Circuit that switches between 12V battery and 12V PSU

Thread Starter


Joined Jan 8, 2021
Hi everyone!

I'm currently trying to build a diy UPS that will supply 12V to the attached load no matter what. I used an SLA battery in combination with a 12V power supply that can output up to 13.5V.

Circuit that switches between the 12V PSU and the battery in case of power outage and has it's output connected to the load.
A) The 12V battery is connected to the PSU through a boost converter so it can get charged.
B) An Arduino board will be used for another things, so if it is possible to control this with an Arduino (that's running other things though, let me know).

Solutions I have thought that would work:
  • Arduino to sense power outage and then switch to the battery (I prefer that but I don't know if there is going to be a delay in that and btw I'm drawing about 8A)
  • Auxiliary power supply connected to the gate of a MOSFET that controls battery's output. Let me know if this can be bypassed if I want.


Audioguru again

Joined Oct 21, 2019
Replace the boost converter with a proper battery charger. Add a power supply that can power the charger and with enough extra current to charge the battery and power your load at the same time.
Then add a voltage reducer to reduce the power supply voltage to 12V feeding the load and a diode from the battery to the load.