Old BMS General Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

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

Old BMS General Thread

Postby retepsnikrep » Thu Jun 05, 2008 4:45 pm

Edit by Peter 10/08/09

Welcome to my opensource free BMS thread.
I have added some basic at a glance specs for the working BMS now. And a few basic pics of the setup. I strongly recommend you read all of this first post and wade through as much of the three threads as you can to understand how it all works, was developed and fits together :wink:

Specs for Modules are as follows.

*********** Slave Module Specification **********

Approx Parts Cost inc pcb $5.00 each.
One slave module per Lithium Cell.
Supply/Cell Voltage 1.75 - 5.00V DC.
Average Supply Current at 3.35v <1ma.
Voltage Ref LM 385 1.235V accuracy 1% Supply/Cell.
Voltage sensing maximum accuracy +/- 20mv.
Maximum balancing/bypass current with 15R resistor 333ma at 5.00V. Maximum Serial Master Bus data rate 9600 baud.
Maximum cell Capacity 65ah. Can be increased to 650ah.
Maximum 256 Slave Modules per Master Module.
Slave CPU Speed 8mhz with internal resonator.
Permitted Working Cell Voltage Range 1.75 - 4.30V.


************ Master Module Specification *************

Approx Parts Cost inc pcb $100.00 each.
One Master module per complete system.
Supply Voltage 8.00-30.00V DC or as limited by 5.00V 78L05 regulator.
CPU Supply Voltage 5.00V.
CPU Speed 8mhz with internal resonator.
Average Board Supply Current at 12.00v <100ma.
Maximum Serial Master Bus data rate 9600 baud.
Maximum Cell Capacity 65ah. Can be increased to 650ah.
Maximum Pack Voltage 650v.
Maximum Charge/Discharge rate depends on current sensor used.
Maximum 256 Slave Modules per Master Module.
Battery Pack Temp Sensor Range (-25 to +100C).
Composite Video Display data rate 9600 baud (SV2000 Video Chip).
Composite RCA Video Monitor Output 1V 75ohm PAL/NTSC.
Charger relay output is board supply voltage max 30v at 500ma.
Opto Isolated Charger/Controller Cutback outputs max 50ma 50v.
The Video display is limited to 16x9 characters in a 0-15 & 0-8 matrix.

Pictures & Videos

Digital Slave Schematic.

www.solarvan.co.uk/bms/DigitalSlave080908.jpg

Early test run of Slaves & Master with display from 2008.

www.solarvan.co.uk/bms/MasterTest01.jpg

Latest software display showing various info.

www.solarvan.co.uk/bms/BMS050809001.jpg

www.solarvan.co.uk/bms/BMS050809004.jpg

Youtube BMS Tour Videos. Note there are several available from 2008.

http://www.youtube.com/watch?v=gAaSTQ2cWrk

http://www.youtube.com/watch?v=Wgyg41GIGxU

Hope that helps.

Peter


Edit by Peter 15/06/09

Dear All

This BMS thread has now grown a bit too large, so I'm am starting two additional threads to run alongside this one.

This BMS General thread contains all the work/discussion upto 15/06/09.

http://www.batteryvehiclesociety.org.uk ... php?t=1245

The BMS Hardware thread will contain any new work/discussion related to the hardware.

http://www.batteryvehiclesociety.org.uk ... php?t=2059

The BMS Software thread will contain any new work/discussion related to the software.

http://www.batteryvehiclesociety.org.uk ... php?t=2060

I hope this makes it a bit more manageable.

New readers should work through the General thread first until they reach 15/06/09, they should then look at specific hardware/software/general threads for further info.

Thanks Peter



Edit by Peter 12/01/09

Dear All

This Open Source BMS thread has grown dramatically over the last few months. Appologies for that, and to the BVS for using their bandwidth!.

At the moment I recommend those new here read the whole thread to be fully upto date with the software/ideas/principles & evolution of the idea. It's changed a lot and dipping in won't give you the full picture :(

There are now a number of other helpful and knowledgable contributors :D Thanks to them for their hard work and support.

The system is up and running in analogue mode in two UK vehicles now, Greg Fordyce's Fiat 126 EV, and my own PHEV Honda Insight. I hope to complete a further upgrade to my digital version with Master/Slave configuration and data display screen shortly. It's also being adapted and tested by several other contributors.

It is my intention to do a write up of the project later and perhaps provide a FAQ, parts list and various other bits and pieces. These things will take time so please bear with us. We welcome comments and ideas but I'm no expert so please be gentle :wink:


To help visitors the latest software/schematics etc will now be updated/available here as a zip archive below. Please note carefully version numbers for software and firmware requirements.

www.solarvan.co.uk/bms/BMSProject041208.zip


We/I make no claims about safety/effectiveness/reliability of this system.
It's just one of the many possible solutions now available for the management of EV batteries, and the standard disclaimer below applies.

This BMS carries no warranty or guarantee of any kind! It's used at your own risk, and I make no claims as to suitability for a particular function. Prospective users must evaluate the system before using it, and no liability will be entertained by anyone in any shape or form whatsoever.
The modules and software have been produced at low cost for the benefit of the EV & electronic community. The software is available free via the internet. Users may modify or adapt the system as they see fit. If you are not fully competent to work on potentially lethal battery systems and high voltages, then do not experiment with or use this system. Be aware that vehicle modifications can lead to invalidated insurance and warranty issues. You the end user remain fully liable for any modifications made to your vehicle.


A useful list of other available BMS designs for your consideration is here

http://liionbms.com/php/bms_options.php

Now back to the original message that started it all off 8)



I thought I would start this thread to pull together BMS (Battery Management Systems) ideas for our projects, especially as a lot of us are currently investing in expensive Lithium Cells. :shock:

Now my ideas below won't be new I'm sure, and I hope everyone will contribute their own freely.

I've been dabbling and experimenting over last few weeks, and I do like the idea of an intelligent expandable BMS. Appologies in advance for my schematic skills, I could also only export the diagrams to a bmp file. :(

For any BMS there are an ever increasing number of desirable features,
but we have to draw the line somewhere for the sake of reproducability, practicality and cost.

I would like a BMS to monitor individual cells (in my new Li-fepo4 pack) or subpacks (In the case of the Insight)

I would like to know the cell V and temp, the pack capacity and voltage etc.

I've come up with a digital solution here which has many functions, only limited by the programmers collective ingenuity (Thats all of you 8) ).

http://www.solarvan.co.uk/insight/digitalslave.bmp 356kb Schematic

Proteus design file here

http://www.solarvan.co.uk/insight/Batmo ... uments.DSN

This uses a Picaxe 08M or (12F683 pic) 8pin chip on each cell at a cost of about £2.00. (pcb and discrete components extra of course but if we could get it down to £5-8.00 a cell that's not bad.) Each cell is going to be fitted with one of these small circuits. The pic has a wide operating voltage from 2-5.5v so covers virtually all the various types of Li-Ion chemistry. It sits there 24/7 (need to keep the current drain to a minimum) running a cell monitoring program checking the cell (subpack) voltage against it's reference. It's also checking the cell temp, and activating it's balancing load if the cell goes over Max V. Now this idea uses an opto isolated serial bus for comms with the master PIC and dashboard display. All the serial opto outputs are connected in parallel so the cells have a common data bus.

The master pic pulls the interupt opto of cell one high and triggers an initial delay of say 0.1 seconds in the slave pic, the slave then starts the serial data output routine which dumps the cell data onto the bus for the master to receive and record. The act of data transmission triggers the interupt on cell two which waits for 0.1 seconds and then transmits it's data, add infinitum along the pack. The master recieves and checks all the data (Missing data can simply trigger an alarm condition etc) it then acts on data as reqd, calculating pack voltage from sum of cells, checking for over temp condition, etc etc etc.

Note on the first cell in the pack the master PIC would be connected to (pins 1 and 2) of the interboard connector to initiate the interupt sequence, the cell 1 slave would then connect it's output (pins 3 and 4) to the input (pins 1 and 2) of the next slave. Hope that makes sense, like a cascade effect. Bit of work to do on timing of data etc and all slaves must run the same software.

I'm off on hols now for a couple of weeks, I'll take a few schematics and have a further think. More ideas very welcome.

Here is a first draft slave PIC code
`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
`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 > 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) `Send raw cell/slave data to master, include :-Cell V, Cell temp
setint %00001000,%00001000 `Reset the interrupt and wait for another data request.
return `Return from interrupt to main program.

Once everything is working as reqd I could probably buy a job lot of the bare slave PIC's and program them in assembler with the final code.

The Picaxe basic is nice and easy for development though and can be simulated using Proteus VSM software. So any experts on schematics and pcb development want to lend a hand ;) Come on down!

Picaxe stuff/info is here

http://www.rev-ed.co.uk/picaxe/

I'm going to make up three slave boards when I get back from hols and clag them onto three of my old TS cells, I'll fire them up and see how the idea works in practise. I don't really see any major limit to the number of cells/slaves you could have except time taken to poll them all may become excessive or the parallel leakage of the data opto may become an issue. I think a pack scan rate of once a second if I can acheive it would be good. :)

Peter[/b]
Last edited by retepsnikrep on Wed Jun 23, 2010 5:50 pm, edited 28 times 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.

MalcolmB
Posts: 423
Joined: Sat Jun 23, 2007 8:07 pm

Postby MalcolmB » Thu Jun 05, 2008 6:36 pm

Sounds like a great idea :)
I can't make any contribution myself, but there's a thread been running on the Endless Sphere forum for some time on this subject. It's biased towards electric bike solutions, but may be of interest (it's 25 pages long though!)
http://endless-sphere.com/forums/viewto ... 86&start=0

electricmini
Posts: 28
Joined: Wed Sep 26, 2007 10:13 pm

Re: BMS Design

Postby electricmini » Thu Jun 05, 2008 10:19 pm

Sounds like we're both thinking along similar lines Peter!

I've been meaning to develop a BMS for a while now, using
some of the 8-pin PICs (there is one model that had a built-in AtoD).

I design pcbs and program PIC micros for my job, so if you want
boards laying out and software written for it - I can help!
I also still have those old Thundersky cells from your original pack -
- so there's some good test mules to see what happens with
old & tired cells!

Another thought - we recently had a rep from Wurth Electronik call in
to see us in work, they have some high-current press-in bushings for
pcbs that let you to bolt large cable lugs straight to a pcb,
including ones that are double-sided and will fit an M6 through-bolt.
(e.g. they will happily take a large compressive bolt load)

So we could build-in metal spacers to allow the boards to sit right on top of the cell terminals...

Sadly I haven't got the cash (yet) to buy a nice big pack of cells for
the Supra, so it'll have to make do with PbA for the moment..

(Engine & oily bits started coming out yesterday evening, hoping to do
most of the de-ICEing this weekend if it ever stops raining!)

Richard

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

Postby retepsnikrep » Fri Jun 06, 2008 5:46 am

OK Richard sounds like you should have it all done in five minutes then :lol: If you feel like laying out that initial design on say 5 miniature pcb's as samples I can experiment with that save me a lot of work with veroboard :roll: I'm happy to pay for samples.

I've specced up the outline for a very basic test board which will fit on my new cells and my old TS ones. See diagram. The darker grey areas are solder pads for the cell terminals onto which the pcb mounts.

If you could put this into your pcb program and draw it up as per my schematic keeping all the components between the inner holes on the centre section of board that might be a start. Components would be on the opposite side of the single layer board, the view shows the solder side. I would prefer not to use surface mount devices so that people can easily assemble their own. (cheaper :wink: )
By keeping all the components in the centre part users could simply hacksaw off the ends if there application did not need the outer holes (Me for instance) or it was too long to fit on their cells :shock: .

Please bear in mind isolation safety issues and keep the appropriate spacing on the board and orientation of the optos to avoid the isolated data output or interupt input trigger portion of the circuit being adjacent to the non isolated pic side etc. I don't want the pack high or low V leaking back to the master pic :shock:

www.solarvan.co.uk/bmspcbv1.jpg

Over to you.

Also if you want to convert my rudimentary code above into assembler for the 12F683 pic that's even better.

http://ww1.microchip.com/downloads/en/D ... 1211D_.pdf

Picaxe 08M or 12F683 pic datasheet.
Last edited by retepsnikrep on Fri Jun 06, 2008 7:58 am, edited 2 times 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.

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

Postby retepsnikrep » Fri Jun 06, 2008 7:12 am

MalcolmB wrote:Sounds like a great idea :)
I can't make any contribution myself, but there's a thread been running on the Endless Sphere forum for some time on this subject. It's biased towards electric bike solutions, but may be of interest (it's 25 pages long though!)
http://endless-sphere.com/forums/viewto ... 86&start=0


That's certainly comprehensive :shock: but they really like multiplexing and chips with huge numbers of inputs, I prefer the one simple circuit per cell approach, infinitely scaleable in theory for our massive cells. 8)
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 » Fri Jun 06, 2008 10:57 am

Great idea Peter. As I mentioned before I have 2 BMS boards coming from ebay seller PingBattery. Might even see them today as they have cleared customs :D

I haven't decided how I am going to adapt them yet but they have a control chip on them that might be able to be replaced with a picaxe-14M. I will post pictures when I get them and maybe a simple circuit diagram when I have time.

I have posted some pics of the 24v version here;
http://tech.ph.groups.yahoo.com/group/T ... rowse/5965
You might need to be signed up to the thundersky group to view, not sure.

My idea is that it may be possible to adapt these into a slave board that handles say maybe 8 or 12 cells each and then have them comunicate with a master as per Peters suggestion. Not as flexible as Peters but maybe better for larger strings? And if by some miracle the pic could be soldered straight in it could be a simple solution.

Greg
Greg Fordyce

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

bobc
Posts: 107
Joined: Thu Dec 20, 2007 1:11 pm
Location: Knutsford

Postby bobc » Fri Jun 06, 2008 3:16 pm

I'm well into the design of a very similar system, with an overall controlled current source charger & local shunt regulators on each cell. I reckon the components cost per cell will be around £2. I'm using AVR ATtiny44 micros - SO14 package & a fairchild RFP12N10L FET for the shunt reg.
Bob

ChrisBarron
Posts: 244
Joined: Tue Dec 11, 2007 11:26 pm

Postby ChrisBarron » Mon Jun 09, 2008 10:00 pm

MalcolmB wrote:Sounds like a great idea :)
I can't make any contribution myself, but there's a thread been running on the Endless Sphere forum for some time on this subject. It's biased towards electric bike solutions, but may be of interest (it's 25 pages long though!)
http://endless-sphere.com/forums/viewto ... 86&start=0



That's similar to the way which I have been doing it.
Initally trialled on Lead acid cells, I received my tired and unbalanced lithium cells for testing purposes and managed better than the preferred 0.5% accuracy on charge voltage.

The system I have uses daisychained and optically isolated pics which makes for an expandable system. . I got tied down with some university work but that's behind me now and I may be able to find time to finish it soon

Chris
Last edited by ChrisBarron on Mon Jun 09, 2008 10:06 pm, edited 1 time in total.

electricmini
Posts: 28
Joined: Wed Sep 26, 2007 10:13 pm

Postby electricmini » Wed Jun 11, 2008 7:59 pm

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

electricmini
Posts: 28
Joined: Wed Sep 26, 2007 10:13 pm

Postby electricmini » Wed Jun 11, 2008 8:03 pm

electricmini wrote:There is a variant of the 8-pin PIC family, that has a built-in AtoD module,
and an analogue comparator module (the PIC12F683).


Ha ha!

I've just realised that's the chip the PICAXE module is using!

Good, nice chip. It even has some non-volatile data storage (EEPROM)

We could even program (or re-program) it
in-circuit, if we allocate our IO pins carefully
(or put in a couple of jumpers)

Richard


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 10 guests