
Parallel power sources with battery priority
Main project requirements and background
-
Because "free" energy is available from batteries charged by a solar panel, an automatic power-source switching system is required: the load should be powered from the battery first and, once the battery is discharged, from the AC-DC power adapter.
-
In my case, the load is 12V LED lighting.
Schematic of the device


How it works and the components used in the project
-
The circuit is powered on by switching on the AC-DC adapter, which turns on MOSFET Q1.
-
An 8.13V Zener diode reduces the voltage applied to the MOSFET gate. Together with resistor R2 (150R), it helps discharge the capacitors in the AC-DC adapter and turn the MOSFET off faster when power is removed. This is necessary when the LEDs are powered by the battery.
-
N-channel MOSFET Q1 (IRF3205) is needed to create a closed circuit from the battery through the relay coil and the MOSFET.
-
If the battery is discharged or absent, the DPDT relay is not energized, and current flows through the normally closed contacts by default, powering the LED from the 12V AC-DC adapter.
-
If the battery is connected and charged, energizing the relay switches its contacts, and the load (LED) is powered by the battery.
-
The DPDT relay coil operates from 9.5V (rated at 12V). I used a relay with two pairs of contacts. For this project, the second pair is not used.
-
Diode 1N4007 protects the MOSFET when power to the relay coil is interrupted.
-
Schottky diode 1N5820 prevents the relay from repeatedly cycling on and off.
A list of components used in this project, with links, is available in the Google Sheet ("Preferential battery supply" tab).