DIY Programmable BMS (now using ATtiny/Arduino)

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

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

Re: DIY Modular BMS

Post by dmwahl » Apr 16 2013 1:22pm

SamTexas wrote: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.
It's basically an active low signal. In my case I'm connecting it to one of the brake inputs on my controller, so when the LVC point is reached on any cell it shuts off the motor current.

I have the output from each cell monitor going to an opto isolator. The transistor outputs of the optos are all tied together, so whenever any one of the cells goes below the LVC point (or above the HVC point) the corresponding opto turns on and the output starts to conduct. The only down side to this approach is there is a roughly 1-2mA draw on the cell when the LVC signal is asserted. I figured this was far better though than allowing the user to continue discharging at many times higher current.

I attached the relevant part of the schematic in case that's more help.
lvc.png
lvc.png (27.7 KiB) Viewed 518 times

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 1:28pm

dmwahl wrote: It's basically an active low signal. In my case I'm connecting it to one of the brake inputs on my controller, so when the LVC point is reached on any cell it shuts off the motor current.
That will do.
dmwahl wrote: I attached the relevant part of the schematic in case that's more help.
lvc.png
Thanks. Too bad I'm not an electronic guy. I do understand the general idea though.

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 17 2013 9:21am

Teaser picture of the balancing/HVC/LVC module. It measures 1.97 x 1.91 inches (50 x 49 mm). Stacking height is about 3/8" per module, less if you solder cell wires directly to the board.
Attachments
4-cell-module-top.png
4-cell-module-top.png (128.56 KiB) Viewed 2012 times

knighty   10 kW

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

Re: DIY Modular BMS

Post by knighty » Apr 17 2013 11:19am

is there way way to make them stackable, a bit like an ardrino shield ?

I'm just thinking about the extra wires going between each one, like the C1- connector going to the previous board, and the hv/lv disconnects ?

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 17 2013 11:31am

knighty wrote:is there way way to make them stackable, a bit like an ardrino shield ?

I'm just thinking about the extra wires going between each one, like the C1- connector going to the previous board, and the hv/lv disconnects ?
They are designed to be stackable. In fact, as I was working on this the arduino sitting on my computer desk gave me the idea :)

The top-right mounting hole (P106) is connected to the HVC/LVC signal, and the other 3 are connected to a common ground. All the cell connections are isolated, you don't need to connect C1- to C4+ on the previous board. I added the LVC/HVC connections so that you can connect them to other boards if you want to, but they're not required for it to function. Simply connect all the boards together. The P106 hole is offset relative to the others so it won't line up if you don't have the boards oriented correctly.

cassschr1   10 kW

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

Re: DIY Modular BMS

Post by cassschr1 » Apr 17 2013 11:34am

What will the charging amp capacity be for both chemistries?

knighty   10 kW

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

Re: DIY Modular BMS

Post by knighty » Apr 17 2013 11:40am

dmwahl wrote:
knighty wrote:is there way way to make them stackable, a bit like an ardrino shield ?

I'm just thinking about the extra wires going between each one, like the C1- connector going to the previous board, and the hv/lv disconnects ?
They are designed to be stackable. In fact, as I was working on this the arduino sitting on my computer desk gave me the idea :)

The top-right mounting hole (P106) is connected to the HVC/LVC signal, and the other 3 are connected to a common ground. All the cell connections are isolated, you don't need to connect C1- to C4+ on the previous board. I added the LVC/HVC connections so that you can connect them to other boards if you want to, but they're not required for it to function. Simply connect all the boards together. The P106 hole is offset relative to the others so it won't line up if you don't have the boards oriented correctly.

sounds good

guessing it's just me, but I'm confused how you don't need to connect C1- co C4 of the previous board ?

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 17 2013 11:52am

cassschr1 wrote:What will the charging amp capacity be for both chemistries?
That depends on a few factors, but generally I'm planning on about 5A to be safe.

Basically it's limited by how much current the balancing resistors will shunt. They are spec'd as 27 ohm resistors, so at 3.6V (LiFePO4) they will be shunting ~130mA. The PWM module switches on whenever any cell goes above the HVC point, and I currently have it set at 3% of the normal charging current. 130mA / 3% = 4.3A. You could easily charge at a higher rate than this without damage to the BMS, but you risk overpowering the shunt resistors and overcharging your cells. I'll consider making the PWM duty cycle adjustable with a potentiometer.

What would you like to charge at?

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 17 2013 12:00pm

knighty wrote:
dmwahl wrote:
knighty wrote:is there way way to make them stackable, a bit like an ardrino shield ?

I'm just thinking about the extra wires going between each one, like the C1- connector going to the previous board, and the hv/lv disconnects ?
They are designed to be stackable. In fact, as I was working on this the arduino sitting on my computer desk gave me the idea :)

