Reference chart
Arduino Uno pins and limits
An Arduino Uno has 14 digital pins, six analog inputs and a row of power pins. This chart shows what each pin can do, which pins share a job, and the current limits that keep its ATmega328P chip alive.
Digital pins
Every digital pin can be an input or an output, HIGH (5 V) or LOW (0 V). Some have extra jobs. A ~ on the board marks the PWM pins.
| Pin | Also | Notes |
|---|---|---|
| 0 | Serial RX | Used by USB uploads and Serial: leave it free if you can |
| 1 | Serial TX | Same as pin 0 |
| 2 | Interrupt 0 | |
| 3 | ~ PWM, interrupt 1 | |
| 4 | ||
| 5 | ~ PWM | About 980 Hz |
| 6 | ~ PWM | About 980 Hz |
| 7 | ||
| 8 | ||
| 9 | ~ PWM | About 490 Hz |
| 10 | ~ PWM, SPI SS | About 490 Hz |
| 11 | ~ PWM, SPI MOSI | About 490 Hz |
| 12 | SPI MISO | |
| 13 | SPI SCK | The board's own LED, L, is on this pin |
PWM on pin 3 also runs at about 490 Hz. tone() stops PWM on pins 3 and 11, and the Servo library stops it on pins 9 and 10.
Analog pins
A0 to A5 feed the chip's 10-bit analog-to-digital converter. analogRead gives 0 to 1023 for 0 to 5 V, steps of about 4.88 mV, and takes about 100 µs per reading. Each one also works as a digital pin.
| Pin | Digital pin | Also |
|---|---|---|
| A0 | 14 | |
| A1 | 15 | |
| A2 | 16 | |
| A3 | 17 | |
| A4 | 18 | I²C SDA |
| A5 | 19 | I²C SCL |
To turn a reading into volts: volts ≈ reading × 5 ÷ 1024. A reading of 512 is about 2.5 V.
Talking to other chips
| Job | Pins |
|---|---|
| Serial (UART) | 0 RX, 1 TX, shared with USB |
| I²C | A4 SDA, A5 SCL |
| SPI | 10 SS, 11 MOSI, 12 MISO, 13 SCK, and the six-pin ICSP header |
attachInterrupt() | 2 and 3 only |
Power pins
| Pin | What it is | Limit |
|---|---|---|
| 5V | The board's regulated 5 V | On USB, the board and everything on this pin share about 500 mA |
| 3.3V | A small 3.3 V regulator | 50 mA |
| Vin | The power jack's voltage, or feed the board here | 7–12 V recommended |
| GND | 0 V, on several pins, all joined | |
| AREF | analogRead's top voltage, if you change it | Never above 5 V |
| IOREF | Tells a shield the board works at 5 V | |
| RESET | Pull it LOW to restart the program |
Current limits
These come from the ATmega328P's datasheet. Running past the absolute maximum can damage the chip for good.
| Limit | Value |
|---|---|
| Per pin, safe | 20 mA |
| Per pin, absolute maximum | 40 mA |
| All pins together | 200 mA |
| 3.3V pin | 50 mA |
| A pin's input | Between 0 V and 5 V, never outside |
An input reads HIGH from about 3.0 V and LOW up to about 1.5 V. pinMode(pin, INPUT_PULLUP) adds a built-in resistor of 20–50 kΩ to 5 V, so a button can pull the pin LOW.
Using the chart
- Pick the pin for the job: a ~ pin for analogWrite, A0–A5 for analogRead, 2 or 3 for
attachInterrupt(). - Work out the current. A red LED through 220 Ω draws about 12.5 mA: fine. A motor, a relay or a long LED strip is not.
- Add up every load. Under 20 mA a pin, and under 200 mA for the whole chip.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Meet the board” is lesson 1 of 6 in Blink Bay, Embedded Systems World 1. Free with an account. It’s open as soon as you sign up.
Or start from the very first lesson, no account neededThe ideas behind it
- What is a microcontroller?A tiny computer on one chip that reads buttons and sensors and switches lights and motors.
- How much current can an Arduino pin supply?About 20 mA per pin: what that runs, what it doesn't, and how a transistor takes the load.
- Arduino analogWrite values: from percent to 0–255analogWrite counts to 255, not 100: turning a percentage into a value, and what the LED really gets.
- How Arduino analogRead worksHow analogRead turns 0–5 V into 0–1023, and how to scale it for analogWrite.
Questions people ask
Which Arduino Uno pins can do PWM?
Pins 3, 5, 6, 9, 10 and 11, each marked with a ~ on the board. analogWrite works on them at about 490 Hz, or about 980 Hz on pins 5 and 6. On any other pin it can only switch fully on or fully off.
How much current can an Arduino Uno pin supply?
About 20 mA is safe. The ATmega328P's absolute maximum is 40 mA per pin, and running near that damages it. All the pins together should stay under 200 mA. For anything bigger, let the pin switch a transistor.
Can I use the analog pins as digital pins?
Yes. A0 to A5 also work as digital pins 14 to 19, so pinMode(A0, OUTPUT) and digitalWrite(A0, HIGH) work. They're the only pins that can use analogRead, so use the others first if you can.
Which pins are I²C on an Arduino Uno?
A4 is SDA, the data line, and A5 is SCL, the clock. Newer Uno boards repeat them as two pins labelled SDA and SCL beside AREF; they're the same connections, so you can't use A4 and A5 for anything else while I²C is running.
More charts
- Standard resistor values chartThe E12, E24 and E96 series, decade by decade, and which one to reach for.
- SMD resistor code chartTurn 472, 4702, 4R7 or 01C on a tiny resistor into ohms.
- LED forward voltage by colourEach colour's forward voltage, and how many LEDs fit in series on 5 V, 9 V or 12 V.
- Electronics unit prefixes and conversionsp, n, µ, m, k, M and G, conversion tables, and what 4k7 or 2n2 means.
- Capacitor code chartTurn 104, 473J or 2A into a value, a tolerance and a voltage rating.
- Common diodes chart1N4148, 1N4007, 1N5819 and the 1N47xx Zeners compared, and which one to use.
- Common transistors chartRatings, gain and pinouts for the BJTs and MOSFETs in every parts kit.
- Logic gate truth tablesAll seven gates' truth tables, how to write each one, and the chip numbers to buy.
- Binary, decimal and hex table0 to 15 in all three bases, the powers of two, common bytes, and converting four bits at a time.
- AWG wire gauge chartAWG and mm² side by side, ohms per metre, and roughly how many amps each size takes.
- Battery voltage and capacity chartFull, nominal and flat voltages, typical mAh, and how full a lithium cell is from its voltage.
- Electronics formulas cheat sheetOhm's law to antenna length: every formula in the course, what it gives and where to learn it.
- Electronics glossaryFrom AC to Zener diode: the words of electronics, each in a sentence or two.