DIY Programmable BMS (now using ATtiny/Arduino)

dmwahl

10 kW
Joined
May 6, 2009
Messages
614
Location
Madison, WI
I've been designing my own BMS recently and I'm wondering if there would be enough interest on the ES forum to make the bare PCBs (or pre-assembled boards) available.

Current features:
8-24 cells in series, although I could easily expand this to support a higher cell count with just a few component changes (higher voltage rated FETs mostly)
Cell balancing using shunt resistors and TL431 regulators, shunt current around 150-200mA (user configurable)
LVC triggers the controller brake input (or an external cutoff circuit)
HVC during charge turns on a PWM circuit to reduce the charge current
The HVC/LVC trip points and PWM duty cycle are configurable by changing resistor values, so it will work with LiFePO4/LiPo/Li-ion or other future chemistries, as well as a range of charging currents.
If you're charging a pack that has been forcibly discharged below the LVC set point, charge current will also be limited until all of the individual cell voltages are all back above the LVC point.

The overall design will be rugged and simple (K.I.S.S.) and as low cost as possible.

Any thoughts/questions/interested people? A few ES members have already expressed interest.

5/8/2013
EDIT:
Since this first post the specs have changed slightly.
It now supports any number of cells in series, although the PWM circuit can only handle charging voltages between about 32V and 125V (ie 8S-32S LiFePO4). It's highly recommended to use the PWM circuit unless the cells are close to balanced already or you're using a balancing charger.


9/16/2013
EDIT:
The analog version of this has turned out to be a pain to produce and I've been experimenting with using an ATtiny microcontroller instead. Will be reprogrammable using the Arduino tools. Skip to the end of page 5 if you want to ignore the analog design discussion. Schematics are halfway down page 8.
 
I'm very interested. So here is the first question:

Does your BMS create a perpetual imbalance on the battery pack it tries to manage?
 
SamTexas said:
I'm very interested. So here is the first question:

Does your BMS create a perpetual imbalance on the battery pack it tries to manage?

Could you clarify the question a bit? Are you wondering if the control circuitry draws power from the first 8 cells only and therefore causes an imbalance? Or some other mechanism?

My last pack was killed by a BMS (signalab) creating (or allowing) imbalance, it was supposedly a balancing bms but the balance current was so low that it would have taken days on the charger after each charge.

No design is perfect, but one of the reasons I'm designing my own is I want to ensure a properly balanced pack all the time.
 
dmwahl said:
SamTexas said:
I'm very interested. So here is the first question:

Does your BMS create a perpetual imbalance on the battery pack it tries to manage?

Could you clarify the question a bit? Are you wondering if the control circuitry draws power from the first 8 cells only and therefore causes an imbalance? Or some other mechanism?
I would like to know if the control circuitry draws power from just a few cells in a pack, or from the pack.

Example: A BMS for n cells (or groups of cells) in series. The control circuitry draws power from m cells in series.
If m = n, then no imbalance is created by the BMS
if m < n, then the BMS is creating a perpetual imbalance.

Which one is yours?

dmwahl said:
... I want to ensure a properly balanced pack all the time.
That is possible/doable if m=n.

If m < n, then it's just hot air. Because the pack is NEVER BALANCED.
 
It will draw equally across all the cells.

The control circuitry is powered by the individual cells when not charging. When charging the PWM circuitry is supplied by the charger itself, and disconnected as soon as you disconnect the charger. This gave a bit more wiggle room on regulator selection.

When the charger is disconnected the only draw is from the individual cell monitors, and they draw about 40 microamps total. At that rate it will take almost 3 years to discharge the pack by 1Ah, ignoring cell self discharge. This could be reduced, but the balancing circuit stability would suffer.
 
dmwahl said:
The control circuitry is powered by the individual cells when not charging...
When the charger is disconnected the only draw is from the individual cell monitors,
So when not in charging mode, does the control circuitry draw EQUALLY ACROSS ALL CELLS? Yes or No?
 
SamTexas said:
dmwahl said:
The control circuitry is powered by the individual cells when not charging...
When the charger is disconnected the only draw is from the individual cell monitors,
So when not in charging mode, does the control circuitry EQUALLY draw ACROSS ALL CELLS? Yes or No?

Yes, the draw across all cells will be equal. Each cell has it's own monitoring circuit, and they are all identical.

There will be some very small variation due to the component tolerances, worst case 2-3%. You will never get perfectly equal draw across the cells. Even using 0.1% resistors for the 431 divider network there will be some inherent imbalance between them.
 
That sounds good. So it appears to me it's a "slave/master" scheme. But that's speculation on my part. Where can I find a high level block diagram?
 
SamTexas said:
That sounds good. So it appears to me it's a "slave/master" scheme. But that's speculation on my part. Where can I find a high level block diagram?

I'll put one together and post it here. I'd scan the one in my notebook but that would just be embarrassing.
 
dmwahl said:
The overall design will be rugged and simple (K.I.S.S.) and as low cost as possible.

"Low cost" means different things to different people. What are the expected costs for a 4s, 7s, 10s and 14s unit.
 
dmwahl said:
SamTexas said:
That sounds good. So it appears to me it's a "slave/master" scheme. But that's speculation on my part. Where can I find a high level block diagram?

I'll put one together and post it here. I'd scan the one in my notebook but that would just be embarrassing.
Can't speak for others, but I value function over form.
 
I'm with you on function being the priority, there are plenty of poorly functioning BMSes out there already, no sense adding another.

I'm still working on the final layout and BOM but I'll post it when I have it.
 
dmwahl said:
I've been designing my own BMS recently and I'm wondering if there would be enough interest on the ES forum to make the bare PCBs (or pre-assembled boards) available.

I am interested. Thanks for your work so far.
 
dmwahl said:
Any thoughts/questions/interested people? A few ES members have already expressed interest.

I would be interested in board(s). I live 1.5 hr from you. Will you be sending data out of a com port so I can capture the data on my cpu board so I can display cell status? I would like to read battery temperature at some point. Using common thermistors. I can populate the boards.
 
emiyata said:
dmwahl said:
Any thoughts/questions/interested people? A few ES members have already expressed interest.

I would be interested in board(s). I live 1.5 hr from you. Will you be sending data out of a com port so I can capture the data on my cpu board so I can display cell status? I would like to read battery temperature at some point. Using common thermistors. I can populate the boards.

This one is a purely analog design, so no com ports. At some point I'd like to do a microprocessor version that would include a data port, but there's a lot more work involved in that. What cpu board are you using?
 
dmwahl said:
This one is a purely analog design, so no com ports. At some point I'd like to do a microprocessor version that would include a data port, but there's a lot more work involved in that. What cpu board are you using?
I am using a Arduino Nano 3.0 with ATMEGA328. In time I could connect another one up and read analog voltages and send the data to the main cpu . The cpu boards are like $10. Reading voltages using test points keeps the board looking clean and not so hacked up. If traces need to be cut so that DACs can replace analog ref voltages, the use of two triangles on a trace pointing at each would be nice .
If you need parts contact me I may have the parts you need. Lots of analog parts in bins. Your not that far away and my sister lives in Madison and I make it there from time to time.
 
emiyata said:
dmwahl said:
This one is a purely analog design, so no com ports. At some point I'd like to do a microprocessor version that would include a data port, but there's a lot more work involved in that. What cpu board are you using?
I am using a Arduino Nano 3.0 with ATMEGA328. In time I could connect another one up and read analog voltages and send the data to the main cpu . The cpu boards are like $10. Reading voltages using test points keeps the board looking clean and not so hacked up. If traces need to be cut so that DACs can replace analog ref voltages, the use of two triangles on a trace pointing at each would be nice .
If you need parts contact me I may have the parts you need. Lots of analog parts in bins. Your not that far away and my sister lives in Madison and I make it there from time to time.

I wasn't planning on adding voltage reference points, primarily because through hole components are pretty easy to take readings off of. You could also use the header for the cell connections. I attached a screenshot of part of the board. P104 on the far left is the cell connections. Pin 1 is the negative terminal of cell 1, pin 2 the positive terminal of cell 1, pin 3 the positive terminal of cell 2, and so on. Will that meet your needs or did you have something else in mind?
4-cell_routed.png
 
dmwahl said:
I wasn't planning on adding voltage reference points, primarily because through hole components are pretty easy to take readings off of. You could also use the header for the cell connections. I attached a screenshot of part of the board. P104 on the far left is the cell connections. Pin 1 is the negative terminal of cell 1, pin 2 the positive terminal of cell 1, pin 3 the positive terminal of cell 2, and so on. Will that meet your needs or did you have something else in mind?
I was thinking you had surface mount parts and they are harder to mount wires. You are using through hole so everything should be fine. In a high vibration environment things need to be fairly stable.
If you are ordering parts I will need need some. Just msg me. I can send you money. If not I will need a BOM so I can order parts. Also if you have a BOM you can send me I have lots of new analog parts and could see what I have in my bins to reduce the cost of building the boards.
 
emiyata said:
dmwahl said:
I wasn't planning on adding voltage reference points, primarily because through hole components are pretty easy to take readings off of. You could also use the header for the cell connections. I attached a screenshot of part of the board. P104 on the far left is the cell connections. Pin 1 is the negative terminal of cell 1, pin 2 the positive terminal of cell 1, pin 3 the positive terminal of cell 2, and so on. Will that meet your needs or did you have something else in mind?
I was thinking you had surface mount parts and they are harder to mount wires. You are using through hole so everything should be fine. In a high vibration environment things need to be fairly stable.
If you are ordering parts I will need need some. Just msg me. I can send you money. If not I will need a BOM so I can order parts. Also if you have a BOM you can send me I have lots of new analog parts and could see what I have in my bins to reduce the cost of building the boards.

I was originally going to use surface mount parts since they're cheaper and smaller (so the PCB would be cheaper) but I decided against it since I wanted to make this available to the DIY crowd. I'll post a BOM when it's complete.

My estimate on the BOM cost (based on Mouser pricing) will be around $7 plus about $1.50 per cell. Most quantity discounts start around 25-100, so if you're building multiples then the cost will decrease.
 
dmwahl said:
My estimate on the BOM cost (based on Mouser pricing) will be around $7 plus about $1.50 per cell. Most quantity discounts start around 25-100, so if you're building multiples then the cost will decrease.
I would guess I would build 10 4 cell units to start with and go from there. Ordering that quantity I assume you bread boarded the design and works for the most part.
 
emiyata said:
dmwahl said:
My estimate on the BOM cost (based on Mouser pricing) will be around $7 plus about $1.50 per cell. Most quantity discounts start around 25-100, so if you're building multiples then the cost will decrease.
I would guess I would build 10 4 cell units to start with and go from there. Ordering that quantity I assume you bread boarded the design and works for the most part.

The current one only supports down to 8 cells with the charge throttling (PWM) circuit, although it would work on smaller packs with a few modifications. The individual cell monitors (LVC, HVC, balancing) will work on any number of cells. If you're interested in the charge throttling on your 4 cell packs then I can modify the schematic to support that as well but it will take some time. I've been considering doing a stand-alone charger controller to go between a pack and the charger as well, one thing at a time though :)

What are you building the 4S packs for? Are they LiFePO4 or some other chemistry?
 
dmwahl said:
What are you building the 4S packs for? Are they LiFePO4 or some other chemistry?
I was assuming you are using many boards if you run higher voltage 4s is your smallest size. I will use laptop batteries lots of them on a cargo bike. I will run 13-14s 30-40 ah. You are making a bigger board and people just populate what they need? I guess without a block diagram I have no idea how it will work. The features sound good. Have you bread boarded this BMS?
 
Back
Top