# Cheap DIY BMS



## Woodsmith (Jun 5, 2008)

Whoosh! Straight over my head!

Given what you achieve when you 'Cheap DIY' I am looking forward to this being simple enough that even I 'get it'.



As an OT aside, Simon, I never did update you on the cad drawing you did for me. Having done a load of design and testing using your drawing the client went quiet for quite a while and then announced another solution had been found and will be used instead.
I finally got my test components back last weekend.


----------



## Elithion (Oct 6, 2009)

SimonRafferty said:


> Winston 90Ah ones x 60 cells... any type of monitoring / balancing solution will cost as much as the batteries


I beg to differ:


90Ah ones x 60 cells = $ 6750
BMS for 60 cells: $ 810 ~ 860
A good reason to build your own BMS (and I am all for you doing it, especially with BMS design guidance), is the fun and the experience. If you think you'll save money building your own BMS, I am afraid that you will be disappointed.


----------



## njloof (Nov 21, 2011)

I was gonna say the same -- batteries are much more expensive than a BMS.

For me, just having the individual cell data is worthwhile even if I never hooked the BMS up to the controller or charger (but I will...)


----------



## SimonRafferty (Apr 13, 2009)

Elithion said:


> If you think you'll save money building your own BMS, I am afraid that you will be disappointed.


It's funny, when I built my charger - there were a number of people who said the same, and were wrong.
When I built my speed controller (3 phase vector) - same thing.

While I'm sure that I will get some enjoyment & education out of building my own - this kind of statement is very condescending. This forum, after all is called *DIY*electriccar. While I agree that people need to decide which bits of a build they can DIY and which bits they need to buy a ready made solution - if you take that attitude to its natural conclusion, we should all go out and buy a Nissan Leaf and not bother trying to do it yourself.

It's actually a common theme on DIY forums - that they, on the whole are negative about DIY.

The parts list for 60 cells, supplied by RS (who are relatively expensive) comes out at £140 / $232 including PCB's and a microcontroller with 4" touch screen (ByVac.co.uk) - obviously plus the time to build it and write the code. On the plus side, I can write the code to talk to my charger and speed controller.


----------



## Elithion (Oct 6, 2009)

I said:



Elithion said:


> I am all for you doing it


As you see, I totally agree with you.


----------



## SimonRafferty (Apr 13, 2009)

Elithion said:


> I said:
> Please don't twist my words 180 degrees.


I'm sorry - I must have misunderstood the rest of your post?!

If you have something constructive to contribute - then please do so. Telling me that what I'm doing will be a waste of time and I'm better off buying one from your company is not helpful.

If you (any of you) feel that I'm better off not having a go - that's fine, you are entitled to your opinion and if I fail - you will have the satisfaction of knowing you were right - but do you really need to share it?


----------



## jddcircuit (Mar 18, 2010)

SimonRafferty said:


> I've been thinking about changing to LiFePo4 batteries (probably Winston 90Ah ones x 60 cells). The main disincentive at the moment is that any type of monitoring / balancing solution will cost _*Edit* A good proportion_ as much as the batteries - which doesn't feel good value to me!
> 
> Top balancing is fairly easy with a zenner referenced shunt switched in by a power transistor - similar to many of the others available.
> 
> ...


Simon,
I reckon that it can work. I am all about the DIY aspect of things and I encourage you to proceed. I actually have a prototype BMS working that has some strong similarities to your approach. The company I work for pursued patent on it so I am not supposed to discuss it until it is made public by the patent disclosure. Then every DIY'er can copy it if they want. At least now I am able to work on my hobby some and get paid for it.

My BOM cost worked out to be about $2.00 per cell ordering from Mouser and ExpressPCB. I would like to get it even cheaper in quantity.

I was only focusing on low cost cell voltage monitoring with minimal parasitic current draw (less than 100uA). The similarity of our approach is related to the sequential and time based signaling approach.

Regards
Jeff


----------



## TexasCotton (Sep 18, 2008)

Elithion said:


> I beg to differ:
> 
> 
> 90Ah ones x 60 cells = $ 6750
> ...


I am afraid of domestic mfg. who engage in Obfuscation http://en.wikipedia.org/wiki/Obfuscation and above statements. I guess a fair statement is some domestic EV vendors/mfg are not into open source or fair trade practices


----------



## SimonRafferty (Apr 13, 2009)

jddcircuit said:


> Simon,
> The similarity of our approach is related to the sequential and time based signaling approach.


Thanks Jeff - it seemed like the lowest cost, machine readable way of doing it.
I'd initially considered using something like ATTiny processors - but even they are too expensive at one per cell and don't have the ADC resolution to measure 4 cells in series (as you can only have a single ground), so the resolution is effectively / 4.
Although charging a capacitor is crude, with a max pulse length of 1.2ms, it should be able to achieve the equivalent of 10 to 12 bit resolution for each cells voltage fairly easily with even a low cost microcontroller as the monitor.

The bit that's missing from this is monitoring the cell temperature - I'm still thinking about that one. Wondering if it would be reasonable to assume each block of 4 cells will be at the same temperature - do you really need the individual temperatures?

Si


----------



## corbin (Apr 6, 2010)

TexasCotton said:


> I am afraid of domestic mfg. who engage in Obfuscation http://en.wikipedia.org/wiki/Obfuscation and above statements. I guess a fair statement is some domestic EV vendors/mfg are not into open source or fair trade practices


Hopefully you don’t use Windows. It is produced by a domestic manufacturer...and it isn’t open source.

corbin


----------



## Siwastaja (Aug 1, 2012)

ATTiny25, £0.386 per piece from Mouser when you buy 100 . With integrated temperature sensor, ADC, and differential ADC with integrated 20x gain if you want to measure shunting current, but you probably won't need to. 

You can consider shunting only 20 mA directly from IO to an SMD resistor to decrease part count and simplify the PCB, that amount should account for the small imbalance that develops from differences in self discharge, charge efficiency and BMS cell module quiescent current mismatch. Higher balancing currents may be needed with different chemistries or large batteries.

Sleep the processor most of the time, and if you have resistor dividers, make them big enough so that they won't discharge your cells. Add some capacitive filtration for noise immunity.

That only leaves you the communication. With level shifting, you don't need to optoisolate every link, but optoisolating is not that expensive either and seems easier to me. It will double your component cost to about £1 total per cell board but I think it's worth it. 

One module per cell is simple, robust, scalable, with least amount of wire spaghetti, and you get the temperature measurement for every cell for free.

DIY BMS is cheap if you know what you are doing and if you have a lot of time. It's all about the "development" part of the R&D.


----------



## SimonRafferty (Apr 13, 2009)

Siwastaja said:


> ATTiny25, £0.386 per piece from Mouser when you buy 100


I didn't realise they could be had that cheap - i'd not looked very hard and pretty much discounted the idea based on the cost of buying one.

I'll order some! I really like the ATTiny platform.



Siwastaja said:


> DIY BMS is cheap if you know what you are doing and if you have a lot of time. It's all about the "development" part of the R&D.


I'm never sure I _really_ know what I'm doing and never have enough time - but always seem to muddle through and find the time in the end! R&D is what I do for a living and for fun. 
I prefer to employ people who don't profess to know what they are doing as I find 'experts' often rule out ideas they think are impossible or impractical - and just sometimes they miss the most elegant solution! 

Si


----------



## Siwastaja (Aug 1, 2012)

SimonRafferty said:


> I prefer to employ people who don't profess to know what they are doing as I find 'experts' often rule out ideas they think are impossible or impractical - and just sometimes they miss the most elegant solution!


Yea -- it's not unusual that people who claim to be experts don't have a slightest clue about what they are doing.

It's pretty difficult to see on the outside; only the time will tell.

Real expertise is all about understanding the most basic (beginner level) things. Many experts are lacking exactly there. Understanding the basics well enables grasping new concepts quickly and thinking outside the box (box being a complex idea of a certain solution)


----------



## jddcircuit (Mar 18, 2010)

SimonRafferty said:


> Thanks Jeff - it seemed like the lowest cost, machine readable way of doing it.
> I'd initially considered using something like ATTiny processors - but even they are too expensive at one per cell and don't have the ADC resolution to measure 4 cells in series (as you can only have a single ground), so the resolution is effectively / 4.
> Although charging a capacitor is crude, with a max pulse length of 1.2ms, it should be able to achieve the equivalent of 10 to 12 bit resolution for each cells voltage fairly easily with even a low cost microcontroller as the monitor.
> 
> ...


I have a 4ms RC time constant right now for 3 cell group. The circuit is stable and definitely accurate enough to manage over or under voltage conditions (+/- 1%). Perhaps good enough to manage cell behavior under loads to get an idea of internal resistance. It is only drawing 15 micro amps from the cells. The interval pulses are level shifted and propagated through the daisy chain of 3 cell group circuits to end of chain opto isolation to my micro. I am using an arduino to measure the time intervals and then sending it over the USB to an android tablet for logarithmic calculations to correct for non-linearities and then graphical display of the cell voltages.

I have 30 40ah cells in series right now but going up to 100 cells in my conversion.


Jeff


----------



## sholland (Jan 16, 2012)

Why not just use a part designed for this application that's already available?


----------



## Siwastaja (Aug 1, 2012)

Because those parts typically are completely unusable or difficult to use in large packs. Maybe some day we have usable chips for that but I doubt it. A programmable CPU is just perfect tool for the job. There are no special HW tasks there, and quite a bit of state machine logic needed. This just is a job for a general purpose MCU.

Not saying it's impossible. Using those chips in anything else than laptop battery pack just has poor track record. OTOH, the link you provide gives a great list of features. You just need to remember that a feature list for any IC product is typically half bogus. To give an example, a 2 kW three-phase Intelligent/Integrated Power Module we have a lot sports an "automatic overcurrent protection" as a feature, which, when you read the datasheet carefully, is nothing else than a "drive enable" input so that you can do your own overcurrent protection from scratch and connect it to that very pin. This kind of marketing con is very typical when shopping IC's, and even if the feature was there, it's probable that it just doesn't work.

Most MCU's, on the other hand, have a well proven track record in a large scale of different applications, and they're great when you want to have a flexible system, which absolutely is the case in a large battery BMS. For example, you can select between fully distributed, tree-distributed, or a centralized system.


----------



## Elithion (Oct 6, 2009)

The TI bq76PL536 is indeed a good IC for a BMS for large traction packs; indeed, of all the great ICs that TI makes, that one is the only one that is appropriate for a large BMS.

Here is a List of BMS ICs that are appropriate for BMSs for large traction packs.


----------



## sholland (Jan 16, 2012)

Siwastaja said:


> Because those parts typically are completely unusable or difficult to use in large packs. Maybe some day we have usable chips for that but I doubt it. A programmable CPU is just perfect tool for the job. There are no special HW tasks there, and quite a bit of state machine logic needed. This just is a job for a general purpose MCU.
> 
> Not saying it's impossible. Using those chips in anything else than laptop battery pack just has poor track record. OTOH, the link you provide gives a great list of features. You just need to remember that a feature list for any IC product is typically half bogus. To give an example, a 2 kW three-phase Intelligent/Integrated Power Module we have a lot sports an "automatic overcurrent protection" as a feature, which, when you read the datasheet carefully, is nothing else than a "drive enable" input so that you can do your own overcurrent protection from scratch and connect it to that very pin. This kind of marketing con is very typical when shopping IC's, and even if the feature was there, it's probable that it just doesn't work.
> 
> Most MCU's, on the other hand, have a well proven track record in a large scale of different applications, and they're great when you want to have a flexible system, which absolutely is the case in a large battery BMS. For example, you can select between fully distributed, tree-distributed, or a centralized system.


All due respect but you don't know what you are talking about. This part was designed for large packs. There are many others too. A microcontroller is a good solution but not the most reliable thing to put in a HV traction pack.


----------



## JoeG (Jul 18, 2010)

I just found that chip at amazon for $17.20 EA on amazon. Kind of pricey, since you would need 8($137.20) for a 45S pack. My current low cost system, 6 ea 19$ cellogMs system cost about $120 total, with relays. Attached is a diagram of the system that I based mine on.


----------



## sholland (Jan 16, 2012)

JoeG said:


> I just found that chip at amazon for $17.20 EA on amazon. Kind of pricey, since you would need 8($137.20) for a 45S pack. My current low cost system, 6 ea 19$ cellogMs system cost about $120 total, with relays.


$10.34 each at quantity 10 on digikey.com. Cheaper if you ask for some samples .


----------



## Otmar (Dec 4, 2008)

JoeG said:


> I just found that chip at amazon for $17.20 EA on amazon.


Much cheaper at http://www.findchips.com/


----------



## sholland (Jan 16, 2012)

Otmar said:


> Much cheaper at http://www.findchips.com/


Yes, but remember he's only buying maybe 10 of them...


----------



## JoeG (Jul 18, 2010)

Great search site. http://www.findchips.com/ has the chip for $11.15 in stk at mouser in 1pc qty, much better. Now I just have to figure out how to use 8 of them to build a BMS for a 45S pack.
Thanks for the site Otmar.


----------



## Siwastaja (Aug 1, 2012)

sholland said:


> All due respect but you don't know what you are talking about. This part was designed for large packs. There are many others too. A microcontroller is a good solution but not the most reliable thing to put in a HV traction pack.


I'm just stating propabilities based on "specialty" IC's and battery management IC's in general, without knowing about the exact part here. If this part _really_ has been used in large packs with good results and has the real-world flexibility, then just please state it. MCU's have been used with great results. It's very good to hear such a part really exists. I just want to avoid disappointments by being sure before buying expensive parts.


