Arduino Nano Pinout Reference

The Arduino Nano may be small in size, but don’t let that fool you—it packs nearly all the functionality of the larger Arduino Uno into a compact, breadboard-friendly package. This makes it perfect for projects where space is tight but capability still matters.

To harness the full power of the Nano, you’ll need to understand its pinout. In this guide, we’ll walk you through the different types of pins on the Arduino Nano so you can make the most of this compact board.

So grab your Nano, and get ready to dive into this pin-tastic adventure!

Arduino Nano Pinout

The Arduino Nano has 30 pins in total. The pinout is as follows:

arduino nano pinout

Let’s take a closer look at the Arduino pins and their functions one by one.

Arduino Nano Digital I/O Pins

These are pins on the Arduino Nano that can be configured as either inputs or outputs. When set as inputs, they can read digital signals (HIGH or LOW), and when set as outputs, they can send digital signals to control external components like LEDs, motors, and relays.

The Arduino Nano has 14 digital I/O pins, labeled D0 to D13:

arduino nano digital io pins

Please note that these pins operate at a 5V logic level, and each pin can source or sink a maximum of 20 mA of current.

To set a digital pin as an input, you use the pinMode(pin, INPUT) function, and then digitalRead(pin) function to read the input pin’s state. For setting a pin as an output, you use the pinMode(pin, OUTPUT) function, and then digitalWrite(pin, HIGH/LOW) to set it to the desired state.

Onboard LED

The Arduino Nano has an onboard LED connected to pin D13. It illuminates when the pin is set to HIGH and turns off when set to LOW. This makes it a handy indicator for debugging or signaling the status of a project.

If you use D13 for other purposes besides controlling the LED, remember that the onboard LED will also respond to changes in the pin’s state. This could be confusing if you’re unaware of the connection.

Internal Pull-up Resistors

Each digital pin has an internal pull-up resistor that can be enabled in INPUT mode using pinMode(pinNumber, INPUT_PULLUP). This resistor weakly pulls the pin to HIGH when nothing is connected to it, preventing it from floating between HIGH and LOW states due to electrical noise.

The value of the pull-up resistor is guaranteed to be between 20-50 kΩ.

Arduino Nano Interrupt Pins

Interrupt pins are special digital input pins that can trigger a specific block of code (an interrupt service routine or ISR) when an external event occurs, such as a change in voltage level (HIGH to LOW or vice versa). This allows the Arduino to respond immediately to events without constantly checking the pin’s state in the main loop of your code.

The Arduino Nano has two dedicated hardware interrupt pins:

arduino nano interrupt pins

These pins can be configured to trigger an interrupt on a rising, falling, or changing signal edge. This is useful for tasks that require immediate attention, like reading a sensor that needs to be processed quickly.

The attachInterrupt(interrupt, ISR, mode) function is used to configure the pins as external interrupts, where interrupt is the interrupt number (0 for pin 2, 1 for pin 3), ISR is the interrupt service routine (a function to be called when the interrupt occurs) and mode defines the trigger condition (RISING, FALLING, or CHANGE).

Please keep in mind that Interrupt 0 (pin 2) has higher priority than Interrupt 1 (pin 3). If both interrupts are triggered simultaneously, Interrupt 0 will be serviced first.

Arduino Nano PWM Pins

PWM pins on the Arduino Nano are digital pins that can simulate analog output. They achieve this by rapidly switching the pin between HIGH and LOW states, creating a square wave signal. The ratio of the “ON” time to the total period of the signal is called the duty cycle. By varying the duty cycle, you can control the average voltage delivered to a connected component, allowing you to dim LEDs, control motor speeds, and even generate simple audio tones.

The Arduino Nano provides 6 PWM-capable digital pins: D3, D5, D6, D9, D10, and D11. These pins are marked with a tilde (~) symbol next to their pin number on the board.

arduino nano pwm pins

The PWM output is an 8-bit signal, meaning it can take any value from 0 to 255. This translates to 256 discrete levels of duty cycle.

