Custom power supply


I need to power my Arduino Uno with a 12V led battery + solar pannel. The next thing I need is to optimize autonomy, therefore not burning too much current in heat sinks. My problem is that I know very little in electronics. So do I need your help.

My first idea was to use a switching regulator to make 5V I can feed the Arduino with. * Is this a good idea? * is this model appropriate? * Can I plug the arduino directly to the regulator ? or do I need some extra electronics inbeetween?

Tanks, Olivier

Yes, very good idea. Yes, good model. Yes, plug it in the Arduino. Well, hold your horses... You can power for example an Arduino with 5V to the 5V pin, but you need to protect the voltage regulator on the Arduino board with an extra diode from the 5V pin to the VIN pin. You can also plug the 5V in the usb connector, that way the polyfuse gives extra protection.

  • Yes - with the caveat that they do draw a non-negligible amount of power even when not doing anything. Depending on the specifics of your application, this may be a total show-stopper, or irrelevant. That one claims 7-9mA quintescent current.

  • Yes, subject to above caveats, plus the fact that it looks expensive (there are less efficient, bulkier, and likely less reliable adjustable buck converters available from chinese vendors on ebay for under $2 each)

  • Yes, make sure you connect it such that it's not also going through the regulator. The typical application circuit in the datasheet makes no mention of external caps... though I'd probably put a cap on the output for good measure.

5volt DC/DC 200uA quiescent. 500mA out is plenty for an UNO with lots of sensors/shields. Read about adding a protection input cap on the page. Feed into the USB in with a hacked USB lead. Leo..

Wawa, that Pololu converter is awesome. Thanks for sharing.

Many thanks for the answers. I have seen that if I feed the board through the 5V pin, I should never connect a computer to the USB port. * Is this correct?

If yes, I am in trouble. The Arduino will be working as a datalogger on the field. From time to time, I will come with a PC, connect it and do some checkings etc. The Arduino must stay alive when I plug the computer in and out. How can I do that?

The Arduino Uno will switch off the USB power when VIN is above 6.6V (or the power jack is above about 7.3V). When you supply power to the 5V pin, the USB power is not switched off, and current can flow from the 5V pin via the usb cable into the computer. For me, that has never been a problem, en there is still the polyfuse of 500mA.

When the USB voltage is 5.0V, and the voltage from a DC-DC converter is 5.1V, the DC-DC converter might get a little hotter when the computer is connected.

Thanks for the explanation. It put words on what I intuitively thought. Now rises a question: why is it claimed that plugging a computer with the Arduino fed through the 5V pin will fry the board? Is this a myth?

Not a myth, that is about the voltage regulator on the Arduino board.

Suppose a very strong 5V power supply with thick wires touches the 5V pin. At that moment the 5V onboard voltage regulator has 5V at its output and 0V at its input. The charging of the input capacitor might be too much and the voltage regulator could blow.

That is why a protection diode from 5V to VIN is needed.

I do solder that protection diode on my boards, but with or without that diode, I have not blown a voltage regulator (yet). I often use 5V DC-DC converters that can supply 2A.

I have never read that the Arduino board (powered via 5V pin) could be damaged when the usb is connected to a computer. Can you give a link to where that is mentioned ? Perhaps a custom made Arduino or a Pro Mini, without the polyfuse, and a big 5V power supply for the Arduino and when the computer is turned off.

Here Answer 1, 5th item in the list. I have seen the same advice somewhere else, but I cannot find it again.

Can you explain how the diode will work. If the power supply goes to the 5V, nothing is connected to Vin. And the only thing we need is to prevent the current to flow back in the USB cable, right ? Sorry for this question: I know very little in electronics.

Indeed, there it is :smiley_cat: This is a longer thread : Here is it once more at #5 :

Some say very loud that the Arduino board or the USB components in the computer might get damaged. Others are more reasonably and say it can be done if you know the risks.

I don't see a problem. I do it all time 8) I do have current flowing into my computer. Yes, it happens. Will it damage my computer ? No. Will it always work for every computer ... well.. no guarantees ::)

This is the reference page for Arduino Uno : That page has a pdf-file for the schematic.

The 5V voltage regulator on the Arduino Uno board is only to make 5V from the power jack and VIN inputs. It is not used when the Arduino is powered with USB.

These are two seperate things : Connecting it to the computer and the protection diode. Sorry for the confusion that I caused.

1 ) Arduino powered with 5V and connecting the USB to the computer. Current can flow into the computer.

2 ) The protection diode. That is when the Arduino board is not powered an all capacitors are empty. A big blast of reverse current through the voltage regulator could damage it. A protection diode from 5V to VIN prevents that.

What should you do ? For home usage with your own computer, then I don't see a problem. But out there in the dangerous world, where anyone should be able to connect to the Arduino, then it would not be nice when current is pushed into the computer. If you use the USB connecter ot power the Arduino board with 5V, the problem is gone. But the Arduino will get temporarily no power when someone switches that cable with a USB cable to the computer. It might be possible to change the hardware of the Uno board, but that has other consequences.

Thank-you for the details. I am well on the road of understanding things that are very important to me. Can you explain how does the diode trick work. The diode will allow the current to flow from the 5V to the VIN, right? but nothing will be connected to VIN... How does this work?

The onboard 5V voltage regulator has it's input connect to VIN and its output to the 5V pin. If VIN is 9V, it makes a nice 5.0V for the microcontroller. There is a capacitor at VIN and a capacitor at the 5V.

So far so good.

Now let's assume that VIN is not connected to anything, and the 5V pin has 5V power. The voltage regulator sees 5V at its output pin and nothing at its input pin. And that is not good. Reverse current to emitters of transistors inside it is bad. It probably has a protection diode from output to input. But sometimes that is not enough. An extra external protection diode will help.

When VIN is 9V, the protection diode is blocking current, and is doing nothing.

Peter_n: The voltage regulator sees 5V at its output pin and nothing at its input pin. And that is not good.

... But with a diode, the regulator sees 5V at both ends. Correct?

which diode should I use (I know nothing on diode nomenclature)

Just a the most common 1N4004 to 1N4007.

With the diode the capacitor at VIN is charged up to about 4.5V. The regulator has 5.0V at output and 4.5V at input. But that is okay.

Many thanks for the detailed explanations, and for your patience.