Better BMS! Arduino Based Battery Management System

Place for dealers to post items for sale.

Better BMS! Arduino Based Battery Management System

Postby pkarplus » Sun Jul 08, 2012 5:56 pm

When I started my electric motorcycle conversion two years ago, I struggled to find an off-the-shelf battery management system to use. I looked through all of the online EV parts stores and all the units I found were either too basic, too expensive, or too unreliable. If this sounds like you, please read on. As a result, I decided to design my own that uses the LTC6803-3 chips and is controlled by an Arduino microcontroller. I think what I ended up with is a much simpler, versatile, and easy to use system than what is currently available for hobbyists. Here is a list of its features:
-Each board measures the voltage of up to 12 cells.
-Cell voltages are output over serial.
-Under-voltage, Over-voltage, and Balancing-voltage threshold can be set according to your battery chemistry.
-If a cell charges above the Balancing-voltage threshold, a draining circuit is turned on that drains the cell at 100mA.
-If a cell charges above the Over-voltage threshold, a wire that controls a charging relay is pulled low to disable the charger.
-Up to 10 boards can be stacked together to measure up to 120 cells.
-Connection to each cell is made with a single wire. (I currently use it with Thundersky LiFePO4 cells)

I currently have a prototype of the battery management system on my electric motorcycle that has worked flawlessly for over 600 miles of driving and over 25 full charge-discharge cycles.
I would like to gauge interest among the DIY, hobbyist community for productising my battery management system into an of-the-shelf unit for e-bikes, e-scooters, e-motorcycle, e-cars, e-boats, etc. Is anyone interested in purchasing this BMS? I would like to sell each board for $200. This price would include the hardware, initial setup, and a 90 day warranty. Please e-mail me if you are interested or comment on this post if you have any suggestions or ideas to share.
-Thank you
pkarplus
10 µW
10 µW
 
Posts: 5
Joined: Thu Feb 23, 2012 2:27 am

Re: Better BMS! Arduino Based Battery Management System

Postby EVPowers » Sun Jul 08, 2012 6:02 pm

Tell me more about the undervoltage protection.
Is it an audible alarm? Or does it trigger a relay?
EV Powers
A green-vehicle workshop in Madison, WI
http://www.EVPowers.com
608-729-4082
EVPowers
10 mW
10 mW
 
Posts: 33
Joined: Sat Apr 03, 2010 3:00 pm
Location: Madison, WI

Re: Better BMS! Arduino Based Battery Management System

Postby deVries » Sun Jul 08, 2012 6:12 pm

If a cell charges above the Over-voltage threshold, a wire that controls a charging relay is pulled low to disable the charger.


How is the charge completed? Manual reset? 100ma discharge on high cell? Please explain the completion of the charge cycle under this HVC condition...

What is the max charge amps?

Thanks. :)
deVries
1 MW
1 MW
 
Posts: 1652
Joined: Thu Jul 10, 2008 11:29 pm
Location: Solar Powered 3000w Austin Texas

Re: Better BMS! Arduino Based Battery Management System

Postby Gregory » Sun Jul 08, 2012 6:57 pm

What is it's quiescent current draw? And does it draw it's power from all cells? I don't want it draining my cells while I'm away.

What country are you in? And a photo would be great.

Thanks,
Greg


1) x5305 Hub Motor in a 24" Sun rim with 10G spokes, Kelly 72601 controller, 74V 10Ah Turnigy LiPo 20C Battery and CycleAnalyst
2) Mac 10T rear hub in a 700C "comfort bike" 15S 5Ah LiPo, stock 28A Xie Cheng controller
User avatar
Gregory
1 kW
1 kW
 
Posts: 441
Joined: Fri Jul 27, 2007 9:18 pm
Location: Perth, Western Australia

Re: Better BMS! Arduino Based Battery Management System

Postby pkarplus » Mon Jul 09, 2012 12:54 am

Answers to your questions:

Tell me more about the undervoltage protection.
Is it an audible alarm? Or does it trigger a relay?

-On my motorcycle, the under-voltage protection is taken care of by my Kelly motor controller so I do not have any immediate actual taken by the BMS. The BMS board has the option of triggering a relay if that is preferable.

How is the charge completed? Manual reset? 100ma discharge on high cell? Please explain the completion of the charge cycle under this HVC condition...
What is the max charge amps?

-If a cell goes overvoltage, the charger is disabled, the balancing resistors drain the high cells to below a "resume charging threshold"; and then the charger is re-enabled. The maximum charging voltage for the entire pack should be set separately by the charger.
-There is no max charge current. The charge current should be set by the charger. Then, when the charger goes into constant voltage mode, the current should taper off until it is below a threshold and then the charger should turn off.

What is it's quiescent current draw? And does it draw it's power from all cells? I don't want it draining my cells while I'm away.
What country are you in? And a photo would be great.

-The quiescent draw when the board is off is 16.5microA maximum.
-The BMS is turned on with 12V that should be supplied with the key-on. It draws a very small amount of power directly from the cells to make the voltage measurements. Most of its power it gets from the 12 volts. I have not measured its total power draw but from the data sheets on all the different components, it can't be more than 150mA at 12V.
-I am in California in the USA.
-I will take a picture and upload it tomorrow.
pkarplus
10 µW
10 µW
 
Posts: 5
Joined: Thu Feb 23, 2012 2:27 am

Re: Better BMS! Arduino Based Battery Management System

Postby Kin » Mon Jul 09, 2012 10:37 am

Hey, thanks for introducing me to this chip. It actually might be very useful for me, for a totally unrelated project.

Out of curiosity, do you know jhuebner on diyelectriccar? I'm just doing some research about the chip/usage, and he/she seems to have used the same IC for an arduino BMS, as well.

Anyway, I don't mean to clutter your sale thread, but I was wondering how you found using that chip. Was it particularly difficult to figure out the system? (Then again, maybe you do this for a living and thats why its not so hard. But I am still a newbie kid on many of these things- so I appreciate when things are more user friendly.)