----------



## MAVA (Apr 13, 2012)

Gentlemen,

The age of the Microprocessor is here, and the reliability, efficiancy, and cost effectiveness is here, so I would use it as the foremost device, yet it can be upgraded using a boot loader. The worries of high voltages, can be isolated through cheap opto coupler transistors(used in home automation designs).

Using discrete may work, but it cannot be customized, nor can it be made reliable because of lower component count, and large scale integration.

A high integrated blank Micro Controller can be purchased for $5 USD, and one of these controllers can monitor ten or so cells since the Micro Controller will have a voltage reference, and analog inputs.

Now the latest craze is the Arduino(UNO) programmer, yet this is fine and would work, but C++ languge has a very steep learning curve. I would recomend a BASIC language programmer as it is much easyier to learn, and equally powerful(if not more!!). I would recommed the CrownHill one as it very powerful, and cheap. The compiler is top notch, and the working interface(IDE) is smart, efficiant, intellegent, and easy to use. The one for the Arduino is not so intelligent.

Arduino:

http://www.arduino.cc/

CrownHill:

http://www.myamicus.co.uk/

All you need is the AMICUS18 for about $30USD

http://www.crownhill.co.uk/level3.php?cat=270

The Forum is excellent:

http://www.myamicus.co.uk/forum.php


The code required for a BMS is simple, but I would chain the controllers, so they can be programmed on the go. Plus, the data can be transmitted since these functions are built in to the AMICUS to avoid all this extra wiring back to the controller. The dream is unlimited, but the code can be changed on existing hardware to accommodate new features.

Many people on the forum will help, yet even design the whole thing. The code is simple.

Best of luck,

Martin


----------



## sholland (Jan 16, 2012)

I am not doubting the reliability of the microcontroller itself, but it's the code you put on it reliable? Would you trust your own safety to your own software? That is the point I was try to make... In addition Flash memory can get corrupted, and in this case would you trust the system to still operate as expected? This is why all the OEMs are loath to do so, and if they do, they use an ISO26262/ASIL certified device which had the necessary redundancy and safety features to ensure reliable operation. This is not a cheap device .


----------



## MAVA (Apr 13, 2012)

Sholland,

I would trust the code(my code). Now, I would create redundancy as most products have that(no matter what they are-some are better than others).

I did not look-up the ISO requirement(recommendation). I've dealt with life safety electronic designs, and the key to keep the device from igniting in explosive environments. Which some of that applies to BMS circuits. The real thing is to use fusible resistors(to avoid fire if the controling device shorts out) on the power leg of the control section. Next a fuseable resistor on the whole circuit to avoid spark, and disconnect circuit to cut off the device(or circuit(s)) from the individual cell if it keeps draining the cell which is the biggest problem.

I've seen handful of BMS devices, and many do not have safety features.built in.

The basic thing when working with CMOS chips(as in the first post). Is the unused pins on the part are tied to ground to avoid false triggers/false operation.

I would not go cold turkey and put this on "car battery pack" I test it with some smaller cells. I would short out the power output section of the chip or the transistor, and see what happens(yes...). Watch to see the fire(if any). Then watch the device continue to drain the battery(if any), and see if the secondary circuit kicks-in to disconnect the circuit from the cell(s), so the battery cells are not damaged because the low voltage went below the minimum as the result of a short, yet this may sound complex to implement in circuit design. It really is not.


Martin


----------



## Salty9 (Jul 13, 2009)

A consideration in using Arduino with small micros is code bloat. My limited experience show about 10 times the size of an equivalent assembly program.


----------



## ga2500ev (Apr 20, 2008)

Salty9 said:


> A consideration in using Arduino with small micros is code bloat. My limited experience show about 10 times the size of an equivalent assembly program.


This is only important if a negative impact is caused by the size difference. If it fits and it runs fast enough to do the job, then it doesn't really matter.

I'm an assembly hack myself. Primarily because I don't want to be beholden to others tools, libraries, and other restrictions. But the lack of abstraction can be painful sometimes, especially when all you really want to do is get something working.


ga2500ev


----------



## TexasCotton (Sep 18, 2008)

I doubt this is a solution however the BMS/cell protection/pcb (from China) sold on Ebay. None of those could be changed or modified to me some applications?


----------



## kchiangusa (Mar 28, 2012)

My solution for a cheap BMS is to combine a quick and easy to use monitor device with manual bottom balancing. It cost ~$250 and has served me well for about 2 year and 20k miles. Here's my write up:

http://blog.mr2ev.com/?p=871

Please comment if you like the idea or have suggestions for improvements.

Thanks!

Ken


----------

