# How to switch between a solar panel and battery?

A 12v battery is being charged from a solar panel. When battery is 12v solar panel is disconnected from battery and connect the load with battery. And again solar panel is connected with battery when battery voltage is say 10v. How to switch simply? Which one is preferable, optocoupler or mosfet? and how they are interconnected for proper switching?

• Just for my satisfaction, does anyone know, if leaving the solar panel connected to the battery during load conditions, whether damage of any sort would happen? Commented Apr 24, 2013 at 19:24
• You don't necessarily have to disconnect it, a blocking diode from panel to battery can be sufficient. Commented Apr 24, 2013 at 19:28
• @Andy aka It is common practice to leave a charging source connected to the battery while the load is also drawing current. I see no need for the switch that Apu is considering. Commented Apr 24, 2013 at 19:30
• Ugh...why is the grammar so bad? I can hardly tell what's being asked! "And again solar panel is connected with battery when battery voltage is say 10v." Commented Apr 25, 2013 at 7:52
• Also, does the solar panel drive the load too? Or does the solar panel only charge the battery, which then, after disconnecting the solar cell, drive the load? Commented Apr 25, 2013 at 7:54

Just use some low-voltage-drop diodes, such as Schottky diodes, to ensure that the battery will not try to energize the solar cell.

simulate this circuit – Schematic created using CircuitLab

Here, the solar cell is represented using the photodiode symbol D1, which is the closest thing available in the schematic editor. Current can flow from the photocell only if it develops a voltage which exceeds that of the battery by at least about 0.25V, a difference that is needed to forward-bias the Schottky diode D2. When this condition does not exist (for instance, the light is too low), then the Schottky is not forward biased and prevents the reverse current flow from battery to D1.

Here is a version of the above schematic which incorporates a more detailed discrete component model of the cell:

simulate this circuit

• Does a charge controller has this functionality embedded in it?
– VVK
Commented Oct 19, 2017 at 6:33

Assuming you have no other power supply except for the battery and the solar panel, and assuming that it is always daytime...

Here's how to do it. You have two zeners for voltage reference, 10 and 12 volts. You would also have a SR latch, which controls whether the solar cells are connected. You would have 2 transistors. When the battery's voltage gets to be above 12, the voltage flows through the zener, turns on the transistor, which then sets the SR latch, and the solar panel gets disconnected. When the voltage is below 10, the other transistor resets the SR latch, connecting the solar panel.

And you could use optocoupler, MOSFET, or even a relay! It doesn't really matter in this case, as long as you choose one with the proper power rating. However, I recommend optocoupler because it doesn't store residual charge or get damaged by static electricity (MOSFET), or have mechanical wear and tear (relay).

• If you have the time and inclination, could you whip up a schematic to show this? I would appreciate it as would others, I'm sure. Commented Apr 25, 2013 at 13:21