Jotrin Electronics
備考 合計 (USD) 動作して
製品とショッピングカート : 0
ホーム > Embedded technology > Pin Configuration of Arduino Nano: A Comprehensive Guide

Pin Configuration of Arduino Nano: A Comprehensive Guide

更新時間: 2024-03-15 15:47:41


The Arduino board is designed to be beginner-friendly, making it easy for newcomers to start working with microcontrollers. The board is particularly well-suited for use with breadboards, making it simple to create and manage connections.

Following the Arduino UNO, one of the most popular boards in the Arduino lineup is the Arduino Nano. Both the UNO and Nano utilize the ATmega328P Microcontroller, but the Nano is notably smaller in size compared to the UNO.

Despite its size, the Arduino Nano offers nearly the same features as the UNO. In a comparison between the two, the Nano lacks the DC Power Jack found on the UNO and instead features a mini-B-type USB connector. However, other than these differences, the Nano and UNO are quite similar in terms of functionality.

The Nano board is designed with pins that are breadboard-friendly, allowing for easy mounting on a breadboard for DIY projects.

Overall, the Arduino Nano is a compelling alternative to the Arduino UNO, offered at a lower price point. I recommend the Arduino Nano over the UNO due to its affordability, compatibility with breadboards, compact size, and slightly higher number of digital and analog IO pins compared to the UNO. In this article, we'll delve into the pin configuration of the Arduino Nano, providing insights on how to connect and communicate efficiently with various devices to realize your creative projects. 


Overview of Arduino Pinout

Arduino Pinout.jpg

The pinout diagram of the Arduino Nano provides a visual representation of all the pins on the board, including their numbering, functions, and physical locations. This diagram is essential for understanding how to connect external components and peripherals to the Arduino Nano.

The Arduino Nano has a total of 30 pins, each serving a specific purpose. These pins are numbered and labeled on the board, with each pin serving either a digital, analog, or special function. Understanding the numbering and functions of these pins is crucial for programming and using the Arduino Nano effectively in projects.

The physical layout of the pins on the Arduino Nano board corresponds to the pinout diagram. The pins are arranged in a specific order to facilitate easy access and connection to external components. The layout also takes into account the spacing and size of the pins to ensure compatibility with standard breadboards and connectors. Understanding the physical layout of the pins helps in designing circuits and connecting peripherals to the Arduino Nano.

The diagram below illustrates a typical Arduino Nano board layout. As seen in the earlier image, several components are also on the board's underside, with the 5V regulator and USB-to-serial converter IC being the most prominent.

pin configuration of the Arduino Nano.jpg

You'll notice that the Type-B USB connector found on the Arduino UNO has been replaced with a mini-B type connector on the Nano. Additionally, there's no 2.1 mm DC jack for external power. Other than these changes, the Arduino Nano's layout is quite straightforward.

We'll delve into the specifics of the pins in the Arduino Nano Pin Configuration Section.

Arduino Nano Features

Arduino Nano may be small, but it's powerful. This compact microcontroller board packs all the essential features. Let's explore its key features.

  • Powerful Microcontroller: At the core of Nano is the ATmega328P, which is efficient, versatile, and suitable for a wide range of projects.

  • Compact Size: Nano's small footprint is ideal for designs where space is limited. Despite its size, it delivers impressive performance.

  • USB Interface: Nano's built-in USB connectivity allows for easy programming and communication. It's simply plug-and-play.

  • Analog Inputs: Featuring six ADC channels, Nano enables you to read analog signals, enhancing project flexibility.

  • Digital I/O Pins: Nano boasts fourteen digital pins, six of which support PWM. This allows you to control devices and create intricate projects.

  • Operating Voltage: Running on 5V, Nano is compatible with a variety of sensors and peripherals, offering versatility in project design.

  • Communication Protocols: Nano supports UART, SPI, and I2C, facilitating seamless connection with a wide array of devices.

  • Breadboard-Friendly: Nano's design makes it easy to integrate with breadboards, simplifying prototyping and development processes.

Specifications of Arduino Nano

Operating Voltage5V
Input Voltage7V – 12V
Clock Speed16 MHz
Flash Memory32 KB (2 KB of this used by bootloader)
Digital IO Pins22 (of which 6 can produce PWM)
Analog Input Pins8
DC Current per I/O Pin40 mA
USB InterfaceBuilt-in
Dimensions18 mm x 45 mm

Arduino Nano Pin Configuration

The Arduino Nano boasts a total of 30 pins, with 22 serving input and output functions. Among these, 14 digital IO pins (D0-D13) can be tailored using pinMode(), digitalWrite(), and digitalRead() functions. These pins can source or sink 40mA of current and include internal pull-up resistors ranging from 20KΩ to 50KΩ.

Furthermore, the Nano features 8 analog input pins (A0-A7), offering a 10-bit resolution ADC for the analogRead() function. Notably, the Nano surpasses the Arduino UNO by providing 8 analog pins, compared to UNO's 6. All analog pins, except A6 and A7, can be configured as digital IO pins if necessary.

Digital IO pins 3, 5, 6, 9, 10, and 11 can deliver 8-bit output for generating PWM signals. To utilize this feature, simply use the analogWrite() function.

Below is a tabular breakdown of the Arduino Nano pins, providing a clear overview of their functions and alternative roles:

Arduino Nano Pins

Pin No.Pin NameDescription
1TX / D1Digital IO Pin 1
2RX / D0Digital IO Pin 0
3RSTReset (Active LOW)
D2Digital IO Pin 2
6D3Digital IO Pin 3
7D4Digital IO Pin 4
8D5Digital IO Pin 5
9D6Digital IO Pin 6
10D7Digital IO Pin 7
11D8Digital IO Pin 8
12D9Digital IO Pin 9
13D10Digital IO Pin 10
14D11Digital IO Pin 11
15D12Digital IO Pin 12
16D13Digital IO Pin 13
18AREFAnalog Reference
19A0Analog Input 0
20A1Analog Input 1
21A2Analog Input 2
22A3Analog Input 3
23A4Analog Input 4
24A5Analog Input 5
25A6Analog Input 6
26A7Analog Input 7
275V+5V Output/Input
28RSTReset (Active LOW)
30VINUnregulated Supply

ICSP Connector's Pins

Here's the description of the pins on the ICSP Connector:

Pin NameDescription
MISOMaster In Slave Out
SCKClock (Master to Slave)
MOSIMaster Out Slave In
RESETActive Low

Arduino Nano Digital Pins

Arduino Nano Digital Pins.png

As previously mentioned, the Arduino Nano features 14 digital I/O pins, which can function as either digital inputs or outputs. These pins operate at a maximum voltage of 5V, where a digital high corresponds to 5V and a digital low to 0V. Each pin can source or sink a current of 40mA and has an internal pull-up resistance of approximately 20-50k ohms. These pins can be configured as inputs or outputs using the pinMode(), digitalWrite(), and digitalRead() functions.

In addition to their digital I/O capabilities, the digital pins on the Nano offer some additional functionality.

Serial Communication Pins

Serial Communication Pins.png

These two pins, RX (receive) and TX (transmit), are utilized for TTL serial data communication. They are connected to the corresponding pins of the USB-to-TTL Serial chip.

PWM Pins

PWM Pins.png

Each of these digital pins provides an 8-bit resolution Pulse Width Modulation (PWM) signal, which can be generated using the analogWrite() function.

External Interrupts

External Interrupts.png

These pins can be utilized when an external interrupt is needed to another processor or controller. By using the attachInterrupt() function, these pins can enable interrupts INT0 and INT1, respectively. These pins can trigger three types of interrupts: an interrupt on a low value, a rising or falling edge interrupt, and a change in value interrupt.

SPI Pins

SPI Pins.png

If you prefer synchronous communication over asynchronous transmission, you can utilize the Serial Peripheral Interface (SPI) pins. These pins support synchronous communication with SCK as the synchronizing clock. Although the hardware supports this feature, the default Arduino software does not. To enable this feature, you need to include the SPI Library.



If you recall your initial Arduino code, the blinking LED example, and you'll certainly remember Pin 16. This pin is connected to the blinking LED on the board.

Arduino Nano Analog Pins

Arduino Nano Analog Pins.png

As mentioned earlier, while the UNO has 6 analog input pins, the Arduino Nano offers 8 analog inputs (A0 through A7, pins 19 to 26). This allows you to connect up to 8 channel analog sensor inputs for processing. Each of these analog pins features an inbuilt ADC with a resolution of 1024 bits, providing 1024 values. By default, these pins are measured from ground to 5V. If you want the reference voltage to be 0V to 3.3V, you can provide 3.3V to the AREF pin (18th Pin) using the analogReference() function.

Similar to digital pins in the Nano, analog pins also offer additional functionality.



SPI communication, while powerful, has drawbacks, such as requiring four essential pins and being limited to communication within a single device. For longer-distance communication, the I2C protocol is often preferred. I2C supports multi-master and multi-slave configurations with just two wires: one for the clock (SCL) and another for data (SDA). To utilize I2C, the Wire library needs to be imported.



The AREF (Analog Reference) pin serves as a reference voltage for analog inputs during ADC (Analog-to-Digital Conversion).



In Arduino, reset pins operate on an active LOW basis. Setting the pin value to LOW (0V) triggers a controller reset. Typically, these pins are linked with switches to serve as reset buttons.


Arduino Nano ICSP.png

ICSP, short for In-Circuit Serial Programming, is one of the methods used for programming Arduino boards. Typically, Arduino boards are programmed using a bootloader program. However, if the bootloader is missing or damaged, ICSP can be used as an alternative method to program the board or restore a missing/damaged bootloader.

Each ICSP pin is usually connected to another Arduino pin with the same name or function. For instance, on the Nano, MISO on the ICSP header is connected to MISO/digital pin 12 (Pin 15); MOSI on the ICSP header is connected to MOSI/digital pin 11 (Pin 16), and so on. These pins, MISO, MOSI, and SCK, together form the SPI interface.

ICSP can also be used to program one Arduino board using another Arduino.

Arduino as ISPATMega328





How to power up the Arduino Nano?

How to Power the Arduino Nano.jpg

There are several methods of powering the Nano board. The simplest is to use the mini-B type USB connector. Alternatively, you can supply a regulated 5V through the 5V pin (Pin 27).

  • Mini USB: This smaller connector powers the Nano and allows connection to a computer for programming.

  • Vin: This input provides a modulated DC supply voltage that regulates the ICs in the circuit. It serves as the primary voltage for the Arduino board's ICs, with Vcc values relative to the GND pin.

Additionally, the Nano includes an onboard regulator (along with the USB-to-Serial Converter). To use it, supply an unregulated voltage between 6V and 20V to the VIN pin (Pin 30) of the Nano.

What are the Input and Output Pins of Arduino Nano?

Of the 30 pins on the Nano board, 22 are designated for input and output. Among these, 14 pins (D0 to D13) function as true digital IO pins, configurable for your application using pinMode(), digitalWrite(), and digitalRead() functions.

Each of these digital IO pins can source or sink 40mA of current. Additionally, they feature an internal pull-up resistor (not connected by default) with a value ranging from 20KΩ to 50KΩ.

The Nano also provides 8 Analog Input Pins (A0 to A7), two more than the Arduino UNO's 6. These analog input pins offer a 10-bit resolution ADC, accessible via the analogRead() function.

Notably, Analog Input pins can be configured as Digital IO pins if needed (all analog pins except A6 and A7).

Digital IO pins 3, 5, 6, 9, 10, and 11 can generate 8-bit PWM signals using the analogWrite() function.

Communication Interface of Arduino Nano

Communication Interface of Arduino Nano.jpg

Arduino Nano supports three primary communication interfaces:

  1. Serial Communication: This is the most common interface used in Arduino boards (UNO, Nano, Mega) for programming. Digital IO pins 0 and 1 are utilized as Serial RX and TX pins for receiving and transmitting serial data, connected to the USB to Serial Converter IC's serial pins.

  2. I2C (I2C or Two Wire Interface) Communication: Analog Input Pins A4 and A5 can be configured as SDA (A4) and SCK (A5) for I2C communication. This allows the Nano to communicate with other devices using the I2C protocol.

  3. SPI (Serial Peripheral Interface) Communication: Digital IO Pins 10, 11, 12, and 13 can be configured as SPI pins SS, MOSI, MISO, and SCK respectively. SPI is commonly used for high-speed communication between microcontrollers and peripheral devices.

How to use Arduino Nano

Uploading your first program to the Arduino Nano takes 5-10 minutes. All you need is the Arduino IDE, a USB cable, and your Nano board.

To get started, download and install the Arduino IDE from the link below. Additionally, you may need to install drivers for your Arduino to communicate with your computer.

Uploading your first program

After installing the Arduino IDE on your computer:

  1. Connect the Arduino Nano board using a USB cable.

  2. Open the Arduino IDE and select the correct board by navigating to Tools > Boards > Arduino/Nano.

  3. Choose the correct port by going to Tools > Port.

The Arduino Uno is programmed using the Arduino programming language based on Wiring.

To start with the Arduino Uno board and blink the built-in LED, load the example code by selecting File > Examples > Basics > Blink. Once the example code is loaded into your IDE, click on the 'upload' button in the top bar. After the upload is complete, you should see the Arduino's built-in LED blinking. Below is the example code for blinking:

Uploading your first program.png

Arduino Nano Application

  • Prototyping of electronics products and systems.

  • Multiple DIY projects.

  • Easy to use for beginner-level DIYers and makers.

  • Projects requiring multiple I/O interfaces and communications.

Arduino Nano Package

Arduino Nano Package.png

What are Different Memories of Arduino Nano?

Specifically, this information pertains to the microcontroller unit (MCU) utilized on the Nano Board, which is the ATmega328P. The ATmega328P provides three distinct types of memory:

  • 32 KB of Flash Memory

  • 2 KB of SRAM

  • 1 KB of EEPROM

Out of the total Flash Memory, 2 KB is allocated for the bootloader code.

What is the Difference between Arduino UNO and Arduino Nano?

The Arduino Nano bears a striking resemblance to the Arduino UNO. They are powered by the same processor (Atmega328p) and can, therefore, run the same programs. However, a notable difference between the two lies in their size, with the UNO being twice as large as the Nano, thus requiring more space in your projects. Additionally, the Nano is designed to be breadboard-friendly, unlike the UNO. While programming the UNO necessitates the use of a standard USB cable, the Nano requires a mini USB cable instead. The technical distinctions between the Uno and Nano are outlined below:

Difference between Arduino UNO and Arduino Nano.png

What is the Difference between Arduino Nano and Arduino Mega?

The Arduino Nano and Arduino Mega differ significantly, primarily due to the use of different processors. The Arduino Mega outperforms the Arduino Nano in terms of speed and the number of I/O pins available. As expected, the Arduino Mega is larger than the Arduino UNO. The Mega is typically chosen for projects that demand numerous I/O pins and various communication protocols. The technical distinctions between the Nano and Mega are detailed below:

Difference between Arduino Nano and Arduino Mega.png

Troubleshooting and Debugging Arduino Nano Pinout Issues

Common Issues: Pins and Connections

The Arduino Nano is a popular microcontroller known for its compact size and versatility, making it a favorite among makers and hobbyists. However, working with this small but powerful device can sometimes be challenging. Issues related to pins and connections are common and can cause disruptions in your projects.

Problems such as misbehaving pins, loose connections, and incorrect wiring are often the culprits. Additionally, dust, dirt, or physical damage to the pins can also impact their performance. In this section, we will explore these common issues in detail, equipping you with the knowledge to troubleshoot and resolve them effectively.

Strategies: Identifying and Resolving Issues

Before tackling pinout issues with your Arduino Nano, it's crucial to pinpoint the root cause. With a multimeter and careful observation, you can check for continuity, voltage, and signs of poor connections or damaged pins. Once you've identified the problem, it's time to take action.

Resoldering connections, replacing faulty pins, or rewiring your project are all effective ways to address pinout issues and restore your Arduino Nano to working order. This section will explore strategies for identifying and resolving these issues, providing you with the knowledge to overcome these challenges and maintain the smooth operation of your Arduino projects.

Tips: Maintaining Optimal Performance

To maintain optimal performance, Arduino enthusiasts must adhere to best practices and care for their Arduino Nano. Proper soldering, the use of quality components, and avoiding excessive force on pins can all enhance the longevity and performance of the microcontroller.

Ensuring neat, secure connections and handling the Arduino Nano with care can prevent issues before they occur. This section will delve into tips and tricks for maintaining your Arduino Nano's peak performance. By following these guidelines, you'll experience smoother operation with your Arduino projects, fostering uninterrupted creativity.


In summary, the Arduino Nano's versatility and popularity stem from its discussed features and functionalities. It finds applications in various fields, including gesture tracking and onboard sensor electronics.

Moreover, we have seen that Arduino programming can become more complex in larger projects. We have also covered SPI and serial communication using pins.

Due to their compact size and affordability, Arduino Nano boards are ideal for numerous electronics projects. The newer models offer additional features such as WiFi and Bluetooth connectivity, an IMU, and various onboard sensors.

前: Potentiometer: Pinout, Symbol, Wiring, and Working

次の: AMD Ryzen 5 vs. Intel i5: How to Choose the Right Processor


  • How to configure Arduino pins?
  • Before setting the pinMode(pin, OUTPUT), ensure to use pull-up or pull-down resistors to set the OUTPUT pins to the desired initial state. In the setup(), utilize digitalWrite() to establish the OUTPUT pin to the same desired initial state before setting pinMode(pin, OUTPUT).

  • What is the pinout spacing for Arduino Nano?
  • The Nano's pins are arranged on a standard 0.1" grid, providing two rows of fifteen pins, each with 0.1" spacing, and the rows are spaced 0.6" apart.

  • How are Arduino pins numbered?
  • For the convenience of beginners targeted by the Arduino framework, the digital and analog pins are numbered. These numbers correspond to the pins labeled on the Arduino board. Therefore, D2 refers to the third digital pin within the Arduino framework, while A0 represents the first analog pin.

  • What are the 3 types of pins on Arduino?
  • Digital pins, analog pins, and power pins.

  • What does an Arduino Nano do?
  • The Arduino Nano is a versatile microcontroller device equipped with 16 digital pins, suitable for a wide range of applications. Whether for small-scale projects or large industrial endeavors, the Nano excels. It is also ideal for prototyping and exploring new application possibilities.

Ratings and Reviews