Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Split Charger.

Status
Not open for further replies.

hackableFM

New Member
I've done a bit of searching and can't come up with what I need.

I have a microwave, Kettle & Toaster in the back of my van.... :D (You Can Laugh now!) all three running from a 2KW Inverter. I have a second battery running the inverter. (Actually there's two 'second' batteries in parallel).

I have built a voltage sensing circuit which monitors the Main Van Battery and activates a relay (A 'Glow plug' relay ripped out of an old Land Rover from a scrap yard) in order to 'Split Charge' my second battery.

The circuit actually monitored the Main Van battery and switched on the relay when it saw the voltage rise to a level above approx 13.2V which only happens obviously when the alternator is charging the main battery.... I was as Proud as punch when it activated but then it failed. My problem was when the battery voltage dropped below 13.2V and the relay de-energised, The back EMF seemed to be sensed by the circuit although I had a diode across the relay to kill it, This seems to cause the circuit to reset and activate the relay again. This led to a vicious circle of the relay switching on & off every half second.

After various attempts at solving this problem over the space of a week I got annoyed and needed the Microwave to heat my lunch so I ripped out the circuit and reverted to twisting the Relay 'activate' wire to a 12Volt feed in order to manually charge the secondary battery.

My next problem arose when I left the Relay switched on for a couple of hours by accident and the relay gave up and died in a cloud of smoke. Clearly the relay wasn't designed to be left switched on for any length of time since it was a 12V relay and being run on a 12V battery.

Anyway, I'll cut to the chase.... I have bought some of these EV200HAANA Relays from E-bay.

Can anyone recommend a decent 'Split Charger' circuit other than the basic link to the Alternator's 'Charging indicator' light on the dashboard, to drive my new relays? I am not scared of using a PIC Microcontroller project, In fact I would just love a link to something which has been built and tested which gives an LCD readout of battery voltages etc etc. I am just starting to learn the basics of Microcontrollers and this is the sort of thing which would put a PIC to good use isn't it lol. Anyway, I've pulled enough hair out and I need a working circuit that I can just build & fit so I can have a nice hot coffee while out at work!

Thanks for reading this, If you didn't get bored half way through and skip to the next thread lol.

Hopefully...

hackableFM.
 
Just to add, **broken link removed** is the basic circuit I used & modified to monitor the battery & Activate the relay. Amongst some other stuff ;)

I tried adding decoupling capacitors of various sizes to this circuit in hope it would stop the sensing of the back EMF.
 
Your problem is that you need hysteresis on your relay trigger circuit. ie: you want it to turn ON when the main battery reaches 14V and to turn off when the main battery reaches 13V. Also, if the wiring is light duty, then the voltage drop in the wiring between the main and aux batteries will cause the relay to cycle even with 1v of hysteresis.
A better solution would be to wire the relay coil to the ignition circuit of the vehicle so the aux batteries are only connected when the key is on.
The RS link to your relay spec returned the following:
To protect your personal and contact details your
session has timed out after a period of inactivity
 
Last edited:
You can't link to pages from RS. Just post the part number. It is 617-2757 I think, at rswww.com

http://catalog.tycoelectronics.com/TE/bin/TE.Connect?C=1&M=BYPN&TCPN=1-1618002-8&RQPN=EV200HAANA

I think that what you need is some hysteresis, or a significantly higher voltage, and maybe some smoothing.

I don't think it was the back EMF that the circuit was sensing. I think what was happening was that the Main Van battey would naturally sit at about 13.25 V with no load. That is enough to turn on your relay circuit. The relay proabably took an amp or two (before it went bang) and the other battery could have a slightly lower voltage. Then when the relay turns on, the other battery and the relay coil drag the battery voltage down to 13.15 V, which makes the relay turn off.....

If you make it turn on at 13.3 and turn off at 13.1, that probably won't happen. If you make it turn on and off at 13.8, that will probably stop it as well.
 
Glow plugs are intermittant duty, so I believe the relay would/could be intended for intermittant duty. A friend had a similliar problem when he tried to use a Ford starter solenoid for the same purpose. The solenoid was only designed for short cylcing and not meant to be left on, the coil burned out on it...
 
As others have pointed out, the circuit you have built will behave the way it did.
Before considering "better" circuits, I have to ask:
What is wrong with controlling the split relay from the alternator charging light?
That way the vehicle battery will not be drained by your "domestic appliances", and the auxilliary battery will be charged when the engine is running.

JimB
 
Right, I'm gonna try and answer as many of your questions as possible.

I'm using 10mm multi-stranded cable to link the batteries together. I personally wouldn't call this 'Light duty' cable. Yes it could do with being a bit thicker but for charging purposes and the mentioned voltage drop I wouldn't think this size cable would be an issue would it?

@ Diver300... Yes your link you posted is pretty much the same as the relays I bought.

Diver300 said:
I don't think it was the back EMF that the circuit was sensing. I think what was happening was that the Main Van battey would naturally sit at about 13.25 V with no load. That is enough to turn on your relay circuit. The relay proabably took an amp or two (before it went bang) and the other battery could have a slightly lower voltage. Then when the relay turns on, the other battery and the relay coil drag the battery voltage down to 13.15 V, which makes the relay turn off.....

What you describe here is the relay switching on & off when the relay first switches on to charge the batteries when the engine is running, My fault I know, I should have said already that this problem only happens when the relay is switching OFF when the circuit has detected the Alternator has stopped charging, The circuit works fine when switching ON to charge the batteries.

@ gerty.... Yes mate, you have hit the nail on the head as far as I am concerned. This is exactly why I think my previous relay burnt out. This problem I am not really worried about simply because I know I wasn't 'overdriving' it with excessive voltage etc etc... It must have been down to the fact that it was only designed for 'intermittant duty'.

@ JimB... The circuit behaved that way for what ever reason, I really don't think it is up to much now anyway after I ripped it's heart out in order to boil the kettle lol. As you point out I am doing this for the very reasons you describe, In order to prevent the main vehicle battery from running out whilst maintaining a decent charge in the secondary battery.

Now, Let me clarify here... I must be honest, The reasons I want to avoid the basic circuit as connected to the alternator charging light are as follows...

1. I have read that some vehicles do not like this type of circuit being wired to the alternator light as it can cause confusion to the existing vehicle electrics/computer, I understand that this may just be a heap of doggy doo but to be honest, with the other problems I have had with this van recently I just don't want to take the risk and that is the truth.

2. I have been into electronics for some years and I am presently trying to learn a bit about PIC controllers and I have this bee in my bonnet (No pun intended) about using this as an excuse to build something and learn something about PIC's. I have today spent many hours thinking about it and have decided to 'Have a go' because it's now or never. So I've been out and bought a 16F877 to have a play with because I feel I want to try and build **broken link removed** circuit then modify it (and the code) on breadboard to monitor the batteries and display their voltage on an LCD whilst also monitoring and controlling the power to the split charge relay in order to display when it has been energised. I also want to monitor the Inverter status in the back of the van and have this displayed on the LCD so we have a visual indicator to say it's still inverting or been left switched on.

Maybe this is an overkill starter project for PIC's but I feel I can have a try and learn something whether it works or not.

I'm just getting a bit older and I'm using this as an excuse to get my hands dirty and learn something about those wonderful little PIC's before I am too senile to try. I have got a programmer already after building a PIC clock from a step by step tutorial.

Any extra help on this will be appreciated.
 
Last edited:
hackableFM said:
The reasons I want to avoid the basic circuit as connected to the alternator charging light are as follows...

1. I have read that some vehicles do not like this type of circuit being wired to the alternator light ...

2. I have been into electronics for some years and I am presently trying to learn a bit about PIC controllers and I have this bee in my bonnet ...

OK, try this for an idea:

Based on your PIC circuit, have three analogue inputs

The vehicle battery
The aux battery
The charging light

Measure the two battery voltages and display them on the LCD display.
You could make a "low battery alarm" when the battery volts drops below 10v or so.

Measure the charging light voltage and use it to switch a digital output which operates the split charge relay.
You could also have an indication on the LCD to show when the relay is closed.
The input impedance of the PIC should be high and will not affect the charge light or computer. You will need voltage dividers anyway to reduce the 12 - 14 volts from the battery to 5volt maximum for the PIC ADC.

Anything else?

JimB
 
hackableFM said:
What you describe here is the relay switching on & off when the relay first switches on to charge the batteries when the engine is running, My fault I know, I should have said already that this problem only happens when the relay is switching OFF when the circuit has detected the Alternator has stopped charging, The circuit works fine when switching ON to charge the batteries.

I still think that the main problem is that the switch voltage is too low.

When the alternator stops charging, the battery voltage drops. If you switch point is too low, the battery voltage remains too close to the switch point.

Raise the switch point by 1/2 a volt and the problem should go.

On the point of sensing the warning light voltage, you should not take too much current from the warning light connection. However, we are talking about cars here, with warning lights that take .25 amps or more. If you sense the voltage through a 10 k:eek:hm: resistor you won't upset anything.

Here is a possible alternative. Total component count: 3. No need for any adjustments.
(Admittedly the components are big)

The alternator has 3 wires on the AC side. There are 9 diodes in most modern alternators, usually in one big rectifier stack.
3 connect each of the 3 AC wires to ground, with the anodes connected to ground
3 connect each of the 3 AC wires to the battery, with the cathodes connected to the battery
3 connect each of the 3 AC wires to the warning light connection with the cathodes connected to the warning light connection.

My suggestion. Find the ends of the 3 AC wires where they go into the rectifier stack. This will be inside the alternator, the terminal end. Connect up 3 big diodes, connecting each anode to one AC wire and all the cathodes to your second battery. The diodes need to be BIG as they will have to take the charging current for the second battery. I would suggest 50A rating at least.

You could use a second rectifier stack. Wire the 3 AC wires to the second stack, and connect the second battery to the battery terminal on the second stack. Leave the warning light connection on the second rectifier stack unconnected. You can either earth the earth connection on the second rectifier stack or leave it unconnected.

This has the advantage that if the second battery is very flat, it will only take the full alternator output, and it can't drag down the main battery.

If you join the two batteries with a relay when the second is flat, you could get a huge current and you could see the main battery voltage dip. That would also cause the relay to drop out, so the main voltage recovers, so the relay pulls in etc etc.

How extra diodes work:-

When the alternator is off, the diodes stop any current flowing back into the alternator from either battery.

When the alternator is on, the AC voltage on the alternator goes through the diodes to the lowest voltage out of the main battery, the warning light connection and, if you take up my suggestion, the second battery.

For less than a second, it is the warning light connection that takes all the current, as its voltage is lowest, and it is where the alternator field current comes from. When the field is established, the alternator voltage increases up to 12 volts or so and current flows into the battery. With two batteries, it flows into the lowest battery. The voltage on the warning light connection will be about the same as the lowest battery. When this gets up to 14V the alternator regulator reduces the field current, therefore limiting the main voltage.
 
Two excellent replies... Thanks for those..

No Offence Diver300, You have been VERRRY helpful. I still prefer the PIC idea though, (Because I am a pain in the ass!) If it fails then I will go with the sensing of the 'Charge light' via a 10K resistor.

I really don't fancy trying to get to the alternator never mind accessing the three AC wires inside it lol. This is a Ford Transit Van I'm using you know! :)

I'm gonna take a bit of time to digest the suggestion made by JimB, That sounds pretty much exactly what I'm after. I'm gonna have a dig about for more information on this suggestion and see if I can find a few ready made projects that I can 'Merge' into one. I'm only looking for ready made projects as I have never tried anything like this with a PIC before and I still don't even understand the difference between all the available PIC languages. :D

Thanks for all suggestions so far.

hackableFM...
 
I don't mind what you do. I guessed when I was writing the post that opening an alternator would seem scary to some people.

I have run stuff from the AC outputs of alternators that didn't have those connections when they were new, and it isn't that difficult because everything is so big in an alternator. You need a big soldering iron.

If you do go with the voltage sensing and PIC route, make sure you put some hysteresis in the switch levels.

For example, turn the relay on at 14.0 V, and off at 13.7 V

