Sub topic 16
Beyond the Uno: Nano, Mega, Leonardo, and 3.3V Boards
This chapter assumes that you understand voltage, current, resistance, and the Arduino setup() and loop() structure. You should also be able to read a simple breadboard diagram.
The Arduino Uno R3 is a useful reference, but its pin names, voltage, USB design, and memory are not universal. Choose a board by the connections and electrical levels your project needs.
Nano: Uno features in a smaller shape
The classic Arduino Nano uses the same ATmega328P microcontroller as the Uno R3. It normally runs at 5 V and 16 MHz, with similar digital pins, analog inputs, and PWM pins. Its small solderless-breadboard-friendly shape is its main advantage.
A Nano usually has pin labels such as D2 and A0, while the Uno has larger headers. Code using digitalRead(2) or analogRead(A0) often transfers directly. However, USB hardware varies between Nano versions. Some use an FTDI chip, some use a CH340 chip, and newer Nano models use different microcontrollers. The USB driver, bootloader, and available features may therefore differ.
Mega: more pins and more serial ports
The Arduino Mega 2560 uses an ATmega2560 microcontroller. It provides many more digital and analog pins than the Uno and includes four hardware UART serial ports. A UART is a circuit that sends and receives serial data without using software timing.
The Mega is a good choice for projects with many sensors, displays, motors, or communication modules. Its pin numbers and board size differ from the Uno, so a shield or wiring diagram designed for the Uno may not fit or work unchanged. Check the Mega pinout before moving a project.
Leonardo: USB is built into the microcontroller
The Leonardo uses the ATmega32U4, which includes a USB controller. The Uno normally uses a separate USB-to-serial interface. This gives the Leonardo different USB behavior.
The Leonardo can appear to the computer as a keyboard, mouse, or other USB device. Its USB serial connection is represented by Serial, while its hardware UART uses Serial1. On the Uno, Serial normally refers to the pins used by the USB-to-serial interface. A program that waits forever for Serial during startup can therefore behave differently on a Leonardo.
3.3V boards: logic levels change
Many boards, including some Nano 33 and SAMD-based boards, operate at 3.3 V rather than 5 V. Their input pins may not tolerate a 5 V signal. A 5 V sensor output connected directly to a 3.3 V input can damage the board.
Use a logic-level converter, a suitable voltage divider, or a sensor that operates at 3.3 V. Also check whether the board's output voltage is high enough for the device receiving it.
| Board family | Typical logic voltage | Main reason to choose it |
|---|---|---|
| Uno R3 | 5 V | Simple projects and broad shield compatibility |
| Classic Nano | 5 V | Uno-like features in a compact form |
| Mega 2560 | 5 V | Many pins and four hardware UART ports |
| Leonardo | 5 V | Native USB device features |
| 3.3 V boards | 3.3 V | Modern sensors and lower-voltage systems |
Exercise
You are connecting a 5 V sensor to a 3.3 V board. What must you check before wiring it?
Show answer
Check whether the sensor output reaches 5 V. If it does, use a level converter, voltage divider, or compatible 3.3 V sensor instead of connecting it directly.