Switching between two 5V sources

Thread Starter

Scalpel78

Joined Aug 11, 2013
56
Hi, I'm working on a circuit which can either be powered via a Micro-USB, or a pre-regulated 5V input. If both are present I want the 5V to come from the regulated source.

I need some help finding a simple circuit which can help me accomplish this.

I've seen one variant which just uses a diode in series with each input, but that will incur a small voltage drop which I would like to avoid.

I've also seen a couple of variants which uses opamps and p-channel mosfets, but those seem to require that the input voltage is higher than 5V.

How can I build a circuit that takes in 5V from one or two sources, and outputs 5V?
 

Thread Starter

Scalpel78

Joined Aug 11, 2013
56
That last one was a little expensive.

What would be the simplest circuit based around a FET that could be used? I see the ones Arduino boards use normally also include a op-amp. Can this be done without the opamp?
 

Thread Starter

Scalpel78

Joined Aug 11, 2013
56
The circuit is primarily an ESP32, two PWM controlled servos, a few leds, a MEMS accelerometer, and some IR sensors. Not sure about what the total current consumption will be, but I assume I'm under the 500mA that USB can supply.

Maybe a silly question, but why does current consumption matter?
 
Last edited:

MrChips

Joined Oct 2, 2009
34,810
LTC4411 is even simpler since it contains the high-side p-channel MOSFET
You don't need the 470k pullup on STAT if you are not using the STAT output.

 

falade47

Joined Jan 24, 2017
178
T
The circuit is primarily an ESP32, two PWM controlled servos, a few leds, a MEMS accelerometer, and some IR sensors. Not sure about what the total current consumption will be, but I assume I'm under the 500mA that USB can supply.

Maybe a silly question, but why does current consumption matter?
To avoid any contradiction between the two voltage sources supplying more current (that is if the circuit has no current limiter) when both sources are available
 

MrChips

Joined Oct 2, 2009
34,810
To avoid any contradiction between the two voltage sources supplying more current (that is if the circuit has no current limiter) when both sources are available
There is no contradiction or contention. The higher of the two supply voltages will take over the load. You don't get double the current.

I still think that the dual Schottky 1N5817 diodes is the simplest solution.
At 500mA the voltage drop will be about 0.3V.
 

dendad

Joined Feb 20, 2016
4,637
Current consumption is need to select the appropriate FEts/diodes. There is a difference in components needed for a 10mA switch and a 10A one. A relay could be used to switch the supplies but there would be a short time on no connect during switching that would have to be taken into consideration. Also the driving current of the relay coil. A FET switch is better.
And to answer falade47, yes, there are plenty of 5V relays around. Most relays models are available in a range of coil voltages.
For example...
http://www.mouser.com/ds/2/316/ds_61B05_en_js-469954.pdf
 
Last edited:

ian field

Joined Oct 27, 2012
6,536
So, you mean like this then?

That seems to be the idea, but you incur a small forward volt drop. Shottky Barrier is the lowest Vf I can think of (usually less than 200mV). To a small extent; an excessively large diode will drop slightly less voltage under load.

USB regulation should be pretty good - unless the current is so high you need another supply, the other supply probably isn't any better.
 

Thread Starter

Scalpel78

Joined Aug 11, 2013
56
Thanks, I'll try the two-schottky-diode setup first, with a couple of STPS2L30A or SSA33L's I have lying around.
 
Top