# Switching between two sources of power to a battery?

This is the simplified system:

The battery is constantly being drained, but very slowly (85 mWh per day).

The solar panel produces 62.5 mWh per day on an average day (7 hours of low sun at only 8,000 lux).

This sustains the system for a little over a year if we assume everyday is an average day (without solar the batteries drain in a few months).

The wall charger is only used once a year to quickly replenish the batteries back to full, so the system can last another year.

Every few years the batteries will have to be replaced.

I want these scenarios to happen:

• If wall charger is not plugged in, trickle charge battery with solar panel only.
• If wall charger is plugged in, stop charging with solar panel and fast charge the battery only with wall charger.

How do I switch between the two scenarios?

You can use a Schottky diode in series at the charger and solar panel and then connect them both to the battery. The drawback is a ~0.3V drop on the diode. Not a problem in case of the charger, but will reduce the power output of the solar cell. On the other hand - smaller PCB area, cheaper and more reliable.

• Problem with this approach is that the charger can't charge the battery properly. Li-Ion or LiPo battery charge voltage must be accurate to better than 50mV. Your series diode is introducing more than 5 times that voltage inaccuracy. – Dwayne Reid Feb 26 '15 at 5:10
• @Dwayne : the question is about NiMH not Li-Ion. – Brian Drummond Feb 26 '15 at 11:13
• @Dwayne: He's using a NiMH battery which has low requirements when it comes to charging. Basically any source with a voltage higher than the cell will do the trick. If it were Li-poly or Li-ion a charging chip should be used - like the MCP73831. – user68591 Feb 27 '15 at 14:51
• @Wojciech So you don't believe any charging chip is needed? My original thought was that I needed to: switch between the voltage sources, connect the active one into a charging IC, and then connect the output of that charging IC to my battery. Is this not needed? – Christina Mar 1 '15 at 8:31
• You don't need more than a current limiter. This could be an LM317 circuit (for the wall charger) or a resistor with Zener diode clamping (for the solar cell just to be safe). Charging ICs for NiMH cells are used for fast charging (using pulses of current and temperature control). If you'd like to use one of those, the bigger problem would be disconnecting the battery from the rest circuit during charging. – user68591 Mar 3 '15 at 23:06

My opinion only: ignore the solar panel when charging from the wall charger. Leave the solar panel connected to the battery charger.

The solar panel is going to contribute very little current compared to the wall charger. Your charge circuit should have no problem determining the battery end-of-charge point.

• Could you be more specific by what you mean by the charge circuit? Do you mean a charge controller IC? Is this necessary for this application? – Christina Mar 1 '15 at 8:29

Use a normally closed contact of a relay for feeding solar panel charge to the battery. When the ac charger is plugged in it turns on the relay and diverts the battery from solar charge to the ac charger. The relay needs a changeover contact with normally open connected to the ac powered charger. Relay coil powered by same charger.