Power supply basics for the Arduino Uno

Just wanted to make sure i’ve understood all of this completely properly.

From the Power section on the product spec page (http://arduino.cc/en/Main/ArduinoBoardUno) ;

The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.

Just for a newbie’s curiosity, what exactly goes on when, say a 9V battery is connected to the DC jack, and the USB connection is also being used to download code.

VIN. The input voltage to the Arduino board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

So, if i have a 9V battery connected to the DC jack, i can also get 9V coming out from the “Vin” pin ?

**5V.**This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don’t advise it.

Last sentence sounds a bit worrying now… why have the pin there then ?
i’m assuming that it’s at least okay to use it to power sensors that require a V-supply, either 5V or 3.3V - and if one were so inclined, via voltage dividers, some other nominal value ?

1 )
When you power the DC plug with 9V, and connect the USB, the USB power is not used. And if you disconnect the 9V, it will switch automatically to the USB power without problem.

2 )
Yes, Vin can be used as output. Sometimes there is a protection diode between the DC plug and Vin, so they are not exactly the same.

3 )
The 5V pin is a power output. For example for 5V sensors.
The 3.3V pin is a power output. For example for 3.3V sensors.
You can not use a voltage divider with resistors to power something. For other voltages between 0 and 5V, you would need a voltage regulator.

About damaging the board: Some used the 5V power output pin as a power input. It will go wrong if that would not be 5.0V but higher. For example with an wall wart that says "5V" but outputs 8 or 9V.
Suppose you have already a good regulated 5.0V and connect that to the 5V pin of the Arduino. That still could go wrong, since the voltage regulator on the Arduino gets a reverse voltage, and because of capacitors also reverse current. Although it will happen very rare, it might damage the voltage regulator.

Caltoa:
1 )
When you power the DC plug with 9V, and connect the USB, the USB power is not used. And if you disconnect the 9V, it will switch automatically to the USB power without problem.

Well, i got as much from the “automatically selected” - was just wondering what sort of “magickery” (sub-circuit ?) was at hand - is there a technical term for it that i could search for ?
the hardware version of if(DC_plug) then USB_power=FALSE; else USB_power=TRUE; :smiley:

Caltoa:
2 )
Yes, Vin can be used as output. Sometimes there is a protection diode between the DC plug and Vin, so they are not exactly the same.

okay thanks, will have to try and measure it to see what the difference is.

Caltoa:
3 )
The 5V pin is a power output. For example for 5V sensors.
The 3.3V pin is a power output. For example for 3.3V sensors.
You can not use a voltage divider with resistors to power something. For other voltages between 0 and 5V, you would need a voltage regulator.

okay, i’ve seen the term level-shifter - is that different from a voltage divider ?

Caltoa:
About damaging the board: Some used the 5V power output pin as a power input. It will go wrong if that would not be 5.0V but higher. For example with an wall wart that says “5V” but outputs 8 or 9V.
Suppose you have already a good regulated 5.0V and connect that to the 5V pin of the Arduino. That still could go wrong, since the voltage regulator on the Arduino gets a reverse voltage, and because of capacitors also reverse current. Although it will happen very rare, it might damage the voltage regulator.

ahh okay, i see - “Supplying voltage” as a power supply TO the Arduino, not FROM it !
i don’t think i’d try that then.

EDIT:
one more question, is there any difference between the 3 GND pins ?

The GND pins are all the same.

A level shifter connects signals of different voltages.
For example a 3.3V SPI bus to a 5V SPI bus.
Or a 3.3V I2C bus to a 5V I2C bus.
It converts the voltage levels of the signals and prevents that the 5V signals will destroy 3.3V chips.

The power circuit differs on the different Arduino boards. Since everything is online, you can check the schematic to see how it is done.

Look for : Schematic: arduino-uno-Rev3-schematic.pdf
Sometime a low-voltage-drop diode is used, sometimes a smart circuit that uses a mosfet to switch.
The Arduino Uno R3 use a super smart circuit with comparator, mosfet, diode, voltage regulators, automatic fuse.

Caltoa:
...
...
Sometime a low-voltage-drop diode is used, sometimes a smart circuit that uses a mosfet to switch.
The Arduino Uno R3 use a super smart circuit with comparator, mosfet, diode, voltage regulators, automatic fuse.

ahh, some serious "magickery" then...
guess we can't just "chuck it in the water to see if it floats..." :wink:
Thanks for all your responses!