Go Down

Topic: Circuit power source switching (Read 948 times) previous topic - next topic

jscoulter

Hi All. Not sure my question subject accurately describes what I am actually asking, but....what I want to do is this:

I have a circuit that runs off a fixed 5v source. By fixed I mean its a hard wired 5V adapter. What I want to do is have the circuit detect that this 5V source is gone, and it now needs to start running off a battery backup...which is also 5V. This is so when I turn off off the 5V hardwired source, the circuit will now run off the battery input.

Is this hard to do? What would I need to do?

Thanks, Jeremy

dhenry

The simplest would require two diodes.

jscoulter

Ok cool. How would I set them up in a circuit to use them? I have a thought in mind....but would like to know what somoeone else says before I look like an idiot  :D

Jeremy

fungus

Does it have to involve an Arduino?

Put in a big capacitor, enough to power the Arduino for a few seconds. Now get the Arduino to monitor the voltage via an input pin and switch over to battery if it notices a change.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

jscoulter

Ok, so say I do use a big capacitor, how do I tell the Arduino....or in this case a standalone circuit....to use a different power source. Thats the bit I cant figure out.

Jeremy

fungus


Ok, so say I do use a big capacitor, how do I tell the Arduino....or in this case a standalone circuit....to use a different power source. Thats the bit I cant figure out.


That was a bit of a joke...

Connect the battery up via a P-channel "logic level" MOSFET with the 5V supply connected to the gate. The transistor will switch on when the 5V supply drops to zero (helped by your pull-down resistor)

You'll still need a big capacitor though - to keep the Arduino safe during the switchover...


No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

jscoulter

Ok Cheers. I can prob. figure it out from that info...well hope so :-)

Thanks, Jeremy

jscoulter

HI. Well I found a solution in the end that works on the breadboard at least  :D  It was suggested a couple of posts back, but I wasnt sure what to do...well I knew WHAT to do, just not how to do it.....if you get what I mean  :~

http://www.farmhack.net/wiki/back-battery-arduino

I have tested it and its working ok. I can deal with the loss over the diode because then I know I can turn my screen off and just keep the GPS going....an alomost perfect solution  :)

Jeremy

jscoulter

Just a final follow up, I have now integrated it into my circuit and it works a charm....


Thanks, Jeremy

dhenry

Quote
it works a charm....


That's why good engineering is about simple and elegant solutions.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy