Trickle charging spare batteries in the van (by )

So, my van is a former "welfare van"; originally the sort of thing that would pull up next to some roadworks, offering a space for the crew to shelter from the rain and have their lunch. The back has four seats (with belts, so people can travel in them, making it a seven-seater overall), a table and a bunch of storage compartments. But it also has a 200Ah deep-cycle battery pack and a bunch of auxiliary electrical accessories.

Kinds of lead-acid batteries

A deep-cycle battery is a kind of lead-acid battery, superficially very similar to a normal "car battery" (more properly called a starter battery), but built slightly differently. A starter battery is built for high current; it's intended to provide a few hundred amps or so to turn over the starter motor when starting the engine, for perhaps a few seconds, then rapidly charging back up again from the alternator once the engine is running. It can run some low current loads like the lights and radio and stuff when the engine's off, but it doesn't actually have a very large capacity so will go flat fairly fast under that kind of load.

Whereas a deep-cycle battery (sometimes known, confusingly, as a "leisure battery") is built for high capacity and lower currents. It's meant for supplying a few tens or hundreds of amps, for hours at a time. It's more tolerant of being discharged deeply without being damaged than a starter battery.

However, all lead acid batteries are harmed by being discharged for long periods. They live the longest if they're kept charged; but deep-cycle batteries are made to tolerate being kept discharged as best as they can, because it's expected that they might have to wait until they reach a charging source between being used and being recharged.

Back to the van

So, the van has a starter battery for starting the engine and all that, but it has this extra auxiliary power system for extra equipment in the back - interior lighting, a microwave oven, and a hot water boiler for making hot drinks. To that, I've added a 2m/70m amateur radio transceiver that can draw about ten amps when transmitting at full power, and an SB50 socket into which I can plug the power distribution unit I made a couple of years ago, to power a whole bunch of stuff - extra lights, USB mobile phone chargers, an inverter for AC loads, a coolbox, and chargers for various other kinds of small battery.

The heart of the aux power system is a pair of big deep-cycle batteries, about 200Ah capacity in total (220Ah if you believe the manufacturer's claims, which of course I don't). There's a device called a "split-charge relay" that connects them to the vehicle's main power circuit - the one with the starter battery and the alternator driven by the engine - but only when the voltage on the main power circuit is above about 13.5v. And the reason for that requires a bit more battery theory...

Lead acid battery voltages

So, a "12v" lead acid battery is actually six lead-acid cells in series. This is done to multiply up the voltage of a lead-acid cell - which is fixed by the chemistry involved - up to a more useful voltage. I'm going to talk about voltages in terms of a "12v" battery, but really, what matters here is the cell voltages, which are just a sixth of the numbers I quote. But the numbers I quote are the ones you can actually measure outside the battery, so are far more useful.

A "12v" battery, when fully charged and otherwise idle, having sat idle for a few hours, will present a voltage of around 12.8v. If it's been discharged (and then sat idle for a few hours) the voltage will be something lower; there is no definite "minimum" voltage, but the further you discharge it the more strain you put on the battery. So I'd consider 11v to be the absolute minimum, although I'm sure the manufacturers discharged the batteries down to 10v to make their claim of 220Ah capacity...

Of course, those voltages only apply when the battery is idle, and has been so for a few hours. If you draw current from the battery, the voltage will drop by an amount that roughly corresponds to the current draw - you can more or less imagine there's a resistor inside the battery - known as the "source impedance" - and there's some voltage drop on the resistor that increases linearly with the current drawn. A typical lead-acid source impedance might be a few miliohms when it's fully charged, but that rises as the battery discharges, and of course increases as the battery ages too.

But even if you take the load off of a battery, it'll take a while for the voltage to recover to its true "idle" voltage, because the chemical reactions that happen inside the battery to release power happen at the plates, depleting the reactants at those points. When the battery is idle the fluids inside can mix about a bit, bringing fresh reactants to the plates and letting the spent stuff dissipate out.

This means that telling the charge level of a battery when it's under load is pretty hard - measuring the voltage only gives you a good result if the battery has been idle for a few hours...


To charge a battery, you need to connect it to a power source that provides a higher voltage than the battery does, as that's the only way to get current to flow back INTO the battery. For a lead acid battery, the charging process is pretty simple, and the battery is pretty tolerant of variations in the process (unlike lithium ion batteries!), so the charging circuits can be pretty simple too.

