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: BMS Software

Postby retepsnikrep » Wed Jun 23, 2010 6:45 am

:roll: Ok checking config and did not enable timr1 correctly to use internal oscilator. So it would hang at this loop :oops:


Code: Select all

lOOP0:
   IF TMR1IF = 0 THEN lOOP0      ;If 250ms has not elapsed then goto Loop0



TMR1F would never get set so trapped here!!!!

Try this version

http://www.solarvan.co.uk/pbp/MASTER_PB ... UD_I2C.hex


Are your diodes which feed the piezo the right way round?
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: BMS Software

Postby GregsGarage » Wed Jun 23, 2010 10:38 am

Checked the diodes, they are o.k. Won't have time to test until tomorrow. :(
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: BMS Software

Postby retepsnikrep » Wed Jun 23, 2010 2:30 pm

Ok I tried the new watchdog code on my master board, that works as predicted taking 65 seconds to time out. It didnt work for me straight away of course, because without an active master chip plugged in, the input to the watchdog pin floats :shock: and detects static and stray emi as pulses reseting the watchdog timer :roll:

I added a simple pull down and it worked fine for testing.

I have added one test slave and programmed the master. it's doing something but is wildy off somewhere. Display looks hopeful so we can see it is doing something.

I need to build my ICSP but i dont have a spare 28 pin socket to make the adapter like greg did at present.

I have added the MCLR IN4148 diode to the board though. By pulling the lead of R1 nearest the chip and inserting the diode there, then soldering the leads together.

I'll post a new high res pic of my master v2 board shortly. Please take careful note of the components I have ommitted mainly capacitors!!
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: BMS Software

Postby retepsnikrep » Wed Jun 23, 2010 5:17 pm

Testing Testing!!

pulse led now flashing.

pbpro Master pic now talking to single slave but returned voltage is wrong. Display works OK but all the master maths routines needs looking at. :roll:

When masterbus serial input is remmed out voltage is shown as 1.75v and triggers under v alarm which is correct. Need to get my logic analyser on the masterbus to check the data.

Need a 28 pin pic socket tio arrive so I can make the icsp adapter.
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 » Sat Jun 26, 2010 4:19 am

I now have my picaxe 28x1 chips as well and have built the ICSP adapter.

With my one test slave on bench my test system is not working at present with either Master, so i suspect a problem in latest slave software. :roll:

Please wait until i have it up and running on bench before finally programming your slaves etc.

I won't be able to work on it until monday next week.
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 » Sun Jun 27, 2010 2:42 am

Getting there slowly.

The error is in the latest versions of the slave software. I rolled back to an earlier non command version and that works fine on the bench even with the plain pic master 8)

Now have old and new slave software side by side trying to see what i broke!!!

Plain master pic software also getting there :)
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 » Sun Jun 27, 2010 11:53 am

Although i'm making some progress i need to sit down and get a grip!!!

I have a serial comms rather than a pulse comms version working now with the picbasic pro master on the bench at 9600baud. It required a stronger pull down resistor on the slave boards for R4 of 1K max I used a 510R.

I'm still stuck with the pulse comms version. The slave are not getting the right commands :roll:

Lots of testing to do before I let this out in the wild. Please be patient
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 Jun 28, 2010 10:26 am

Still working on all this. I am adding a new command to the slave software to report the software version which will be read by the master. Please ensure you mark your slave and master boards with the current version details of the software you are using. It makes debbuging a lot easier and in six months time you will know where you are. use sticker or something with version details. I wish I had done this earlier :roll:

The serial slave software is working fine at 9600 baud on both slave and master buses on the bench at present but needs the harder 510R pull down resistor for R4 on the multi slave boards. I'm still working on the pulse software to get it working properly without the resistor mod.

Rick will update me shortly with the current slave version he is using so i can back track a bit as he says that is working fine.
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 » Tue Jun 29, 2010 11:43 am

Picaxe Master Pulse code is now working with pbpro slave. :D

http://www.solarvan.co.uk/bms/PICAXE_MA ... 00BAUD.txt

The Master code now contains the sub menu option "Temp Rom" to read the serial numbers for your own I2C DS18B20 temp sensors. (each is different) This info then needs adding to the master software. This new option removes the need for the seperate BMS config software that i used to use.

http://www.solarvan.co.uk/bms/SlavePulseV01_290610.txt
http://www.solarvan.co.uk/bms/SlavePulseV01_290610.hex

I've re started the version numbering from V01 for the slaves. This slave software also contains Command 12 to report the slave software version number although the Master code to receive it is not finished yet.

Other news

Pbpro Master pulse code is also working with pbpro slave above but still contains a few other errors, but good progress made and not far off finished 8)

Once the Pbpro version is working acceptably I shall discontinue updates on the Picaxe versions of the Master code.
So future updates will require plain pic Master 16F886 chips.
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 » Wed Jun 30, 2010 1:58 pm

New today an extended version of the picaxe BMS master software with much better temp resolution for the I2C DS18B20 sensors.
Battery temp is now to 1/10th of a degree C. 8)
The routine also displays negative temps so covers the device full range -55 to +125 C

There are now two sub menus and another/more will be added later as additional functions are included.

Added the report slave software version number function (Command 12)

Several other little screen layout glitches tidied up.

http://www.solarvan.co.uk/bms/PICAXE_MA ... 00BAUD.txt

i'm now working on getting the eeprom code working to store some data. This was problematic before and kept crashing.

I'm cutting down the data stored in the eeprom chip to two bytes per second.

Alarm byte = type of alarm detected
Alarm count = cell with the above alarm if applicable

It should store over 9hrs worth of data on the above basis.

I may add a sub menu funtion to make the BMS check back the last stored data on request and display any Alarms that were stored. We can also dump this data to a PC if we wish via the programming lead or the remote display interface but that all needs a fair bit more work.

Other stuff

Still working on the non picaxe master code and have two problems at present, the buttons don't work (probably something to do with the adc input and the maths) and the I2c temp stuff is giving erroneous temps (probably my adaptation of the example code I borrowed).
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 11 guests