Arduino Nano Pinout: What Every Pin Actually Does

The Arduino Nano pinout consists of 30 pins that break down into four functional groups: 14 digital I/O pins (D0–D13), 8 analog input pins (A0–A7), power pins, and communication interface pins. Six digital pins (D3, D5, D6, D9, D10, D11) support PWM output. The board runs on the ATmega328P microcontroller at 16 MHz with 5V logic.

This guide covers every pin function, common mistakes, and what the datasheet does not tell you about working with the Nano in real projects.



TL;DR / Key Takeaways

  • The Arduino Nano has 30 pins split into digital I/O, analog inputs, power, and communication groups
  • A6 and A7 are analog-only — they cannot be used as digital pins despite what tutorials suggest
  • Six pins support PWM: D3, D5, D6, D9, D10, D11
  • Maximum current per pin: 40 mA — exceeding this damages the ATmega328P
  • The Nano operates at 5V logic, not 3.3V compatible without level shifting

Arduino Nano Pinout at a Glance

The Arduino Nano is a compact (45mm × 18mm) development board based on the ATmega328P microcontroller. Unlike the larger Arduino Uno, the Nano is breadboard-friendly and plugs directly into a prototyping board.

Here is the complete pin layout:

Pin Group Pins Function
Digital I/O D0–D13 General-purpose input/output
Analog Input A0–A7 Read variable voltages (10-bit ADC)
Power VIN, 5V, 3.3V, GND Power in/out
Communication RX/TX, SDA/SCL, MOSI/MISO/SCK Serial, I2C, SPI

The Nano ships with 32 KB flash memory (2 KB bootloader), 2 KB SRAM, and 1 KB EEPROM. It draws approximately 19 mA at 5V during normal operation, according to Arduino specifications.


Digital I/O Pins (D0–D13)

The 14 digital pins on the Arduino Nano operate at 5V logic. Each pin can source or sink up to 40 mA maximum, though the total package dissipation of the ATmega328P limits how many pins can draw full current simultaneously.

General Digital Pins

Pin Alternate Name Function
D0 RX Serial receive
D1 TX Serial transmit
D2 External interrupt 0
D3 External interrupt 1 / PWM
D4–D8 General digital I/O
D9–D11 PWM output
D12 General digital I/O
D13 Built-in LED / SPI MISO

Pin D13 has a built-in LED connected through a 1 kΩ resistor. When D13 outputs HIGH, the LED illuminates. This LED is useful for basic diagnostics without external components.

PWM-Capable Pins

Six pins generate Pulse Width Modulation signals using the analogWrite() function:

PWM Pin Timer Used Frequency
D3 Timer 2 490 Hz
D5 Timer 0 980 Hz
D6 Timer 0 980 Hz
D9 Timer 1 490 Hz
D10 Timer 1 490 Hz
D11 Timer 2 490 Hz

The analogWrite() function outputs an 8-bit value (0–255) representing duty cycle. A value of 127 produces a 50% duty cycle square wave. PWM is commonly used for LED dimming, motor speed control, and generating audio signals.

Supplier Perspective: Why D3 and D11 Use Different Timers

The ATmega328P has three hardware timers: Timer 0 (8-bit), Timer 1 (16-bit), and Timer 2 (8-bit). Timer conflicts occur when libraries claim specific timers for their own purposes. The Servo library uses Timer 1, which blocks PWM on D9 and D10. If you need PWM on these pins while controlling servos, use analogWrite() before initializing the Servo object, or switch to software PWM libraries.


Analog Input Pins (A0–A7)

The Arduino Nano features 8 analog input pins connected to a 10-bit Analog-to-Digital Converter (ADC). This resolution produces values from 0–1023, where 0 represents 0V and 1023 represents the reference voltage (typically 5V).

The Critical Difference: A0–A5 vs. A6–A7

This is the most commonly misunderstood aspect of the Nano pinout.

A0–A5:

  • Function as analog inputs (A0–A5)
  • Can also function as digital I/O (mapped to D14–D19)
  • Support analogRead(), digitalRead(), and digitalWrite()

A6–A7:

  • Analog inputs ONLY
  • Cannot be used as digital inputs or outputs
  • digitalRead() and digitalWrite() do NOT work on these pins

This limitation exists because the ATmega328P comes in two packages: TQFP and DIP. The Nano uses the SMD (surface-mount) version, and pins A6 and A7 connect only to the ADC channels without digital port registers.

Why This Matters in Practice

The Arduino documentation does not make this distinction obvious. When a tutorial shows pinMode(A6, OUTPUT) or digitalWrite(A6, HIGH), it will compile without errors but produce unexpected behavior — the pin simply does not respond.

In our experience with clients sourcing Nano-based products, this A6/A7 issue has caused production delays when engineers copy-paste code from forums without testing on actual hardware. Always verify pin capabilities against the physical chip architecture, not just the pin labels on the board silkscreen.

Analog Reference Voltage (AREF)

The AREF pin accepts an external reference voltage for the ADC. By default, the Nano uses the operating voltage (5V) as the reference, producing 4.88 mV per ADC step. Connecting an external 3.3V reference changes the scale to 3.22 mV per step, improving precision for signals in the 0–3.3V range.

To use an external reference, call analogReference(EXTERNAL) before reading analog values. Never apply voltage >5V or <0V to AREF.


Power Pins

The Arduino Nano accepts power through three primary methods:

Pin Voltage Current Limit Use Case
VIN 7–12V Limited by onboard regulator External barrel jack or bench supply
5V 5V regulated 500–800 mA (total) Power sensors, shields
USB 5V from USB 500 mA (USB spec) Programming, low-power operation
3.3V 3.3V regulated 50 mA maximum Low-voltage sensors, SD cards

Power Architecture

The Nano includes an onboard 5V voltage regulator (typically UA78M05 or equivalent) rated at 500 mA. When powering through VIN, the regulator dissipates the voltage difference as heat. At 12V input and 500 mA load, the regulator handles 3.5W of thermal dissipation — close to its absolute limit in free air.

For high-current applications, we recommend powering through the 5V pin directly with a well-regulated 5V supply, bypassing the onboard regulator entirely. This approach eliminates thermal stress on the Nano and improves long-term reliability.

Current Limitations

The ATmega328P datasheet specifies:

  • Maximum current per I/O pin: 40 mA
  • Total current from all I/O pins: 200 mA maximum
  • 3.3V rail: 50 mA (from FT232RL USB chip)

Exceeding 40 mA per pin causes voltage drops and can permanently damage the pin or entire chip. For loads requiring more current (motors, solenoids, high-power LEDs), use external driver circuits or MOSFETs.


Communication Interfaces

The Arduino Nano supports three standard communication protocols for interfacing with sensors, displays, and other microcontrollers.

UART (Serial) — D0 and D1

The Nano’s UART interface connects to the USB-to-Serial converter (FT232RL on original boards, CH340 on clones) for programming and serial monitoring.

Pin Function Direction
D0 RX (Receive) Input
D1 TX (Transmit) Output

The Serial.begin(9600) function initializes UART at 9600 baud. Common baud rates include 9600, 115200, and 230400. When uploading sketches, the Nano enters bootloader mode for approximately 2 seconds — during this window, any data on D0/D1 may corrupt the upload.

Common mistake: Using Serial.print() while the UART pins are connected to another device. The USB-to-Serial chip and external devices both drive these lines, causing conflicts. Always disconnect D0/D1 devices before uploading code.

I2C (TWI) — A4 (SDA) and A5 (SCL)

The Two-Wire Interface uses A4 for Serial Data (SDA) and A5 for Serial Clock (SCL). The Nano’s I2C bus operates at 100 kHz (standard mode) or 400 kHz (fast mode).

The Wire.begin() library handles I2C communication. Typical I2C devices include:

  • OLED displays (SSD1306, SH1106)
  • Temperature sensors (DS18B20, BMP280)
  • Real-time clocks (DS3231, DS1307)
  • IO expanders (MCP23017, PCF8574)

Important: The Nano shares the I2C pins with analog inputs A4 and A5. While they function correctly as I2C, you cannot simultaneously use them for analog measurements when an I2C device is actively communicating.

SPI — D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK)

Serial Peripheral Interface provides faster communication than I2C, suitable for high-bandwidth devices.

Pin Function Direction (Nano as Master)
D10 SS (Slave Select) Output
D11 MOSI (Master Out, Slave In) Output
D12 MISO (Master In, Slave Out) Input
D13 SCK (Clock) Output

The SPI.begin() library configures the hardware SPI peripheral. Common SPI devices include:

  • SD card modules
  • RFID readers (MFRC522)
  • Display modules (TFT, ePaper)
  • Shift registers (74HC595)

Arduino Nano vs. Arduino Uno: Pinout Differences

The Nano and Uno share the same ATmega328P processor but differ in form factor and pin availability.

Feature Arduino Nano Arduino Uno
Digital I/O Pins 14 (D0–D13) 14 (D0–D13)
Analog Input Pins **8 (A0–A7)** 6 (A0–A5)
PWM Pins 6 6
I2C Pins A4 (SDA), A5 (SCL) A4 (SDA), A5 (SCL)
SPI Pins D10–D13 D10–D13
USB Connector Mini-B / Micro-USB Type-B
Board Size **45mm × 18mm** 68.6mm × 53.4mm
Breadboard Compatible **Yes** No

The Nano’s extra analog pins (A6, A7) provide flexibility for projects requiring more sensor inputs, but remember their analog-only limitation. Both boards operate at 5V logic and are code-compatible for most applications.


Common Mistakes and How to Avoid Them

Mistake 1: Assuming A6/A7 Work as Digital Pins


// This will NOT work as expected
pinMode(A6, OUTPUT);
digitalWrite(A6, HIGH);  // Pin A6 ignores this

A6 and A7 have no digital output drivers on the ATmega328P package used in the Nano. Always check pin capabilities before writing code. If you need more digital pins, use a shift register or IO expander.

Mistake 2: Drawing Too Much Current from 3.3V Rail

The 3.3V pin on the Nano comes from the FT232RL USB chip and is limited to 50 mA. Attempting to power SD cards (which can draw 100–200 mA during writes) from this pin causes voltage drops, data corruption, or board reset.

Use a separate 3.3V regulator for current-hungry devices.

Mistake 3: Leaving I2C Pullups Enabled

The Nano does not have built-in I2C pullup resistors. When multiple I2C devices share the bus, enable pullups on only one device. Enabling pullups on every device increases the combined resistance, slowing the bus rise times and causing communication errors at high speeds.

Mistake 4: Forgetting TX/RX Conflicts

Never connect anything to D0/D1 while uploading. The bootloader and USB-to-Serial chip both drive these lines, and external connections create contention that prevents successful uploads.


Why Arduino Nano Pinout Knowledge Matters for PCB Design

The Arduino Nano is excellent for prototyping, but transitioning to production often means designing a custom PCB with the ATmega328P. Understanding the pinout reveals critical design constraints that the development board hides.

Pin Current Density in Custom Designs

The ATmega328P datasheet specifies 40 mA maximum per pin, but this assumes adequate thermal management. In a custom PCB with thin traces, current path design determines reliability. A trace carrying 40 mA over 2 oz copper should be at least 0.3 mm wide for acceptable temperature rise.

For high-current applications (LED drivers, motor controllers), external MOSFETs or dedicated driver ICs are essential. The Nano’s 40 mA limit is far too low for most actuator control.

Clock and Signal Integrity

The 16 MHz clock on the Nano works fine for hobbyist projects, but EMI from switching power supplies, motor drivers, or long wires can corrupt clock signals. In custom designs, place the crystal within 1 cm of the ATmega328P and add grounded keep-out zones around the oscillator circuit.

USB Connector Considerations

Nano clones often use Micro-USB connectors prone to mechanical failure in products. If reliability matters, consider replacing the Nano in production with a bare ATmega328P chip and a dedicated USB-to-Serial bridge, or specify a higher-quality connector with reinforced retention.

Need help designing a Nano-based product? Our engineering team reviews circuits for signal integrity and thermal constraints — free for orders over $500.

[Request a Free DFM Review → https://www.wellcircuits.com/contact-2/]


Frequently Asked Questions

How many pins does the Arduino Nano have?

The Arduino Nano has 30 pins total: 14 digital I/O pins (D0–D13), 8 analog input pins (A0–A7), and multiple power and control pins including VIN, 5V, 3.3V, GND, AREF, and RST.

Which Arduino Nano pins support PWM?

Six digital pins support PWM: D3, D5, D6, D9, D10, and D11. These pins use the analogWrite() function for 8-bit PWM output with duty cycles from 0% to 100%.

Can Arduino Nano analog pins be used as digital pins?

Pins A0 through A5 can function as digital I/O pins (mapped to D14–D19). However, pins A6 and A7 are analog-only and cannot be used as digital inputs or outputs. Attempting digitalRead() or digitalWrite() on A6/A7 will not produce expected results.

What voltage does the Arduino Nano operate at?

The Arduino Nano operates at 5V logic level. It can be powered through USB (5V), the VIN pin (7–12V input, regulated to 5V onboard), or directly through the 5V pin with an external regulated 5V supply.

What is the maximum current per Arduino Nano pin?

The maximum current per I/O pin is 40 mA, according to the ATmega328P datasheet. The total current from all I/O pins should not exceed 200 mA. Exceeding these limits can permanently damage the microcontroller.


Conclusion

The Arduino Nano pinout reveals a versatile but constrained platform. Its 30 pins cover the essentials for most prototyping projects, but the 40 mA per-pin limit, the A6/A7 analog-only quirk, and the 50 mA 3.3V rail constraint define the boundaries of what the Nano can do without external hardware.

Understanding these limitations prevents the debugging sessions that eat days of development time. Before starting your next Nano project, map out your current requirements, verify that A6/A7 meet your analog needs, and plan for external drivers if your loads exceed 40 mA.

For projects that outgrow the Nano, the step up to a board with more current capacity or 3.3V logic is straightforward — but that is a topic for another guide.

Please enable JavaScript in your browser to complete this form.

Quick Quote

Info
Click or drag a file to this area to upload.
send me gerber or pcb file,format:7z,rar,zip,pdf

Contact

WellCircuits
More than PCB

Upload your GerberFile(7z,rar,zip)