battery-charging

Solar cluster: Charge controller ponderings

I’ve been giving some thought to how to manage charging of the battery.

There’ll be two charge sources essentially, one will be mains power via a conventional battery charger, the other will be solar. Both are current-limited and will be below 24 volts.

The battery will not respond straight away to a step change in applied voltage, rather current will start flowing in and the battery voltage will begin to rise. There’ll be a delay in the voltage being applied and the observed battery voltage reaching that point. The only thing we really need to watch is that the current doesn’t exceed the inrush capabilities of the battery.

What we want to avoid is that, as we get close to charge, we do not “chatter” on the upper set-point. When the upper set point is reached, we should back off some minimum delay, before continuing to charge.

This is a possible implementation of that idea.

We consider 3 voltages:

Variable Notes
V_{CL} “Low” control voltage set-point. Charger should turn on near this point. Set by a potentiometer on a regulated supply.
V_{CH} “High” control voltage set-point. Voltages above this point are considered harmful and we should cut power when this voltage is reached. Set by a potentiometer on a regulated supply.
V_{CB} Battery control voltage. This is proportional to the battery voltage, set by a resistor divider or potentiometer across the battery.

We have two comparators that tell us when the battery is below the high set-point, telling us we’re “safe” to begin charging, and when the battery is below the low set-point, telling us the battery is “low” and needs charging. We use an SR latch to achieve this. The “safe” is inverted, and helps drive the “reset” side of the SR latch, the “low” signal drives the “set” side.

If the voltage gets above our high set point at any time, we must stop charging immediately. So we use an AND-gate to ensure that the power is shut off as soon as possible. We feed this into the SR latch reset pin via a NOT gate to the SR latch to reset the state.

If the voltage gets low, depending on our set-point and rate of discharge, we can tolerate some small delay in getting going. We ensure it is safe to do so by ANDing “LOW” with “SAFE”, then delay the rising edge pulse by a few seconds, possibly with an RC circuit or 555 timer, before passing that into the SR-latch.

The AND logic also prevents us from asserting “SET” and “RESET” on the SR latch simultaneously.

The graph I’ve drawn is a bit of an exaggeration, hopefully the discharge curves won’t be that steep. It’s possible I could do away with an op-amp and use hysteresis, however I feel using two means I can control the two set-points independently.

Two of these, and tweak the delays a bit so that the solar comes on first, and we should be able to run both in parallel to charge the same battery.