8 Battery Lead Acid Slave Board

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

User avatar
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Wed Feb 23, 2011 8:28 pm

RESULT :D

Using just the LM393 comparator, I can get 300 baud serial.
Using an op-amp first I can get 1200 baud serial 8)
The phototransistor can't drive a 10K pulldown so I am using 39K. I wonder if I could omit the comparator now or use the other op-amp on the LM393 with positive feedback as a comparator and that would reduce the package count. I'm not finished tinkering yet! I have been using the dual trace feature on my oscilloscope tonight, I feel so like a scientist :lol:

I like the sound of using pulsin for the slavebus and using serial on the masterbus to talk back to the master. I've been fleshing out my ideas for the software and will hack it together pretty soon I think.

Tomorrow, I'll play with the hall sensor and LM393 to see if I can make a propshaft speed sensor to ping the opto input on the master board.
Having fun with this now :)

Derek

EDIT: The picaxe connects to pin 1 on the LM393, missed it on the schematic :oops:
It still works with just the op-amp but it looks better on the scope with the comparator and the ability to adjust the threshold makes it easier to dial in the proper logic levels.
Attachments
fibre3.png
fibre3.png (9.2 KiB) Viewed 30770 times

User avatar
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Fri Feb 25, 2011 11:41 pm

Sometimes it IS that easy!!!
I am still tinkering with the el cheapo fibre link and have finally arrived at the correct choice of ingredients.
Receiver is the TEPT4400 from Vishay and the transmitter is an ultrabright 5mm red led with clear optics (from ebay). The led is driven via a 220R resistor direct from the picaxe. The TEPT4400 is fed +5v and goes direct to the pic input using a 10K pulldown resistor.....and that's it .....2400baud just like that :wink:
Total cost < £2 Fibre cable can be obtained cheaply by purchasing cheap TosLink cables on ebay £3 - £4 for 3 metres.

I have as usual been overcomplicating things :oops: I have learned how to use op-amps and comparators though so my "experiments" have not been for nothing :lol:


The solution presented itself when I was testing my newly built multi-slave board........yep thats right, PCB delivery received from China yesterday :shock:
I had connected the new slave board to the "test mule" and didn't get any serial comms even though the super high tech Avago transmitter was flashing merrily to itself. After a bit of scoping I deduced the signal was way too strong after the op-amp so it was not switching logic levels properly. When I discovered the Avago transmitter could make the TEPT4400 work with no extra gubbins I realised I had a cr*p LED scenario so I tried the clear red LED, which I had in my spares box all along :roll:

So I guess this has been a good night! Pictures of the boards to follow.

Derek
Last edited by dillond666 on Wed Mar 02, 2011 5:23 pm, edited 1 time in total.

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

Re: 8 Battery Lead Acid Slave Board

Postby retepsnikrep » Sat Feb 26, 2011 12:14 am

Nice work Derek

I might use that on my next slave/master board version :) I'll do some tinkering.
Did you heatshrink the devices onto end of the fibre cable as I mentioned?

Can we have some pics of the setup and cable etc please.
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
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Sat Feb 26, 2011 11:36 am

PICTURES:

http://www.dillond1.pwp.blueyonder.co.u ... -built.JPG
http://www.dillond1.pwp.blueyonder.co.uk/pcb-front.JPG
http://www.dillond1.pwp.blueyonder.co.uk/pcb-back.JPG
http://www.dillond1.pwp.blueyonder.co.uk/test-mule.JPG

Peter, I did use heatshrink as you suggested. On the test mule picture the receiver is near the yellow label on my breadboard and the 18 pin picaxe board is the receiver. The small 8 pin picaxe board to the left is the transmitter. The op-amp and comparator chips are still stuck in here too.
For the test I set the transmitter to transmit a sequence of numbers and the receiver to light the LEDs when the specified numbers are received, I also had the debug screen open on the receiver.

Just about to assemble the master / 5 slave board. The only error I've found so far is that I put the power resistors a little too close together so the gaps I've left will be filled with a narrower solution, Three resistors per slave was mainly just a way of "keeping my options open" though, not an absolute requirement :wink: The input protection zeners I bought are too large as well, but I just bought what was in stock at the time and made them fit :)

Derek

EDIT: pic of the master/5-slave board. http://www.dillond1.pwp.blueyonder.co.u ... master.JPG
Last edited by dillond666 on Mon Feb 28, 2011 8:40 pm, edited 1 time in total.

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

Re: 8 Battery Lead Acid Slave Board

Postby retepsnikrep » Sat Feb 26, 2011 11:44 am

