DIY Programmable BMS (now using ATtiny/Arduino)

Batteries, Chargers, and Battery Management Systems.
dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 04 2013 9:28am

circuit wrote:How is this one different from numerous other TL431 based "BMS"?
The monitoring part of the circuit (the TL431 part) isn't much different, in fact it's very similar to the reference design in TI's datasheet (http://www.ti.com/lit/ds/symlink/tl431.pdf, figure 24). The PWM portion of the BMS that turns on when balancing starts is the part I haven't seen in other BMSs. I actually build a standalone version of it to test the concept, boards came in yesterday and I got one built up (see attachment). Works beautifully, although my soldering skills leave something to be desired.

I mostly just thought it would be a fun project to do on my own :)
IMG_0827.JPG
PWM circuit
IMG_0827.JPG (203.14 KiB) Viewed 1281 times

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 04 2013 10:35pm

Phew... all routed. BOM is done.

I'm going to be adding a bunch of thermal vias to improve cooling, but that won't affect size, which is just under 4x6 inches for a 16S BMS.

I'll figure out pricing in the next few days. What is something like this worth to people? I'd be interested in hearing your thoughts.
bms 1.0 top.png

User avatar
parabellum   10 MW

10 MW
Posts: 2061
Joined: Nov 19 2010 9:55am
Location: Dominican Republic, north.

Re: DIY BMS

Post by parabellum » Apr 06 2013 1:17am

Good work! Can this board be connected partially, let say 12 of 16 cells and still work normally?

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 06 2013 8:35am

parabellum wrote:Good work! Can this board be connected partially, let say 12 of 16 cells and still work normally?
Yes, the only restriction is that the voltage regulator (TL783) on the PWM portion needs a minimum voltage to function, about 15V or so from the charger. The balancing and HVC/LVC circuits work whether you have 1 or 16 cells hooked up.

The board can be scaled up to 24S easily just by copying the balancing sections, my bike is only 16S though so that's what I started with.

cassschr1   10 kW

10 kW
Posts: 510
Joined: Aug 14 2009 11:57am
Location: LaCrosse, Wisconsin

Re: DIY BMS

Post by cassschr1 » Apr 06 2013 11:02am

Sounds good. Now can you run as 32s or 2 BMS in series, say 28s for life4.

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 06 2013 12:21pm

cassschr1 wrote:Sounds good. Now can you run as 32s or 2 BMS in series, say 28s for life4.
Yes, that should work fine. The only part of the BMS itself that would possibly be exposed to the full charging voltage would be the voltage regulator, and it's good up to 150V input. I've had your 28S pack in mind since we spoke on the phone.

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 15 2013 1:11pm

Quick update as there have been a few changes to this project in the last couple of weeks.

1. After figuring out the cost of all the parts + pcb, I decided it would be worthwhile to go with surface mount parts. I know this might be a turn off to some, but they're actually not that bad to work with. I'll post more details on my experience with this as parts come in and I get it built up.

2. Rather than having 1 large "monolithic" board that incorporates all the functions I wanted, I decided to go with multiple smaller PCBs that each take care of a specific function. There are 4 cell "modules" that take care of the individual cell balancing, as well as the LVC/HVC signal. These are just under 2"x2", and stack together to monitor any multiple of 4 cells. I've ordered the boards for the 4 cell balancing modules, and am working on the charge controlling module now.

hillyterrain   100 W

100 W
Posts: 132
Joined: Feb 28 2013 1:11am
Location: Bay Area, CA

Re: DIY BMS

Post by hillyterrain » Apr 15 2013 3:14pm

I'm interested for in this, using 12s LiPo

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 15 2013 3:24pm

hillyterrain wrote:I'm interested for in this, using 12s LiPo
What voltage do you want for the HVC/LVC? I'm on the conservative side so I set mine to 3.6V for balancing and 2.5V LVC (LiFePO4).

HVC is just 2 resistor value changes. LVC is set by a voltage supervisor chip, they come in a range of options.

knighty   10 kW

10 kW
Posts: 535
Joined: Sep 13 2012 8:57pm

Re: DIY BMS

Post by knighty » Apr 15 2013 3:26pm

I'm interested too

building multiple 24s packs with laptop cells, will go to 28s instead if I can :-)

(wanted 28s but couldn't find bms)

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 15 2013 3:35pm

knighty wrote:I'm interested too

building multiple 24s packs with laptop cells, will go to 28s instead if I can :-)

