RAW power and USB at the same time?

I have been having a look at this issue too for a 5V Pro Micro based portable device that I want to power either with batteries (using a 5V step-up DC/DC converter) or USB. The best I could come up with, though I have not made it, is an op-amp based power source selector. Example:

http://www.edn.com/design/analog/436830 … r-selector

I do not understand the electronics yet but you use op-amps as comparators and the mosfets switch between the input lines.

I think the full-sized arduino schematics have a section in them that allows you to connect and disconnect the USB power while batteries are connected. If you look there you may get a power source selection circuit. Some people have critisised it but it obviously works.

I also had a look at “power path management” because Li-ion powered circuits also have to deal with selecting power from charger or battery but I did not really get anywhere there due to patience/understanding issues. There seem to be dedicated chips for that.

Maybe another solution could involve a 2 position mechanical switch that allows either battery power OR usb power to be on. This way you can cut off one and supply only the other. If it is a 2-pole-2-throw (2P2T) switch you can also switch grounds.

Advantages: simple, cheap, can be done in minutes

Disadvantages: not so elegant, have to hack open a USB cable

Then regarding your high-current devices, power those independently of how you power the Pro Micro.

Thoughts?

First post! Woot!

:violin: