questions involving the creation of a battery power failsafe

Thread Starter


Joined Jan 10, 2019
I made an Arduino alarm clock, I want to connect it to a battery for power fail safe.

If I connect a diode to the positive terminal of a 9v, and connect it to my powerline from a 12v DC power transformer, then both into my mega2650: (input voltage 7-12v, operational voltage 5v)

a) will it work?

b)does the battery drain even while the main power is on?

(I dont neccesarially need a charging circuit, and think I want to avoid one)

c)are there any precautions or suggestions I may not be aware of?


Joined Mar 6, 2008
Should work, but unless you're sure that the 12v DC PSU can take a 9v voltage at it's output when turned off (and won't drain the battery either), you should add another diode at the PSU output to avoid it.