In this guide, learn about Arduino Nano pin outs and diagrams. We’ve created a well explained, diagram based pin out representation of Arduino Nano.
Arduino Nano Pinout
The Arduino Uno R3 pin diagram is shown below. It comprises 14-digit I/O pins. From these pins, 6-pins can be utilized like PWM outputs. This board includes 14 digital input/output pins, Analog inputs-6, a USB connection, quartz crystal-16 MHz, a power jack, a USB connection, resonator-16Mhz, a power jack, an ICSP header an RST button. In this tutorial you will learn how to read the status of a digital pin of Arduino.I hope that you already go through our first tutorial, Getting Started with Arduino Uno – LED Blinking.In this example, a push button switch and an LED is connected to Arduino Uno.When we press the switch, LED will glow for 3 seconds.
The Arduino Nano, as the name suggests is a compact, complete and bread-board friendly microcontroller board. The Nano board weighs around 7 grams with dimensions of 4.5 cms to 1.8 cms (L to B). This article discusses about the technical specs most importantly the pinout and functions of each and every pin in the Arduino Nano board.
How different is Arduino Nano?
Arduino Nano has similar functionalities as Arduino Duemilanove but with a different package. The Nano is inbuilt with the ATmega328P microcontroller, same as the Arduino UNO. The main difference between them is that the UNO board is presented in PDIP (Plastic Dual-In-line Package) form with 30 pins and Nano is available in TQFP (plastic quad flat pack) with 32 pins. The extra 2 pins of Arduino Nano serve for the ADC functionalities, while UNO has 6 ADC ports but Nano has 8 ADC ports. The Nano board doesn’t have a DC power jack as other Arduino boards, but instead has a mini-USB port. This port is used for both programming and serial monitoring. The fascinating feature in Nano is that it will choose the strongest power source with its potential difference, and the power source selecting jumper is invalid.
Arduino Nano – Specification
Arduino Nano | Specifications |
---|---|
Microcontroller | ATmega328P |
Architecture | AVR |
Operating Voltage | 5 Volts |
Flash Memory | 32 KB of which 2 KB used by Bootloader |
SRAM | 2KB |
Clock Speed | 16 MHz |
Analog I/O Pins | 8 |
EEPROM | 1 KB |
DC Current per I/O Pins | 40 milliAmps |
Input Voltage | (7-12) Volts |
Digital I/O Pins | 22 |
PWM Output | 6 |
Power Consumption | 19 milliAmps |
PCB Size | 18 x 45 mm |
Weight | 7 gms |
Arduino Nano Pinout Description
Taking this pin-out diagram below as reference, we shall discuss all the functionalities of each and every pin.
We can infer from the image that Arduino Nano got 36 pins in total. We will see all the pins section wise as well as a detailed format at last.
Arduino Nano Pin Description
Arduino Nan0 – Pin Description
Pins 1 to 30
Arduino Nano Pin | Pin Name | Type | Function |
---|---|---|---|
1 | D1/TX | I/O | Digital I/O Pin Serial TX Pin |
2 | D0/RX | I/O | Digital I/O Pin Serial RX Pin |
3 | RESET | Input | Reset ( Active Low) |
4 | GND | Power | Supply Ground |
5 | D2 | I/O | Digital I/O Pin |
6 | D3 | I/O | Digital I/O Pin |
7 | D4 | I/O | Digital I/O Pin |
8 | D5 | I/O | Digital I/O Pin |
9 | D6 | I/O | Digital I/O Pin |
10 | D7 | I/O | Digital I/O Pin |
11 | D8 | I/O | Digital I/O Pin |
12 | D9 | I/O | Digital I/O Pin |
13 | D10 | I/O | Digital I/O Pin |
14 | D11 | I/O | Digital I/O Pin |
15 | D12 | I/O | Digital I/O Pin |
16 | D13 | I/O | Digital I/O Pin |
17 | 3V3 | Output | +3.3V Output (from FTDI) |
18 | AREF | Input | ADC reference |
19 | A0 | Input | Analog Input Channel 0 |
20 | A1 | Input | Analog Input Channel 1 |
21 | A2 | Input | Analog Input Channel 2 |
22 | A3 | Input | Analog Input Channel 3 |
23 | A4 | Input | Analog Input Channel 4 |
24 | A5 | Input | Analog Input Channel 5 |
25 | A6 | Input | Analog Input Channel 6 |
26 | A7 | Input | Analog Input Channel 7 |
27 | +5V | Output or Input | +5V Output (From On-board Regulator) or +5V (Input from External Power Supply |
28 | RESET | Input | Reset ( Active Low) |
29 | GND | Power | Supply Ground |
30 | VIN | Power | Supply voltage |
ICSP Pins
Arduino Nano ICSP Pin Name | Type | Function |
---|---|---|
MISO | Input or Output | Master In Slave Out |
Vcc | Output | Supply Voltage |
SCK | Output | Clock from Master to Slave |
MOSI | Output or Input | Master Out Slave In |
RST | Input | Reset (Active Low) |
GND | Power | Supply Ground |
Arduino Nano Digital Pins
As mentioned earlier, Arduino Nano has 14 digital I/O pins that can be used either as digital input or output. The pins work with 5V voltage as maximum, i.e., digital high is 5V and digital low is 0V. Each pin can provide or receive a current of 40mA, and has a pull-up resistance of about 20-50k ohms. Each of the 14 digital pins on the Nano pinout can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions.
Other than the digital input and output functions, the digital pins have some additional functionality as well.
Serial Communication Pins
These two pins RX- receive and TX- transmit are used for TTL serial data communication. The pins RX and TX are connected to the corresponding pins of the USB-to-TTL Serial chip.
PWM Pins
Each of these digital pins provide a Pulse Width Modulation signal of 8-bit resolution. The PWM signal can be generated using analogWrite () function.
External Interrupts
When we need to provide an external interrupt to other processor or controller we can make use of these pins. These pins can be used to enable interrupts INT0 and INT1 respectively by using the attachInterrupt () function. These pins can be used to trigger three types of interrupts such as interrupt on a low value, a rising or falling edge interrupt and a change in value interrupt.
SPI Pins
When you don’t want the data to be transmitted asynchronously you can use these Serial Peripheral Interface pins. These pins support synchronous communication with SCK as the synchronizing clock. Even though the hardware has this feature, the Arduino software doesn’t have this by default. So you have to include a library called SPI Library for using this feature.
LED
If you remember your first Arduino code, blinking LED, then you’ll definitely came across this Pin16. The pin 16 is being connected to the blinking LED on the board.
Arduino Nano Analog Pins
As mentioned earlier UNO got 6 analog input pins but Arduino Nano has 8 analog inputs (19 to 26), marked A0 through A7. This means you can connect *8 channel analog sensor inputs for processing. Each of these analog pins has a inbuilt ADC of resolution of 1024 bits (so it will give 1024 values). By default, the pins are measured from ground to 5V. If you want the reference voltage to be 0V to 3.3V, we can give 3.3V to AREF pin (18th Pin) by using the analogReference () function.
Similar to digital pins in Nano, analog pins also got some other functions as well.
I2C
Since SPI communication also has its disadvantages such as 4 essential pins and limited within a device. For long distance communication we use the I2C protocol. I2C supports multi master and multi slave with only two wires. One for clock (SCL) and another for data (SDA). For using this I2C feature we need to import a library called Wire library.
AREF
As mentioned already the AREF- Analog Reference pin is used as a reference voltage for analog input for the ADC conversion.
Reset
Reset pins in Arduino are active LOW pins which means if we make this pin value as LOW i.e., 0v, it will reset the controller. Usually used to be connected with switches to use as reset button.
ICSP
ICSP stands for In Circuit Serial Programming, which represents one of the several methods available for programming Arduino boards. Ordinarily, an Arduino bootloader program is used to program an Arduino board, but if the bootloader is missing or damaged, ICSP can be used instead. ICSP can be used to restore a missing or damaged bootloader.
Each ICSP pin usually is cross-connected to another Arduino pin with the same name or function. For example, MISO on Nano’s ICSP header is connected to MISO / digital pin 12 (Pin 15); MOSI on the ISCP header is connected to MOSI / digital pin 11 (Pin 16); and so forth. Note, MISO, MOSI, and SCK pins taken together make up most of an SPI interface.
We can use one Arduino to program another Arduino using this ICSP.
Arduino as ISP | ATMega328 |
---|---|
Vcc/5V | Vcc |
GND | GND |
MOSI/D11 | D11 |
MISO/D12 | D12 |
SCK/D13 | D13 |
D10 | Reset |
RESET
Power
Applications
We have compiled a huge list of Arduino Nano based projects with complete source code and detailed explanation of the circuits. Check out the list below.
In this chapter, we will learn about the different components on the Arduino board. We will study the Arduino UNO board because it is the most popular board in the Arduino board family. In addition, it is the best board to get started with electronics and coding. Some boards look a bit different from the one given below, but most Arduinos have majority of these components in common.
Power USB Arduino board can be powered by using the USB cable from your computer. All you need to do is connect the USB cable to the USB connection (1). |
Power (Barrel Jack) Arduino boards can be powered directly from the AC mains power supply by connecting it to the Barrel Jack (2). |
Voltage Regulator The function of the voltage regulator is to control the voltage given to the Arduino board and stabilize the DC voltages used by the processor and other elements. |
Crystal Oscillator The crystal oscillator helps Arduino in dealing with time issues. How does Arduino calculate time? The answer is, by using the crystal oscillator. The number printed on top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz. |
Arduino Reset You can reset your Arduino board, i.e., start your program from the beginning. You can reset the UNO board in two ways. First, by using the reset button (17) on the board. Second, you can connect an external reset button to the Arduino pin labelled RESET (5). |
Pins (3.3, 5, GND, Vin)
|
Analog pins The Arduino UNO board has six analog input pins A0 through A5. These pins can read the signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a digital value that can be read by the microprocessor. |
Main microcontroller Each Arduino board has its own microcontroller (11). You can assume it as the brain of your board. The main IC (integrated circuit) on the Arduino is slightly different from board to board. The microcontrollers are usually of the ATMEL Company. You must know what IC your board has before loading up a new program from the Arduino IDE. This information is available on the top of the IC. For more details about the IC construction and functions, you can refer to the data sheet. |
ICSP pin Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral Interface), which could be considered as an 'expansion' of the output. Actually, you are slaving the output device to the master of the SPI bus. |
Power LED indicator This LED should light up when you plug your Arduino into a power source to indicate that your board is powered up correctly. If this light does not turn on, then there is something wrong with the connection. |
TX and RX LEDs On your board, you will find two labels: TX (transmit) and RX (receive). They appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with different speed while sending the serial data. The speed of flashing depends on the baud rate used by the board. RX flashes during the receiving process. |
Digital I/O The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse Width Modulation) output. These pins can be configured to work as input digital pins to read logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The pins labeled “~” can be used to generate PWM. |
AREF AREF stands for Analog Reference. It is sometimes, used to set an external reference voltage (between 0 and 5 Volts) as the upper limit for the analog input pins. |