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:

Postby retepsnikrep » Thu Jul 24, 2008 4:41 am

mattcarr wrote:Peter I will have a go for you.

we know that there are 4550 pulses per mile traveled and
you are reading the pulses per second

s = speed in MPH
x = pulses per second

s = (x*3600)/4550

Should give pulses per hour divided by pulses per mile to give you a mile per hour figure.
so for a 60mph reading you would be reading about 76 pulses per second.

Let me know what you think.


Thanks Matt for the idea above, the actual calculation has to fit into 16bit maths (0-65535) so I'll have to scale that down, by dividing both sides of the equation by 10.

So it becomes Speed Mph = (X*360)/455

The maximum pulses per second the 16 bit speed maths can stand is 180 which equates to a speed of 142 mph, fast enough for me. If you exceed 142mph the speedo will be incorrect/overflow (read low) during that second. Fat Chance :shock:

Now we need Distance in feet travelled in that second.
Distance ft per second = (X*528)/455

To keep a running total of feet travelled
Distance = Distance + (X*528)/455

When Distance = 5280ft (1 mile) increment odometer and start again.

The maximum pulses per second the 16 bit distance maths can stand is 124 which equates to a speed of 98mph, fast enough for me. If you exceed 98mph the distance will be incorrect/overflow (read low) during that second. That won't be a problem for me in the Insight, I rarely go above 60mph :shock:

The odometer will display 0-65535 miles with 1 mile resolution.

Now I have the formulae the calculations can be adjusted to suit any sensor providing 5v pulses. A potential divider could also be used on the BMS Master Speed Sensor input to scale down a 12v sensor to the voltage reqd.
Last edited by retepsnikrep on Thu Jul 24, 2008 1:26 pm, 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:

Charger Control

Postby retepsnikrep » Thu Jul 24, 2008 7:05 am

The BMS Master has a charger control output and can be used to control suitable modified chargers. I'm thinking of the Zivan NG Range initially.

For Lithium-Ion use you need a charger with a nominal voltage rating slightly less than or equal to the nominal pack voltage. You need the IU Constant Current then Constant Voltage charge curve.

So for my 50 x 3.2v cells that's about 160v, but I'll probably go for a 144V one to lessen the risk of overcharging. A 144V Charger with the IU charge curve can still deliver 180+ Volts.

In the past I have controlled one of these Zivan Chargers very succesfully by modifying the voltage adjust pot on the circuit board and bringing two wires out of the charger which are then connected to the/a Charger control opto output.

Cedric Lynch has described very nicely how to perform this charger surgery here. No point me re-writing all that :wink:

http://agnimotors.com/home/index.php?op ... &Itemid=39

Now Cedric's cell controllers are very good, and I used them for nearly four years. They are an option you should certainly consider when making any decsion about a BMS.

My thoughts about charger control are these, should I pull the charger voltage up or pull it down :?

By connecting the leads to the top two connections on the pot instead of the bottom two then the charger can be pulled up to the correct (max) voltage when the opto is active instead of being pulled down when the opto is active.

So we have two scenarios.

1) Opto pulls charger voltage up as opto brightness increases (conducts).

2) As in Cedric's system opto pulls charger voltage down as opto brightness increases (conducts).

To help increase fail safe nature of the system I think I prefer option (1), because if the opto fails the charger voltage remains at minimum. If opto fails in (2) charger output voltage will rise as load falls leading to possible overcharge.

Thoughts?

Latest Master Software

http://www.solarvan.co.uk/bms/Master240708v69.txt
Last edited by retepsnikrep on Thu Jul 24, 2008 1:28 pm, 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:

Re: Charger Control

Postby GregsGarage » Thu Jul 24, 2008 12:21 pm

retepsnikrep wrote:
My thoughts about charger control are these, should I pull the charger voltage up or pull it down :?

By connecting the leads to the top two connections on the pot instead of the bottom two then the charger can be pulled up to the correct (max) voltage when the opto is active instead of being pulled down when the opto is active.

So we have two scenarios.

1) Opto pulls charger voltage up as opto brightness increases.

2) As in Cedric's system opto pulls charger voltage down as opto brightness increases.

To help increase fail safe nature of the system I think I prefer option (1), because if the opto fails the charger voltage remains at minimum. If opto fails in (2) charger output voltage will rise as load falls leading to possible overcharge.

Thoughts?


A problem with option 1 is that your assuming the opto can only fail off, what if it fails on!

You could use option 2 and as a failsafe, add another output to your master to shutdown the charger completely. You could either cut the AC power through a relay or Cedric mentions in his description that the Zivan chargers can be configured with a remote shutoff switch. As an added benefit you can also then be able to shutdown the charger if the pack temp goes to high during charging. 8)

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:

Re: Charger Control

Postby retepsnikrep » Thu Jul 24, 2008 1:11 pm

GregsGarage wrote:
A problem with option 1 is that your assuming the opto can only fail off, what if it fails on!

You could use option 2 and as a failsafe, add another output to your master to shutdown the charger completely. You could either cut the AC power through a relay or Cedric mentions in his description that the Zivan chargers can be configured with a remote shutoff switch. As an added benefit you can also then be able to shutdown the charger if the pack temp goes to high during charging. 8)

Greg


Greg dealing with option 2 first. The Master already has the charger cut off relay which responds if any cell goes over Abs Max V or Over Temp. Check the schematic.

Option 1, if the opto fails on it will pull charger voltage up, but a resistor can also be placed in the circuit limiting the max voltage it can be pulled up to. This could be set to the max charging voltage for the pack, so BMS could never pull charger above the max voltage even if the opto failed hard on.

With my previous Lithium Cells I found that my Zivan charger if correctly adjusted so that the max V was about equal to the max pack V, even if disconnected from the BMS (Cedric's protectors in those days) it would just taper down, and if cells were reasonably in balance there was no problem.

The odd slight overcharge is not instant cell death and the sky will not fall in. :lol:
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 » Thu Jul 24, 2008 2:40 pm

I printed your latest schematics etc off last night but haven't looked at them properly yet.

Also consider that for option 1 if your wires to the charger short together that will drive the charger voltage high regardless of the extra resistor. Could this possible damage the charge? I don't know but this fault in option 2 will just effectivly turn off the charger, no risk of equipment damage.

In any case though the ability to switch off the charger adds another failsafe, so do it either way you like, but my vote is for option 2.

Keep up the good work, I am impressed by what you have achieved so far. I have also been working on a BMS for my cells which should arrive next week. I will post what I have done in a new topic shortly, as this one is getting rather long.

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 » Thu Jul 24, 2008 5:04 pm

Greg

I look forward to seeing your own BMS thoughts/design.

The resistor I would incorporate at the charger end anyway for option 1 so the short in the wires/opto hard on, would only pull charger up to the predetemined max volts you set.

Sorry about rambling on with this design, the thread is getting a bit long now. :oops:

I think I will go with Option 2, pull charger down for now.

So connections as per Cedric's instructions and charger adjusted to give 50 x 3.75v as maximum output. BMS Pulls output voltage down when any cell goes over the Max V setting by driving cutback opto with increasing pwm output. 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 Jul 25, 2008 12:56 pm

Peter

Hopefully have something to post by the end of next week. I have taken a different approach to you in that I am connecting together "off the shelf" components. I have a programmable controller from http://www.splatco.com/cc16p1.htm as the brains and am using BMS boards designed for electric bicycles for its main inputs as well as some inputs from the vehicle, ign, throttle, etc.

My BMS will only protect the battery from over or undercharging including during regen. I am going to use an e-meter for keeping track of SOC, so a much simpler system than yours. It will be interesting to compare costs when both systems are working.

At the moment I am about 2/3rds the way through the code. Still need to write the last bit and get it all working under simulation. Once I get the code working I will post it and more details on a new thread so people can find all the faults I missed.

I'm off now for the weekend.

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 Jul 25, 2008 1:14 pm

Nice to have a bit of competition ;)

I look forward to seeing the design in more detail.
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:

Displays + Watchdogs

Postby retepsnikrep » Sat Jul 26, 2008 4:54 am

Been looking on e-bay at the huge number of LCD monitor display thingies you can get now for in car use. :shock:

This seller has an enormous selection and decent feedback rating.

http://myworld.ebay.co.uk/eonon/

I'm not going to waste much time on the two line lcd display driving routines I had been tweaking. I'll probably just utilise the serial to rca video output 16x9 chip I mentioned a few posts above and use one of these in dash things. My Honda radio needs an upgrade anyway 8)

Quite a few have a bluetooth interface and touch screens, now I know next to nothing about bluetooth, but I suppose a wireless touch screen interface to the BMS is a distant possibility :?

Back at work now for a week and free time limited :( Hope to finish PCB's this week.

Master Watchdog Timer.

I haven't forgotten about this, and will include some sort of watchdog, probably based on a a seperate 08M Picaxe on the Master board counting pulses from the Master and forcing a reset or shutdown if they stop. This probably won't appear however until MK2 too much other stuff to do.
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:

Some Stuff

Postby retepsnikrep » Sun Jul 27, 2008 12:17 pm

Added Watchdog chip to Master board 8) Yes it's another Picaxe 08M.

This basically counts the loop pulses from the Master Pic and if there is an interuption it triggers the audible alarm and if enabled then resets the Master after a designated time.

The Watchdog can only help to deal with Problems with the Main Pic, if it's programmed and designed properly it should not lock up anyway :roll: But it's a safety feature worth adding IMO. The watchdog does not deal with logic/program errors in my Master software unless they cause it to fall into an endless loop whilst not sending the reqd pulses to the Watchdog chip. :oops: A power glitch could cause both Pics to freeze I suppose in extreme conditions but I don't think I can do anything about that. Only so much I can do :cry:

Need to write the Watchdog Software now :?

Latest Schematic and Master software.

http://www.solarvan.co.uk/bms/Master270 ... hz_v77.txt

http://www.solarvan.co.uk/bms/Master270708.jpg

Note I have removed the two line 20x2 panel mount lcd driving routines from this Master version onwards as I am concentrating my display design on the Video output 16x9 Chip, which will work with a shed load of displays able to accept RCA Composite Video In.

I can add the simple LCD rountines back into the final versions later.

After tidying up and removing odd bits and pieces Master down to about 800bytes out of 4096bytes available.

Speed also now tweaked to 8mhz for Slave and Master to enable faster execution and direct comms with video chip.
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.


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 8 guests