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:

enter image description here 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)

  • \$\begingroup\$ What battery chemistry are you using, and how much current are the loads on each line pulling? \$\endgroup\$ Commented Oct 27, 2016 at 3:33
  • \$\begingroup\$ 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 \$\endgroup\$
    – Xiagua
    Commented Oct 27, 2016 at 3:36
  • \$\begingroup\$ 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... \$\endgroup\$ Commented Oct 27, 2016 at 3:37
  • \$\begingroup\$ @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. \$\endgroup\$
    – Xiagua
    Commented Oct 27, 2016 at 3:38
  • \$\begingroup\$ Will the solenoid work on the 7.2 volts (or a bit less) that you will get from six NiMH cells? \$\endgroup\$ Commented Jun 13, 2018 at 16:28

1 Answer 1


You always start with specifications not a design idea.

  • V , I, Load impedance ESR of source
  • Then put in min/max range or tolerances.
  • Then add efficiency and budget.
  • Then compute power delivery and losses allowed.
  • Then add back up time and Watt-hour capacity needed
    • then choose Voltage of battery from Ah ratings needed and cost.

Then start the design.

  • 1
    \$\begingroup\$ I'm sorry, but this doesn't really answer my question. \$\endgroup\$
    – Xiagua
    Commented Oct 27, 2016 at 4:33
  • \$\begingroup\$ The explicit answer to "Would this work? " is No, not even close. too many errors' \$\endgroup\$ Commented Feb 4, 2022 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.