In this article, we will explain the Arduino Nano board, its features like how many i2C pins are available, how many SPI connections are present, which pins are used for PWM, and some questions commonly asked in forums.
Table of contents
About Arduino Nano Development board
Arduino Nano is a commonly used prototype development board that was released in 2008. This board has similar features to the Arduino Uno board available in the market, but this design with a small form factor makes it suitable for breadboard usage.
Arduino Nano boards are equipped with the same microcontroller available in the Arduino Uno board, Atmega328p. Only missing thing is DC jack is replaced with a USB B connecter. Moreover, in Addition to Arduino Uno, Nano has Additional Analog pins that are not in the Uno.
Arduino Nano Specifications
Microcontroller | Atmega 328p |
Operating | voltage 5 V |
Input voltage (VIN) | 6-20 V |
Power consumption | 19 mA |
Flash memory | 32 KB, of which the bootloader uses 2 KB |
SRAM | 2 KB |
Clock speed | 16 Mhz |
EEPROM | 1 KB |
DC current per I/O pin | 40 mA (20 mA recommended) |
Digital I/O pins | 22 |
PWM outputs | 6 (D3, D5, D6, D9, D10, D11) |
Analog input pins | 8 (ADC 10 bit) |
I2C | A4 (SDA), A5 (SCL) |
SPI | D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK) |
LED_BUILTIN | D13 |
Arduino Nano PINOUT
Arduino Nano pinout can be found from below Image
Digital Pins are marked as D2-D13, TX(D0), RX(D1) these pins on the Arduino Nano used for input and output by using the function such as pinMode(), digitalWrite() and digitalRead(). These pins operate at 5V and Provide a maximum current of 40Miliamphere. All the digital and Analog pins are connected with an internal Pull resistor of 50K ohms. By default its disconnected, for those who want to use it can enable it through the program by providing pinMode(PIN, INPUT_PULLUP);
In Arduino Nano, you have Analog pins ranging from A0 to A7, in which A6 and A7 can only be used for Analog inputs. Pins and its function will be explained in the below table
Pin number | Pin name | Type | Function Assigned to the pin |
1 | D1/TX | Digital Pin | Serial communication (TX) |
2 | D0/RX | Digital Pin | Serial communication (RX) |
3 | RESET | Other pin | Reset (active LOW) |
4 | GND | Ground | |
5 | D2 | Digital Pin | External interrupt |
6 | ~D3 | Digital Pin | External interrupt 8-bit PWM output |
7 | D4 | Digital Pin | |
8 | ~D5 | Digital Pin | 8-bit PWM output |
9 | ~D6 | Digital Pin | 8-bit PWM output |
10 | D7 | Digital Pin | |
11 | D8 | Digital Pin | |
12 | ~D9 | Digital Pin | 8-bit PWM output |
13 | ~D10 | Digital Pin | SPI communication (SS), 8-bit PWM output |
14 | ~D11 | Digital Pin | SPI communication (MOSI), 8-bit PWM output |
15 | D12 | Digital Pin | SPI communication (MISO) |
16 | D13 | Digital Pin | SPI communication (SCK) Connected to a built-in LED |
17 | Power | ||
18 | AREF | Analog Pin | Reference voltage for the analog inputs |
19 | D14 A0 | Digital Pin Analog Pin | |
20 | D15 A1 | Digital Pin Analog Pin | |
21 | D16, A2 | Digital Pin Analog Pin | |
22 | D17, A3 | Digital Pin Analog Pin | |
23 | D18, A4 | Digital Pin Analog Pin | I2C communication (SDA) |
24 | D19, A5 | Digital Pin Analog Pin | I2C communication (SCL) |
25 | D20 A6 | Digital Pin Analog Pin | Cannot be used as a digital pin |
26 | D21 A7 | Digital Pin Analog Pin | Cannot be used as a digital pin |
27 | Power | ||
28 | RESET | Other pin | Reset (active LOW) |
29 | GND | Ground | Ground |
30 | VIN | Power | 6 – 20 V input to the board |
Communication pins in Arduino Nano
The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). ATmega328 also supports I2C (TWI) and SPI communication. Arduino Nano Provide SDA and SCL are available on A4 and A5 pins. SDA -> A4; SCL -> A5. Support I2C (TWI) communication using the Wire library. SPI connections are available on SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). Although provided by the underlying hardware, these pins support SPI communication, which is not currently included in the Arduino language.
How to Power Arduino Nano
MiniB USB Connector: The most popular way to power the Arduino Nano board is to use a USB cable. You can use a MiniB USB cable connected to the USB port of your laptop, PC, or USB 5V power adapter. This cable is also used to program Arduino Nano
VIN pin: You can also power the Arduino Nano with an external unregulated 6 – 20V power supply connected to the VIN pin (pin 30). This pin can also be used to power the microcontroller with a battery
Pin + 5V: It is also possible to use an external stabilized 5V power supply connected to the pin + 5V (pin 27). However, this method is not recommended as it bypasses voltage regulators. If you want to power the board in this way, you need to make sure that the voltage level is stable and not over 5V
Variants of Arduino Nano
Arduino Nano Every:
Arduino Nano Every is one of the newest and most powerful Arduino Nano boards. It uses the ATmega4809 microcontroller and is the cheapest Arduino board you can buy. This board is also 5V compatible and has the same form factor as the original Arduino Nano (18 x 45mm). Its small size and low cost make it ideal for portable projects, low-cost robotics, drones, as well as general use to control small parts of larger projects.
Arduino Nano 33 IoT
Arduino Nano 33 IoT is one of the 3.3V variants of the Arduino Nano family. It includes an Arm CortexM0 + microcontroller, a pre-certified ESP32 based WiFi and Bluetooth module, and an integrated ECC608A crypto chip that provides IoT security. The board also consists of a 6-axis LSM6DS3 IMU. The Nano 33 IoT is essentially an MKR WiFi 1010 but sacrifices charger and shield compatibility for a smaller footprint and lower cost. As a result, it costs even less than the original Arduino Nano!
Programming Arduino Nano
The programing of Arduino Nano is similar to Arduino UNO and can be quickly done using Arduino IDE.
Common Question in Forums about Arduino Nano
The 6-pin PWM uses the built-in UART on the ATmega328P to produce its output. This makes the pulses very fast for a better “analog” output. Since the servos communicate at a sufficiently low speed, they can be driven using software interrupts. Software breaks move away from the code you are running and run the code included with the servo library. This code uses standard means to change the state of the pins. By doing this using interrupts instead of UART, you lose processing time but can drive multiple servos.
Connect the wire from the -ve terminal of the battery connector to one of the Arduino ground pins and connect the wire from the +ve terminal to the Arduino Vin pin.. The battery voltage range is 9-12V