Old BMS Software 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:

Re: Old BMS Software Thread

Postby retepsnikrep » Sun Jul 18, 2010 3:56 pm

A rest :wink: I'm relaxing a bit after a few weeks hard work on the project and I have some others stuff to do as well. So updates will be less frequent.

One possible issue that did occur to me was with the multi slave boards. If you power down the master whilst the system is charging, and any of the cells are bypassing, then if the master fails to send the load off command before it cuts off, the load could (Depending on the exact timing of the power down) be stuck on until the slave passed the low voltage fail safe cut off point.

So I recommend you do not turn the master off whilst any slave is bypassing current or within say 10 minutes of cutting off the charger.

In the normal charging scenario this isnt an issue as the BMS cuts the charger power when the cells are full, then within a few minutes the cells voltages fall back under the load turn on threshold and the loads would all be off and the master can then be powered down. So I will have to add a delay to any self power down routine for master V3.

I will add another feature to help determine end of charge and improve effciency. At the moment charge is terminated by your chargers own algorithm or when any cell goes over ABSMAXV and/or Charge is cut back when any cell goes over MAXCELLV. I will add a flag for every cell that is set when each cell reaches the balancing point. So as soon as all have reached the target voltage then the charge is terminated immediately via the relay.
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:

Re: Old BMS Software Thread

Postby retepsnikrep » Sun Jul 18, 2010 3:58 pm

Yes, you can use the picaxe cable, Yes, the code will need altering, Yes the data should appear on the pc serial port and be available to your software.

You have to power down the BMS for a couple of seconds to silence the watchdog alarm.
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:

Re: Old BMS Software Thread

Postby retepsnikrep » Mon Jul 19, 2010 8:57 am

I did some quick mods to the master software today to tidy up a few things and include the "all cells are full" charge cut off routine, which now stops charging as soon as all the cells have risen to the balancing voltage during the charge cycle.

They don't have to be all at the balancing point simultaneously, the master detects when each cell reaches the load cut in point and notes it, once all the cells have reached the load point at least once during this charging cyle then it cuts off. Every time you start a new charge cycle this all resets.

I also added the over or under total pack voltage alarms.

You need to adjust the constants MaxPackV & MinPackV and re-compile the program to set these, or advise me of your limits and I compile a version for you.

A few minor issues remain with PBP Master

The one second main loop timing which is critical for soc calculations is not tested or probably accurate at this time.

The 1st I2C temp sensor serial number data storage in the EEprom is not working correctly.

I'll post the updates when tested.
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: Old BMS Software Thread

Postby GregsGarage » Tue Jul 20, 2010 1:47 pm

retepsnikrep wrote:One possible issue that did occur to me was with the multi slave boards. If you power down the master whilst the system is charging, and any of the cells are bypassing, then if the master fails to send the load off command before it cuts off, the load could (Depending on the exact timing of the power down) be stuck on until the slave passed the low voltage fail safe cut off point.


Peter, I am going to address this issue by setting the low voltage fail safe cut off point to 3.50 volts instead of the 3.40 volts. Can you post the source code of the latest version so I can change it? I only saw the hex files a few posts back. Thanks.
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: Old BMS Software Thread

Postby retepsnikrep » Tue Jul 20, 2010 2:30 pm

Greg

I'm not sure that will work as I suspect you will run into the problem that caused us to develop the multislave software in the first place.

If the load is on then the slave ADC is affected by loads on adjacent slave and the voltage drop of it's own load, which will probably lead it to turn the load staright off if the fail safe is too close to the load cut in point. So you won't have any balancing capbility as the fail safe will always turn the load straight off. I think you need a minimum of at least 300mv between the two.

www.solarvan.co.uk/bms/PBP_COMMAND_SLAVE_V28_190410.txt
www.solarvan.co.uk/bms/PBP_COMMAND_SLAVE_V28_190410.hex

I have modified this for a fail safe of 3.50v but it is untested.
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: Old BMS Software Thread

Postby GregsGarage » Tue Jul 20, 2010 3:12 pm

I will give it a try, I am using 1.5mm2 wire for the slaves to keep voltage drop to a minimum so I might get away with it.
Greg Fordyce

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

martinwinlow
Posts: 79
Joined: Mon Jun 11, 2007 9:35 am
Location: Herts, UK

Re: Old BMS Software Thread

Postby martinwinlow » Sat Jul 24, 2010 10:35 pm

Peter, I'm trying to use the AXE027 lead with the redundant Master PCB programming port to connect to my PC using Hyperterminal rather than using another o/p port and having to rewire the PCB. If it were a PICAXE chip I gather I could address the 'TXD' pin directly with a SERTXD command with little or no configuration, DEFINEs etc. SEROUT appears to be the PBP equivelent but no mention of talkng directly to the SER OUT (TXD) pin on the 28X1 in the PBP manual. I'm planning to just add an extra line everywhere in the Master code to send the same serial output to the PC as goes to the video chip - maybe add a prefix code to ease deciphering in my VB program.

Any clues would be gratefully recieved.

Regards, Martin.
Regards, Martin Winlow
Herts, UK
http://www.evalbum.com/2092
www.winlow.co.uk

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

Re: Old BMS Software Thread

Postby retepsnikrep » Sun Jul 25, 2010 4:41 am

Have a look at this code. It is untested but contains a couple of improvements.

The timing routine has been altered to try and ensure the main program loop executes at 1 second intervals.

Data Logging to the Master Picaxe port has been enabled at 9600,8,N,1

Look through the program for "PCBit"

Please report back with test results.

www.solarvan.co.uk/bms/PBP_MASTER_V13_210710.txt
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:

Re: Old BMS Software Thread

Postby retepsnikrep » Fri Aug 20, 2010 2:39 pm

Having had a look at the slave software think i might have found how to deal with the master power failure issue if the slaves are balancing. Leaving slaves stuck on until they fall to failsafe voltage. Need to do some testing but am including a timeout function in the slave software which turn off the loads if commands are not recieved within a set period. So if the master packs up then slave loads are killed within a couple of seconds.

Had to replace the Bc337 charger relay drive transistor today on my master board as my mains charger relay had overheated and failed taking it with it. I was expecting quite a lot from my old octal 10A mains relay and my NG3 charger, so I'm now looking at a solid state 25A jobby from e-bay. My charger was turned down to around 10A drain but it was too much after a couple of years at max loads.
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:

Garbage in, Garbage out.

Postby GregsGarage » Fri Aug 27, 2010 9:08 pm

Doing some testing today of my slave boards and discovered something interesting. One of my boards only has 7 positions populated to match one of my battery boxes with 7 cells. Connected it all up and while setting the master to 7 cells I overshot and set it to 6 cells by accident. Thought, oh well I'll try it anyway and was getting the first cell reading of 4.27 volts and a over-voltage warning, the next 5 read normal. My first thought was a problem with the slave board, so plugged another one in and same thing. This was really strange because I had tested this one and knew it was o.k. :? So off I went on a wild goose chase. :shock: Some time later I thought to put in the correct number of cells, 7, and it all worked normally. :roll:

So it would appear that if you set the number of cells to a number less than the actual number of cells you will get erratic cell readings. I don't see this as a bug, more of the old computer saying of garbage in - garbage out.
Greg Fordyce

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


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 28 guests