Basically, you want to put about 14.8v onto a lead acid battery to get it to charge, but with a current limit of about 30% of an amp for each amp-hour of the battery's capacity (so, 60 amps for my 200Ah battery pack). So unless the battery is already close to full, the actual voltage will be lower as the current limit limits it, but the voltage will rise until it hits 14.8v and the voltage becomes the limit, with the current falling off.

When the current drops to about a tenth of its maximum, or about ten hours have passed, keeping the battery pushed with 14.8v starts to become a bit much for it, and you should drop the voltage down to 13.5v, which is known as a "trickle charge". At this point you can actually keep the battery charging forever quite happily; the current drawn by the battery will be just enough to replace the energy lost due to self-discharge (ending up as heat, of course), which won't be much but it'll keep the battery voltage high, so absolutely minimise the chemical decay of the battery's innards.

Now, inside a vehicle, it's rare for the engine to run for ten hours at a stretch, so in practice a vehicle's alternator produces a voltage of around 14.8v (with a current limit) and the battery just does its "bulk" charge, initially current limited but soon just being limited by the 14.8v voltage. If the engine did keep running for tens of hours, then you'd want to build some circuit that monitored current into the battery and the passage of time and reduce the alternator's voltage to 13.5v, but such a circuit would basically never get activated in a normal car or van.

On the other hand, when I add solar panels to the van, the solar panels will feed into the aux power circuit through a smart charger that (sunlight permitting) provides 14.8v until the batteries look charged, then drops to 13.5v - because, at least in principle, the sun can shine for more than ten hours at a time (rare in the UK, but...)

These voltages should be modified slightly based on temperature; higher voltages at lower temperatures and vice versa. But as the temperatures inside the engine bay and the back of the van are reasonably stable once things are running, the differences are tiny, so I tend to ignore that. People with a battery bank sat outside should pay more attention to this, however.

Split charge relays

