5v - 12v input, 5 volt output regulator

Thread Starter


Joined Mar 21, 2018
Hi guys, I'm building a circuit that I'd like to power from either 5v power pack or a 12v lead-gel battery. I've taken a look at the 7805 5 volt regulator but it's minimum input voltage is 5.1v
If I was to have a 5 v USB style connector and a 12 volt connector (different size so you can't mix them up) how could I connect both outputs together so as I could use either one? I first though of using two diodes but figured I'd only get 4.3v output as a result of the 0.7v drop of the diode.

Any thoughts would be much appreciated.
Much appreciated,

P.s It may be that I don't need to worry in which case that would be great as I could then use the USB connector as a 5v charging point for my phone!


Joined Aug 1, 2013
If you are building a regulator circuit, search for low dropout regulator schematics, or LDO. Also, several chip makers make 3-terminal LDO parts similar to the 78xx series but without the large differential.

To combine DC sources without the diode Vf voltage drop, consider using Shottkey diodes for a lower Vf. If you want less loss than that, look into ideal diode or active diode or active OR-ing diode circuits. Linear Tech makes several ideal diode controllers. These use a power MOSFET as a unidirectional DC voltage switch, with extremely low voltage drop.



Joined Oct 15, 2009
Its important to realize that any battery is never going to consistently give exactly 5V or 12V.. As the battery capacity is used up its voltage will change..


Joined Mar 14, 2008
Are you concerned about having both 5V and 12V connected at the same time?

If not, apply the 12V to a 7805 regulator with a diode across the regulator from output (anode) to input (cathode).
The diode prevents any possible reverse bias damage to the regulator.

Also connect the 5V input directly to the 7805 output.

That way you will have 5V, either from the 12V through the 7805 regulator, or directly from the 5V input.