Best luck, I hope to keep up with this thread, as more details arrive (although my interest in the chip is not for usage as a BMS, I'm still interested in this BMS project.) You should probably give some tentative cost ideas, as well.
New to endless-sphere? Notice a lot of signatures recommending Ebike.ca? That's because it's the best place for a quality and manageable, (but still 'real'), first build. Justin is a solid supporter of electric bike development, and a good source of equipment.

My hat off a thousand times to the green people that effectively run this forum. The ES Mods are superb.
Kin
100 kW
100 kW
 
Posts: 1195
Joined: Sat Mar 05, 2011 6:16 pm
Location: NC or MA, U.S

Re: Better BMS! Arduino Based Battery Management System

Postby hillzofvalp » Mon Jul 09, 2012 12:49 pm

Would you mind sharing with me your code to interface with these chips? I have a few of the demo boards but I haven't gotten around to interfacing with a microcontroller. Some of my friends have successfully implemented them in EVs but only under the demo software.

edit: I don't intend to hijack your possible sales.. just being a hobbyist and asking for help to work with what I already have
User avatar
hillzofvalp
1 MW
1 MW
 
Posts: 1861
Joined: Sun Dec 26, 2010 2:09 am
Location: Lafayette, Indiana

Re: Better BMS! Arduino Based Battery Management System

Postby pkarplus » Mon Jul 09, 2012 10:03 pm

To Kin:
No problem. What project would you like to use the chip for? I did not know jhuebner on diyelectriccar but I just looked at his forum post and he is using the same Linear BMS chip. It appeared that he never took the project past the prototype phase though and did not have a way of logging the cell voltage data. On my electric motorcycle, I find logging cell voltage and checking them every couple of trips to be extremely useful. I thought while riding that the bike was a bit sluggish and it turned out that a few of my batteries had were damage (I believe this happened before I had a BMS to monitor charge and discharge). I attached a graph of my cell voltage from my morning 15 mile commute to work.
7.2.2012 Evening Commute Cell Voltages.jpg
(60.92 KiB) Downloaded 3 times


I found using the chip difficult. I wrote a library for the chip so that interfacing with it now is much easier but figuring out the communication the first time too a lot of time, pouring over the data sheet, and calling Linear Technologies tech support. I am an engineer by profession so I was also able to ask help from software friends at my work.
My cost target it $200s for the board with an arduino, the BMS chip, and the necessary discrete components.

To hillzofvalp:
I first tried to implement the demo boards using the demo software. I was able to get it to work sometimes but I had to work to make the communication much more robust. My friend and I wrote a library for the Arduino to handle SPI communication with the chips. If you are interested in that code, I would be happy to share it with you. I am a hobbyist myself and my goal in all of this is to help more people get EVs on the road (large or small, hobby or otherwise). Send me a private message and we will work out how to get you the code.

Let me pose a question to the readers of this forum. Are you currently satisfied with the BMS options available to hobbyists for your electric conversions? If so, what do you use? If not, would this satisfy your needs at a reasonable price?
pkarplus
10 µW
10 µW
 
Posts: 5
Joined: Thu Feb 23, 2012 2:27 am

Re: Better BMS! Arduino Based Battery Management System

Postby Kin » Mon Jul 09, 2012 11:14 pm

Hi Pkarplus,

EDIT: This morning I realize that all my comments about your system are based on the assumption that this would be a BMS + Partial or Full Computer combo. You may have zero interest in entering some of the computer functions, but then if it's only a logging system, I think there is slightly less appeal.

To my dismay, after several hours of looking at the chip and methods of implementation, it might not work so well for my use. At least, not without resistors or some consistent voltage dropping diodes, which is a mite sad since this chip so very much excited me because I thought I might avoid those. It's still possibly easier than alternatives, however.

(apologizes for cluttering your thread. This is thread has some potential and I don't want to clutter things. I can open up a different thread to talk about this if it gets much further.)
In my spare time between projects at work, I'm looking to mock up an arduino based system that measures the voltage drop across 9 peltier modules (thermoelectric units) to 3 sig figs, where the voltages are ~5.7v. That resolution requirement sort of blows, when it comes to using the 10 bit ADC - i'm just somewhat shy of the requirement if I were to scale everything down. So there are of course three dozen ways to do this, but as a simple engineering student I've been pretty foiled at chip selection for the different ways I could solve it. It's a small 13 person place, so we don't have anyone particularly familiar with designing circuits.

Lackluster methods so far:
1) Two high voltage multiplexers selectively coordinating "cells" (referring to each voltage drop as a cell) through two different voltage dividers (get the 5.7v down to 0-5v) and then to one high voltage differential op amp to get the voltage difference at each successive step.
2) high resolution adc (some have suggestion the 10 bits with oversampling and dithering might be enough- but I have preciously little experience or knowledge about the principles of noise and dithering), coordinating a full network of 4-wire characterized resistors (differences compensated in my code).
3) 8 high voltage differential op amps with a single high voltage multiplexer sampling each output, and then putting the output through a single voltage divider to get the 5.7v to <Vcc arduino.
4) Using near barebone attiny45's on each cell to measure their voltage and communicate an isolated serial signal to the master arduino.
5) Using relays to selectively channel as in http://endless-sphere.com/forums/viewto ... 14&t=32586
... There have been a few other ideas. They are all quite messy and not without a few problems. My idle thinking and googling has found me a dozen almost-good solutions. The motivating factor for all this was that with arduino libraries I could easily interface with a thermal receipt printer, do calculations on the data, make the measurements quickly at a given temperature based a thermocouple sensor (or maxim temp chip). Right now this procedure every day is by hand, less accurate, slower, and involves writing the data down then transferring to an excel calculation spreadsheet. Plus the guys say it kind of sucks as one of the more tedious building tasks.

