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 » Mon Mar 14, 2011 9:04 pm

No we moved over to MPASM a while back.

There is a demo version of PBP available.
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 » Sat Mar 19, 2011 11:49 pm

My C rewrite is coming along, to which end I've made up a ZIF header to avoid having to keep removing the PIC to reprogram it:

Image

And this is the display on my old Casio pocket TV (in case anyone is interested :) ):

Image

I have a question about the slave comms - I saw somewhere in the threads about the slave commands being achieved by timed pulses, but I notice the PBP software uses serout - does this mean the commands are now sent as proper serial bytes?
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 » Sun Mar 20, 2011 6:02 am

hohisilver wrote:I have a question about the slave comms - I saw somewhere in the threads about the slave commands being achieved by timed pulses, but I notice the PBP software uses serout - does this mean the commands are now sent as proper serial bytes?


Yes. So you could control the slaves using serial data from a PC/phone or other gizmo.

Nice board and display. The next version of the master will have proper ICSP connections. I use a 28 pin sockket with wires soldered to it which fits on top of the chip to program it. If you search it is easy enough to find the pbpro compiler. I bought it after testing it for a few weeks after I found an older version on the interwebulator. :wink:

Good luck with the C conversion
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.

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

Re: Old BMS Software Thread

Postby martinwinlow » Sun Mar 20, 2011 5:33 pm

Hi Peter,

I have finished testing the 3 x multi slave boards using my 4 x pairs of AA cells (as per pages 41 & 42) and found one or 2 glitches (inc a missed component) and then reprogrammed the Master and Watchdog with the latest code (V28 and V4_1 resp), installed the 1k resistor mod to the Master PCB and all is tickety-boo.

Just tried to ammend the Master code with the I2C codes and can't make head nor tail of which bit of the code needs replacing. The .txt file says ''The owout lines become ($55,xx,xx,xx,xx,xx,xx,xx,xx,$44) where xx = decimal serial no's for the I2C chips" but 2 of the owout lines have '$55,xx,xx,xx,xx,xx,xx,xx,xx,$BE' in them. Help!

Next - PC Logging - Am I right in thinking that if PCbit=0 then I should be getting some data out of CT2?

@jackbauer - Did you manage to write a mod to the Master V28 code for your LEM currant sensor? If so, can you let me know what I need to change in the code to support my sensor, please (data sheet is on page 42)? Thks.

Regards, MW
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 Mar 20, 2011 6:04 pm

It's the middle 8 xx bytes you need to change to match the code for your sensors. Connect the sensors one at a time to the I2C sensor input and then use sub menu 2 "temp rom" option to get the codes for each sensor in turn.

Re logging answer = yes. If you are using the picaxe programming lead then need to make sure serial port is set correctly . not sure what software you are logging to at PC end.
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 » Sun Mar 20, 2011 6:12 pm

Hi Martin, maybe I can help with the temp sensors. The $44 lines are the "start conversion" operation and $BE = "read scratchpad" (in this case the temp reading). You just need to make sure that the values you put in after "if TempInc = 0 then 'Read 1st sensor and start 2nd sensor temp conversion" are the opposite way round to the ones after the "if TempInc = 1" line.
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....

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

Re: Old BMS Software Thread

Postby martinwinlow » Sun Mar 20, 2011 6:44 pm

retepsnikrep wrote:It's the middle 8 xx bytes you need to change ... Connect the sensors one at a time to the I2C sensor input ...
"Yeah I know!..." but I can't understand which octet of code needs to replace what in what line of code... I can't even get it with hihosilver's help. I must be really dim.

Can I try this... in the 'paragraph' starting 'Sensor 1 (Front Battery Block)', which sensors code needs to go in the first 'owout' line and which in the second? Then, in the paragraph starting 'Sensor 2 (Rear Battery Block)', ditto? Does the code need changing in the subroutin 'Start:'?

retepsnikrep wrote:Re logging answer = yes. If you are using the picaxe programming lead then need to make sure serial port is set correctly . not sure what software you are logging to at PC end.


I am geting an output from my AXE027 cable using Hyperterminal but no sign of battery voltages when I toggle TXbit. PCbit toggling to 0 gives:- 'DATA,TIME,81,81,67,69,43,99,100,0,0,0,'.

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

User avatar
hohisilver
Posts: 114
Joined: Mon Jan 24, 2011 10:17 pm
Location: Wells, Somerset

Re: Old BMS Software Thread

Postby hohisilver » Sun Mar 20, 2011 7:06 pm

Ok, say you get "10,20,30,40,50,60,70,80" for one sensor and "80,70,60,50,40,30,20,10" for the second one; change the lines:

owout DigitalTemp,1,[$55,$28,$B9,$11,$16,$01,$00,$00,$A4,$BE]

and

owout DigitalTemp,1,[$55,$28,$CD,$11,$EA,$00,$00,$00,$28,$44]

under "if TempInc = 0" to

owout DigitalTemp,1,[$55,10,20,30,40,50,60,70,80,$BE]

and

owout DigitalTemp,1,[$55,80,70,60,50,40,30,20,10,$44]

Do the same after "if TempInc = 1", but put the 80,70,60,50,40,30,20,10 in the first line and 10,20,30,40,50,60,70,80 in the second

HTH :)

EDIT: Don't forget to change the "owout DigitalTemp,1,[$55,$28,$B9,$11,$16,$01,$00,$00,$A4,$44] 'Start 1st temp sensor" line near the start too :)

EDIT 2: Dammit, shows how confusing it is - I had them the wrong way round in my original post!
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 » Mon Mar 21, 2011 4:32 am

martinwinlow wrote:I am geting an output from my AXE027 cable using Hyperterminal but no sign of battery voltages when I toggle TXbit. PCbit toggling to 0 gives:- 'DATA,TIME,81,81,67,69,43,99,100,0,0,0,'.

Regards, Martin.


Remember the cell voltage data received needs to have 175 DEC added to it in your program to recreate the cell voltage.

Is the data hex or decimal in your example above?

The cell voltages should be the first numbers after "Time"
How many numbers there are of course depends on how many cells you have.

I havent tested the data logging for some months so beware :?
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.

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

Re: Old BMS Software Thread

Postby martinwinlow » Mon Mar 21, 2011 7:14 pm

Hi Peter & Ian,

Thanks - that has sorted it.

Next question... can i use 20+ IC2 temp sensors? If there arn't enough variables avaialble could I use the same variable and just read and 'owout' each reading in turn?

When I connect the currant sensor the display tends to be quite signiificantly affected - it goes like an old TV with heavy distortion and rotating etc. Any ideas?

To use my -400 - 0 - +400 amp currant sensor can I ask, at line 789 in the CalulateSOC: subroutine, do I need to divide by 2.5 rather than 10 (I gather I have to multiply by 10 first and then divide by 25)?

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


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 4 guests