This question already has an answer here:

I've come across this issue multiple times already and never really figured out the best way to do it.

I'm designing a controller PCB for a drone and I would like to have a few different ways of powering it. USB power just for the control electronics, a battery connector (2-4S, not really sure yet) for the ESCs/motors and another regular connector for development 12V supply so I don't have to rely on batteries.

Now, I'd love to have a circuit that would automagically switch between these and make sure only one of them is active at any time to protect other supplies from reverse current and what not if multiple are plugged in at the same time. For instance, I would probably have USB and the 12V supply or battery plugged in at the same time during development because USB would just be used for debugging and the 12V supply or the battery to power all of the electronics and motors. Priorities would be 12V supply > battery > USB.

I could probably figure out the rest out myself but I just don't know where to start with this.


marked as duplicate by Elliot Alderson, Oleg Mazurov, Dmitry Grigoryev, Huisman, Finbarr Sep 18 at 9:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    \$\begingroup\$ It's close, but the other question requires a focus on discrete solutions, and on two power sources. This question allows for inclusion of integrated solutions, and looks at three power sources (Battery, USB, and HiV) which is a fairly common specific situation. \$\endgroup\$ – Brandon Hill Sep 5 at 18:02
  • 1
    \$\begingroup\$ An Analog Diode OR solution might be “Highest Source V supplies the current” \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Sep 5 at 19:23
  • \$\begingroup\$ The inclusion of "integrated solutions" would be border line with shopping recommendations. Can you explain why the solutions given in the dupe target don't work in your case? \$\endgroup\$ – Dmitry Grigoryev Sep 14 at 17:18

So there is a lot here to figure out. Assuming everything on your board will run on one regulated voltage, there are several options.

Simple diodes can do a lot of what you're asking. Coupled with a linear regulator, and accounting for some loss, this could be the easiest solution. Your battery voltage could be a problem, as if it is lower than 5V, the priority wouldn't be correct. This EE stack exchange answer and this one provide some diagrams of simple 2 source solutions, but more sources can be added in the same way.

More complicated solutions are possible using resistor and diode networks to switch a series of mosfets. Another EE stack exchange answer provides some examples.

There are also IC's for this (As for most things). Look for "PowerPath" or "ORing controller" ICs. A few dollars will buy you an incredibly capable product like LTC4090-3, which will handle 12V in, USB, and battery, while controlling a buck circuit and charging your battery for you as well. It will need another regulator, and will output a max of 5V, but it produces exactly the priority switching control you require.

This overview by Analog would be good for some IC based ideas, and has several circuit topologies as well as part selection tables.

Another link with more information about other manufacturers parts.

  • \$\begingroup\$ Thank you so much for sharing all of these resources! I will take a look at them and figure out whats the best for my usecase. I have also simplified it to only two sources so that should help with things. \$\endgroup\$ – nufflee Sep 5 at 18:32

This is a very common problem, and fortunately there's lots of good solutions to choose from depending on your exact needs.

Linear Technology (Analog Devices now) has a whole family of parts under their PowerPath branding that do exactly this function. Some include battery charge control. More about that here: https://www.analog.com/media/en/technical-documentation/product-information/Battery_Management_Soulutions_PowerPath.pdf

TI also has an extensive product line competitive with ADI/Linear. Appnote here: http://www.ti.com/lit/an/slua376/slua376.pdf

There's probably more from folks like Maxim, MPS, Richtek, Diodes Inc, etc.


Not the answer you're looking for? Browse other questions tagged or ask your own question.