Sub topic 12
Powering an Arduino Board: VIN, 5V, 3.3V, and USB
Assume you understand voltage, current, resistance, breadboard wiring, and how to upload an Arduino sketch. This chapter uses an Arduino Uno-style board as the main example. Always check the exact board's documentation because voltage limits and available current vary.
The four power paths
An Arduino board may expose several power connections. They do not all mean the same thing.
| Connection | What it does | Typical use |
|---|---|---|
| USB | Supplies regulated 5 V from a computer or USB supply | Development and testing |
| VIN | Feeds the board's onboard voltage regulator | Higher-voltage battery or adapter |
| 5V | Direct connection to the regulated 5 V rail | An external, clean 5 V supply |
| 3.3V | Provides the board's regulated 3.3 V output | Low-current 3.3 V peripherals |
USB power normally reaches the board's 5 V rail through protection and power-selection circuitry. VIN usually passes through a linear regulator before reaching the 5 V rail. The regulator needs extra voltage above 5 V, called dropout voltage, so a source close to 5 V may not work reliably through VIN.
The 5V pin bypasses the onboard regulator. Apply only a controlled 5 V supply there. A higher voltage can damage the microcontroller and connected components.
The 3.3V pin is usually an output, not a general-purpose input. Its regulator may provide much less current than the 5 V rail. Check the board specification before powering sensors, radios, or displays from it.
Choosing the correct input
Use VIN when your source is within the board's specified input range, such as a suitable battery pack. The onboard linear regulator turns excess voltage into heat. A 9 V battery can power an Uno, but it may waste energy and become unreliable as its voltage falls.
Use an external 5 V regulator and connect its output to 5V when efficiency matters. Confirm the regulator's output voltage with a multimeter before connecting the board. Connect the regulator ground to Arduino GND.
Use USB for development. Disconnect or isolate other power sources if your board or circuit can feed voltage back into USB. Never connect two independent 5 V outputs together unless the design specifically supports power sharing.
A safe wiring check
Before powering the circuit:
- Confirm battery polarity and measure its voltage.
- Confirm the regulator output voltage with no Arduino connected.
- Connect regulator ground to Arduino GND.
- Connect the regulated output to VIN or 5V according to the regulator's voltage.
- Check for shorts between power and ground.
- Add the required input and output capacitors from the regulator's datasheet.
A simple sketch can confirm that the board starts after power is applied:
void setup() {
Serial.begin(9600);
Serial.println("Arduino power-up successful");
}
void loop() {
}If the board resets when a motor or radio transmits, the supply may have insufficient current, excessive voltage sag, or inadequate decoupling. Measure the rail during the load's startup, not only while the circuit is idle.
Exercise
A battery produces 7.4 V, and a buck converter produces a stable 5.0 V. Should the converter output connect to VIN or 5V?
Show answer
Connect it to 5V, with its ground connected to Arduino GND. VIN would waste voltage in the onboard regulator and may require more input voltage than the converter provides.