Old BMS Software Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

feken
Posts: 13
Joined: Sun Nov 07, 2010 8:33 am

Re: Old BMS Software Thread

Postby feken » Tue Nov 23, 2010 6:41 pm

That's it..

So for the record, when using the Picbasic Pro compiler (2.60a) with the MPASM assembler you have to:

1. Comment out the DEVICE statements:

Code: Select all

'@ DEVICE PIC12F683,MCLR_OFF
'@ DEVICE PIC12F683,BOD_OFF
'@ DEVICE PIC12F683,PROTECT_OFF
'@ DEVICE PIC12F683,WDT_OFF


2. Add the following line:

Code: Select all

'Below used with MPASM Assembler
@ __config _FCMEN_ON & _IESO_ON & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _INTOSCIO


3. In your c:\pbp\12f683.inc file comment out the __config line:

Code: Select all

    else
        LIST
        LIST p = 12F683, r = dec, w = -302
        INCLUDE "P12F683.INC"   ; MPASM  Header
        ;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
        NOLIST
    endif


Thanks for the help guys.

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

Re: Old BMS Software Thread

Postby GregsGarage » Tue Nov 23, 2010 8:54 pm

Hopefully after all that you can get the comms to the slaves working. :shock: Interested in how you get on with the netduino, looks like a quite powerful board. 8)
Greg Fordyce

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

feken
Posts: 13
Joined: Sun Nov 07, 2010 8:33 am

Re: Old BMS Software Thread

Postby feken » Tue Nov 23, 2010 9:01 pm

Me too. I guess it has something to do with the inverted signal.
I ordered myself one of these: http://www.saleae.com/logic/ to find out.. :D

My goal is to connect the slaveboard to a netduino plus (with networking and SD card) and host a webserver on it displaying all sorts of info... and keep the history on the SD card. These netduino's are unbeatable in price, features, ease of programming (for me as c# programmer) and debugging.

Wish me luck 8)

feken
Posts: 13
Joined: Sun Nov 07, 2010 8:33 am

Re: Old BMS Software Thread

Postby feken » Tue Dec 21, 2010 8:54 pm

Figured it out.. the slaveboard is now responding to command's from the netduino.

See here the slave board responding to command '1', and resending it to the next slave:
Image

The trick was (as I suspected) the inverted signal

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 Dec 22, 2010 5:12 am

Well done. That salea logic thingy is excellent I have one as well. :D
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 » Thu Jan 13, 2011 8:19 am

Here is some updated Master software for V2 boards.

It has a much improved button routine at last, seems to work well with the little joybutton i'm using. :D

Note this version is compiled for an abs max pack battery voltage of 225V for my Insight. So if you need a different pack voltage you will need to let me know. Or you can compile your own source is included.

Error logging in the I2C eeprom is disabled at present i'll work on that again soon.

Peter
Attachments
MASTER_V22_120111_MPASM_225V.zip
(25.37 KiB) Downloaded 726 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.

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 Jan 13, 2011 5:48 pm

General musings.

The multi slave boards work Ok but as slave numbers increase the available current bypass time decreases due to the increased comms load. I would also like the slaves to retain some autonomous capability beyond the basic fail safe mode they now have.

But in order for the slaves to operate correctly they have to know what is happening with the slave before and after it in the chain. If the loads is on either slave then it interferes with the voltage readings as we discovered.

This problem does not affect the single slave boards on prismatic cells.

So the question is how can we overcome this problem in a more elegant way and allow the slaves to operate the loads without the master having to send all the various commands. Some interslave comms will be reqd so I think we can connect the slave data bus output from the last slave to the input on the first slave. Making a nice closed loop. The Master can also be connected into the input of the first slave to inject commands into the loop. This would probably make the master code a lot simpler.

1) The slaves when first turned on / connected will sit there until the master sends the special start command.

2) Once sent the slaves continue to pass this special command round and round checking cell voltage, operating the load and dumping the cell voltage data on the master bus until another command or a special stop/sleep command is sent by the Master.

The slaves themselves need to turn off the load, measure the voltage, activate the load if reqd and report the cell voltage. The problem is getting them to do that whilst not interfering with each other.

If we start with slave 1 lets imagine when it recieves this special command it executes the following sequence.

1) slave load off
2) send command to next slave (This gives time for cell voltage to stabalise)
5) Pause Xms (This gives time for next slave to turn off it's load)
3) Measure cell voltage
4) Send cell voltage data on master bus
5) Pause Xms (This gives time for next slave to measure it's voltage before this load comes on)
6) Activate load if reqd

Does that make sense? There are lots of possible issues and room for error. :roll:
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 » Fri Jan 14, 2011 10:29 am

Peter your idea does make sense. There is one other solution that hasn't been discussed. I had the idea a while ago after looking at one of my car battery chargers. It has a separate wire for voltage monitoring from the wire that carries current. This allows it to accurately measure the voltage at the battery without having to worry about voltage drops/rises in the charging wire. Of course the biggest down side is this doubles the number of wires. :( We could do something similair with the slaves, although I am not keen on extra spaghetti wiring. :shock:

On my setup I have used quite large wires to minimize voltage drop. Will try at some point to run it without switching off the loads and see how it goes.
Greg Fordyce

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

feken
Posts: 13
Joined: Sun Nov 07, 2010 8:33 am

Re: Old BMS Software Thread

Postby feken » Fri Jan 14, 2011 4:05 pm

Peter,

How many cells are used when this problem occurs?

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 Jan 14, 2011 5:21 pm

Greg I don't like the idea of double the spaghetti. I think we can try difefrent software ;)

Feken it's not really a question of how many cells, although this does reduce the effective balancing current at the moment as the time the load can be on is shorter with a higher number of cells.

It's when you have thin wires and a remote slave board. When the cell load activates it first of all produces a false cell voltage reading due to the voltage drop in the wires and then also interferes with the adjacent cell voltage readings.

That's why in the current version of the Master Software the slave loads are turned off on all the slaves before any voltage readings are taken.

Having been thinking about it i think we can improve the duty cycle quite a bit. i'll do some software tinkering. It may require some loss of error checking though as at the moment the master checks every slave has recieved every command it sends.
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 12 guests