Nice boards!! :D
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
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Wed Mar 02, 2011 5:56 pm

SOFTWARE:

I've had some initial thoughts about software.

Slave
The slavebus will use the El Cheapo fibre link and communicate using pulsin / pulsout, this will enable the master to give more commands to the slaves.
The slaves will chirp back on the masterbus to acknowledge all commands and to relay information.
Functions might include adjustment of cut in and cut out thresholds, testing of the load switching and manually switching loads on and off.

Master
The master will be designed to be uncluttered and unobtrusive. I will separate the two modes of operation as much as possible with charging and driving being considered separately. I want to have a minimum of information on the screen during both driving and charging.

When in Driving mode the display will show vehicle speed and fuel gauge prominently and current and voltage less prominently. The button routine will be locked out if the speedo reads any movement. The buttons will be mainly for entering the admin menu (using a press and hold to access) shorter presses may be used for other functions. The fuel gauge will take account of peukerts effect for more accuracy and will be scaled to go for 50% - 60% DOD.

When in charging mode (set automatically by plugging in the charge lead) the display will show the fuel gauge and current as well as the high and low battery and how many batteries are balancing. There will be a digital output to throttle the charger if I can mod my Zivan a little (help). I might try to store the last couple of high/low batteries at the end of each charge to help identify any stragglers. The master will switch on and off the charger and receive its power from a 12v plug pack so as to preserve battery power.

Derek

User avatar
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Mon Mar 07, 2011 8:31 pm

I've got a first draft of the slave software done :) I have only made one command available using pulsin at the moment.
I am crunching together the master software at the moment.
Unfortunately I've discovered a howler of a hardware error :oops: The Picaxe pin I have the charger current sensor attached to doesn't do ADC ! what a plonker! I do have two spare ADC inputs on a separate header though, so I can utilise one of those no problem and use the pullup command to take care of the unsuitable pin :wink:
I'm getting close to wrestling with the display routine and am not too impressed with the tellymate documentation, they need a spannermonkey friendly version :(
I think version one of the master software will not even require the keypad. I'll pad it out with frilly bits when I get the core functionality sorted.

Also managed to fry one of the slave input protection zeners when "destruction testing", it failed short circuit with no other damage so if I had a properly rated fuse in the equation I reckon it would work fine (without the dead zener either!).

first draft slave software here: http://www.dillond1.pwp.blueyonder.co.u ... ftware.bas

Derek

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

Re: 8 Battery Lead Acid Slave Board

Postby retepsnikrep » Mon Mar 07, 2011 8:38 pm

That code looks ok to me at a quick glance. 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.

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

Re: 8 Battery Lead Acid Slave Board

Postby hohisilver » Mon Mar 07, 2011 9:29 pm

The master will be designed to be uncluttered and unobtrusive. I will separate the two modes of operation as much as possible with charging and driving being considered separately. I want to have a minimum of information on the screen during both driving and charging.


I had similar thoughts about the master software - on a scooter I have very few options for user input, so I too would like to have a "riding mode" which is triggered by pulses from the controller, a "charger mode" when the charger is plugged in and an "idle mode" for all other times. Depending on where I can find to fit the switch where it will be protected from the weather I may use it for different display options in idle (and possibly charger) mode only.

Once I've got the master running with Peter's software, being a C/C++ programmer I'm intending to rewrite it in C so that I can customise it for my purposes - I have a PIC C Compiler so there doesn't seem a lot of point in splashing out on PBP!
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
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: 8 Battery Lead Acid Slave Board

Postby dillond666 » Sat Mar 12, 2011 10:23 pm

I have been creating my master software and have found a couple of hardware issues. The Tellymate should have had a pullup resistor on the reset pin (pin1) which was not shown on the Tellymate schematic. I also needed to put a 75R resistor across the RCA connector because the cheap portable dvd player I'm using for bench testing requires it :x

On the plus side, I was so annoyed I ordered another 3.5" monitor :) to save me having to remove the other one from the car (awkward job). I realised that I'll have my old master board (Perkins V1) left over when my new system is ready, so I figured I could use it as the brain for my wood/coal central heating boiler project 8) waste not want not :wink:

I've also figured out how to use the Tellymate and will be posting a cheat sheet for dummies (surely I'm not the only one) :lol:

Derek
EDIT: Cheat sheet V1 here! http://www.dillond1.pwp.blueyonder.co.u ... ummies.odt
and here for the unfortunates who don't use Openoffice :lol: http://www.dillond1.pwp.blueyonder.co.u ... ummies.pdf


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 29 guests