General questions about the BMS project here please.

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: General questions about the BMS project here please.

Postby retepsnikrep » Sun Mar 20, 2011 6:15 am

hohisilver wrote:Solved :D

The watchdog PIC wasn't programmed correctly. It was warning me that it would be unreliable if MCLR was disabled while using the internal clock, which I foolishly ignored. Once I'd overridden the MCLR setting in the configuration it programmed correctly :)


I don't understand the mclr error. I don't get that with my cheapo programmer using the published code. What programmer are you using?
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: General questions about the BMS project here please.

Postby hohisilver » Sun Mar 20, 2011 12:45 pm

I'm using an ICD2 driven by MPLAB. I don't know whether it reads the configuration bits from the hex file, but I had "configuration bits set in software" checked and I kept getting that warning. Unchecking that box and setting the MCLR manually fixed the problem.
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....

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

Re: General questions about the BMS project here please.

Postby GregsGarage » Sun Mar 20, 2011 3:09 pm

hohisilver wrote:I'm using an ICD2 driven by MPLAB. I don't know whether it reads the configuration bits from the hex file, but I had "configuration bits set in software" checked and I kept getting that warning. Unchecking that box and setting the MCLR manually fixed the problem.


Look here for a discussion on the required configuration settings for the watchdog chip. Version 3 required manual setting of the configuration bits because it used default settings which were not correct. In version 4, it should all be set in the hex file. Maybe you've got version 3 of the watchdog? BTW, the only difference between the 2 versions is the configuration settings in the hex file, so if you have manually set the configuration it will work the same.
Greg Fordyce

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

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

Re: General questions about the BMS project here please.

Postby hohisilver » Sun Mar 20, 2011 5:36 pm

I'm actually a bit confused about how it programmed in the first place. When I tried to reprogram it yesterday with those settings it gave me the warning then failed to program. Before, I just got the warning and programming succeeded - I'm just wondering whether I programmed it as a slave the first time!

I'm definitely using Watchdog_081010_V04_1SP.hex, and looking at the source I'm assuming in this line:

@ __config _FCMEN_ON & _IESO_ON & _BOD_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_ON & _INTOSCIO

_MCLRE_OFF is equivalent to "MCLR pin function is digital input, MCLR internally tied to VDD" in MPLAB-speak and _INTOSCIO is telling it to use the internal oscillator, which MPLAB is telling me is an illegal combination.
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
hohisilver
Posts: 114
Joined: Mon Jan 24, 2011 10:17 pm
Location: Wells, Somerset

Re: General questions about the BMS project here please.

Postby hohisilver » Sun Mar 20, 2011 5:56 pm

Ah no, as you were :) It's an ICD2-specific thing I think - from the help file:

"When Internal MCLR is used with MPLAB ICD 2 for programming, both Vpp and Vdd are powered together, and then Vpp is pulled high to Vihh to enter programming mode. This means that your code will be running before Vpp goes to Vihh. If that code makes use of port pins that correspond to clock and data pins* in programming mode, there is a chance their values may not be 0, as necessary to enter programming mode. Therefore, the device could not be reprogrammed."

What I read from this is that once the code has been programmed in with this combination of config bits it can't be reprogrammed without erasing it first with MCLR enabled. Not really a problem then :)
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....

boelle
Posts: 83
Joined: Mon May 11, 2009 12:55 am
Location: Odense, Denmark
Contact:

Re: General questions about the BMS project here please.

Postby boelle » Fri Dec 16, 2011 9:20 pm

Hi peter

Would you mind if your work found way to a user based product?

We are (excludning myself) a group of danish cityel owners that are thinkinger with a replacement board that replaces the org relay/fuse board and the battery cells are from thundersky.

Since the cityel is not an complicated "car" it would look stupid on my eyes to invent the wheel all over


ps... do you think your PCB layouter are up for making boards if we do schematic's etc?
Help me build a big local network: http://gogetfunding.com/project/big-local-network
Best Pizza In Town: www.pizzaløg.dk

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: General questions about the BMS project here please.

Postby retepsnikrep » Fri Dec 16, 2011 10:04 pm

Sounds reasonable please post more details of exactly what you want.
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.

boelle
Posts: 83
Joined: Mon May 11, 2009 12:55 am
Location: Odense, Denmark
Contact:

Re: General questions about the BMS project here please.

Postby boelle » Fri Dec 16, 2011 11:02 pm

first we are going to build a basic PCB that handles lights etc... all the basic's to make it street legal

after that we are going to add on top of that, charging are the next.... i was maybe a bit ahead but since it's an EV i thought i might as well start search for options..

and that is where i remembered the slave units...

we are still in the very early stages.... for now we are planning what inputs and outputs we need
Help me build a big local network: http://gogetfunding.com/project/big-local-network
Best Pizza In Town: www.pizzaløg.dk

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

Re: General questions about the BMS project here please.

Postby GregsGarage » Fri Dec 16, 2011 11:36 pm

boelle wrote:first we are going to build a basic PCB that handles lights etc... all the basic's to make it street legal


Boelle, have a look at DesignSpark for schematic and pcb layout. It's free and unlike Eagle doesn't have a pcb size limit which would be a problem when making a fairly large board for relays. Also have a look at this pdf for a tutorial on creating pcb layouts. I have done a couple of simple pcbs and they aren't that hard to do. I have been using itead studio, prices start at $10usd for 10 small pcbs, they are quick (about a week, not bad coming from China) and even spotted an error on my first pcb and asked me to correct it and resend the files. :D
Greg Fordyce

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

boelle
Posts: 83
Joined: Mon May 11, 2009 12:55 am
Location: Odense, Denmark
Contact:

Re: General questions about the BMS project here please.

Postby boelle » Sat Dec 17, 2011 1:37 am

great... those advice was just what i needed.... have any idea what max size is they handle? had a bit trouble navigate their site
Help me build a big local network: http://gogetfunding.com/project/big-local-network
Best Pizza In Town: www.pizzaløg.dk


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 21 guests