Current Priority

I would like my Arduino Mini Pro to both run on DC Power (from the plug) and Battery power, but at the same time, priorities (prefer using) the DC Power over the battery power if both are connected at the same time. What kind of electronic component should i use?

Thank you.

When you say "DC power" do you mean power through the USB connector?

What sort of battery, and what voltage, are you using?

...R

With DC Power, i mean 9 V DC from the power plug or maybe 5 V from the USB (Power from a cable). With battery power, i mean the 9V Battery. I wanted to build something similar to a radio, with 2 connection possibilities.

If you use a DC converter to reduce > 5V to 5V, then you will lose less current than if you use the onboard linear regulator.

Will you be wanting to recharge the battery as part of the project?

Long ago we had things that when you pushed the power plug in, it moved a physical switch that turned battery power off. We didn't have the low-current devices we have now, but the built-in switch worked.

GoForSmoke,

Thanks for the answer. But i am not trying to convert DC Power. Let's take an example: If you connect an arduino uno to Power In, to a 9 VDC Power connector (which get's scalled to 5 V) and still connects the Serial USB device, which supplies 5 V, the arduino somehow keeps the current at 5 V. I want to realise the same thing.

I think it would help if you draw a diagram of what you want to do and post a photo of the drawing. See this Simple Image Guide

It is too easy to misunderstand a verbal description.

One solution might be to build upon the comment at the end of Reply #3 and create a patch cable that can plug into the Arduino's power socket and on the patch cable but two similar sockets - one for the battery and one for the power from the mains-adapter. Arrange things so that when you plug the mains adapter into its socket the power from the battery is cut off.

Something like this

AKJ-Arduino.jpg

...R

AKJ:
GoForSmoke,

Thanks for the answer. But i am not trying to convert DC Power. Let's take an example: If you connect an arduino uno to Power In, to a 9 VDC Power connector (which get's scalled to 5 V) and still connects the Serial USB device, which supplies 5 V, the arduino somehow keeps the current at 5 V. I want to realise the same thing.

The somehow is a 7805 linear regulator, it's standard and it wastes power input. All > 5V is lost.

If you put in 100mA 9V you get out 100mA 5V and a Warm Heat Sink.
If you put in 100mA 12V you get out 100mA 5V and a Very Warm Heat Sink.
The Heat is the Wasted Potential turning into Kinetic energy in the voltage drop. School physics.

So when you put your must be >= 7V battery to work through this, it spends power making heat.
When you use a DC converter the loss is far less, which you can measure by Heat to know the true for what you got.

If you put 100 mA 9V through a buck converter set for 5V, you get 900 * efficiency / 5 mA 5V out.

I have cheap, < $3 DC buck converters that are rated to 3A output. I wouldn't push them more than half that, rather 1A at most.
I fed the converter measured 5.5V and it gave me measured 5V back, 6V battery works for this and NOT the 7805.

I have cheap boost converters that take .9V to 5V in and put out 5V on an MP3 charger socket. For small power, 1 AAA battery can deliver 5V until it is drained to .9V. And hehehe, 4 dead AAA's in series can also deliver 5V until the total reach .9V. Think of that.

I've probably had too much time to think.

Soi agree more information would be good.
Do you plan to use a rechargable or non rechargable battery, cause this matters to the overall setup.

If not a rechargable and the power supply is higher than the battery voltage a simple silicone diode inline with the battery lead will stop the battery whenever the power supply is plugged in.

With a diode you have a 0.6volt drop across the diode, if the voltage on the output of the diode goes higher than the input - 0.6v then the diode acts like a cutoff valve and 'cuts off'

Daz