(wanted 28s but couldn't find bms)
That was part of my frustration with current models, I'm running a 16S pack right now but wanted the option to add more cells without buying a whole new BMS and rebuilding everything. Each 4 cell board is isolated from the rest, so to go from 24-28 cells you would just need to add another 4 cell board.

Just out of curiosity, what are you using right now for a BMS?

knighty   10 kW

10 kW
Posts: 535
Joined: Sep 13 2012 8:57pm

Re: DIY BMS

Post by knighty » Apr 15 2013 5:04pm

dmwahl wrote:That was part of my frustration with current models, I'm running a 16S pack right now but wanted the option to add more cells without buying a whole new BMS and rebuilding everything. Each 4 cell board is isolated from the rest, so to go from 24-28 cells you would just need to add another 4 cell board.

Just out of curiosity, what are you using right now for a BMS?

I've got a bms 24c lifepo4 headway 10ah/72v pack from bmsbattery with there bms on it

I'm building range extender packs with laptop cells to a higher voltage, then I'm going to use an ardrino to control charging from the laptop (1c) cells to the headway cells (10c)


plan is I can go out on the bike and take spare laptop packs with me, then when one laptop pack runs empty I can just ride back to my van and swap it for another laptop pack and keep going all day long :-)

hillyterrain   100 W

100 W
Posts: 132
Joined: Feb 28 2013 1:11am
Location: Bay Area, CA

Re: DIY BMS

Post by hillyterrain » Apr 15 2013 9:42pm

dmwahl wrote:
hillyterrain wrote:I'm interested for in this, using 12s LiPo
What voltage do you want for the HVC/LVC? I'm on the conservative side so I set mine to 3.6V for balancing and 2.5V LVC (LiFePO4).

HVC is just 2 resistor value changes. LVC is set by a voltage supervisor chip, they come in a range of options.
I'd like to be on the safe side, for LiPo would that be 3.7 or even 3.75V?

User avatar
malcav   10 mW

10 mW
Posts: 24
Joined: Nov 21 2010 12:21am

Re: DIY BMS

Post by malcav » Apr 15 2013 10:43pm

dose this bms include an over current protection during discharge
current project x 500 frame with a 750w soon to be a 2kw 16x3 rear hub motor

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 15 2013 10:51pm

Not at the moment, although it would be easy to add. The controller I'm using has discharge current limiting built in so there was no need to add it myself.

User avatar
malcav   10 mW

10 mW
Posts: 24
Joined: Nov 21 2010 12:21am

Re: DIY Modular BMS

Post by malcav » Apr 15 2013 11:20pm

i think it would be best as an option. i like the idea of not having it for lipo and having it for lifepo4
current project x 500 frame with a 750w soon to be a 2kw 16x3 rear hub motor

SamTexas   100 MW

100 MW
Posts: 2714
Joined: Dec 29 2010 5:34am
Location: Houston, Texas

Re: DIY BMS

Post by SamTexas » Apr 15 2013 11:50pm

dmwahl wrote:Not at the moment, ...
Please keep it that way if you can. Why add complexity and inefficiency when there's absolutely no need for it. Every ebike controller already has current limit. The cycle analyst also has that capability.

To be honest, the only feature I'm interested in is the cell LVC. So it would be great if LVC is a separate "module". Of course the actual LVC threshold must be "programmable" (dip switches or jumpers would be fine) because an LVC could be reasonable to one person and crazy to another's.

texaspyro   100 kW

100 kW
Posts: 1408
Joined: May 12 2010 6:53pm

Re: DIY BMS

Post by texaspyro » Apr 16 2013 1:15am

dmwahl wrote:that won't affect size, which is just under 4x6 inches for a 16S BMS.
Make the board 100x150mm (or a tad smaller) and SeeedStudio can make them fairly quickly for a rather good price. Their prices are based upon the board outline fitting within various rectangles.

User avatar
Tommy L   100 kW

100 kW
Posts: 1059
Joined: Dec 23 2010 4:33pm
Location: Saint Augustine, Florida USA

Re: DIY Modular BMS

Post by Tommy L » Apr 16 2013 6:43am

subscribed!


Tommy L sends..... Nice work here! ..........Image
http://www.rawvelocity.com

- 4th Hoolagan FS Mtn 9C-2810 with 128v nom 9.2ah A123 40S40P(1.2Kw) - Lyen 18Fet 4115 - 77.8kph :)
http://endless-sphere.com/forums/viewto ... =4&t=39480

- 3rd Catrike 700 Bionx PL350 Velo build
http://www.youtube.com/watch?v=rYdnkaAhVtI

- 2nd 150lbs Pusher Trailer
http://www.youtube.com/watch?v=Q1qTc4sjORY

- 1st Sears NS mtn bike - Rigid 10a drill 800rpm - 2 12v AGM - 1000 watt inverter - 600w dimmer for throttle, wicked torque!

48.2mph/77.8kph Club

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY Modular BMS

Post by dmwahl » Apr 16 2013 7:31am

malcav wrote:i think it would be best as an option. i like the idea of not having it for lipo and having it for lifepo4
That's exactly why I wanted to go the module route. If you want it you can add a module, otherwise you can leave it out. As SamTexas pointed out, it will only add complexity. That said, if there is enough interest I can put one together, and it can be added on for those who want it.

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 16 2013 7:37am

