Posted February 14, 20223 yr I am contemplating another DIY project, which would require a BIG BMS, and was contemplating what it would take to make a really cheap and simple cell-top BMS. Here is a really crude diagram of what I have so far: The microprocessor can be just about anything capable of running off a power supply between 2V and 3.8V, with 8 IO ports, 2 UARTS (or capable of 2 software UARTS at 115kbps) and one ADC capable of measuring the supply voltage. The charge pumps can be driven off an H-bridge motor controller, and should easily be able to push 1A up (or down) to the next cell each. Comms between adjacent cells is by simple capacitive coupling. Only one channel is shown, but each cell will require 4 (RX and TX each for the cell above and below). Back of the envelope calculations show 115kbps is easily sustained, and simulations agree. A simple token passing algorithm should allow polled messages to be passed up and down the chain quickly enough that 200 cells could be sampled 10x per second. Would also need a dedicated low side (or high side) module to control the comms, measure current, and control a contactor. It should be possible to build the basic cell-top units for around R20 each - if this idea works. Any body got some critique and/or better ideas before I go down this rabit hole?
February 14, 20223 yr I've considered coding my own using STM32 because they are like R30 a pop (or used to be, haven't checked again lately) for the "blue pill" variant. Which has 2 x 12bit ADCs capable of some serious SPS (I used one to sample AC voltage and my meter is hitting 10kSPS x2 @ 12bit). My biggest thing is, having gone down the energy meter route, I realized that you end up spending a lot more than what you could buying something. And with the energy meter my motivation was the sample rate. I wanted basically an oscilloscope to see what is happening in terms of spikes coming in on my AC mains. But for a BMS there aren't any features I feel I'm missing. Saving money is definitely not a factor because the amount of hours you'll be putting in is going to be insane.
February 15, 20223 yr Author Ideal MCU would probably be ATTINY424 - runs from 1.8V to 5.5V, 2 UARTS, etc. No need for buck regulators or anything funny to run it over the full cell voltage range. Time is not really an issue, because I do these designs for fun. Although, once you start on a 150S BMS, cost savings can still be a thing...
February 15, 20223 yr 1 hour ago, JustinSchoeman said: Ideal MCU would probably be ATTINY424 Ideal maybe from voltage range perspective. But they are/were pretty expensive, 8 bit and pretty low on memory. I'm not sure about the ATTiny424 but the ATMega have internal band gap which you'll need to use with a voltage divider if you have any hope of accuracy. Else you are using your variable VCC for the ADCs comparator. On the plus side the ATMega ADC using the band gap is super stable and really good for a 10bit ADC. I'm not a big fan of the ATTiny's they are/were far more expensive than modern micros like STM32 with significantly lesser specifications so I haven't much experience (except ATTiny13a which I bought x20 once for like R2 each, but they are hopelessly under specced for something like this). Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Author 12 minutes ago, Gnome said: Ideal maybe from voltage range perspective. But they are/were pretty expensive, 8 bit and pretty low on memory. I'm not sure about the ATTiny424 but the ATMega have internal band gap which you'll need to use with a voltage divider if you have any hope of accuracy. Else you are using your variable VCC for the ADCs comparator. On the plus side the ATMega ADC using the band gap is super stable and really good for a 10bit ADC. I'm not a big fan of the ATTiny's they are/were far more expensive than modern micros like STM32 with significantly lesser specifications so I haven't much experience (except ATTiny13a which I bought x20 once for like R2 each, but they are hopelessly under specced for something like this). The chips are R9 a pop - expensive for what it does, but cheap enough. No need for any dividers or anything. Just use Vcc as the ADC reference, and measure the bandgap voltage. With a known voltage, you can calculate back to what Vref (and thus Vcc) is. All set from internal muxes, and no external pins required. Gives about 5mV accuracy in testing. Plenty of CPU horse power for what is needed (just measure and relay voltages over the serial port). Charge pumps are directly driven from the counter/timer units, so only need to set the frequency. Most complex logic is deciding which direction, and how much to pump, and that can easily fit in 4k. Add in the ability to run off one cell without a buck-boost regulator, and you have a winner.
February 15, 20223 yr 19 minutes ago, JustinSchoeman said: The chips are R9 a pop - expensive for what it does, but cheap enough. Where?? 19 minutes ago, JustinSchoeman said: No need for any dividers or anything. Just use Vcc as the ADC reference, and measure the bandgap voltage. With a known voltage, you can calculate back to what Vref (and thus Vcc) is. All set from internal muxes, and no external pins required. Gives about 5mV accuracy in testing. Yeah that def. won't work. Your battery is always going to be VCC so you will never have a value that isn't the ADC maximum. Measuring the band gap is effectively your voltage. No point measuring anything but the band gap then. Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Author 3 minutes ago, Gnome said: Where?? Digikey 3 minutes ago, Gnome said: Yeah that def. won't work. Your battery is always going to be VCC so you will never have a value that isn't the ADC maximum. Measuring the band gap is effectively your voltage. No point measuring anything but the band gap then No - you measure the bandgap voltage, with the reference being Vcc. So the ADC output is about 1/3 range (1.1V of 3.6V). Lose 1 bit of precision due to reduced range, but otherwise it works perfectly. Already tested.
February 15, 20223 yr 3 hours ago, JustinSchoeman said: No - you measure the bandgap voltage, with the reference being Vcc. So the ADC output is about 1/3 range (1.1V of 3.6V). Lose 1 bit of precision due to reduced range, but otherwise it works perfectly. Already tested. Yep I thought maybe you meant that, IIRC I did the same with a "voltmeter" project I did early on when I just started out 3 hours ago, JustinSchoeman said: Digikey I've only used RS locally, have you used them before, what is the shipping cost and stuff like? Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Author 6 minutes ago, Gnome said: I've only used RS locally, have you used them before, what is the shipping cost and stuff like? Shipping is free over R2000. And then VAT and duties. Otherwise shipping is R600. But you can place smaller orders through NuVision - then it is only local courier, but they have a nominal handling fee on top.
February 15, 20223 yr 30 minutes ago, JustinSchoeman said: Shipping is free over R2000. And then VAT and duties. Otherwise shipping is R600. But you can place smaller orders through NuVision - then it is only local courier, but they have a nominal handling fee on top. Ok bit more than RS but good to have the option. I buy a lot of stuff from eBay or Banggood, but precision stuff like reference, op-amps, etc. I don't particularly trust I'll get what I paid for (so used RS instead). Capacitors especially, I simply don't believe Chinese sellers when they advertise something that says Nippon Chemi-Con/Nichicon/Rubycon/Panasonic on it. The jellybean stuff like 2n2222 and such I've never been disappointed on eBay/Banggood. Always get parts that perform per data sheet and you get a crapload of them for super cheap. EDIT: Also sorry for derail, we can get back on topic now 😛 Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Since I got distracted on other stuff, I may as well see if I can contribute some thoughts. But I haven't got your LTSpice sim so I'm obviously going to only be able to contribute questions. 19 hours ago, JustinSchoeman said: The charge pumps can be driven off an H-bridge motor controller, and should easily be able to push 1A up (or down) to the next cell each. Are you actually going to use an H-Bridge or discrete components. In your diagram it looks like discrete components, which I assume is the chip you want to use? The idea of this being to increase voltage to equalize cells? How will you limit the maximum voltage on the charge pumps? 19 hours ago, JustinSchoeman said: Comms between adjacent cells is by simple capacitive coupling You want each cell to be isolated from the next I gather? So no wires? Perhaps I'm misunderstanding what you mean here. I would probably try something like PC817, should be good for low speed comms and super cheap. Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Author The 'schematic' is just a drawing with placeholder components for now, until I actually flesh out the design. H-bridge I was planning on KA7405 - available for R0.90 a pop, and suitable for pumping about 1A continuous. The charge pump increases the voltage so that the last capacitor ends up dumping most of its charge into the next (or previous) cell in the chain. No need to limit the maximum voltage, as any extra voltage will just dump charge from earlier caps too, which is a bonus. I started with opto-isolation, but it was either too expensive, or too slow. The current plan is to use caps as shown in the drawing. The resistor will keep the cap charged to the voltage difference between adjacent cells, so any signals generated will be level shifted to the same range as the next cell. Ends up costing about R1.50 per channel (and you need 4 per cell). Still have perfect galvanic isolation, so should be fine - especially with the low voltages between adjacent cells. Each board will have 3 wires each to the adjacent board - Rx, Tx and charge.
February 15, 20223 yr 14 minutes ago, JustinSchoeman said: The 'schematic' is just a drawing with placeholder components for now, until I actually flesh out the design. H-bridge I was planning on KA7405 - available for R0.90 a pop, and suitable for pumping about 1A continuous. The charge pump increases the voltage so that the last capacitor ends up dumping most of its charge into the next (or previous) cell in the chain. No need to limit the maximum voltage, as any extra voltage will just dump charge from earlier caps too, which is a bonus. But the point of this is equalization? What if the next cell is at equilibrium? You'll end up pumping current along the batteries right? 14 minutes ago, JustinSchoeman said: I started with opto-isolation, but it was either too expensive, or too slow. The current plan is to use caps as shown in the drawing. The resistor will keep the cap charged to the voltage difference between adjacent cells, so any signals generated will be level shifted to the same range as the next cell. Ends up costing about R1.50 per channel (and you need 4 per cell). X/Y class or just YOLO it and hope none break closed 😛 ? Getting about 50xPC817 at less than R1 per still works out a bit more, but I think it should work? Or are they too slow/unreliable at the target baud?
February 15, 20223 yr Author 18 minutes ago, Gnome said: But the point of this is equalization? What if the next cell is at equilibrium? You'll end up pumping current along the batteries right? The amount of charge transferred is frequency dependent, so you can go from DC (0A) to around 100kHz (1A) more-or-less linear. You know your neighbour's voltage from the comms channel, so adjust frequency accordingly. 18 minutes ago, Gnome said: X/Y class or just YOLO it and hope none break closed 😛 ? Getting about 50xPC817 at less than R1 per still works out a bit more, but I think it should work? Or are they too slow/unreliable at the target baud? Fail closed would just leave the microcontroller driving into a diode, and pin current limits should prevent damage. Token timeouts would pinpoint the failure to the comms master. If a cap should fail (which is extremely rate in low voltage ceramics), there will be no damage other than a controlled BMS shutdown. EDIT: Remember that the cap sees at most 2 cell's voltage - so 7.3V, and I will probably be using 63V caps in this application. Edited February 15, 20223 yr by JustinSchoeman
February 15, 20223 yr 11 minutes ago, JustinSchoeman said: EDIT: Remember that the cap sees at most 2 cell's voltage - so 7.3V, and I will probably be using 63V caps in this application. Yes but it isn't galvanic isolation... There is no galvanic isolation unless actual components specified for that purpose are used. Yes the worst case in your current design is nothing critical, but calling it galvanic isolation could lead to some dangerous assumptions that don't hold in failure cases. And you'd need to keep that in mind as your design evolves. Just saying. 11 minutes ago, JustinSchoeman said: The amount of charge transferred is frequency dependent, so you can go from DC (0A) to around 100kHz (1A) more-or-less linear. You know your neighbour's voltage from the comms channel, so adjust frequency accordingly. I totally get how it works. I think my point is, if your highest and lowest cells are opposite ends, it'll take a lot of push pull to get them to equilibrium. Essentially charging up and discharging through a chain. I'm not sure how active balancers work, I guess they may work like this, but I would have hoped they can directly allow a high cell to charge a low cell and so on to avoid this kind of load on other cells. Edited February 15, 20223 yr by Gnome
February 15, 20223 yr Author Well, it meets the technical definition of galvanic isolation, and since the isolation voltage is so low, it requires no safety rating. All active balancers work on chained banks. At best, they can directly charge 4 or 5 cells away. So there is always some form of 'bucket brigade' for moving charge to distant cells. But if you add some more global logic, you can fuzz it by telling all cells between the high and low to transfer at the same rate, and have a continuous 1A flowing from the highest cell to the lowest, no matter where they are. But that 1A does flow through each individual cell along the way.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.