Dual USB power source

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
johand1
 
Posts: 4
Joined: Wed Mar 05, 2014 1:56 am

Dual USB power source

Post by johand1 »

Hello,

I would like to build a circuit able to shitch transparently from one use power to an other.
The main idea is being able to connect a raspberry on on power source and then swith automagicaly to a second source of power if the first one dropped down.

I imagin that i'll need a linear voltage regulator and a capacitor to clean the noize during the switch but as i'm not an expert, i have no idea if this first expectation is right. I don't know witch size of capacitor i need...

So i would be happy if someone could help me with some advices and documentation :)

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Dual USB power source

Post by adafruit_support_mike »

Take a look at the power source selection circuit for the Arduino. It basically looks like this:
selector.jpg
selector.jpg (22.34 KiB) Viewed 210 times
No matter how you apply power to the system, the 5v rail powers a 3.3v reference. The 7v-12v input connects to a 10k-10k voltage divider and a 5v voltage regulator. A comparator watches the 3.3v reference and the middle of the 10k-10k divider and controls a P-mosfet between the USB line and the 5v rail.

If you have 7v-12v at Vin, the voltage at the center of the 10k-10k divider will be 3.5v. That's higher than the 3.3v reference, so it shuts off the P-mosfet, disconnecting the USB input from the 5v rail. If the voltage at Vin falls below 6.6v, the comparator will turn the P-mosfet on and connect the USB input to the 5v rail.

johand1
 
Posts: 4
Joined: Wed Mar 05, 2014 1:56 am

Re: Dual USB power source

Post by johand1 »

Thanks a lot adafruit_support_mike !!
Your schema is really helpful for me. I still have a question. The mostfet will certainly do some noise during the switch. Does the raspberry can handle it ? If not, how the clean the noise ?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Dual USB power source

Post by adafruit_support_mike »

The switchover noise will be fairly small, but putting a 100uF capacitor on the 5v rail won't hurt.

johand1
 
Posts: 4
Joined: Wed Mar 05, 2014 1:56 am

Re: Dual USB power source

Post by johand1 »

Ok, again thanks a lot.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”