External Power Supply

External power supply.

I have read a lot regards power supply.

I just would like confirmation on this approach for simple projects.

  1. If there is a PC with USB available, use it.
  2. If I have no PC, I could use the barrel jack, max 12V, which I can draw from Vin.
  3. If I have a 9V battery, use Vin.
  4. Best not to use 5 V pin as power supply.

Is that a good and save approach?

1 and 2 depend on the load you want to power. If it's only the Arduino (and maybe a led or 2) that's fine. If you try to work with motors, servo's, power leds, heaters, relays etc you need a external power supply. But then the on board supply will not be able to regulate it all so use a external regulator as well if you want 5V.

3, yes. But again, don't expect you can draw significant current from it (or the Arduino).

4, Mehh, depends. If it's a Uno you can use the 5V just fine as long as you don't connect USB. That's why it's often suggested to power 5V via the USB. Does almost the same as directly powering it via the 5V pin but now the USB port is already occupied :stuck_out_tongue: But for a Pro Mini or a Nano powering it via the 5V is just fine. These have a diode between 5V and the USB power.

Thanks for your reply. I am aware with all the limits of the loads, etc. I just don't want to fry my Arduino as long as possible. The 5V as input worries me most.

You know what's a good safety feature for that? Already order a Arduino in the far East now :wink:

Benarius2,

Your proposal sounds about right and safe (not save).

I suggest the following refinements :
Get at least a ten-pack of bog standard npn transistors, 10kOhm, and 330Ohm resistors and and a pack of LED
Those are for the (possibly overcautious) preference to go through 10kOhm to a transistor base from most arduino digital outs in preference to going directly to a load such as a 20mA LED.
Whilst even a small arduino like the nano 328 seems able to demo 20 mA straight out, I much prefer to draw a lot less than that and use external transistors for almost any load > 1mA

There are a couple of changes to watch out for if removing PC usb and going to 9V on Vin.
On some models, the 3.3V is from the usb power and unpowered if usb is unpowered.
USB might result in 4.6 to 5.1 Volts on the "5Volt" line depending on where the usb came from, cable lengths, power draw .... rarely a problem but be aware that it might do that.

All normal Arduino's are perfectly fine to source or sink a few mA. As long as you stay under 20mA a pin (absolute max is 40mA) and (from the top of my head) 150mA total you are fine. Aka, a bunch of indicator lights is fine, they don't need more then 5mA. No need to drive them via a transistor.

But everything with serious current, yeah.

ad2049q:
On some models, the 3.3V is from the usb power and unpowered if usb is unpowered.

Interesting, never came across that. All I've seen that use the 3V3 from the serial chip are just powered from Vcc. Aka, is also power when power via Vin or 5V.

ad2049q:
USB might result in 4.6 to 5.1 Volts on the "5Volt" line depending on where the usb came from, cable lengths, power draw .... rarely a problem but be aware that it might do that.

True, especially on a Nano or Pro Mini where is has to pass via a diode. But dodgy cables and supplies can also lead to a wide range of voltages.