# Proper way of designing a battery backup system with 12V/5V dual output AC power supply?

I have a project (doorlock) with MCU / LCD / Keypad and solenoid (lock) connected together. MCU, LCD and Keypad runs at 5V while solenoid runs at 9V to 12V. I'm currently powering the system with an AC power supply that has 5V/12V dual output.

I'd like to add a rechargebale battery backup system to this, with 6-pack AA rechargeable batteries attached so that the power is kept on even if the AC power goes away, but since the AC power supply has a dual DC output, I'm not sure how to properly implement this. Here's what I've designed so far:

J1/J2 are connectors for 12V line and 5V line respectively from AC power supply and J3 is the connector for 9V (6 x AA) battery. The batteries should recharge slowly if PSU is on given that a small current flows into R1 to batteries. When power from the PSU is lost, the 9V battery line should provide current through the D2 schottkey diode. For 5V line, I'm using a TPS2110 to auto select between 5V (PSU) line and 5V (Battery, from LM7805) line.

Edit: I'd also like to know if my choices of R2 and R3 seems correct. I'd like the battery voltage to be selected if 5V from power supply falls below 4.6V.

Would this work? Are there any modifications I should make?

Edit: Fixed diagram (Previous diagram had an extra schottkey diode which doesn't belong there)

• What battery chemistry are you using, and how much current are the loads on each line pulling? Oct 27, 2016 at 3:33
• 5V line will pull around 100mA. 12V/9V line is used solely for solenoid lock which will pull around 500-600mA upon activation, which lasts for 5 seconds. The solenoid lock is not expected to activate often. I'm probably going to use 6xAA NiMH type batteries Oct 27, 2016 at 3:36
• Is there any reason you can't use a single 12V PSU instead of the dual 12V/5V unit? That'd actually simplify this design greatly... Oct 27, 2016 at 3:37
• @ThreePhaseEel This is just what I have available in the lab. I mean I could use 12V PSU, but I'd rather stick with what I have and not buy an extra one. Oct 27, 2016 at 3:38
• Will the solenoid work on the 7.2 volts (or a bit less) that you will get from six NiMH cells? Jun 13, 2018 at 16:28