That is much less likely to lead to hunting. The relay switching on can cause the voltage to reduce, and the relay turning off can cause it to increase, so if you don't have hysterisis, hunting is a big danger.
 
Opening an Alternator isn't scary to me, Just something that would take too much doing in removing it from the vehicle which would require time off the road and My van just doesn't sit still for anything more than over night usually, And even when it does sit for a day it has to be ready to go at a moments notice, Hence the alternator modification is out of the window... :D

I thankfully take your warning on hysteresis, It is clear to me that this may well have been the issue I had before and caused my previous circuit to fail.

Now I have to go and do some reading.... Get ready for my next PIC related questions lol, I'm sure there'll be plenty of them!

Thanks again

hackableFM...
 
Are you a "White Van Man" ?

JimB
 
No mate, I'm self employed (Partnership with my brother) we have a red transit van all labelled up and believe me it looks professional. We have all the right tools for the job and we never rip anyone off. We pride ourselves on 'Doing It Right!' and we just love the ammount of recommendations and comments we get from our customers.

Believe it or not, I don't mind either way, but we are a REAL family run businness and we like to have our comforts while out working in the cold. :D Hence the Inverter.
 
OK then, "Red Van Man" :D

JimB
 
JimB said:
OK then, "Red Van Man" :D

JimB

PMSL... yeah ok then I'm a red van man lol. but it's got loads of little black, grey & yellow bits stuck all over it so it's not all red! :D
 
OK, now I have been away and read up on some stuff, I have bought a few bit's and I'm almost ready for a hardware 'Play'.

This is my attempt at rebuilding this split charger using a PIC.

Can anyone advise me on my program please, It's written in 'Basic' as far as I believe, I've copied examples of other peoples snippets of code and added some other stuff which I have made educated guesses at. My description of it is as follows..

A split charger, It monitors two batteries which are seperately fused at around 100A (12V Lead Acid) and the output of an alternator on a vehicle, then it should display the results on the LCD. When the alternator is sensed as running it checks wether the fuses are blown by sensing if there is any voltage at each terminal of the solenoid which is eventually going to connect the batteries together in order to charge them, providing the fuse checks are passed.

If the fuse check fails then the proggy should go into a warning 'Alarm' condition whereby it should pulse a piezo sounder, and display on the LCD which battery has a blown fuse, At this point the proggy should NOT allow the solenoid to be energised.

I understand the "< 1" in the 'Fusecheck' sub routine may be completely wrong and this might not actually be the correct way to sense the state of the batteries connected to the analogue inputs so if I have this wrong please say so and possibly offer an alternative solution.

The main reason I am posting this here is for information which I cant find anywhere, If you look at this snippet of code.....

Result1 = Result1 * 5 / 1023 ' Scale it to volts
Result2 = Result2 *
5 / 1023 '

I know & understand the hardware side of feeding a voltage of 12 - 15 volts into the PIC through a resistor network which allows a max of 5volts to enter the pic. But, what do I put into this piece of code in order to 'scale' the pic's interpretation of the input voltage of 5 volts and display it as up to 15volts. I just can't get my head around the maths involved, Basically because I don't understand the program I have just written lol.

Here's what I have come up with so far.


My first proggy said:
Device 16F877
Declare XTAL4

Declare
ADIN_RES10 ' 10-bit result required
Declare
ADIN_TADFRC ' RC OSC chosen
Declare
ADIN_STIME50 ' Allow 50us sample time

Declare
LCD_TYPE0 ' Type of LCD Used is Alpha
Declare
LCD_DTPINPORTB.4 ' The control bits B4,B5,B6,B7
Declare
LCD_RSPINPORTB.2 ' RS pin on B2
Declare
LCD_ENPINPORTB.3 ' E pin on B3
Declare
LCD_INTERFACE4 ' Interface method is 4 bit

PORTB_PULLUPSTrue

Dim Result1 As Float '
Dim Result2 As Float '

Dim Last_Result1 As Float '
Dim Last_Result2 As Float '

Symbol Input1 =
PORTA.0
Symbol Input2 =
PORTA.1
Symbol Solenoid =
PORTC.0
Symbol Alternator =
PORTC.1
Symbol Sounder =
PORTC.2
Symbol AlmRst =
PORTC.3

