# Switching between a solar cell and battery?

What would be the best method of switching between a solar cell and a battery, I'm currently implementing a system that is functional so long as the solar cell outputs a voltage between around 2V to 7V (7V is the max voltage the panel can output). However, once the panel output dips below 2V the system won't be able to function correctly.

What would be the best way of implementing a battery backup system of some sort so that once the panel output drops below 2V the battery will take over and provide a steady 5V for example, and once the panel goes back to producing above 2V the system switches back to being solar powered.

Since posting, I have been looking into Relays - what would be the advantages and disadvantages of using a Relay Module controlled by an arduino? A relay module such as the 'Parallax 27115' looks like it'd do the trick. That way I could electronically control when to switch between power sources using the arduino? Is this a good solution?

• 1. How much current will the device draw from the 5 volt supply when it goes on battery power? 2. How much time (if any) can the device spend powered down while the system switches from PV to battery or vice versa? Commented Feb 15, 2016 at 17:52
• Thanks for the response, the solar panel on average produces a current of around 300mA - so the battery (which hasn't been chosen yet) would ideally produce a similar current. Preferably as quick as possible, but that aspect isn't so much of a factor - as long as the switch does actually occur I'll be satisfied. Commented Feb 15, 2016 at 18:24

In practice, most choose to use the simple approach of powering the device directly from the battery, with your alternate supply (PV panel in this case) running a battery charger wired parallel to the battery.

This approach gives 0-latency 'switching' between solar/batt. power & requires the lowest complexity & component count to accomplish your stated goal.

The simplest approach will be where your two supplies (solar and battery) have the same voltage. You have a couple of options:

1) let the solar panel charge the battery, and drive the load from the battery

simulate this circuit – Schematic created using CircuitLab

that's good if the battery is rechargeable, but no good if the "battery" is actually a mains power supply or similar.

2) connect the solar panel and battery both to load via diodes

simulate this circuit

This won't keep your battery charged, but can be used with a "battery" that is not a battery. It is a little inefficient because of the voltage lost to the diodes, but it is extremely cheap. You can use a Schottky for smaller loss.

3) use a higher-efficiency version of (2).

See this circuit used on the raspberry pi. It behaves a bit like a diode in that it allows current to flow only one way, but when it is forward-conducting, it has a very low voltage drop and is therefore more efficient.