Old BMS General Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Maxim BMS chip

Postby GregsGarage » Thu Jun 12, 2008 7:27 pm

Found this on another group. New product from maxim.

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5523

Look at page 16 of this pdf, unfortunately at the bottom it says "future product - not yet available"
http://www.maxim-ic.com/design_guides/e ... TIVE_4.pdf

Interesting to see if someone could manage some samples from them.

Greg
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: BMS Design

Postby GregsGarage » Fri Jun 13, 2008 8:27 am

retepsnikrep wrote:The pic has a wide operating voltage from 2-5.5v so covers virtually all the various types of Li-Ion chemistry.


Last night I was starting to read through the Picaxe manual and it stated a operating voltage of 3-5.5v and min 4.5 volts for programming the chip. If this is the case that could be a problem as these cells have a low voltage limit of 2 volts. Maybe that section of the manual is wrong. Still it may be worth considering some sort of analog failsafe in the design.

Greg
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: BMS Design

Postby GregsGarage » Fri Jun 13, 2008 11:45 am

GregsGarage wrote:
retepsnikrep wrote:The pic has a wide operating voltage from 2-5.5v so covers virtually all the various types of Li-Ion chemistry.


Last night I was starting to read through the Picaxe manual and it stated a operating voltage of 3-5.5v and min 4.5 volts for programming the chip. If this is the case that could be a problem as these cells have a low voltage limit of 2 volts. Maybe that section of the manual is wrong. Still it may be worth considering some sort of analog failsafe in the design.

Greg


Just found the data sheet for the PIC12F683 and it states operating voltage of 2.0-5.5v. Anyway the datasheet is here.
http://ww1.microchip.com/downloads/en/D ... 1211D_.pdf

Still worth testing how the circuit will react to less than 2.0 volts.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

hardym
Posts: 6
Joined: Tue Jun 17, 2008 2:53 pm

Maxim 11068

Postby hardym » Tue Jun 17, 2008 2:58 pm

GregsGarage posted a link to some information about the upcoming Maxim 11068 multi-cell battery controller. I requested the info and have posted it here:


http://www.convertthefuture.com/files/MAX11068_Rev_5_4_April_8_2008.pdf

It looks like it supports 12 cells, under over voltage detection, and equalization up to 200mA.

Mark.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: BMS Design

Postby GregsGarage » Wed Jun 18, 2008 12:47 pm

I would like to suggest a couple more variables in Peter's code, I will list my changes in bold. I haven't done any programming in years and never done it professionally so there may be mistakes, but hopefully you will see were I am going with this.

`Battery Management System Slave Module
`Based on Picaxe 08M microcontroller
`Original concept, hardware and code by Peter Perkins`peter@solarvan.gotadsl.co.uk
`V1.00 280508


`Byte Variables for speed
`b1 = Cell voltage
`b2 = Cell temperature
`b3 = Cell max voltage
`b4 = Cell min voltage

`Balancing voltage is set at >3.75v For Li-fepo4 cells



start: `Initialise program and variables/interrupts as reqd
setint %00001000,%00001000 `Activate interrupt when pin 3 goes high

main:
low 2 `Pull pin 2 low to draw current through the ref 1.25v diode
pause 100 `Wait 0.1 of a second
input 2 'Turn off current and turn pin 2 back to an input
readadc 2, b1 `Measure the voltage stored across the capacitor
b1 = 255 - b1 `Invert the value of b1 so higher voltage = higher value
If b1 > b3 then b3=b1 `set b3 to highest cell voltage
If b1 'less than' b4 then b4=b1 `set b4 to lowest cell voltage

If b1 > 170 then `Turn on cell balancing load if voltage >3.75v
high 1 `Turn on load resistor
else
low 1 `Turn off load resistor
endif
readadc 4,b2 `Read the cell temperature into variable b2
goto main `Goto main loop



interrupt: `Send cell data to master Picaxe via opto serial bus

pause 100 `Wait 100 milliseconds to ensure data received OK and prior Pic has sent data
`This may be cut or removed depending on hardware response

sertxd(b1,b2,b3,b4) `Send raw cell/slave data to master, include :-Cell V, Cell temp, Cell min voltage, Cell max voltage
setint %00001000,%00001000 `Reset the interrupt and wait for another data request.
b3=b1 `reset max value to current value
b4=b1 `reset min value to current value

return `Return from interrupt to main program.

These changes would allow you to see where the cells have been as well as where they are now. As the program stands for a 50 cell string you would only poll each cell every 5 seconds. Even if timing were improved you still lose data that could flag a potential problem earlier.

Greg
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Fri Jun 20, 2008 7:42 am

Thanks Greg for ideas.

Just to confirm the delay values in above code are just for testing, my target is to test/poll every cell once a second. Once i have made few prototypes i shall reduce values to mimimum for reliable comms and max speed during bench testing. Im still on hols at moment and am itching to go home and get in shed, much to wifes disgust :wink:
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Update

Postby retepsnikrep » Tue Jun 24, 2008 6:15 am

electricmini wrote:Ok, just having a quick look over it, and I had a few thoughts:

a few resistors, specifically where you have a bidirectional PIC
pin acting as an input - if the software goes nuts and sets this pin to
be an output whilst you're driving a signal in, you'll get a short through
the PIC. Most likely it'll cause a latchup, possibly damage the PIC's
port pin. A simple series resistor (100 ohm, or 1k ohm) takes care of this.

There's no protection against reverse polarity or a cell going open-circuit:
an on-board fuse and a reverse-biased zener/transient suppressor
across the supply would help

Is the LM385 reference diode the right way around?
Looks backwards to me... (designed to be used like a zener)

I presume you're planning on converting the reference diode's voltage,
then using that to give us the cell voltage? Also gives us a reference to use when measuring the temp from the LM335

(this is not intended as a slam, just a few things I thought of)


I tend to write PIC code using either CCS's C complier or the microchip
C compilers, been a while since I resorted to assembly!

There is a variant of the 8-pin PIC family, that has a built-in AtoD module,
and an analogue comparator module (the PIC12F683). This would allow
us to monitor the cell voltage, with the PIC in sleep mode, just waking
up if the cell volts drops or if it's talked to by the master?
Budget price from Microchip is sub $1 (if you buy enough!)
Bank on maybe £1 or £2 as you suggested for small quantities from Farnell / RS

I use Eagle for my pcb layout work (since they've gone and lost
our Orcad CDROM in work!! ), there's a free version which would probably
work ok with this small size board.

More later,

Richard


Thanks for those thoughts.

I've binned individual cell temp monitoring as I already have a pack solution in the Insight which does this.

The 1.25v LM385 is used as a V ref but as the voltage of the cell changes so does the result from the PIC adc ;) So I'll just use a lookup table in the master pic to get the correct cell V in a useable form to work out pack voltage.

If pic cell adc result is 200 then I know cell V is 2.00V (I've tested it)
If pic cell adc result is 500 then I know cell V is 3.80V (I've tested it)

The slave only needs to know that for instance at 3.8V the adc result will be X :) above X it needs to turn on load.

So this version has a reduced component count and slave program is incredibly simple.

It also includes a (Non Isolated :shock: ) reprogramming connection, and an indicator led which flashes once when slave is polled by master (every second) to indicate normal operation.

`Battery Management System
`Slave Module Based on
`Picaxe 08M
`peter@solarvan.gotadsl.co.uk
`V1.1 230608

`Variables
`w0=Cell Voltage 0-1024 word 10bit

`Activate interrupt when pin3 goes high
setint %00001000,%00001000

`Main program loop
Main:

`Measure voltage reference
readadc10 2, w0

`Add cell voltage inverting and conditioning
`routine here to make cell V value
`between 0-1024 (3 significant digits)
`Calibrated so 2V = 200 with 1.25v LM385 V Ref

w0 = 834 - w0

`If cell V > 3.80v then turn on load
if w0 > 500 then
high 1
else
low 1
endif

`Pause 1 second
pause 1000

`Goto main loop
goto main



`Interrupt data transmission routine
Interrupt:

`Turn on indicator led
high 4

`Pause 0.1 of a second
pause 100

`Send raw cell voltage to Master
sertxd(w0)

`Activate interrupt when pin3 goes high
setint %00001000,%00001000

`Turn off indicator led
low 4

`Return from interrupt to main program
return


New schematic is here

www.solarvan.co.uk/slave250608.jpg

I'm almost ready to go to PCB layout now, anyone help me with this?

I'm happy with my once a second cell polling, from my experience with TS cells they are rugged and don't need to be micromanaged to the Nth degree :wink: Yes lots of improvements could be made but again line has to be drawn and boards made up, I can tinker with software to my hearts content later. Looks like my batts could be on way from China by the end of June so need to get on!

So long as the master pic knows if data is missing/invalid/out of range and signals the fact along with shutting down charger etc then the Human computer has to investigate. 8)
Last edited by retepsnikrep on Wed Jun 25, 2008 10:05 am, edited 1 time in total.
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Quick and cheap BMS

Postby GregsGarage » Wed Jun 25, 2008 9:32 am

I like were you are going with this design Peter, simpler is a good direction. 8) Can't help you out on the PCB layout, wouldn't know were to start but if you get ready to have some made please put me down for 24 blank PCBs as well. I would like to try it out on my little Fiat 126, more testing can only improve the design.:D

For the 126 I had ordered 2 BMS boards from ebay seller PingBattery. These cost me around £45 including shipping from China. They are designed for ebikes, etc. Normally they interrupt the negative wire between the pack and controller, shutting off supply. Obviously I can't run 300+ amps through these! :shock:

What I have decided to do is to just monitor the voltage between the pack and the BMS board's output to shut off the controller or charger. I haven't worked out exactly how I am going to do this, possibilities are a simple warning light and rely on the "human computer" as Peter puts it. Or a number of relays or feeding the signal through opto isolators to a programmable controller. I have a CC16 controller from www.splatco.com that I have been meaning to play with.

Another problem with these boards is that there is no warning, they just shut off when a cell's voltage goes to low or high. So I have installed a e-meter which will let me know the state of charge of the pack and also I can set a low voltage alarm at 60volts which is around 2.5volts per cell (assuming all of them are the same).

I will also fit a Paktrakr as well. This is designed for lead acid but could be connected across every 4 cells so that if there is a problem I will know which 4 cells to check instead of having to check all 24 8)
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Wed Jun 25, 2008 10:27 am

I've tweaked the above schematic and code to add a couple more features. :wink: Have a look 8)

I will probably order 100 slave boards initially, I need 50 of them, so there will be some spares.

I now have to design the master board and get on with programming that which is more complicated (not much though) of course.

The dash board display is this simple serial lcd kit driven by the Picaxe 18X Master chip.

http://www.rev-ed.co.uk/docs/axe033.pdf

I'll probably only get 4-5 master boards on the initial run.

I am specifiying normal components and self assembly for Mk1, if the design works I may proceed to SMT and ready built boards :wink:

The slave boards will fill fit 40-200 ah TS cells and my Hi-Power 40ah ones. If the terminal layout on your cell is as TS then it should fit them.

Slave and Master programs can obviously be updated to cope with the different chemistries within the range 2-5v per cell.

Peter
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Postby GregsGarage » Wed Jun 25, 2008 11:16 am

I have ordered Hi-power 100ah cells, I think they will fit your boards.

For the master board I would suggest, among other features, a input for temp switches. A single input could handle any number of temp switches connected in parallel. Switches that tripped at 60 degrees C. would provide a safety cutout in case of thermal runaway.

Of course provision for some temp sensors would be even better.

Greg
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 20 guests