Pages: [1]   Go Down
Author Topic: Circuit power source switching  (Read 829 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The simplest would require two diodes.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-grin

Jeremy
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 144
Posts: 5345
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 144
Posts: 5345
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...


Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks, Jeremy
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HI. Well I found a solution in the end that works on the breadboard at least  smiley-grin  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  smiley-confuse

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  smiley

Jeremy
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Thanks, Jeremy
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it works a charm....

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

Pages: [1]   Go Up
Jump to: