# Looking at making my own BMS



## bradleyk (Apr 3, 2013)

hey,
after looking for a cheap digital BMS and could find one i have decided to make my own.

i was just looking for some advice and to see if i have missed anything.
im looking at $2 per cell.


 bypass mosfet
 attiny85 per cell
 voltage report of each cell back to master via serial bus.

i need to monitor 30 cells. so i will be using a semi centralised system, i will have 6 boards and each will look after 5 cells

i have made 3 cells on a breadboard. works fine so far. need to finish the code before i make a pcb.


----------



## PStechPaul (May 1, 2012)

You might check the thread on BMS Design Guidelines where several of us have discussed various designs. I think you may have some incorrect part values, particularly the 100k in series with the optos (probably 1.00k). Another thing is the gate drive circuit for the MOSFET, which may not provide enough voltage for turn-on. You should be able to drive the gate directly, maybe through a small resistor. Also, the current flowing in the sense leads during top balancing or charge shunting will give a lower voltage reading for the ADC. The voltage divider to the ADC seems to be too high, although again maybe it's 1.00k and not 100k. Make sure the ATTiny has an internal voltage reference so you get an accurate reading.

It appears that you have multiple optocouplers tied to a common line, which is OK as a wire-OR logic to shut down the charger on any cell reaching maximum voltage, but for serial comm the processors need to be synchronized. The other optocouplers seem to form a "daisy chain" which could receive and send packets of data along the chain. How will this be implemented? 

If used only for charging, it may not be an issue, but the circuits will draw a considerable amount of current. You might be able to use a low power "sleep" mode, and wake up the processor only once every few seconds, but the external voltage dividers will still be in the circuit. You can use CMOS analog switches but that adds complexity and cost. 

I thought I could build a BMS for about $2/cell, and it may be possible in high volume or if you use surplus parts and perfboards. But for a practical product, even as open source, you really need to consider having PCBs made and handling parts kits and soldering and cleaning and testing and...

The $5 and $10 Mini-BMS products now look a lot more reasonable.


----------



## bradleyk (Apr 3, 2013)

PStechPaul said:


> You might check the thread on BMS Design Guidelines where several of us have discussed various designs. I think you may have some incorrect part values, particularly the 100k in series with the optos (probably 1.00k). Another thing is the gate drive circuit for the MOSFET, which may not provide enough voltage for turn-on. You should be able to drive the gate directly, maybe through a small resistor.


i will fix up the circuit diagram tonight, lots of those resistor values are incorrect. 
i don't want the mosfet to turn on completely, i am going to be using the mosfet as the shunt(im thinking could be a bad idea) might swap to a resistor. 


PStechPaul said:


> Also, the current flowing in the sense leads during top balancing or charge shunting will give a lower voltage reading for the ADC. The voltage divider to the ADC seems to be too high, although again maybe it's 1.00k and not 100k. Make sure the ATTiny has an internal voltage reference so you get an accurate reading.


i am using the 1.1v internal refenece
the attiny has a 100Mohm adc impedance, so 100k should be fine


PStechPaul said:


> It appears that you have multiple optocouplers tied to a common line, which is OK as a wire-OR logic to shut down the charger on any cell reaching maximum voltage, but for serial comm the processors need to be synchronized. The other optocouplers seem to form a "daisy chain" which could receive and send packets of data along the chain. How will this be implemented?


the tiny's only need to receive a clear to send from the master.
the "daisy chain" is the clear to send, and the "common" is held high by the master. and pulled low by each slave one at a time.


PStechPaul said:


> If used only for charging, it may not be an issue, but the circuits will draw a considerable amount of current. You might be able to use a low power "sleep" mode, and wake up the processor only once every few seconds, but the external voltage dividers will still be in the circuit. You can use CMOS analog switches but that adds complexity and cost.


the processors are planned to sleep until interrupt("daisy chain") wakes them up. then they will go back to sleep


PStechPaul said:


> I thought I could build a BMS for about $2/cell, and it may be possible in high volume or if you use surplus parts and perfboards. But for a practical product, even as open source, you really need to consider having PCBs made and handling parts kits and soldering and cleaning and testing and...
> 
> The $5 and $10 Mini-BMS products now look a lot more reasonable.


i have my own pcb mill. so making pcb's is free for me 
at this current point of time i don't plan to sell kits.


----------



## smpavlik (Mar 28, 2011)

bradleyk said:


> hey,
> after looking for a cheap digital BMS and could find one i have decided to make my own.
> 
> i was just looking for some advice and to see if i have missed anything.
> im looking at $2 per cell.


I've almost done with a project like this. My BMS is also based on Tyni45/85 and costs less then $2 per cell. I plan to share my design shortly.


----------



## dougingraham (Jul 26, 2011)

The big problem with a setup like the one you have designed is that every cell is loaded differently and so you are unbalancing the pack just by having them connected. Another problem is that you are using the internal reference on the CPU for the measurement reference and since they are no better than a couple of percent there is going to be a considerable difference between the voltage readings. You have to operate them at 5 volts and with an external precision voltage reference (usually 4.096 v) to get reasonable accuracy. The spec sheet shows a range of 2.3 to 2.8 volts for the internal 2.56v reference.

You will want a current limiting resistor inline with the FET and probably a fuse as well so when the cpu locks up and the FET is turned on or fails on you don't burn the car down. A current limiting resistor would also let you measure the current you are shunting if there is another A/D input available.

After living with these batteries for well over a year I am firmly in the camp of knowing you can be your own BMS. If you know enough to design a circuit like this you know enough to not need it. As an engineer and scientist I wanted the data but I certainly dont need it. The cells don't self discharge in any meaningful way so the only way to imbalance them is by adding varying loads to individual cells. So in the end you have added a device which will imbalance your pack and adds a parasitic load that is impossible to turn off. And the only advantage to having it is it will tell you which cell has gone bad. It won't prevent you from having one go bad and it adds a lot of potential failure modes.

Save the money and time you would spend on making these and buy a power Lab or iCharger and thoroughly test every cell before you assemble your pack. Buy a few extra cells and keep out the worst of the lot as spares. Your pack is only as good as the worst cell in it.


----------



## bradleyk (Apr 3, 2013)

dougingraham said:


> The big problem with a setup like the one you have designed is that every cell is loaded differently....


i agree with most of this, but i want to know cell voltages, i know that there isn't a need for it, but that is who i am. the parasitic load should be around 35 microamperes when sleeping per cell. i have added a current limiting resistor and dropped the bypass current down to 500ma


----------