TRISA = %00000011 ' Configure AN0 (PORTA.0+1) as an input
ADCON1 = %10000000 ' Set analogue input, Vref is Vdd
TRISC.0 = 0 ' Set PortC 0 as Output
TRISC.1 = 1 ' Set PortC 1 as Input
TRISC.2 = 0 ' Set PortC 2 as Output
TRISC.3 = 1 ' Set PortC 3 as Input

main:

DelayUS
100 ' Allow internal capacitors To charge
Result1 = ADIn
0 ' Grab A0's digital value
DelayUS
100 ' Allow internal capacitors to charge
Result2 = ADIn
1 ' Grab A1's digital value


Result1 = Result1 *
5 / 1023 ' Scale it to volts
Result2 = Result2 *
5 / 1023 '

If Last_Result1 <> Result1 Then ' Check if value has changed
Print At
1, 1, DEC2 Result1, "V " ' If it has, display new data
Last_Result1 = Result1 ' and update last value
EndIf

If Last_Result2 <> Result2 Then ' Check if value has changed
Print At
2, 1, DEC2 Result2, "V " ' If it has, display new data
Last_Result2 = Result2 ' and update last value
EndIf

If Alternator =
1 Then ' If alternator is running then
GoSub Fusecheck
Print At
2, 8, "Y " ' If it is, Display "Y" on LCD line 2 position 7
Solenoid =
1 ' Switch sharge solenoid on
EndIf

If Alternator =
0 Then ' If alternator is NOT running Then
Print At
2, 8, "N " ' Display "N" On LCD Line 2 position 7
Solenoid =
0 ' Switch off charge solenoid
EndIf

DelayUS
250 ' Delay

GoTo main ' Loop for ever


Fusecheck:
If Last_Result1 <
1 Then GoSub Alarm1 ' If main battery (no voltage on terminal) fuse blown then alarm1
If Last_Result2 <
1 Then GoSub Alarm2 ' If slave battery (no voltage on terminal) fuse blown then alarm2

GoTo main

Alarm1:
Cls ' Clear LCD screen
Print At
1, 1, "M F Dead" ' Print Main Fuse Dead on LCD
DelayUS
500 ' Delay
Sounder =
1 ' Trigger sounder
DelayUS
500 ' Delay
Sounder =
0 ' Turn off sounder

If AlmRst =
1 Then GoTo main ' If alarm reset button pressed the return to main program

GoTo Alarm1 ' Cycle alarm until reset pressed

Alarm2:
Cls ' Clear LCD screen
Print At
1, 1, "S F Dead" ' Print Slave Fuse Dead on LCD
DelayUS
500 ' Delay
Sounder =
1 ' Trigger sounder
DelayUS
500 ' Delay
Sounder =
0 ' Turn off sounder

If AlmRst =
1 Then GoTo main ' If alarm reset button pressed the return to main program

GoTo Alarm1 ' Cycle alarm until reset pressed

I know there are probably much more compact ways of writing this code out but believe me this is my first attempt at writing any PIC program.

Marks out of ten anyone??

hackableFM.
 
Last edited:
Can anyone help on this bit please?
hackableFM said:
I know & understand the hardware side of feeding a voltage of 12 - 15 volts into the PIC through a resistor network which allows a max of 5volts to enter the pic. But, what do I put into this piece of code in order to 'scale' the pic's interpretation of the input voltage of 5 volts and display it as up to 15volts. I just can't get my head around the maths involved, Basically because I don't understand the program I have just written lol.
 
Well, the ADC is gonna return a number between 0 and 1023 for an ADC input of 0 - 5V. So think 10.23V and multiply this voltage by 2 to get a range of 0 - 20.46V. Put the decimal point in when you display it but keep the number internally in the PIC as an integer of 0 - 2046. Use a resistive divider that would give you 5V at the PICs ADC input if you put 20.46V into it. Say a 3.9K and 1.2K resistor with a 250R trimmer in the middle added for calibration.
 
OK, now I think I understand that lol.

I'll have a further play and see what I come up with.

Many thanks.

hackableFM.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top