The crestfallen moment occurred when I realized my original reading that the chip could deal with "0-8v" as opposed to the 0-5v of the other bms chips I looked at, was only a tolerance rating.The actual measurement I understand are only 0-5v. As I said earlier, I think this might still be a less ugly solution that my other solutions noted above, even if I have to decrease my voltages somehow

Back more specifically to your own system
I understand that you're looking at ~$200 for the bms system. That is a noticeable amount more than most people would likely be willing to pay, if only because of limited budgets, but less expensive for the electric motorcycle and electric car crowd (who are used to and must tolerate higher costs). I don't know how much of a "market" there is for high end ebike bmses, but I think there would be some people interested in the right system with the right features.

To that effect, I know amberwolf made a treatise somewhere and detailed his thoughts on what would be his "all out" BMS if there was one. I hope he can chime in, because I don't remember where he posted that (it was not on ES, but the guys name was "amberwolf" and his post was smart, so my guess is it was ES amberwolf). Anyway, one item I recall he thought would be potentially a very good safety device would be a tilt sensing mechanism that would shut off the motor in the condition of overtilt and having presumably crashed the bike (another method of testing this would be if the wheel rpm of the front wheel was substantially less than the wheel speed of the arduino.) To this extent, I know the DIYdrones community has arduino-compatible boards with built in accelerometers and substantial usage documentation/tutorials. I don't know if it's something others would agree as useful, or something you'd be interested in, but amberwolf had a lot of other solid MCU compatible ideas on that post.

In terms of cost, if you want, it might trim quite a few costs to eventually go ahead and make the presumable board for the LTC6803 chip (i assume you wouldn't use perf board for a final system) as the whole arduino-compatible board. The eagle files for existing open source arduino compatible boards could be adapted.

pkarplus wrote:I found using the chip difficult. I wrote a library for the chip so that interfacing with it now is much easier but figuring out the communication the first time too a lot of time, pouring over the data sheet, and calling Linear Technologies tech support. I am an engineer by profession so I was also able to ask help from software friends at my work.
This is a bit intimidating :/. I see I should not underestimate this endeavor.
pkarplus wrote:To hillzofvalp:
I first tried to implement the demo boards using the demo software. I was able to get it to work sometimes but I had to work to make the communication much more robust. My friend and I wrote a library for the Arduino to handle SPI communication with the chips. If you are interested in that code, I would be happy to share it with you. I am a hobbyist myself and my goal in all of this is to help more people get EVs on the road (large or small, hobby or otherwise). Send me a private message and we will work out how to get you the code.

I am wondering if you ever found http://arduino.cc/en/Reference/SPI ? I imagine there are more specifics to the LTC chip communication, so my mentioning might be foolish. Anyway, the idea that you might be willing to share some of your SPI progress (possibly the library) is quite generous and quite wonderful. I don't think it should risk your BMS project if you do go forth, because this is not such a huge market that there would be that much motive, nor does the community seem to work like that. It's still more idealist than super commercial, especially on the high end that you would be targeting. Plus a few DIY guys might iron out crinkles or offer ideas for improvement (based on their own board designs).


I hope some other people can get back to you on what BMSs people use. I personally do not have a BMS for my 12s LiPo. I bulk charge and monitor my voltages with cell logs or batter medics, depending on whats on hand. I would not be able to anticipate a weak cell until I had a suspicion and manually worked to find it with either a logging icharger or logging celllog. It would be more manual and less convenient than your system. The way I circumvent having to do much it by typically only discharging 60% (though I imagine I'd be quite in balance even lower than this).

Apologizes for my bit long post. I hope to keep up with the conversation here, this could be interesting.
New to endless-sphere? Notice a lot of signatures recommending Ebike.ca? That's because it's the best place for a quality and manageable, (but still 'real'), first build. Justin is a solid supporter of electric bike development, and a good source of equipment.

My hat off a thousand times to the green people that effectively run this forum. The ES Mods are superb.
Kin
100 kW
100 kW
 
Posts: 1195
Joined: Sat Mar 05, 2011 6:16 pm
Location: NC or MA, U.S

Re: Better BMS! Arduino Based Battery Management System

Postby VeloV » Tue Jul 10, 2012 10:28 pm

Could you clarify pricing for me?
Is there just one type of board, each with an an Arduino on it?

I've done some cursory hunting for a 76-cell set and there are some non-PRC options in the $1500-$1700 range.
Yours would require 7 boards at $200....$1400 with what seems to offer less functionality, and mostly unproven in the wilds (so far).

I'm not knocking your efforts; we need all the options we can get. Thanks for putting your brain to the task!

I don't really want or require reams of data output, but it needs to be solid, reliable, proven for me to stick it in a customers vehicle; smart, but not too smart for its own good.

Having said that, I'd love to solve my need for under $1k.
VeloV
100 mW
100 mW
 
Posts: 38
Joined: Sat Feb 05, 2011 7:43 pm

Re: Better BMS! Arduino Based Battery Management System

Postby hillzofvalp » Tue Jul 10, 2012 11:37 pm

The clock timing And bit sequence can be a bit of a pain in the butt as my friend put it. I believe it, too. Got to know your stuff.

I sort of wonder what your board form factor would be for this bms.. The linear demo boards come in two versions that are pretty big. I assume you would be able to shrink that to at least half the size. For my builds, minimizing clutter and wasted space is high on my list.
User avatar
hillzofvalp
1 MW
1 MW
 
Posts: 1861
Joined: Sun Dec 26, 2010 2:09 am
Location: Lafayette, Indiana

Re: Better BMS! Arduino Based Battery Management System

Postby pkarplus » Wed Jul 11, 2012 12:08 am

To: hillzofvalp
The clock timing was certainly a pain. As was the SPI bus error checking and reading the 12-bit cell voltage values. For the board form factor: I was thinking similar to the demo board but stackable with headers so that you can connect as many in series as you have battery cells. You might think on first inspection that you can decrease the board size by half but you need to keep the balance resistors far enough away from the rest of the components that the heat that they are disapating does not damage them. I agree that waste clutter or space in a layout gets you minus points but in a vehicle, an extra couple of inches^3 shouldn't be a huge problem.

To: VeloV
I was thinking $200 for the board with the Arduino. Since only one Arduino is required for the whole system, I think I could meet your target of $1000 for an entire system of 76-cells. I am very interested in hearing more about your needs. If you would like to talk more, please send me a private message and we can discuss pricing, timing, packaging, features, etc.
pkarplus
10 µW
10 µW
 
Posts: 5
Joined: Thu Feb 23, 2012 2:27 am

Re: Better BMS! Arduino Based Battery Management System

Postby Teh Stork » Wed Jul 11, 2012 4:39 am

As a AVR-guy, working on a charger + BMS system (it won't actually balance anything for you - just notify you if anything is out of whack, and not overcharge your pack) I have some questions for you.

Firstly, how do you sample the cell voltages? Is this done by the BMS interface?

Secondly, why not leave the arduino base when you have code and system that works? This could definitely cut production costs way down. A AVR chip goes for 2-5 bucks.

If you have the guts, standby power draw is a title many use to differentiate systems from each others - look into picopower technology from the new series of AVR's. Definitely a good sales argument ;P
Teh Stork
1 kW
1 kW
 
Posts: 311
Joined: Wed May 25, 2011 8:02 am

Re: Better BMS! Arduino Based Battery Management System

Postby Poboda » Sun Jul 22, 2012 12:29 pm

Would you mind sharing your code with me also. I'm using LTC6803-3 with Arduino for a similar kind of project. But all I read back from the chip is 0.
I'm pretty convinced that the problem lies with SPI communication, but with no clue how to fix it.
I am a student and an electronic hobbyist. Your library to communicate between chip and Arduino will be very helpful to me.
I just need to have my chip up and running asap.

Poboda.
Poboda
100 µW
100 µW
 
Posts: 8
Joined: Wed Jun 20, 2012 12:05 am

Re: Better BMS! Arduino Based Battery Management System

Postby TheWizard » Thu Aug 09, 2012 6:12 pm

I would buy one, either as a unassembled board & parts or as a built kit. I'm looking for 24s (so, two LTC modules) and beefy
shunts/bypasses for really high charging current. People keep making protos of Linear-powered BMS's but never go beyond their own personal builds - lots of wheel re-inventing!

I think people underestimate the market at the $200 range, people pay just under that for a Cycle Analyst, which isn't a terribly necessary piece of equipment compared to a cell-level balancer+HVC+LVC. A high-quality-but-reasonably-priced BMS that is durable, scalable, and user-programmable will not become obsolete and worthless unless 5V+ nominal cells or 36V+ lithium flow batteries become available down the line.
User avatar
TheWizard
1 mW
1 mW
 
Posts: 16
Joined: Wed Dec 15, 2010 7:53 pm
Location: Phoenix, AZ

Re: Better BMS! Arduino Based Battery Management System

Postby winzEracer » Fri Aug 17, 2012 12:14 pm

I am interested in this do you have any technical documents that tell all parameters? Do you have pics? Could this be hooked up to the torque app for gauges? PM or email me at brockwin2000 at yahoo

Thanks,
Brock
www.winzeracer.com
winzEracer
1 mW
1 mW
 
Posts: 18
Joined: Fri Jun 01, 2012 11:29 pm

Re: Better BMS! Arduino Based Battery Management System

Postby methods » Mon Aug 20, 2012 2:35 pm

I should probably just stop posting about other peoples products (because we all know I do it out of a conflict of interest to crush competition :roll: ) but I have already developed 4 arduino based LTC solutions. I am sure you have read all of my threads. I put versions 2, 3, and 4 into small production runs. It is my opinion that you will not be able to build them cheap enough to satisfy the market.

If you look at the ultra-cheap Chinese BMS boards they are $20, they have programmable voltage thresholds for any chemistry including lipo, they come in chunks of 12S... the only real problem is that they dont expand.

So I totally support what you are doing and I encourage you to at least do a run of 10 or 20 boards.... but only do it for your own satisfaction because I do not think you will be able to recoup costs.

This comes from a man with 8 large flat rate boxes full to the brim that have things sharpied on them like "LTC BMS V1.0", LTC BMS V2.0, LTC........... thousands of dollars sunk in.

-methods
Jozzer wrote:Your already the guy to go to for the guys that other guys go to..

I sell stuff.... like little morsels of my integrity @ http://www.MethodsTechnology.com
User avatar
methods
10 GW
10 GW
 
Posts: 4459
Joined: Fri Aug 08, 2008 12:08 pm
Location: Santa Cruz CA

Re: Better BMS! Arduino Based Battery Management System

Postby Njay » Mon Aug 20, 2012 4:31 pm

Hello,

pkarplus wrote:Tell me more about the undervoltage protection.
Is it an audible alarm? Or does it trigger a relay?

-On my motorcycle, the under-voltage protection is taken care of by my Kelly motor controller so I do not have any immediate actual taken by the BMS. (...)

I'm assuming the controller measures pack voltage. How do you know if a single cell goes below limit earlier than others? You may not detect that just looking at the pack's voltage...
Njay
10 kW
10 kW
 
Posts: 559
Joined: Thu Sep 09, 2010 10:43 am
Location: Portugal


Return to Items for Sale - New

Who is online

Users browsing this forum: No registered users and 2 guests