Old BMS Software Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

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

Re: Old BMS Software Thread

Postby jackbauer » Mon Jan 31, 2011 10:22 am

Just a few thoughts on the wh/mile and soc calcs. I realise the problem with soc is not knowing the exact time taken by the main program loop. Sadly the simple solution of an interrupt driven timer will not work in this case. So what about using the PAUSE command in the soc loop? say measure current , pause for 100ms then multiply up to get ah consumed , subtract from total and get percentage? Yes this adds time to the overall loop but should work?

Regards the wh/mile. As we already accuratly calculate the motor power in kw why not use this value in the calculation? It is not soc or time dependent. Just a few thoughts i'm working on at present.

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

Re: Old BMS Software Thread

Postby feken » Mon Jan 31, 2011 9:16 pm

retepsnikrep wrote: 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.


Peter, could you please explain why this is the case.. I would like to understand.

Thanks

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

Re: Old BMS Software Thread

Postby martinwinlow » Tue Feb 01, 2011 6:44 pm

Hi Peter (and everyone else climbing on the band wagon),

I have been busy with other things as well as boxing the Master PCB...

I see things have moved on software wise and that the Master now only works with the new multi position switch setup. This is a bit of a blow as I have just finished making a dinky box for it to sit on the dash! I will try to cannibalize the old switch code into the new master - due to my using my carputer vor most functions I won't need to use the switches much anyway - and it;s nice having a few LEDs to tinker with without having to be able to see the Master PCB...

Can I ask where we are at with the Watchdog and particularly the Slave software as I gather they have both changed since the version I have programmed in.. Watchdog12F683_110610_V02.hex and PicMultiSlaveV29_300510.hex resp. I have tried to get my head around all the intervening posts on this and have got a bit lost especially as we seem to have swapped assemblers too!

Lastly, on the Mater main loop timing issue (which I think is sorted now...?) forgive my simplistic suggestion if it is pants but rather than trying to force the main loop to be a certain length (1 sec), can't the software be written to measure the loop length and calculate SOC etc accordingly? This would make a global solution to different pack sizes as well as issues with button pushes etc getting in the way. Like I say - I really don't know what I'm taking about!
Attachments
IMG_0305.JPG
IMG_0305.JPG (56.01 KiB) Viewed 17519 times
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 » Wed Feb 02, 2011 5:29 am

Martin / Feken

The button code should work with the old buttons. The only real difference with the new joybutton thing is it is consolidated into one device. I use it on all my projects now. The most recent Master software also has a much better debounce routine though which makes it a lot easier to use the menus.

The latest watchdog has the same functions as the picaxe and previous ones, plus Greg added a one second pulse output. That's not used by the master at present as there is no route i/o between them.

The latest slave software probably does not differ much from what you have but if it doesnt work with the latest Master code then you will have to upgrade.

The main problem with the multi slave boards is the voltage drop issue which made all the extra code in slaves and master necessary to get reliable cell voltages. This impacts on the available balancing time, as the number of slaves increases the communication load increases as well. It must affect every other bms with spaghetti wiring and shared cell leads as well.

If we could eliminate or reduce it to less than say 25-50mv then it would be possible to go back to a much simpler and faster version of the slave/master code which would return balancing time to the full 350ma.

The options to improve this are use very short and thick wires from the multislave board to the cells. This is the real killer. It needs someone to do some proper research on what drops are being experienced over what distances and over what gauge wire.

To prevent inter slave interference it is also possible to have one wire for each terminal for each slave but this doubles the number of wires reqd which still need to be a decent gauge.

So I went for the easier software option and turn off all the loads before any voltage readings are taken. This takes time

We really do need an accurate one second timer in the Master i just havent had time to devote the reqd effort to get that working.

Yes the master could time how long it takes to do a loop but the resulting maths would have to be hyper accurate to then keep accurate soc. I think that would be beyond the integer maths of pbpro.

Perhaps we should only take a cell voltage reading every 5 or 10 seconds?
That instantly massively increases the balancing time and reduces the comms load. We could then increase the current samples to say every 1/10 second, we can do a timer for that fairly easily which would also make the soc more accurate as long as our maths is correct :roll:

Taking a voltage reading every 2-5 seconds or so would reduce the accuracy of the instant display of things like motor kw etc

The good thing is that changing to taking a cell voltage reading every 2-5 seconds can be done without changing the slave code :wink:

In my experience using the bms for several years now I can say that although a voltage reading every second is nice you can certainly get away with only taking one every 2-5 seconds in most situations. Heavy regen on a full pack fresh off the charger might lead to an overvoltage scenario for a few seconds though.

Edit

In thinking about this it might be possiblke to have variable cell voltage aquisition intervals. For instance when the car is on the mains charger once every 5 seconds would be fine allowing much better balancing time. When the car is in use we don't really care about balancing for regen much as that will be pretty rare so we can go back to getting data once a second when on the road. I'll think about this! Don't know why I havent done it before to be honest. Too many projects not enough time.
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 » Wed Feb 02, 2011 7:17 pm

Peter,

Have loaded up the hex file for the latest Master and left the slave and watchdog as is. The main program seems to be fine but I get a 'Offset 1020' on the splash screen on startup.

My buttons work but have different button positions. I get a 'Cell 1 Error' no matter what. When I look at Cell voltages I get '1) 1.75V FB0' for each cell of 2 cells (I have 4 connected and 4 set under the 'cell number' variable. I think I used to get this connected with the Superslave thing... :?

Ideas?
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 » Wed Feb 02, 2011 7:28 pm

Peter,
The main program seems to be fine but I get a 'Offset 1020' on the splash screen on startup.


The offset is the current sensor calibration value. Once you have a sensor attached which floats at around 2.5v for zero amps then it should show around 512 which = 0 amps. It checks this each time program starts to get maximum current accuracy. So when you start the master make sure there is no current flowing in your system.

My buttons work but have different button positions. I get a 'Cell 1 Error' no matter what. When I look at Cell voltages I get '1) 1.75V FB0' for each cell of 2 cells (I have 4 connected and 4 set under the 'cell number' variable. I think I used to get this connected with the Superslave thing... :?

Ideas?


Update the slaves to the latest version.
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 » Thu Feb 03, 2011 9:11 pm

Hi Peter,

OK. Have re-progged all the slaves and have the system connected up to 4 x 2AA cells and all is nominal until I disconect a cell. If I disconnect the 1st cell nothing happens, if I disconnect the second or 3rd I get D6 (current limit/cont cutback) light up on the master PCB, if I disconnect the 4th the alarm and D6 come on. The cell voltage does not appear to change... Is this normal?

Next, I have got my I2C rom codes and would like to get to grips with assembling the Master.txt with PBP (I have version 2.6A). When I try to assemble I get a raft of errors ( I can't copy and paste them for some reason so I've put them in a jpg). Is this something to do with the 'configuration bits using MPASM' issue Fekin was having?

Lastly, can I ask if there is any danger in the sequence the cells are connected to the slaves? Does it have to be in a specific order?
Attachments
pbperror.JPG
pbperror.JPG (45.23 KiB) Viewed 17490 times
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 » Thu Feb 03, 2011 9:47 pm

Cells have to be connected in order as they share common connections. :shock: How did you connect them out of order?

Assuming you are using microcode studio as your editor, have you set it to use MPASM as the assembler? It defaults to PM assembler.
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 » Fri Feb 04, 2011 7:21 am

I was thinking about the scenario when one or more cells are disconnected and what effective voltage the relevant slaves then see - can't quite get my head around it but I'll give it some thought.

The other reason for asking was - for testing purposes, I'd like to use my 4 x 2xAA cells to test ALL the slaves so I can do it in the comfort of my study and so planned to test the slaves on a rolling basis ie connect cells 1 to 4 first, then 5 to 8, 9 to 12 etc. Should that work?

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 » Fri Feb 04, 2011 7:31 am

martinwinlow wrote:The other reason for asking was - for testing purposes, I'd like to use my 4 x 2xAA cells to test ALL the slaves so I can do it in the comfort of my study and so planned to test the slaves on a rolling basis ie connect cells 1 to 4 first, then 5 to 8, 9 to 12 etc. Should that work?


Testing the first four will work but not the others, as the slave bus will not be able to pass commands through slaves 1-4 to reach slaves 5-8.
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 31 guests