SamTexas wrote:
dmwahl wrote:Not at the moment, ...
To be honest, the only feature I'm interested in is the cell LVC. So it would be great if LVC is a separate "module". Of course the actual LVC threshold must be "programmable" (dip switches or jumpers would be fine) because an LVC could be reasonable to one person and crazy to another's.
Right now the LVC is set using a voltage monitor IC, specifically the NCP301 series. I did a quick digikey search and found 2.0V, 2.2V, and 2.5V options in stock right now. They're produced in 0.1V increments, so other suppliers are likely to have other options. It's also pin equivalent to the NCP303 which is a newer version of the chip and has similar thresholds. The other parts could just be left off, or I could spin a standalone LVC board if necessary.

Curious... why only LVC and no balancing?
Last edited by dmwahl on Apr 16 2013 7:40am, edited 2 times in total.

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 16 2013 7:38am

texaspyro wrote:
dmwahl wrote:that won't affect size, which is just under 4x6 inches for a 16S BMS.
Make the board 100x150mm (or a tad smaller) and SeeedStudio can make them fairly quickly for a rather good price. Their prices are based upon the board outline fitting within various rectangles.
I've been using OSH Park so far and been quite happy with them, I'll check out SeeedStudio though. Thanks for the tip.

SamTexas   100 MW

100 MW
Posts: 2714
Joined: Dec 29 2010 5:34am
Location: Houston, Texas

Re: DIY BMS

Post by SamTexas » Apr 16 2013 9:54am

dmwahl wrote:
SamTexas wrote:
dmwahl wrote:Not at the moment, ...
To be honest, the only feature I'm interested in is the cell LVC. So it would be great if LVC is a separate "module". Of course the actual LVC threshold must be "programmable" (dip switches or jumpers would be fine) because an LVC could be reasonable to one person and crazy to another's.
Right now the LVC is set using a voltage monitor IC, specifically the NCP301 series. I did a quick digikey search and found 2.0V, 2.2V, and 2.5V options in stock right now. They're produced in 0.1V increments, so other suppliers are likely to have other options. It's also pin equivalent to the NCP303 which is a newer version of the chip and has similar thresholds. The other parts could just be left off, or I could spin a standalone LVC board if necessary.

Curious... why only LVC and no balancing?
Sorry, I should have explained why when I said that. Balancing is already readily available with RC chargers or with a separate balancer.

The 2.0V, 2.2 and 2.5V LVC threshold you listed is definitely too low for LiCo. 2.5V is fine with me for consumer LiCo, but most people are more comfortable with 3.0V.

dmwahl   10 kW

10 kW
Posts: 608
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY BMS

Post by dmwahl » Apr 16 2013 10:22am

SamTexas wrote:
dmwahl wrote:
SamTexas wrote: To be honest, the only feature I'm interested in is the cell LVC. So it would be great if LVC is a separate "module". Of course the actual LVC threshold must be "programmable" (dip switches or jumpers would be fine) because an LVC could be reasonable to one person and crazy to another's.
Right now the LVC is set using a voltage monitor IC, specifically the NCP301 series. I did a quick digikey search and found 2.0V, 2.2V, and 2.5V options in stock right now. They're produced in 0.1V increments, so other suppliers are likely to have other options. It's also pin equivalent to the NCP303 which is a newer version of the chip and has similar thresholds. The other parts could just be left off, or I could spin a standalone LVC board if necessary.

Curious... why only LVC and no balancing?
Sorry, I should have explained why when I said that. Balancing is already readily available with RC chargers or with a separate balancer.

The 2.0V, 2.2 and 2.5V LVC threshold you listed is definitely too low for LiCo. 2.5V is fine with me for consumer LiCo, but most people are more comfortable with 3.0V.
Got it, I wasn't sure what chemistry you were using. The chip I used for LVC comes in 0.1V increments from 0.9V up to 4.9V. Mouser has 3.0V, 3.1V, and 3.2V versions in stock (as well as others). The only reason I didn't use them for the HVC cutoff was the tolerance and hysteresis range is larger than I wanted for balancing.

How many cells do you want to have LVC for?

SamTexas   100 MW

100 MW
Posts: 2714
Joined: Dec 29 2010 5:34am
Location: Houston, Texas

Re: DIY Modular BMS

Post by SamTexas » Apr 16 2013 12:26pm

I also use LiFePO4. But right now my most pressing need is a cell level LVC for a 3s and a 7s consumer LiCo packs. I would love to have a 3.0V LVC, but 2.50V would also do.

I don't know how you plan to notify the user when LVC is reached. I prefer to have a single continuous signal, say going from 0V to 5V for example when any of the 3 (or 7) cells is at or below the LVC. I don't need to know which cell it is. Just my thought.

Post Reply