The top-right mounting hole (P106) is connected to the HVC/LVC signal, and the other 3 are connected to a common ground. All the cell connections are isolated, you don't need to connect C1- to C4+ on the previous board. I added the LVC/HVC connections so that you can connect them to other boards if you want to, but they're not required for it to function. Simply connect all the boards together. The P106 hole is offset relative to the others so it won't line up if you don't have the boards oriented correctly.

sounds good

guessing it's just me, but I'm confused how you don't need to connect C1- co C4 of the previous board ?
Think of it as using isolated 4 cell blocks. A 24S pack could be constructed of six 4S packs, each with their own BMS attached. The 4S packs could then be wired in series and the specific order wouldn't matter. The LVC/HVC signal is isolated from the individual cells using optocouplers, so the output can be at a different voltage from the input. I forget the exact specs on the optos, but I think they're rated for something like 5000V isolation. That said, it's critical that the cells attached to each board are in order.

The reason I did it this way was to make it easy to add more cells later on, say if you were running on 12 cells and wanted to go to 16. All you would need to do is add another board and wire the additional cells to it.

SamTexas   100 MW

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

Re: DIY Modular BMS

Post by SamTexas » Apr 17 2013 12:36pm

dmwahl wrote: Think of it as using isolated 4 cell blocks.
That's nice and convenient for LiFePO4, especially for legacy applications where lead acid batteries are being replaced with lithium. But it does not work with LiCo or LiMn. 4s LiFePO4 is a direct replacement for 12V lead acid. 7s LiCo/LiMN is a direct replacement for 24V lead acid. I'm sure your priority is LiFePO4 at this moment, but you might consider adding 7 cell and/or 3 cell modules in the future.

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 17 2013 12:44pm

SamTexas wrote:
dmwahl wrote: Think of it as using isolated 4 cell blocks.
That's nice and convenient for LiFePO4, especially for legacy applications where lead acid batteries are being replaced with lithium. But it does not work with LiCo or LiMn. 4s LiFePO4 is a direct replacement for 12V lead acid. 7s LiCo/LiMN is a direct replacement for 24V lead acid. I'm sure your priority is LiFePO4 at this moment, but you might consider adding 7 cell and/or 3 cell modules in the future.
I'd be happy to design one for you if you want a dedicated 3S or 7S module and want to buy more than a couple. PM me if you want to do that and give me the specs you want.

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 18 2013 9:40pm

Charge control board is off to fab. I decided to add a potentiometer to allow for adjusting the PWM duty cycle once the balancing phase of charging starts. It will be adjustable from 1-99% of the full charge current.

A few notes on the charge control board...

1. It's powered from the charger, so zero current draw when the charger is not connected.
2. Whenever any of the cells are above HVC or below LVC the PWM circuit is enabled, throttling the charge current.
3. It will require a connection to the charger positive terminal. This is only for the control circuitry, and can be small gauge wire since it will only draw around 20mA.

Feel free to send any questions/comments my way.
charge-control-module.png
charge-control-module.png (114.69 KiB) Viewed 1980 times

User avatar
mwkeefer   10 MW

10 MW
Posts: 2263
Joined: Jun 14 2009 8:47am
Location: Malvern, PA USA

Re: DIY Modular BMS

Post by mwkeefer » Apr 18 2013 10:33pm

+1 subscribed...
Very nice design work :)

-Mike
Regards,
Mike

{My Rides]
2010 Dahon Jack - GNG v1 - LYEN 6FET - 20/40A - 18S2P10AH - Nom:66.6v,1332w
2004 Hard Rock Pro Disc - Recumpence ms eDrive v4 - Astro 3220 4T - 12S2P16AH - HV110 - Left Side Drive - Gearing: 38mph
Nominal Peak Power @ 60 seconds: 5328 watts - Maximum Power: 49.8v, 120A, 5872w
2010 Downtube 8FH - Stock GNG v1 Stock Controller - EB809XC - 12-16S
2012 Downtube Nova 7spd - Stock GNG v2 - 12S2P10AH - EB809 - 12S-16S - 20A/30A,Nom VCC: 44.4, 888w

texaspyro   100 kW

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

Re: DIY BMS

Post by texaspyro » Apr 20 2013 8:07pm

dmwahl wrote:
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.
I use OSHPARK for protos, but they are way to expensive if you are doing any quantities of boards. I have also used MYLYDIA for production boards... around 12 cents per square inch/2000 sq in minimum order.

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 23 2013 7:53am

Found you David!

Subscribed!

Tommy L sends.......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

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 24 2013 7:55am

I'm ready to test one. Availability?

Thank you David!

Tommy L sends.....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: 609
Joined: May 06 2009 9:41am
Location: Madison, WI

Re: DIY Modular BMS

Post by dmwahl » Apr 24 2013 8:47am

Tommy L wrote:I'm ready to test one. Availability?
The PCBs are on order, initially I only ordered 6 4 cell modules (of which I will keep 4) and 3 charge pwm modules (I'll need 1). Assuming all goes well with the initial batch I'll order a bunch more to make available to the ES community.

If you're interested in the prototype boards I will sell you them for $30 each (assembled) plus whatever shipping comes to. Photos, hook up drawings, etc will follow once they're actually built.

knighty   10 kW

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

Re: DIY Modular BMS

Post by knighty » Apr 24 2013 9:50am

if all power for it comes from the charger, how does it monitor for low voltage or a low cell during use ?

(guessing you thought of this already, just interested :-)

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 24 2013 10:29am

knighty wrote:if all power for it comes from the charger, how does it monitor for low voltage or a low cell during use ?

(guessing you thought of this already, just interested :-)
The only power that comes from the charger is for the charge pwm board, the individual cell monitors run off of the cells themselves. The continuous current draw is about 40 microamps (0.00004A), which will draw about 1Ah every 3 years.

Each cell monitor triggers an optoisolator when the HVC/LVC point is reached. The outputs of all the optos are tied together and connected to the brake input on the controller. So when any cell gets to the LVC point during use, the controller sees it as a "brakes applied" signal and shuts down the motor.

Make sense?

chroot   100 kW

100 kW
Posts: 1284
Joined: Nov 29 2009 4:03pm

Re: DIY Modular BMS

Post by chroot » Apr 24 2013 12:02pm

*Subscribed*

I want to see the video how assemble with the LiPo pack in 4s hardcase.
Thank you Justin Lemire-Elmore - You are a HERO!

Tidalforce, Yuba Mundo V4 Cargo bike, Juiced Riders ODK V1 Cargo bike
English is my secondary language - ASL (American Sign Language) is my primary.

cassschr1   10 kW

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

Re: DIY Modular BMS

Post by cassschr1 » Apr 24 2013 1:04pm

I would like to be on that short list for sure!

User avatar
fabiograssi   100 W

100 W
Posts: 253
Joined: Jun 14 2009 9:42am
Location: Bauru, Sao Paulo, Brazil
Contact:

Re: DIY Modular BMS

Post by fabiograssi » Apr 24 2013 2:00pm

Subscribed! Put me on the list!

User avatar
parabellum   10 MW

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

Re: DIY Modular BMS

Post by parabellum » Apr 28 2013 12:14pm

Dmwahl, will you have specific standardized LVC/HVC for every chemistry or to specific buyer request?
My case is LiPo and I like to keep them in between 3.5v and 4.1v

chroot   100 kW

100 kW
Posts: 1284
Joined: Nov 29 2009 4:03pm

Re: DIY Modular BMS

Post by chroot » Apr 28 2013 1:02pm

I would suggest you set 3V as last Modular BMS LVC tripping and secondary LVC tripping set 3.5V by Cyclist Analyst. That's what I am using it and never had any issue or problem with my LiPo battery pack. I am using Methods LVC modules (typically 3V for cutoff) in case you want know.
parabellum wrote:Dmwahl, will you have specific standardized LVC/HVC for every chemistry or to specific buyer request?
My case is LiPo and I like to keep them in between 3.5v and 4.1v
Thank you Justin Lemire-Elmore - You are a HERO!

Tidalforce, Yuba Mundo V4 Cargo bike, Juiced Riders ODK V1 Cargo bike
English is my secondary language - ASL (American Sign Language) is my primary.

dmwahl   10 kW

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

Re: DIY Modular BMS

Post by dmwahl » Apr 28 2013 1:52pm

chroot wrote:I would suggest you set 3V as last Modular BMS LVC tripping and secondary LVC tripping set 3.5V by Cyclist Analyst. That's what I am using it and never had any issue or problem with my LiPo battery pack. I am using Methods LVC modules (typically 3V for cutoff) in case you want know.
parabellum wrote:Dmwahl, will you have specific standardized LVC/HVC for every chemistry or to specific buyer request?
My case is LiPo and I like to keep them in between 3.5v and 4.1v
Since my pack is LiFePO4 I'm setting the LVC/HVC to 2.5V/3.6V respectively for the first batch. It's just a couple of component changes though to set it to any other values. HVC is determined by a resistor divider and LVC is a voltage supervisor chip. They come in 0.1V increments from 0.9V up to around 5V, so LVC can be set to anything in between assuming the parts are available.

After I'm confident everything is working properly, I'll figure out what different voltage setpoints people are interested in and built the boards accordingly. I specifically designed it to be easily configured from the start, so accommodating peoples different chemistries and voltage preferences won't be a problem.

Hope this answers the question, if not feel free to keep asking. The first batch of boards got held up due to some shipping problems, but I've been told to expect them within the week. I'll post here when they're in and built up.

Post Reply