The pinMode(pin, OUTPUT) function is used to set the desired PWM pin as an output. The analogWrite(pin, value) function is then used to set the PWM value on a pin. Here, pin is the PWM-capable pin number, and value is an integer between 0 and 255.

  • analogWrite(pin, 0): Sets the duty cycle to 0% (always off).
  • analogWrite(pin, 127): Sets the duty cycle to approximately 50%.
  • analogWrite(pin, 255): Sets the duty cycle to 100% (always on).

The default frequency of the PWM signal is approximately 490 Hz on all pins, except for pins D5 and D6 which have a frequency of around 980 Hz.

The PWM pins on the Arduino Nano are associated with different timers of the ATmega328P microcontroller:

  • D3 and D11: Controlled by Timer 2.
  • D5 and D6: Controlled by Timer 0.
  • D9 and D10: Controlled by Timer 1.

You can manipulate the timers directly to change the frequency and mode of PWM by configuring the registers of the ATmega328P microcontroller. However, doing this also affects functions like delay() and millis(), which rely on Timer 0.

Arduino Nano ADC Pins

Analog input pins on the Arduino Nano are designed to read continuous analog signals. These signals often come from sensors that measure physical quantities like temperature, light intensity, or pressure. The Arduino Nano converts these analog signals into digital values using an Analog-to-Digital Converter (ADC), allowing you to process and analyze the data within your Arduino code.

The Arduino Nano has 8 analog input pins, labeled A0 through A7.

arduino nano adc pins

The ADC on the Arduino Nano has a resolution of 10 bits, which means it can detect 1024 (2^10) discrete analog levels. In other words, it will convert input voltages ranging from 0 to 5V (operating voltage) into integer values ranging from 0 to 1023. This results in a resolution of 5 volts / 1024 units, or approximately 0.0049 volts (4.9 mV) per unit.

This level of precision is generally sufficient for most of our projects, but for more precise measurements, an external ADC with a higher resolution should be used.

To read an analog value from a pin, you use the analogRead(pin) function. This function returns an integer value between 0 and 1023, representing the measured voltage on the pin. For example, if the pin is measuring a voltage of 2.5V (half of the maximum 5V), the analogRead() function will return approximately 512.

Keep in mind that the analog pins A0 through A5 can also be used as digital input/output pins if you need extra digital I/O. They are referred to as pins 14 through 19 in digital mode. However, pins A6 and A7 can only be used as analog input pins. They cannot be used as digital pins.

Changing Reference Voltage

By default, the ADC measures voltages from 0V to 5V, but this range can be adjusted using the AREF pin and the analogReference(type) function. Possible values for the type are:

  • DEFAULT: Uses the default analog reference of 5V.
  • INTERNAL: Uses an internal reference voltage of 1.1V.
  • EXTERNAL: Uses an external reference voltage applied to the AREF pin.

Arduino Nano ICSP Header Pins

The ICSP header is a set of 6 pins on the Arduino Nano arranged in a 2×3 configuration.

arduino nano icsp pinout

The ICSP header has two primary use cases:

  • Programming the Arduino Nano: You can use an external programmer (like an AVR ISP programmer or another Arduino board acting as an ISP) to upload code to the Arduino Nano directly through the ICSP header. This is particularly useful if the bootloader is corrupted or if you want to burn a bootloader onto a new microcontroller.
  • Communicating with SPI Devices: The header provides access to the SPI (Serial Peripheral Interface) pins: MISO (Master In Slave Out), MOSI (Master Out Slave In), and SCK (Serial Clock). These pins can be used to connect and communicate with SPI devices, such as SD card modules or external sensors. It’s important to note that the Slave Select (SS) pin, necessary for controlling multiple SPI devices, is not included on the header and must be controlled manually.

Arduino Nano I2C Pins

The Arduino Nano has two pins dedicated to I2C communication:

  • A4 (SDA)
  • A5 (SCL)
arduino nano i2c pins

The default I2C bus speed on the Arduino Nano is 100kHz. You can increase it to 400kHz (or even higher in some cases) using Wire.setClock(), but be mindful of limitations of the connected devices.

Please keep in mind that both SDA and SCL lines typically require external pull-up resistors (usually around 4.7kΩ) to ensure reliable communication.

Arduino Nano SPI Pins

The Arduino Nano has a dedicated set of pins for SPI communication:

arduino nano spi pins

Pin 11, labeled MOSI (Master Out Slave In), is used by the master device (Arduino) to send data to the slave device. Conversely, pin 12, labeled MISO (Master In Slave Out), is used by the slave device to send data back to the Arduino. Pin 13, marked SCK (Serial Clock), carries the clock signal that synchronizes the data transfer between the master and slave. Lastly, pin 10, typically assigned as SS (Slave Select), is used to select the specific slave device you want to communicate with if you have multiple SPI devices connected.

In addition to the standard SPI pins, the Arduino Nano also has an ICSP header that provides access to the same SPI signals. You can use either the standard pins or the ICSP header for SPI communication.

Arduino Nano UART Pins

The Arduino Nano has a single hardware UART interface, which is mapped to the digital pins 0 (RX) and 1 (TX).

arduino nano uart pins

This hardware UART is also used for uploading sketches and serial communication with the computer via the USB connection, which means it is shared with the USB-to-serial converter on the board.

If you need more UART channels, the Arduino Nano supports a library called SoftwareSerial, which allows you to create additional software-based UART connections on other digital pins. However, SoftwareSerial has limitations in terms of speed and reliability compared to hardware UART.

Arduino Nano Power Pins

The Arduino Nano has several power pins. These pins are essential for powering the board itself and for supplying power to connected components and sensors.

arduino nano power pins

VIN: This pin allows you to supply power to the Arduino board using an external power source like a wall adapter or a battery pack. This is useful for standalone projects where the board is not connected to a computer via USB. The input voltage range for VIN is typically 7-12 volts. The input voltage supplied to this pin is regulated down to a stable 5V by the onboard voltage regulator, which then powers the microcontroller and other components on the board.

5V: This pin provides a regulated 5V output from the onboard voltage regulator. You can use this pin to power various components and sensors that require a stable 5V supply. The 5V pin can provide a maximum of 500mA of current if you’re powering your Arduino Nano through a USB cable. The onboard voltage regulator is technically rated for 800mA, but due to power dissipation issues, you shouldn’t go over 400 to 500mA. Should your project demand more power than the 5V pin can safely supply, you’ll need to consider an external power source.

3.3V: This pin provides a regulated 3.3V output, which is useful for components that operate at lower voltages. Be cautious not to draw excessive current from this pin, as it has a limited current capacity of approximately 50mA.

GND: This pin represents the common ground reference for all electrical connections on the Arduino. It’s essential to connect the ground pins of your external components to this pin to complete the electrical circuit.

Arduino Nano Reset Pin

Reset pin is used to reset the microcontroller on the Arduino Nano, essentially restarting the program running on it.

arduino nano reset pins

The RESET pin is active LOW, meaning that when it is pulled LOW (connected to ground), the microcontroller resets. Typically, there’s an internal pull-up resistor that keeps the RESET pin HIGH by default.

You can reset the Arduino programmatically by connecting the RESET pin to a digital output pin and toggling it LOW using digitalWrite(RESET_PIN, LOW) and then back HIGH. Or you can connect an external switch or device to this pin. When the switch is closed or the device sends a LOW signal, the Arduino will reset.

Amrit Prabhu

Amrit Prabhu

Amrit is an Electronics Engineer who loves making complex programming and hardware concepts accessible. He has more than 15 years of experience, having worked as a Senior Programmer Analyst at Mindtree Ltd. and Symantec on major projects like Windows 8, Wolters Kluwer CCH and NSE. Since 2018, he has authored hundreds of tutorials and guides for Last Minute Engineers, helping readers master everything from basic circuits to IoT. You can find him on LinkedIn