mikereidis
1 kW
- Joined
- Jul 24, 2008
- Messages
- 343
Time for a build thread. I'm well along in my design of an Arduino micro-controller based bike mounted Lithium charger, BMS, AH meter and bike computer. This will have features similar to the ebike Cycle Analyst (but more powerful, extensible etc.
)
For the record: The TME balancers I ordered 7 days ago are being "reshipped" today as apparently there was a customs form snafu. I'm regretting this purchase already since I may have my own balancer etc working by the time I actually get the TMEs. Better I get my design/ideas into the "public record" here so nobody tries to claim I copied the TME.
Hey, it's just a standard shunt type balancer; micro based.
I have prototyped the basic building blocks and they are working well. I've hacked together an Arduino shield using spare parts from my last personal hobby micro-controller project in 1985. 20+ year old MCT6 opto-isolators and 2n2222 transistors still work fine, as do IC sockets etc.
Coincidentally that 1985 project measured instantaneous engine RPM on my 79 Mustang Turbo updated every ignition pulse. This project will include same concept to measure instantaneous wheel speed from halls so as to measure speed and acceleration. Good concepts like good components and design never die.
I'll have to try powering up the old 6801 micro; I'd hook it to my bike but I think the code is long gone.
I'm editing this thread and these first posts big time, but I'll leave some of the original post as my design criteria:
- I want it flexible for different chemistries, battery combinations etc. so others can use the design also.
- I want to make it as simple and inexpensive as possible, but with modularity for optional features.
- Fail-safe charging is VERY important. I'm currently using a "$50" manual charger consisting of not much more than a bridge rectifier for 120vac, a heater as a current limiter, and some other switchable loads like a light dimmer and lights. I use the dimmer to constantly trim the average current to try and ensure my highest cells stay at 4.2v or below.
Unfortunately, this: http://www.endless-sphere.com/forums/viewtopic.php?f=14&t=4908&st=0&sk=t&sd=a&start=285#p99779 was the result when I forgot it and left it running over 1 hour at 6-7 amps.
- My batteries are 5 cell LiMn 18.5v nominal, 21v max Canadian Tire Yardworks batteries: http://www.endless-sphere.com/forums/viewtopic.php?f=14&t=4908&st=0&sk=t&sd=a . I'm using 2 banks of 4 in series and may change to 4s2p (batts) AKA 20s2p (cells) at some point. But, I'm now thinking seriously of 5s4p - 5s8p to prolong cell life. I'm still hoping to find some rational way to be able to switch battery pack from high voltage serial to high current parallel on the fly with FETs or whatever; perhaps just a few at the 5 cell level, IE: choice of 5s4p, or 10s2p. Regardless, I want a flexible design that will work with any Lithium batts/cells.
- I want the ability to constantly monitor and record each cell voltage, amperage, and perhaps some
batt temperatures as well.
- Also want the same functionality as Cycle Analyst with more features, and perhaps using GPL code.
- I'd like to use USB or similar to gather voltage etc. data, from a Linux (or Windows, cough, cough) laptop, or from other small computers/devices.
Ideas:
I've considered and rejected some simple solutions to prevent over-voltage, like zener diodes, 7805's in series with diodes, and LM317T linear voltage regulators for reasons I'll be happy to write about if anyone is interested. (Basically voltage regulation for CV phase is not tight enough.)
I keep thinking of an idea I have for cell balancing/protection that requires 2 FETS and a voltage monitor per cell. FET1 is normally on and connects the cell in series with the rest of the pack, assuming cell voltage is less than 4.2v. When cell reaches or exceeds 4.2v, FET1 goes off and disconnects the cell from the series string. Also at that point, FET2 goes on and reconnects the series string but without the cell.
With hysteresis and cell "recovery/relaxation" I think the FETs will switch back and forth in a slow PWM like fashion. Yes, one cell oscillating like this will tend to make many cells oscillate, but I think this will be fine. Even with the whole cell pack at full voltage, the worst that happens is all power goes to the current limiting "resistor" (a 120vac heater).
I may revisit the 2 FET idea, but at the 5 cell level, not at the individual cell level. Reason is that even using low on resistance FETs like 4110 will add 10 milliohms of resistance per module. With 25 milli-ohm cells, that's way too much power wasted in FETs IMO. If I do it at the 5 cell level, I may be able to shoe-horn the auto switching 5s4p to 10s2p feature in.
For now however, I am going with the traditional shunt method of balancing.
Special battery chips approach:
I WAS looking for chips (or modules) that are specifically intended for charging, monitoring, protecting etc. Lithium batts. There are some rather interesting chips available. Some handle 3-4 cells, some only 1 or 2; I'd prefer at least 5 cells as my batts are 5 cell and I'd prefer not to have too many chips.
At least one device ( http://focus.ti.com/docs/prod/folders/print/bq24030.html ) I found has a USB interface, both for charging and for data communications. Supposedly you can set custom charging parameters via USB; I beleive this is just an analog front end; A->D converter(s) would need to be added.
Some of these chips/modules are either limited in current capacity and/or require external transistors to handle higher currents. I'm targetting 12 amps as maximum charging current, but even 4 amps would be nice.
Current approach:
Forget about the special chips. My design now is one single Arduino board for each 5 cell battery with a "shield" board containing a small handful of components. In 5s4p I'd only need one of these combos. In 10s or 20s I'd need 2 or 4. Perhaps another Arduino to collect all the data and handle touchscreen LCD and bike computer/CA type stuff.
DIP based Arduino has 6 analog inputs, SMD based has 8. I'm using DIP and will monitor 5 cell voltages and battery current to use all 6 analog inputs. Cell one goes straight to analog input 1 (through resistor just for safety) with A->D at 5v full scale. Cell N goes to N:1 divider resistors. I can use resistors in megohm range since analog inputs seem to be VERY high impedance. So voltage monitoring will not draw down batteries; I figure 700 years to drain full batts completely.
(Yes, the self discharge is much higher.)
Subtracting the voltages will give each cell voltage. Low cell is accurate/has resolution to 5 mV and top cell accurate to 25 mV. Good enough. Current monitor may be coarse at 5v full scale, so perhaps I'll revisit the 5v decision. There's a 1.1v reference on the chip that might be better. 0.1v drop at 10 amps would be 10 millio-ohms and would give resolution to 1 mV (10 bits) or about 0.1 amps. Good enough for a first try; will revisit later; perhaps a 10:1 op amp gain would work better.
Post is getting too long so shunts in next post.
For the record: The TME balancers I ordered 7 days ago are being "reshipped" today as apparently there was a customs form snafu. I'm regretting this purchase already since I may have my own balancer etc working by the time I actually get the TMEs. Better I get my design/ideas into the "public record" here so nobody tries to claim I copied the TME.
I have prototyped the basic building blocks and they are working well. I've hacked together an Arduino shield using spare parts from my last personal hobby micro-controller project in 1985. 20+ year old MCT6 opto-isolators and 2n2222 transistors still work fine, as do IC sockets etc.
Coincidentally that 1985 project measured instantaneous engine RPM on my 79 Mustang Turbo updated every ignition pulse. This project will include same concept to measure instantaneous wheel speed from halls so as to measure speed and acceleration. Good concepts like good components and design never die.
I'm editing this thread and these first posts big time, but I'll leave some of the original post as my design criteria:
- I want it flexible for different chemistries, battery combinations etc. so others can use the design also.
- I want to make it as simple and inexpensive as possible, but with modularity for optional features.
- Fail-safe charging is VERY important. I'm currently using a "$50" manual charger consisting of not much more than a bridge rectifier for 120vac, a heater as a current limiter, and some other switchable loads like a light dimmer and lights. I use the dimmer to constantly trim the average current to try and ensure my highest cells stay at 4.2v or below.
Unfortunately, this: http://www.endless-sphere.com/forums/viewtopic.php?f=14&t=4908&st=0&sk=t&sd=a&start=285#p99779 was the result when I forgot it and left it running over 1 hour at 6-7 amps.
- My batteries are 5 cell LiMn 18.5v nominal, 21v max Canadian Tire Yardworks batteries: http://www.endless-sphere.com/forums/viewtopic.php?f=14&t=4908&st=0&sk=t&sd=a . I'm using 2 banks of 4 in series and may change to 4s2p (batts) AKA 20s2p (cells) at some point. But, I'm now thinking seriously of 5s4p - 5s8p to prolong cell life. I'm still hoping to find some rational way to be able to switch battery pack from high voltage serial to high current parallel on the fly with FETs or whatever; perhaps just a few at the 5 cell level, IE: choice of 5s4p, or 10s2p. Regardless, I want a flexible design that will work with any Lithium batts/cells.
- I want the ability to constantly monitor and record each cell voltage, amperage, and perhaps some
batt temperatures as well.
- Also want the same functionality as Cycle Analyst with more features, and perhaps using GPL code.
- I'd like to use USB or similar to gather voltage etc. data, from a Linux (or Windows, cough, cough) laptop, or from other small computers/devices.
Ideas:
I've considered and rejected some simple solutions to prevent over-voltage, like zener diodes, 7805's in series with diodes, and LM317T linear voltage regulators for reasons I'll be happy to write about if anyone is interested. (Basically voltage regulation for CV phase is not tight enough.)
I keep thinking of an idea I have for cell balancing/protection that requires 2 FETS and a voltage monitor per cell. FET1 is normally on and connects the cell in series with the rest of the pack, assuming cell voltage is less than 4.2v. When cell reaches or exceeds 4.2v, FET1 goes off and disconnects the cell from the series string. Also at that point, FET2 goes on and reconnects the series string but without the cell.
With hysteresis and cell "recovery/relaxation" I think the FETs will switch back and forth in a slow PWM like fashion. Yes, one cell oscillating like this will tend to make many cells oscillate, but I think this will be fine. Even with the whole cell pack at full voltage, the worst that happens is all power goes to the current limiting "resistor" (a 120vac heater).
I may revisit the 2 FET idea, but at the 5 cell level, not at the individual cell level. Reason is that even using low on resistance FETs like 4110 will add 10 milliohms of resistance per module. With 25 milli-ohm cells, that's way too much power wasted in FETs IMO. If I do it at the 5 cell level, I may be able to shoe-horn the auto switching 5s4p to 10s2p feature in.
For now however, I am going with the traditional shunt method of balancing.
Special battery chips approach:
I WAS looking for chips (or modules) that are specifically intended for charging, monitoring, protecting etc. Lithium batts. There are some rather interesting chips available. Some handle 3-4 cells, some only 1 or 2; I'd prefer at least 5 cells as my batts are 5 cell and I'd prefer not to have too many chips.
At least one device ( http://focus.ti.com/docs/prod/folders/print/bq24030.html ) I found has a USB interface, both for charging and for data communications. Supposedly you can set custom charging parameters via USB; I beleive this is just an analog front end; A->D converter(s) would need to be added.
Some of these chips/modules are either limited in current capacity and/or require external transistors to handle higher currents. I'm targetting 12 amps as maximum charging current, but even 4 amps would be nice.
Current approach:
Forget about the special chips. My design now is one single Arduino board for each 5 cell battery with a "shield" board containing a small handful of components. In 5s4p I'd only need one of these combos. In 10s or 20s I'd need 2 or 4. Perhaps another Arduino to collect all the data and handle touchscreen LCD and bike computer/CA type stuff.
DIP based Arduino has 6 analog inputs, SMD based has 8. I'm using DIP and will monitor 5 cell voltages and battery current to use all 6 analog inputs. Cell one goes straight to analog input 1 (through resistor just for safety) with A->D at 5v full scale. Cell N goes to N:1 divider resistors. I can use resistors in megohm range since analog inputs seem to be VERY high impedance. So voltage monitoring will not draw down batteries; I figure 700 years to drain full batts completely.
Subtracting the voltages will give each cell voltage. Low cell is accurate/has resolution to 5 mV and top cell accurate to 25 mV. Good enough. Current monitor may be coarse at 5v full scale, so perhaps I'll revisit the 5v decision. There's a 1.1v reference on the chip that might be better. 0.1v drop at 10 amps would be 10 millio-ohms and would give resolution to 1 mV (10 bits) or about 0.1 amps. Good enough for a first try; will revisit later; perhaps a 10:1 op amp gain would work better.
Post is getting too long so shunts in next post.