Old BMS Software Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

wjdennis
Posts: 17
Joined: Tue Aug 05, 2008 5:27 pm

Postby wjdennis » Fri Aug 07, 2009 3:42 pm

Peter, I've been reading the recent posts, but I've gotten myself confused. There was talk about a pulse and extending the pulse by 10x. But the code still seems to be using serial communications. Can you straighten me out?

Thanks.

Bill

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

Postby GregsGarage » Fri Aug 07, 2009 3:52 pm

wjdennis wrote:Peter, I've been reading the recent posts, but I've gotten myself confused. There was talk about a pulse and extending the pulse by 10x. But the code still seems to be using serial communications. Can you straighten me out?

Thanks.

Bill


Hi Bill,

Peter got the pulse code working, then sorted his EMI issues, so gave the serial data another try and it is working now with no errors. So the current version uses serial comms, but the pulse method is also available in some of the previous versions. Peter found that he was only getting 75mv accuracy with the pulse method if the pulses were very short so he increased the pulse length. This slowed down comms though so he has gone back to the serial method.

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 Aug 07, 2009 5:19 pm

LOL re phone. I don't have a mobile :shock:

I left R8 as 510R it works better for serial data as well helping with cut off at end of serial high pulses. I'm re-doing the schematic for a V2 Master incorporating the various hacks/changes I have made.

I may well get it made up into a pcb just so I can have a nice neat one in my car!! :oops: Vain I know.

I can't decide which new features I like best though. Some on board data storage? Wireless link to a remote display in house so you can see/hear if any issues. Data logging via wireless direct to PC and Excel spreadsheet etc. Better display with pretty graphs in car. Hmm ?

Edit

Yes Bill. Greg has summed it up nicely. I experimented with pulse and it is an option, but I went back to the more accurate serial data once I got my emi sorted.

I may use the pulse option to communicate with the slaves later when passing messages to them from the Master. At the moment the Master only sends one message ( a 10ms pulse) which means send voltage data please on Master Bus. This is passed from slave to slave.

I might expand this, and need a reliable way of the slaves receiving the message. You can't really use serial in on the Slaves 08M as they don't have the serial timeout function like the 28X1 picaxe. They could get stuck in a loop waitng for data and only a hard reset would get out of it.

But they can use Pulsin or Count so I can send LLOOOONNGGG pulses to them with different meanings.

i.e.

10ms pulse = Send Voltage Data on Master Bus

50ms pulse = Increase balancing cut in voltage by 10mv
100ms pulse = Decrease balancing cut in voltage by 10mv
150ms pulse = Adjust Voltage calculation Constant

etc etc You get the idea.
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 » Mon Aug 10, 2009 6:12 am

A few minor changes to Master software today.

Added 10x battery temp oversampling and improved speedo/odometer accuracy.

Looking at adding 10ths of a mile to odometer but not quite worked out best way to do it yet.

This version still has error counter in it, but it can be set to 1 to trigger immediately any error occurs.

www.solarvan.co.uk/bms/MASTER_SERIAL_10 ... 00BAUD.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:

Postby retepsnikrep » Sat Aug 15, 2009 12:47 am

I've been re-organising Master & Remote software to make better / more effcient use of the Alarm Bytes/Bits.

There are now a possible max 255 different Alarm types.
(Hopefully we never need that many :shock: )

There are only 5 different Alarms in the current software.

`AlarmByte (b0)

`If AlarmByte = 0 then (No Alarms Set)
`If AlarmByte = 1 then (Cell over AbsMax V)
`If AlarmByte = 2 then (Cell under AbsMin V)
`If AlarmByte = 3 then (Cell data serial transfer timeout error)
`If AlarmByte = 4 then (Battery Pack over AbsMax Temp)
`If AlarmByte = 5 then (Alarm Test Condition) Used to simulate Alarms

This re-organising helps free up program space in the 08M remote software, which can then be used to format the data when sent to the PC for the Excel/Text data logging.

The Remote software now also displays the type of error, and the cell with the problem if relevant. I'll post updates when I've done a bit more testing.

I quite like the SMS Alarm message idea have to look into that for a longer term upgrade.

Still have a spare ouput on the 08M remote display?
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 » Sat Aug 22, 2009 6:17 am

Rick

Can you post here all the info and software links you are using for your conversion of the Slave code to run on the native Pic. I may well load that onto my system as I have a Pic programmer and I'm happy to have a look at it all as well. It would make the Slave boards very cheap if we could use non-Picaxe Pics, but it would be a lot more difficult to upgrade the software in them later?

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.

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

Software Updates

Postby retepsnikrep » Sat Aug 22, 2009 10:58 am

Some updated versions of Master & Remote software today.

Change Log

Master V1.33 210809

1) Corrected SOC variable corruption. I was using the same variable twice! :oops:
2) Corrected Charger Voltage Control opto hunting problem.
3) Changed Remote data qualifier to "bms".

Remote with/and without display software has been ammended to reflect data qualifier "bms"

www.solarvan.co.uk/bms/MASTER_SERIAL_22 ... 00BAUD.txt
www.solarvan.co.uk/bms/RemoteDisplay220809_v08.txt
www.solarvan.co.uk/bms/RemoteMonitor220809_v02.txt

Remote display pcb's are now with manufacturer.

Master V2 pcb with eeprom, analog temp sensors, extra current sensor, txd output and lots of filtering :wink: is now being laid out by my chap.

I will order some as soon as it is done, anyone want one of those?

I have been thinking about SOC within the Master, it currently uses the actual capacity in AH and displays that, but would a 0-100% SOC display be better/more useful?

I will also add a balancing counter so you can tell when all cells have reached balancing voltage, and that basically the pack is full. I might then use this to turn the charger off :?
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.

steiner
Posts: 89
Joined: Mon Sep 08, 2008 1:50 am
Location: Florida

Postby steiner » Mon Aug 24, 2009 3:42 am

Peter,

I think the 0-100% SOC display would be better if more than one person is driving vehicle (wife maybe). I had actually been thinking of taking it one step farther to "miles remaining". At the end of the day this is what we really care about. "Do I have enough left to go to......".

Obviously miles remaining will depend on how you drive. Since we can't really look forward, we could average a certain interval in the past and assume they will continue to drive in the same manner (wh/mile). Using this information and how much is left in the battery, you could project forward how many miles are left.

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

Postby retepsnikrep » Mon Aug 24, 2009 11:11 am

I think 0-100% is possibly better for Soc rather than actual Ah as well.
I'll have to re-work SOC code to fit it into a variable 10,000. Giving 0-100% and two decimal places "100.00% remaining" I could cludge it for my system by multiplying my 40ah 100% Soc by 2.5x :roll: I won't do that though!!

I had estimated range remaining on my old BMS :shock: I'll look at this. The average vehicle speed for the last minute is already stored in EEprom (AvgSpeed). I could use this and the average current consumed for the last minute to give a figure. When we get the Master V2 pcb and the I2C eeprom on board we can more easily store the last hours average speed minute by minute and the average current minute by minute and then get the Master to do a much more accurate calculation. Accuracy would improve the further you drive on the trip. 8)

I think there are 120 bytes of eeprom free in the 28X1 chip so I might try and implement it soon.

This will be much more useful for a pure EV. My vehicle does not have limited range as it just uses more petrol as battery goes down, but it would be nice to see how far I can go before mpg starts to suffer!

Changes Log.

www.solarvan.co.uk/bms/RemoteDisplay240809_v09.txt

Remote Display simplified and saved 120 bytes. The remote display now tells you the error number and cell with the error, you look it up on the remote display error list surrounding the bezel for the lcd. I'm going to do some graphics for the remote enclosure with the list printed on it.

www.solarvan.co.uk/bms/MASTER_SERIAL_24 ... 00BAUD.txt

Master now has a trip meter and displays odo/trip distance to 1/10th mile, however it only updates once a minute.

Reduced remote display Txd preamble from 10 to 3 bytes which save quite a bit of time during data transmission.

Tidied up way Alarms were displayed on Master Video Screen and now use SV2000 chip save/restore screen feature.
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 » Tue Aug 25, 2009 12:57 pm

Change Log

Master

www.solarvan.co.uk/bms/MASTER_SERIAL_25 ... 00BAUD.txt

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

1) Changed Soc to 0-100% display
2) Increased resolution of Pack Voltage display from 1V to 100mv
3) Added Trip meter reset via button 4
4) Increased Remote Display Txd preamble to 5 bytes
5) Tidied up Video display a bit to make room for kwh & range remaining etc when software completed.

Remote Display

www.solarvan.co.uk/bms/RemoteDisplay250809_v10.txt

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

1) Slight edit to accept new Soc % format.
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 23 guests