Currently I am running my micro-controller boards with power adapter(AC to DC).

Now I am developing a system which senses AC power and sends me some signal when AC power is gone.

The problem is I am running my board with the AC power(through adapter) which I am sensing. So, I need to switch to battery power( as backup ) instantly when AC power is gone making sure my board doesn't turn off while switching.

I am not sure how it should be done.


marked as duplicate by Leon Heller, PeterJ, Daniel Grillo, Rev1.0, Scott Seidman Jun 8 '15 at 12:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    \$\begingroup\$ @LeonHeller this is not the duplicate of what you are interpreting, I am on 5 volts and I am not using any relay to switch for switching \$\endgroup\$ – Saad Rafey Jun 1 '15 at 9:16
  • 1
    \$\begingroup\$ Why put relay in the tags, then? \$\endgroup\$ – Leon Heller Jun 1 '15 at 9:18
  • \$\begingroup\$ @LeonHeller I thought it could done by using relay and a capacitor . \$\endgroup\$ – Saad Rafey Jun 1 '15 at 9:24
  • \$\begingroup\$ @LeonHeller Also I don't have options on my board , I have only one option of adapter I want to integrate that option only \$\endgroup\$ – Saad Rafey Jun 1 '15 at 9:29
  • \$\begingroup\$ You are not making sense Saad, you say you "don't have options" then you say you "have only one option" then you want to "integrate that option". What are you trying to achieve? Please be clear. \$\endgroup\$ – Andy aka Jun 1 '15 at 9:41

One of the simple solutions is using Diode-OR (related question), you only need one-one serial diode after the two power lines, as follows:

enter image description here

As long as the voltage from the battery is less than the voltage from the AC/DC adapter D1 diode will conduct and as soon as the voltage from the AC/DC source disappears D1 will close and D2 will conduct.

Disadvantage is that you lose voltage over the diodes (diode forward voltage drop), I do not know if it is a problem in your case or your sources are high enough.

This was one a simple option which needs only two additional component, but you can use specific IC on supply switching purpose.

Example: TPS2115A

Typical application: enter image description here

This solution need more component, thus more board-space, more expensive but here you do not lose voltage and it is more sophisticated.

There could be other ICs it was just an example as I said.


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