Sub topic 3
The power pins and what each one does
This chapter assumes you know what voltage, current, and ground mean, and that you can read a simple breadboard diagram. It uses the Arduino Uno R3 as the reference board. By the end you should know what each power pin does, which pins supply power and which accept it, and which wiring mistakes damage the board.
The pins at a glance
The Uno has two power-related areas. The POWER header sits beside the analog inputs. One more pin, AREF, sits on the digital header next to pin 13, along with an extra GND pin.
| Pin | Direction | Typical voltage | What it is for |
|---|---|---|---|
| 5V | Output (or input, with care) | 5 V | Regulated supply for sensors, LEDs, and shields |
| 3.3V | Output | 3.3 V | Low-current supply for 3.3 V modules |
| VIN | Input (or output) | Same as the source feeding the board | Raw, unregulated supply voltage |
| GND | Common | 0 V | Return path and shared reference for every voltage |
| IOREF | Output | 5 V on the Uno | Tells shields the board's logic voltage |
| AREF | Input | Whatever you choose, up to 5 V | Reference voltage for analog readings |
The header also has a RESET pin and one unconnected pin. They are not power pins, so this chapter does not cover them.
How power flows through the board
Knowing the path from source to pin explains most of the rules below.
The 5V rail is the center of the design. USB power reaches it through a fuse. Barrel-jack or VIN power reaches it through a regulator. A selector circuit picks the external supply when one is present, so you can leave USB connected while a battery runs the board.
5V
The 5V pin gives you the board's regulated supply. The microcontroller runs from this rail, so anything you draw from the pin comes out of the same budget as the chip itself.
How much you can draw depends on the source:
- On USB power, the whole board must stay under about 500 mA. A resettable fuse trips near that level, and the computer's USB port may also cut power.
- On barrel-jack or VIN power, the 5V regulator limits you. The practical ceiling is a few hundred milliamps, because the regulator turns the extra voltage into heat.
You can also feed regulated 5 V into this pin to power the board. This bypasses the fuse, the reverse-polarity diode, and the regulator, so a supply above 5 V or a reversed connection can destroy the board. Use it only with a clean, regulated 5 V source.
3.3V
The 3.3V pin comes from a second, small regulator fed by the 5V rail. It supplies at most about 50 mA. That is enough for a low-power sensor or a small radio module. It is not enough for a servo, a Wi-Fi module with transmit bursts, or a string of LEDs.
Two points matter here:
- The 3.3V pin only changes the supply voltage of a module. The Uno's I/O pins still swing between 0 V and 5 V. A 3.3 V-only module can be damaged by a 5 V signal on its input, even if it is powered from this pin. Chapter 12 covers logic levels.
- Never connect the 3.3V pin to the 5V pin or to another supply.
VIN
VIN connects to the barrel jack through the reverse-polarity diode. It serves two roles:
- As an output: when you power the board through the barrel jack, VIN carries roughly the jack voltage minus the diode drop (a few tenths of a volt). You can use it to power a motor driver or a strip that wants the raw supply voltage.
- As an input: you can feed a supply into VIN instead of using the jack. Arduino recommends 7 to 12 V. The board tolerates 6 to 20 V, but the extremes cause problems.
The reason for the recommended range is the 5V regulator. Below about 7 V, the 5V rail may sag below 5 V. Above 12 V, the regulator burns the excess as heat. Power lost in the regulator is approximately:
P = (Vin - 5 V) x IWith a 12 V supply and 200 mA drawn from the board, that is (12 - 5) × 0.2 = 1.4 W. A regulator with no heatsink gets very hot at that level and may shut itself down. If your project needs more current, use a lower input voltage or a separate regulated supply for the high-current parts.
GND
The Uno has several GND pins: three on the headers (two on the POWER header, one beside AREF), plus the shell of the USB connector. They are all joined on the board, so any of them works.
GND is the reference for every voltage on the board. A "5 V" signal means 5 V relative to GND. For that reason:
- Every part of your circuit must share a common GND with the board. A sensor with its own battery still needs its ground wired to the Arduino's GND.
- A missing ground connection is a common cause of readings that jump around or never settle.
- Use a spare GND pin for each return wire instead of daisy-chaining many wires through one breadboard hole, especially for high current.
IOREF
IOREF outputs the voltage at which the board's I/O pins operate. On the Uno it reads 5 V. Shields use it to adapt: a well-designed shield reads IOREF and sets its level shifters or supply accordingly, so the same shield works on 5 V and 3.3 V boards.
You normally leave IOREF unconnected in a hand-built circuit. Do not treat it as a power supply. It is a signal for shields, not a source of current.
AREF
AREF is the analog reference pin. The analog-to-digital converter (ADC) turns a voltage into a number from 0 to 1023 by comparing it with a reference voltage. By default the reference is the 5V rail. The pin lets you change it.
The analogReference() function selects the source. On the Uno, the options are:
DEFAULT: use the 5V rail. The AREF pin is not driven.INTERNAL: use a built-in 1.1 V reference.EXTERNAL: use the voltage you apply to the AREF pin.
A smaller reference gives finer steps for small signals. With a 1.1 V reference, one step is about 1.1 / 1023 ≈ 1.08 mV, compared with 4.89 mV at 5 V. This sketch measures a signal that stays below 1.1 V:
void setup() {
Serial.begin(9600);
analogReference(INTERNAL); // 1.1 V reference on the Uno
analogRead(A0); // discard the first reading after the change
}
void loop() {
int raw = analogRead(A0);
float volts = raw * (1.1 / 1023.0);
Serial.print(volts, 3);
Serial.println(" V");
delay(500);
}The first reading after a reference change can be inaccurate, so the sketch throws one away. Any input above 1.1 V reads as 1023, so keep the signal inside the new range.
Common errors
- Powering motors from 5V. Motors and servos draw current spikes that exceed the board's budget, so the board resets. Give them their own supply and join the grounds.
- Expecting 3.3V to run a 3.3 V board. At 50 mA it cannot.
- Backfeeding. Connecting a supply to 5V while also powering the board from USB or the jack puts two supplies in conflict. Use one source at a time.
- Touching bare pins on a powered board. Metal objects bridging 5V and GND short the rail. Power down before you change wiring.
- A brownout that looks like a code bug. Weak USB ports or long thin cables drop the 5V rail. The sketch restarts or sensors misread, and nothing in the code is wrong.
Exercise
You power an Uno from a 12 V supply through the barrel jack, and the board draws 150 mA in total. About how much power does the 5V regulator dissipate as heat, and what is one way to reduce it?
Show answer
The regulator drops 12 V - 5 V = 7 V at 150 mA, so P = 7 × 0.15 = 1.05 W. You can reduce it by lowering the supply voltage toward 7 V (which cuts the dissipation to about 0.3 W at the same current), or by moving high-current loads onto a separate regulated supply.
Exercise
A temperature sensor outputs between 0 V and 0.9 V. Which analogReference() setting gives the finest resolution on an Uno, and what is the approximate step size?
Show answer
Use INTERNAL, the 1.1 V reference. The step size is about 1.1 / 1023 ≈ 1.08 mV, compared with about 4.89 mV at the default 5 V reference.
Exercise
A 3.3 V sensor is powered from the Uno's 3.3V pin. It also has a signal wire connected to a digital output pin, but the sensor still gets damaged. Why?
Show answer
The 3.3V pin only sets the sensor's supply voltage. The Uno's digital pins drive 5 V signals, and a 3.3 V-only input can be damaged by that voltage. The signal needs a level shifter or a voltage divider.