Loading the figure…
The Uno's brain on a board the size of a stick of gum, made to plug into a breadboard.
Each lesson runs your own code on the board. Finish its checks to tick it off.
Build the board in the right order, then power it up and check it, as on the bench.
0 of 9 stepsNever work on a live board. Pull the USB cable and anything on VIN or 5V before you touch a part.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
The Nano (A000005, revision 3.3) has the same ATmega328P at 16 MHz and 5 V logic as the Uno, on a 43.18 × 17.78 mm board with two rows of 15 pins 0.6 in apart, so it straddles the middle of a breadboard. USB comes in on a Mini-B socket and goes through an FTDI FT232RNL USB-to-serial chip, which also resets the 328P for uploads. You get 14 digital pins (6 with PWM), 8 analog inputs (A6 and A7 are analog only), 32 KB of flash of which 30 720 bytes are free for your sketch, 2 KB of RAM and 1 KB of EEPROM. There is no barrel jack: power it from USB, from 7-12 V on VIN, or from a regulated 5 V on the 5V pin.
| Header | Pin | Name | Functions | Level | Max current | Notes |
|---|---|---|---|---|---|---|
| J1 | 1 | TX1 | D1, TXD, PCINT17 | 5 V | 20 mA | Serial TX. It also goes to the FT232 through a 1 kΩ resistor, so the Serial Monitor sees everything sent here. |
| J1 | 2 | RX0 | D0, RXD, PCINT16 | 5 V | 20 mA | Serial RX, driven by the FT232 through 1 kΩ. Anything wired here (a Bluetooth or GPS module) can block uploads. |
| J1 | 3 | RST | RESET (active low), PCINT14 | 5 V | – | RESET, active low, with a 1 kΩ pull-up to 5 V. Same net as the other RST pin and the RESET button. |
| J1 | 4 | GND | GND | – | – | |
| J1 | 5 | D2 | INT0, PCINT18 | 5 V | 20 mA | |
| J1 | 6 | D3 | PWM OC2B (490 Hz), INT1, PCINT19 | 5 V | 20 mA | PWM from Timer2. tone() uses Timer2 too, so it stops PWM on D3 and D11. |
| J1 | 7 | D4 | T0, XCK, PCINT20 | 5 V | 20 mA | |
| J1 | 8 | D5 | PWM OC0B (977 Hz), T1, PCINT21 | 5 V | 20 mA | PWM from Timer0 at 977 Hz. Timer0 also counts millis(), so leave its settings alone. |
| J1 | 9 | D6 | PWM OC0A (977 Hz), AIN0, PCINT22 | 5 V | 20 mA | PWM from Timer0 at 977 Hz. |
| J1 | 10 | D7 | AIN1, PCINT23 | 5 V | 20 mA | |
| J1 | 11 | D8 | ICP1, CLKO, PCINT0 | 5 V | 20 mA | |
| J1 | 12 | D9 | PWM OC1A (490 Hz), PCINT1 | 5 V | 20 mA | PWM from Timer1 at 490 Hz. The Servo library takes Timer1, which stops PWM on D9 and D10. |
| J1 | 13 | D10 | PWM OC1B (490 Hz), SPI SS, PCINT2 | 5 V | 20 mA | PWM from Timer1. As SPI SS it must stay an output while the Nano is the SPI controller. |
| J1 | 14 | D11 | PWM OC2A (490 Hz), SPI MOSI (COPI), PCINT3 | 5 V | 20 mA | PWM from Timer2, and SPI MOSI (COPI). Also on ICSP pad 4. |
| J1 | 15 | D12 | SPI MISO (CIPO), PCINT4 | 5 V | 20 mA | |
| J2 | 1 | VIN | LDO input, 7-12 V | – | – | Input for the 5 V regulator: 7-12 V, 15 V absolute maximum. No reverse-polarity protection. |
| J2 | 2 | GND | GND | – | – | |
| J2 | 3 | RST | RESET (active low) | 5 V | – | The same RESET net as J1 pin 3. |
| J2 | 4 | 5V | +5V rail, in or out | 5 V | – | The 5 V rail: an output on USB (about 4.65 V) or VIN (5.0 V), or a regulated 5 V input. |
| J2 | 5 | A7 | ADC7, Input only | 5 V | – | Analog input only (ADC7): no digital I/O and no pull-up, so digitalRead(A7) does not work. |
| J2 | 6 | A6 | ADC6, Input only | 5 V | – | Analog input only (ADC6): no digital I/O and no pull-up, so digitalRead(A6) does not work. |
| J2 | 7 | A5 | ADC5, I2C SCL, D19, PCINT13 | 5 V | 20 mA | I2C SCL for the Wire library. There are no I2C pull-ups on the board; most modules bring their own. |
| J2 | 8 | A4 | ADC4, I2C SDA, D18, PCINT12 | 5 V | 20 mA | I2C SDA for the Wire library. |
| J2 | 9 | A3 | ADC3, D17, PCINT11 | 5 V | 20 mA | |
| J2 | 10 | A2 | ADC2, D16, PCINT10 | 5 V | 20 mA | |
| J2 | 11 | A1 | ADC1, D15, PCINT9 | 5 V | 20 mA | |
| J2 | 12 | A0 | ADC0, D14, PCINT8 | 5 V | 20 mA | |
| J2 | 13 | REF | AREF, ADC reference | 5 V | – | ADC reference, decoupled by 100 nF on the board. Never feed a voltage here while analogReference(DEFAULT) is active. |
| J2 | 14 | 3.3V | 3.3 V out from the FT232 (50 mA) | 3.3 V | 50 mA | 3.3 V out from the FT232, 50 mA at most. Never feed 5 V into it. |
| J2 | 15 | D13 | SPI SCK, LED L, PCINT5 | 5 V | 20 mA | Drives the L LED through 1 kΩ (about 3 mA), with no buffer. Because of that load, INPUT_PULLUP on D13 does not read HIGH reliably. Also SPI SCK, so L flickers during SPI transfers. |
| J4 | 1 | MISO | D12, SPI MISO | 5 V | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
| J4 | 2 | 5V | +5V | 5 V | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
| J4 | 3 | SCK | D13, SPI SCK | 5 V | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
| J4 | 4 | MOSI | D11, SPI MOSI | 5 V | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
| J4 | 5 | RESET | RESET (active low) | 5 V | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
| J4 | 6 | GND | GND | – | – | ICSP pad. The six pads are left bare on the Nano: press a programmer's pogo pins or a header onto them to burn the bootloader. |
Sensors and actuators this board drives, with the real connections.
A 5 mm LED from a PWM pin through a 220 Ω resistor: about 12 mA on USB, bright and safe.
| Part pin | Board pin |
|---|---|
| A | D9Wire colour orange |
| K | GNDWire colour black |
Never without the resistor: an LED straight on a pin pulls far more than the 40 mA maximum and kills the pin or the LED.
Between D2 and GND with pinMode(2, INPUT_PULLUP): pressed reads LOW, no resistor needed. D2 is also interrupt INT0.
| Part pin | Board pin |
|---|---|
| 1 | D2Wire colour blue |
| 3 | GNDWire colour black |
A 10 kΩ knob as a voltage divider: ends to GND and 5V, wiper to A0. analogRead gives 0-1023.
| Part pin | Board pin |
|---|---|
| 1 | GNDWire colour black |
| 2 | A0Wire colour yellow |
| 3 | 5VWire colour red |
A light-dependent resistor from 5V to A0 plus a 10 kΩ resistor from A0 to GND: more light, higher reading.
| Part pin | Board pin |
|---|---|
| 1 | 5VWire colour red |
| 2 | A0Wire colour yellow |
Analog temperature sensor: 0.5 V at 0 °C plus 10 mV per °C. Read it on A1 and keep the leads short.
| Part pin | Board pin |
|---|---|
| +Vs | 5VWire colour red |
| Vout | A1Wire colour yellow |
| GND | GNDWire colour black |
A passive buzzer on D8 plays tone(8, 440).
| Part pin | Board pin |
|---|---|
| + | D8Wire colour orange |
| − | GNDWire colour black |
tone() takes Timer2, so PWM on D3 and D11 stops while a tone plays.
Signal on D9 with the Servo library (it takes Timer1, so PWM on D10 stops too).
| Part pin | Board pin |
|---|---|
| SIG | D9Wire colour orange |
| GND | GNDWire colour brown |
Feed the red wire from a separate 5 V supply whose GND joins the Nano's GND. A stalling servo pulls about 1 A, which browns out the Nano on USB and trips the polyfuse.
Ultrasonic distance sensor, 5 V: Trig on D9, Echo on D10, distance = echo µs / 58 cm. A 5 V board needs no level shifting for its echo.
| Part pin | Board pin |
|---|---|
| VCC | 5VWire colour red |
| Trig | D9Wire colour yellow |
| Echo | D10Wire colour green |
| GND | GNDWire colour black |
GY-521 breakout with an MPU-6050 at I2C address 0x68 (0x69 with AD0 high). Its own regulator lets it run from 5V; SDA goes to A4 and SCL to A5.
| Part pin | Board pin |
|---|---|
| VCC | 5VWire colour red |
| GND | GNDWire colour black |
| SCL | A5Wire colour yellow |
| SDA | A4Wire colour blue |
The chip itself is 3.3 V. The breakout pulls SDA and SCL up to its 3.3 V, and Wire.begin() also turns on the 328P's weak pull-ups to 5 V, so the bus idles a little above 3.3 V. It works in practice; a level shifter is the clean fix.
0.96 in 128 × 64 OLED at I2C address 0x3C, on A4 (SDA) and A5 (SCL).
| Part pin | Board pin |
|---|---|
| GND | GNDWire colour black |
| VCC | 5VWire colour red |
| SCL | A5Wire colour yellow |
| SDA | A4Wire colour blue |
Read the pin order on the silk: some modules are GND VCC, others VCC GND, and swapping them kills the display. Its 1 KB frame buffer takes half the Nano's RAM, so keep text in flash with F("...").