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 » Thu Feb 10, 2011 4:33 am

Thanks Jack. I left the timer in place until it all settles down. Seems to work a lot better. It cut off correctly last night and soc appears to be more accurate. 8) It will take a while but i plan a major rewrite of the master code now :shock:

I'll make the bms display the last recorded Alarm via a menu option and when it first starts so we can see what has happenend when you get back to it later. The I2C EEprom is still not utilised properly I'll gte back to that code after the rewrite and tidy up.
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 Feb 21, 2011 5:42 am

I've just added a few more functions to the Master software V0.28. I'll test and post them later.

1) Pushing the up toggle button at any time when in main loop displays the last stored Alarm.
This is useful when you come back to the car and perhaps charging has terminated unexpectedly or you just want to know charging terminated correctly. Press Up :)

I might add a smile or similiar character to the bottom right hand corner of the screen :) indicates charging finished OK, :( indicates Houston we have/had a problem, press up to view it. Depends what's available in SV2000 chip eeprom extended ascii.

The last alarm is stored in the pic eeprom so when BMS next turned on it should be available to view.

2) In submenu three you can now toggle on/off the Charger and Controller optos for testing purposes.

I'm using this to force my charger into current cutback mode (controlled by the opto) without having to wait until batteries are nearly full which limits available testing time. So you can test the opto's at whatever stage you like.

I'm using hacked 350w meanwell chargers with two stage current control.
Bulk phase is 6A charge. when opto comes on current will be limited to 300ma to allow balancing.

3) Temp display again now shows one figure after decimal point. This was the behaviour before we messed around with the one second loop stuff.
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 » Mon Feb 21, 2011 9:34 pm

Hoping to get all my bms modules wired in this week, then I can try the new master software. Car is getting very close now. :)
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 Feb 22, 2011 5:39 am

OK here is Master V0.28

As above and another version of the current routine for a bit more accuracy with integer maths. This version takes four samples instead of ten each time current is measured. Then uses a bit of clever maths to squeeze out extra resolution.
The maths/sensor accuracy is highly dependent on the accuracy of the adc reference voltage, which in this case is the 5v master board supply. Please use a decent 5v regulator. Theoretically with a good +100A to -100A sensor it should be accurate to around 200ma.
Attachments
MASTER_V28_210211_185V_P.zip
(28.33 KiB) Downloaded 808 times
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.

jackbauer
Posts: 19
Joined: Wed Jan 26, 2011 8:38 pm
Location: Ireland
Contact:

Re: Old BMS Software Thread

Postby jackbauer » Wed Feb 23, 2011 8:22 am

Peter , could this new current routine be used with a lem hass 300s for 500amp readings?

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 » Wed Feb 23, 2011 8:59 am

I've no idea Jack. Feel free to have a tinker and report back.

For everyones info here is a current list of The Master Alarm & Command Codes.
I suggest print it out and keep in car!

'**************************** Master Alarms ***********************************

' Alarms Additional Information (255 possible Alarms) 0 or 255 = No Alarms

' If Alarms = 0 then (No Alarms Set)
' If Alarms = 1 then (Cell over AbsMax V)
' If Alarms = 2 then (Cell under AbsMin V)
' If Alarms = 3 then (Cell data serial transfer timeout error)
' If Alarms = 4 then (Battery Pack over AbsMax Temp)
' If Alarms = 5 then (External End Charge OR Battery Fault Condition) (Pack Voltage Drop Detector)
' If Alarms = 6 then (Internal End Charge) (Cells have all reached balancing voltage during this charge cyle)
' If Alarms = 7 then (Pack Voltage > Maximum permitted Pack Voltage)
' If Alarms = 8 then (Pack Voltage < Minimum permitted Pack Voltage)
' If Alarms = 9 then (Watchdog chip 1S pulse missing)
' If Alarms = 10 then (Command Error, Sent & Recd do not match!)


'***************************** Slave Commands **********************************

' Command 01 = Send Cell Voltage on Master Bus
' Command 02 = Turn Off Loads
' Command 03 = Turn On Loads as Reqd by Load CutIn Voltage
' Command 04 = Increase Load CutIn Voltage by 50mv
' Command 05 = Decrease Load CutIn Voltage by 50mv
' Command 06 = Set Slave Load CutIn Voltage Default
' Command 07 = Turn On Slave Load for 0.5 seconds (Flash Led)
' Command 08 = Report Slave Software Version Number
' Command 09 = Increase FailLow Cut Off Voltage by 50mv
' Command 10 = Decrease FailLow Cut Off Voltage by 50mv
' Command 11 = Increase FailHigh Cut in Voltage by 50mv
' Command 12 = Decrease FailHigh Cut in Voltage by 50mv
' Command 13 = Set FailHigh/Low Voltages to Default
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
hohisilver
Posts: 114
Joined: Mon Jan 24, 2011 10:17 pm
Location: Wells, Somerset

Re: Old BMS Software Thread

Postby hohisilver » Wed Feb 23, 2011 9:41 pm

Peter: I've read through most of the threads now and I think I know roughly where things stand with the project at the moment. One thing worries me slightly, you mentioned you've gone over to Pic Basic Pro for programming? I was hoping I might be able to customise the master software a bit, but I see the compiler for this costs £179 from Rapid? :shock:

My budget is going to be stretched somewhat for this project and I don't really want to have to spend that much just to be able to do a few "tweaks" :roll:
Ian.

A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....

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 » Wed Feb 23, 2011 10:32 pm

HoHiSilver. There is nothing to stop you using the earlier picaxe versions and incorporating some of the newer changes into that code. Comms would be max of 4800bps but that's not bad. We can still support it here.

I and some of the others on here won't mind compiling pbpro code for you if you need it.

The BMS here was never intended to be a commercial system, just a few people tinkering around. You are welcome to modify what you need to meet your project specs.

We changed to pbpro for better speed and smaller code, I use it in a number of other projects that the picaxe could not cope with, and pbpro made them possible for me. :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
hohisilver
Posts: 114
Joined: Mon Jan 24, 2011 10:17 pm
Location: Wells, Somerset

Re: Old BMS Software Thread

Postby hohisilver » Thu Feb 24, 2011 8:24 am

Ah, so "bridges haven't been burnt" as it were - the boards can still use picaxe? ;) My other thought was maybe to disassemble the PBPro code and do my changes in assembler! :lol:

Yeah, I appreciate that this is not a commercial project (and the amount of work you guys have put into it) - I think that's why it appeals to me, in that it is more than just a BMS and is customisable to what I want. On which subject, I believe it's possible to use more than one temperature sensor? I ask because I may want to incorporate a motor temp sensor in mine.

EDIT: Boards arrived yesterday, thanks Peter :)
I didn't realise it included the Remote Display board(s? What's the tiny one?) - looks like I'll have to build that too then! :lol:
One question: I'd like to build and play with the master first - are there any problems not having slaves connected?
Ian.

A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....

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

Re: Old BMS Software Thread

Postby steiner » Mon Mar 14, 2011 8:55 pm

Peter,

I had lunch today with a friend that is also using PBP on some of his projects (nothing related to BMS). He recently had to talk with someone at MicroEngineering and they informed him that since MicroChip is coming out with new chips so fast they are going to drop their assembler (PM) in the near future and only support the MicroChip version (MPASM). Just wanted to let you know in case you were using the PM assembler on any of this.

Rick


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 14 guests