Mini 12F683 Master

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:

Mini 12F683 Master

Postby retepsnikrep » Wed May 23, 2012 6:53 pm

I now have a 12F683 based Mini Master working on my 12 x A123 20Ah cell cycle pack. 8)

It uses a part populated 16 cell slave board so I can expand to 16 cells if I want a bit more omph.

It is greatly simplified and uses a serial Sparkfun 20x4 lcd display.
It does not at the moment do SOC or TEMP but for my application that's fine.
It displays Number of cells, Pack Voltage, Hi and Lo cell V number and Voltage.
It has the normal alarms displays.
It has one button which toggles the charger on/off.

The charger is a 48V 100w SwitchMode psu adjusted to 12*3.65V (44V) it tapers down well and is giving about 2.5A into the 40V pack.
I'm using a mosfet on the charger output (which simply turns off when a cell goes above AbsVMax) to control current and may use the pic HPWM on that pin so we could have pwm control of the current.

Code: Select all

'************************** Master PIC12F683 Pinouts ***************************

'                                    Top               
'                                   _____
'(+ Cell Supply)             +Ve -1|  ^  |8- -Ve                 (- Cell Supply)
'(Piezo/Led Out)             GP5 -2|  6  |7- GP0                     (Lcd Out)
'(Slave Data Bus Out)        GP4 -3|  8  |6- GP1                     (Button In)
'(Master Data Bus In)        GP3 -4|  3  |5- GP2             (Charger Control Out) 
'                                   -----


Basically the lcd/master will sit on the handlebars and a simple switch powers the master on/off via a 36-5v DC-DC converter so it draws from the full pack.

I could sacrifice the Pizeo output for a current or temp sensor in so may do that later.
My application is so far within the A123 cell specs I don't intend bothering at the moment.

I'll post the pics and code shortly.

Note I built this slave board using 180R resistors for the various opto/led drivers to firm up the signal. I also inverted the serial MasterBus signal into the Master so the MasterBus optos pull down the MasterBus pic input rather than the other way round which was a bad feature of the previous design. I use a 1K pull up on the pic MasterBus input pin.

Edit

I have just added the code for pwm (500hz) proportional charger control using a transistor in the power lead from the charger to the pack. I'll have to test this in due course.

Might be able to combine some functions on pins, for instance if I use a 4k7 pull up on the charger toggle button input, I may be able to have a single I2C DS18B20 temp sensor on the same pin.

A current sensor may be able to be added instead of the Piezo/Led.
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: Mini 12F683 Master

Postby GregsGarage » Wed May 23, 2012 8:50 pm

Cool. 8) Did you get a chance to try the 4 cell slave I sent you? I didn't want to make any more up if it didn't work, but if it does I can build and send you some more.
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: Mini 12F683 Master

Postby retepsnikrep » Wed May 23, 2012 9:05 pm

No chance to test yet Greg. Stupidly busy.
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 38 guests