This is why there's a "split charge relay" between the main and auxiliary electrical circuits in the van. When the engine is started, the main voltage rises rapidly towards 14.8v as the starter battery goes through its current-limited initial charge. But as soon as the voltage is at least 13.5v it's healthy to also connect it to the auxiliary circuit, both to power the auxiliary accessories rather than having them loading the aux battery, but also to charge the aux battery pack - at the very least at a trickle, but as the main voltage rises as the started battery recharges, soon at a proper deep charging rate. When the engine is stopped, the voltages of both main and aux power circuits drop to 12.8v (or less, if the batteries didn't get fully charged), which is less than 13.5v so the split charge relay disconnects the two circuits.

This disconnection has two consequences:

  1. Starting the engine won't suck hundreds of amps back out of the aux batteries, which they're not designed for; it'll only drain the starter battery, which is made to handle it.
  2. Running the aux appliances won't slowly drain the starter battery, which it's not designed for; it'll only drain the deep cycle aux battery, which is made to handle it.

A split charge relay is a pretty simple and neat solution that gets us pretty optimal behaviour!

But my van has THREE levels of battery...

So, when we bought the van, the aux batteries had been run down and left in a discharged state for some time - and the batteries hadn't been being given routine maintenance, so had been being run with a low electrolyte level for some time. Their capacity was greatly reduced; they'd charge rapidly but would then run out quickly, even when just running the lights. So, I bought nice new ones and installed them and everything was awesome.

But I took a look at the old batteries. I topped up the electrolyte, charged them up, and even slightly over-charged them for a short period, which is said by some to help reverse chemical decay of the plates, and then left them on a 13.5v trickle charge for days. Once that was done, I tested them with a little gadget that discharges them into a high-power resistor until a voltage threshold is reached (and adds up the current times time product as it goes), and found that bringing them down to 11v produced 50 and 56 amp-hours, respectively. Which, for batteries that were probably rated 110Ah when manufactured (and that rating probably based on discharging them further than I would have been comfortable with), was pretty good, I thought. Given that my little portable Pikachu battery has a capacity of around 30Ah and that's plenty useful for a lot of things, I wanted to find a use for these two rather than throwing them away!

They don't directly compete with the Pikachu battery, of course - they weigh lots and don't have very comfortable handles for long-distance carrying. But, I reasoned, they could fill an intermediate niche: short-distance luggable batteries to run things separately from the van. When we camped briefly last year, I had to run a power cable from the power distribution unit in the van and out of a window into our tent to run lights, which was fiddly. Being able to just heft one of these batteries out into a tent would mean less trailing cables, and being able to drive the van away without unplugging everything.

So, I wanted a way to keep these batteries charged from the alternator like the aux batteries, but I didn't want to just wire them in parallel with the aux batteries. As they have much lower capacity and are in a worse state of health, when sat idle in the van for weeks, they would self-discharge faster than the aux batteries and thus draw current from the aux batteries to recharge themselves. In general, lead-acid batteries in parallel "age" at the rate of the weakest battery.

What I needed was... another split-charge relay, in effect. One per battery, almost, because one is slightly healthier than the other so just wiring them in parallel would also be a bad idea.

So I built this little box, shown here sat on top of the two batteries in question:

Dual trickle charger, on top of the two big batteries it charges

It plugs into the aux power system through one of those Powerpole sockets on the power distribution unit. Inside version 1 was the following circuit:

  1. A TL431 with the reference voltage taken from a potential divider from the input supply, so it switches on when the supply voltage is above 13.5v.
  2. A PMOS FET with the source connected to the input +ve and the gate connected to the TL431's cathode, and a pull-up resistor from the gate to the source, so that when the TL431 switches on, the transistor conducts.
  3. Two off-the-shelf "ideal diode" modules driven from the output of the PMOS FET, the outputs of which drive the ammeters on the outside of the box, and thence onto the two sets of output battery terminals.
  4. The output of the PMOS FET also drives the blue LED so I know when there's charging voltage present, even if not enough current to move the meters is flowing.
  5. Ground is common across the whole thing.

The principle being that the two ideal diodes prevent the two batteries from discharging into each other, and the TL431/PMOS FET combination stops either of them from draining the aux batteries, only allowing current in when power is being fed into the aux circuit (from the engine alternator or, in future, from solar panels).

It worked fine on the bench, but when I plugged it in, the results were disappointing - barely even a whole amp on the ammeters, and when I investigated inside, the PMOS FET was hot! What was going on?


Clearly, the circuit wasn't behaving properly. It seemed liked the PMOS FET wasn't fully "on" and was exhibiting some nontrivial resistance, reducing the current so the batteries never charged up very much, and causing it to get hot (wasting precious power!).

Now, I'd read the datasheet for the transistor, which had claimed an Rds(on) of 0.48 ohms at Vgs of -10V. Vgs is the voltage from the gate to the source; when "on" the gate voltage would be about 1v (due to the TL431) and the source would be at least 13v, meaning we had a Vgs of more like -12V (and "more is better"), so the resistance of the transistor should be 0.48 ohms at the very worst. I wanted a bit of resistance in the system to stop a large initial current flowing if a fully discharged battery was connected, so I didn't mind the 0.48 ohms, but this seemed to be a lot more; I measured a voltage drop of 1-2v when barely half an amp was flowing (forgive the lack of precision, but getting multimeter probes into that small space was tricky and they kept slipping, and those ammeters were cheap and aren't very precise).

So, I reasoned, I must be misunderstanding the datasheet somewhat - perhaps that Rds(on) figure only applied in some ideal circumstances, such as within the event horizon of a black hole or something. I removed the TL431 circuit and made another, that triggered a relay instead. A relay is a literal switch, so would have very near zero "on" resistance; the downside being a 30mA current draw to keep the coil energised, on top of the 5mA already wasted lighting up a blue status LED, but I could spare 30mA when the engine was running - so no big deal.

I installed version two, now relay-driven, started the engine... and the real problem with version one immediately became obvious, because the relay just started buzzing loudly. Switching on and off rapidly.

You see, the long thin cable feeding this thing, plus the various connectors and fuses in series all the way from the alternator to it, presented a small resistance - nearly a whole ohm, in total. This meant that for every amp of current this device drew, the input voltage would drop by nearly a volt. So when the van engine started and the voltage was rising towards 14.8v at the alternator, the voltage at my TL431 was rising towards 14.8v too and passed the 13.5v threshold - so the relay switched on, promptly attempting to draw a couple of amps, which made the voltage drop down to somewhere between 11 and 12 volts. Which was below the TL431's threshold, so it switched off again. So the current drain stopped, so the source voltage bounced back up, repeating the cycle...

When I'd had a PMOS FET instead of the relay, something slightly different happened. Rather than oscillating, the PMOS FET would end up "half on", on just enough to draw enough current to pull the input voltage down to just over 13.5v so that the TL431 was just starting to turn off enough to turn the PMOS FET "half on". This made a negative feedback loop that would ensure the PMOS FET was turned on just enough to draw enough current to keep the input voltage at 13.5v exactly. Basically, a linear voltage regulator that regulated its INPUT voltage. And because the PMOS FET was partially on it would have a significant resistance and waste energy as heat.

I had no idea the source impedance was that high (perhaps I need to go and improve some of the wiring, by probing the voltage with a multimeter while under load? But that's a job for another day!), so had completely failed to anticipate this problem!

The solution

But now I knew what the problem was, how to fix it became clear. I could see two approaches, so decided to take them both at once.


The first step is to introduce some hysteresis. The principle here is to change the threshold of the TL431 - to make it turn ON at 13.5v, but then once on, to not turn OFF unless the voltage drops below 12.8v. The on voltage being chosen as the minimum useful voltage to charge a battery, and the off voltage being chosen as a voltage that the aux power circuit will definitely be below once charging has stopped - even a fully charged aux battery, once it has had a few minutes to idle a bit after being charged, will always end up below 12.8v. If I set the "off" voltage any lower, there's a risk that the system would remain on after the engine stopped, until the aux battery had actually been discharged somewhat by the trickle charger.

This was easy to arrange. The TL431 switches on when the input voltage exceeds 2.5v, so we use a potential divider to convert a 13.5v input into a 2.5v output to the TL431. But if we also add a third resistor connecting the power line AFTER the relay to the TL431 input, then when the relay engages, the sense voltage will be increased by being pulled up by the second resistor - so the input voltage needs to drop further to make the sense voltage drop below 2.5v. When it does, of course, the relay disconnects so there's only the single resistor pulling the sense voltage up, and it needs to rise above 13.5v again to turn back on. In my case, a 1 megohm resistor at this point in the circuit made the turn-off voltage around 12.9v, which was perfect.

Having this kind of two-threshold system helps to avoid oscillation, because it means that the voltage needs to drop a lot further to turn the system back off once it's just turned on. However, it wouldn't be enough alone - the batteries could draw several amps if they're particularly low when the engine starts, meaning that the input voltage could well be pulled down to 10-11v for a few seconds as the batteries initially started to charge.

Time delay

Any initial large surge in current would be short lived; at a high initial current draw the batteries would charge fast, and within mere seconds, the voltage would be higher and the current draw lower and so the voltage drop in the cabling reduced. Given that I couldn't widen the hysterisis any further or risk having the system not switch off when it should, I also had to add some "lag" to the system; when the relay initially switched on, even if the current draw pulled the input voltage down low, it should stay on for a while. Only sustained low input voltage, due to the alternator actually switching off, should cause it to switch off.

Thankfully, this is also really easy to do: just connect a suitable capacitor from the sense voltage line to ground. When initially plugged in, this capacitor would charge up to 2-and-a-bit volts (whatever the idle voltage of the aux system is, divided by the potential divider ratio). When the alternator kicks in and the aux system voltage rises, the capacitor will slowly charge from current stolen from the potential divider until it reaches the potential divider voltage - meaning that it slightly delays the switch on of the TL431. However, when the TL431 turns on and turns on the relay so the batteries drain current and the input voltage drops even below the 12.8v turn-off threshold, the capacitor then discharges, sourcing current down into the potential divider, and stopping the sense voltage from falling immediately - giving the batteries a chance to charge a bit and their current draw to drop before the TL431 shuts off.

As I was using a 50k potentiometer as the potential divider, there would be about 40k ohms of resistance from the capacitor to the positive rail and 10k ohms to the negative rail, so a 220uF capacitor I had lying around in my junk box gave us a time constant of about two seconds. That doesn't mean a two second delay - the sense voltage only needs to move a few tenths of a volt either way - but put us in a ballpark that would certain prohibit relay buzzing.

So, I went back out to the van with version THREE of this circuit. As I'd been using the extra batteries for things and they'd not been being properly charged for some time now, one of them was down to 11.5v, so this was going to be a good test. I plugged the system in, and nothing exploded, and the charging LED didn't come on, which was as expected. I started the engine, and after a few second's delay, it clicked on - then off - then on again - then a few seconds - then briefly off then on again... and then it stayed on, as shown in the photo, with a nice two amps flowing into the emptier battery and one amp into the fuller one. Until I stopped the engine, whereupon it turned off perhaps half a second later.

Ok, not a perfect activation, but it's a stress test scenario and it behaved well enough for my needs! Although I could improve it a bit by putting a bigger capacitor in, I am not motivated to do so. If it hadn't stabilised promptly, then the only alternative would have probably been to switch to microprocessor control, with an algorithm that implements some kind of hysteresis and a much longer time lag, possibly even combined with a process of turning off the charge current once a minute and sampling the input voltage when unloaded...

Thankfully, however, I don't need to do that and I have a nicely working trickle charge system!

No Comments

No comments yet.

RSS feed for comments on this post.

Leave a comment

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales