Home / Reference

Arduino Uno pinout: digital, analogue, PWM and power pins

An Arduino Uno-style board showing the digital pins along the top and the power and analogue pins along the bottom
Beginner

The Arduino Uno is the board most people learn on. Its pins are labelled on the board, but the labels don't tell you which ones do PWM, which are shared with USB, or how much current they can take. This page covers all of that for the Uno R3.

Logic level: 5 V. Unlike a Raspberry Pi, the Uno's pins work at 5 V. That's handy for older modules, but its 5 V outputs can damage 3.3 V boards and sensors. Use a level shifter or a voltage divider when connecting to them.

Digital pins 0 to 13

PinExtra functionsNotes
0Serial RXShared with the USB serial link. Leave it free while uploading.
1Serial TXShared with the USB serial link.
2Interrupt 0Good for buttons and encoders.
3PWM, interrupt 1
4
5PWMAbout 980 Hz PWM.
6PWMAbout 980 Hz PWM.
7
8
9PWM
10PWM, SPI SS
11PWM, SPI MOSI
12SPI MISO
13SPI SCK, LEDThe on-board "L" LED is connected here.

PWM pins are marked with a ~ on the board. analogWrite() runs at about 490 Hz on pins 3, 9, 10 and 11, and about 980 Hz on pins 5 and 6.

Analogue pins A0 to A5

A0 to A5 read voltages from 0 to 5 V with a 10-bit ADC, so analogRead() returns 0 to 1023. They also work as ordinary digital pins. A4 is I²C SDA and A5 is I²C SCL. On the R3, the same two signals also appear on the two pins beside AREF, so you can use either.

The power header

  • Vin: the voltage from the barrel jack, or an input if you power the board here. The recommended input is 7 to 12 V.
  • 5V: the regulated 5 V supply. From USB it's limited by the computer's port and the board's fuse.
  • 3.3V: a 3.3 V output for small sensors, up to 50 mA.
  • GND: ground. There are three GND pins on the board.
  • IOREF tells shields the board's logic voltage (5 V on the Uno). RESET restarts the board when pulled low. AREF is an optional reference voltage for the ADC.

Current limits

The ATmega328P datasheet gives an absolute maximum of 40 mA per I/O pin and 200 mA in total through the chip's VCC and GND pins. Absolute maximums are damage thresholds, not working values, so Arduino's long-standing guidance is to stay around 20 mA per pin. Ten pins at 20 mA each already reaches the 200 mA total. Use a transistor for motors, relays and anything bright. Our LED resistor calculator sizes resistors for single LEDs.

Things that catch people out

  • Uploads fail when something is connected to pins 0 and 1. Disconnect it while uploading.
  • The Servo library takes over the timer behind pins 9 and 10, so analogWrite() on those pins stops working while servos are attached.
  • tone() interferes with PWM on pins 3 and 11.
  • Floating inputs read random values. Use pinMode(pin, INPUT_PULLUP) for buttons and wire the button to GND.

The newer Uno R4 boards keep the same header layout, but use a different chip with different current limits and features. Check Arduino's documentation for the R4 before reusing R3 numbers.

Sources

The main references behind this guide. Numbers we worked out ourselves, such as the code outputs, come from running the code.