Old BMS Software Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

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

Re: BMS Software

Postby GregsGarage » Sat Jun 19, 2010 6:15 pm

I have knocked this up. Carefully place over chip on master so pins line up. Can't test until Monday as I left the master at work. :(

EDIT: I have removed the image, schematic was wrong. As Peter has pointed out in the next post it needs a pull-up on the MCLR pin.
Last edited by GregsGarage on Mon Jun 21, 2010 12:12 pm, edited 1 time in total.
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 » Sat Jun 19, 2010 8:24 pm

:lol: :lol: :lol: :lol: :lol: :lol: :lol:

There is a limit to what I can do in a B&B in Salen Argyle :wink

Edit

Greg you need a 1n4148 diode on the mclr line with a 10k pull up resistor to +

like this

Image

Master may already have a 10k on that line (MCLR) I dont have a schematic here. Make sure the reset jumper is removed during programming.
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 » Mon Jun 21, 2010 12:51 pm

8) 8) 8) 8) It works! 8) 8) 8) 8)

R1 on the master provides the pull-up for the MCLR line (pin 1). Doesn't appear to need the diode. I left the reset jumper connected, mainly because disconnecting it would mean cutting the wire I put across it! :shock: D4 illuminates when connected to the programmer, but doesn't seem to affect it. The 16f886 has 2 ground pins and both must be connected to ground. I will upload a scematic and a better picture of what I have done tonight.
ICSP4.jpg
ICSP4.jpg (96.18 KiB) Viewed 13781 times
Greg Fordyce

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

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

Re: BMS Software

Postby GregsGarage » Mon Jun 21, 2010 10:48 pm

I have built a slightly better adapter, soldered the wires onto the top of a 28 pin DIP socket. The programmer seems happy with it. I have downloaded Peters latest master code onto the pic. I am getting a warning "Some configuration words not in hex file. Ensure default values above right are acceptable". The top right shows "Configuration 23D4 0700". Don't know what it all means, probably need some tweaking of the software. Still can't do any testing, must finish my battery boxes.
ICSP5.jpg
ICSP5.jpg (47.78 KiB) Viewed 13776 times


I have been playing with Fritzing, getting to like it. Here is a schematic of what I have done.
ICSP adapter_schem.png
ICSP adapter_schem.png (39.18 KiB) Viewed 13776 times


And a breadboard view from Fritzing.
ICSP adapter_bb.png
ICSP adapter_bb.png (5.57 KiB) Viewed 13776 times


The schematic shows a Picaxe which you can use, but once you program it with the pic programmer it will never be usable as a picaxe again. Use a bare 16F886 instead. The programmer we are using can be found at www.piccircuit.com
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 » Tue Jun 22, 2010 12:34 pm

Greg

You can ignore those configuration errors.

Put an led across the watchog led output is it flashing??

I'll be home tomorrow, may get some shed time wed pm or thursday pm.

The IN4148 diode is reqd I believe as the programmer sends a high voltage (>5v) to the MCLR pin and the diode prevents it getting to the + ve bus. But if it works hey ho. I will include it in the schematic for Master V3 though.
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: Cougar data string

Postby GregsGarage » Tue Jun 22, 2010 8:25 pm

No flashing from the watchdog led. When I power the board D4 (transmitter output) and D5 (charger relay) light up solid. After about 2 seconds D5 goes out and stays out. The watchdog is running the picaxe software.


GregsGarage wrote:Also what was the name again of the program you use to highlight changes in different versions of software?
Found it! http://winmerge.org/downloads/
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 » Tue Jun 22, 2010 8:30 pm

Anything on the video screen? Splash screen?

Does the audible alarm sound for 2 seconds?

I suspect the defines/config at the begining of the program.
Last edited by retepsnikrep on Tue Jun 22, 2010 9:01 pm, edited 2 times in total.
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 » Tue Jun 22, 2010 8:42 pm

8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8) 8)

Yes we do have a splash screen and then an error, "pack max temp".

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

EDIT: Nothing from the audible alarm. :( Maybe D5 illuminating for 2 seconds is supposed to be the audible alarm? :shock:
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 » Tue Jun 22, 2010 9:00 pm

The temp alarm is logically correct if no sensors are fitted because the input will be out of range. Sounds hopeful.

Ok this version has temp remmed out for testing.

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

Is your Piezo in the right way round?

Which pin of the pic is d5 attached too? I dont have a schematic here.

D5 is probably the voltage alarm led.

You really need to connect at least one slave to the master so we can see if it working. I will have to compile the code for a single slave. The current software is expecting 48 slaves so will give a communication error immediately!
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 » Tue Jun 22, 2010 9:42 pm

Piezo is the correct way round and tested o.k. D5 connects to pin 27, RB6. I had a look at the code and didn't see anything. Maybe test it on a known working master in case I made a stupid soldering mistake. :shock:

Made some progress on my battery boxes today, 3 done and the last one nearly there. So should be able to test 48 cells soon. I am going to call it a night for now.
Greg Fordyce

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


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 64 guests