Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 37 ยท Boards and IDE

Boards Compared: Uno, Nano, Mega and ESP32

Compare popular Arduino boards by microcontroller, voltage, memory, pins and features, and learn how to choose the right board for a project and avoid 3.3 V mistakes.

"Which Arduino should I buy?" has no single answer, because boards differ in size, speed, memory, pin count, operating voltage and wireless features. This lesson explains the differences that matter in practice and gives you a method for choosing. The sketches in the rest of the course work on nearly any board; only pin numbers and a few capabilities change.

The classic family

The original boards use 8-bit AVR chips from Microchip (formerly Atmel).

Board Chip Clock Flash RAM Digital pins Analog inputs Logic level
Uno R3 ATmega328P 16 MHz 32 KB 2 KB 14 (6 PWM) 6 5 V
Nano ATmega328P 16 MHz 32 KB 2 KB 14 (6 PWM) 8 5 V
Mega 2560 ATmega2560 16 MHz 256 KB 8 KB 54 (15 PWM) 16 5 V
Leonardo ATmega32U4 16 MHz 32 KB 2.5 KB 20 12 5 V

The Uno is the reference board: the most tutorials, shields and libraries target it. The Nano has the same brain in a breadboard-friendly package, which makes it the usual choice for finished projects. The Mega is for projects with many pins or big programs. The Leonardo has native USB and can pretend to be a keyboard or mouse.

The modern 32-bit boards

Newer boards use ARM Cortex or ESP chips: faster, with much more memory, and usually 3.3 V logic.

Board Chip Clock Flash RAM Notes
Nano 33 IoT SAMD21 (Cortex-M0+) 48 MHz 256 KB 32 KB Wi-Fi, Bluetooth, 3.3 V
Uno R4 Minima Renesas RA4M1 48 MHz 256 KB 32 KB Uno layout, 5 V pins
Uno R4 WiFi RA4M1 + ESP32-S3 48 MHz 256 KB 32 KB LED matrix, Wi-Fi
ESP32 DevKit ESP32 (dual core) up to 240 MHz 4 MB (typical) 520 KB Wi-Fi, Bluetooth, 3.3 V
Pi Pico (RP2040) RP2040 133 MHz 2 MB 264 KB Programmable I/O

Specifications change with new revisions, so confirm a figure against the board's datasheet before depending on it.

flowchart TD
    A["What do you need?"] --> B{"Wi-Fi or Bluetooth?"}
    B -- yes --> C["ESP32 or Nano 33 IoT or Uno R4 WiFi"]
    B -- no --> D{"Many pins or big program?"}
    D -- yes --> E["Mega 2560"]
    D -- no --> F{"Learning or tiny finished project?"}
    F -- learning --> G["Uno"]
    F -- finished --> H["Nano"]

Figure: a quick board chooser. Start from the feature you cannot do without.

Why logic voltage matters

A pin's "high" is the board's logic level: 5 V on an Uno, 3.3 V on an ESP32 or Nano 33. This matters in two ways.

  1. Input limits. A 3.3 V board pin may be damaged by a 5 V signal. Many sensors and modules are 5 V devices, so connecting them to a 3.3 V board needs a level shifter or a voltage divider (Voltage Dividers).
  2. Output strength. A 3.3 V pin has less headroom to drive an LED: with a red LED (2 V drop) the resistor sees only 1.3 V, so you must recalculate it using Ohm's law.

Always check a module's documentation for its supply range and logic level before wiring it.

Memory is the first limit you hit

An Uno has only 2 KB of RAM. Each global variable, each String object and each library buffer consumes some. Programs that look small can run out because of text strings and arrays. The following stand-in estimates memory use the way you would on paper:

C Stand-in: will my buffers fit in 2 KB of RAM?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

About two thirds of the RAM is spoken for before any logic runs, and the stack also needs room to grow. This is why later chapters return to memory use.

Choosing: a checklist

C Stand-in: score boards against your requirements

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Change the requirements and rerun. The idea is the real skill: write the requirements down (pins, memory, wireless, voltage, size, price) and then pick, rather than buying the most expensive board.

Clones and shields

Many clones use the same chip and work identically, though some use a different USB-serial chip (CH340 instead of ATmega16U2) that needs a separate driver. Shields are boards that stack onto the Uno's header to add motor drivers, Ethernet or displays. They are convenient but occupy pins, so check the pin map before combining two shields.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which board is best when a project needs about 40 digital pins?

    The Mega 2560 has 54 digital pins; the Uno and Nano have 14.
  2. 2. What is the main risk of connecting a 5 V sensor output to an ESP32 input?

    ESP32 pins are 3.3 V logic and generally not 5 V tolerant; use a level shifter or divider.
  3. 3. How much RAM does an Uno's ATmega328P have?

    2 KB of SRAM. The 32 KB figure is flash program storage.
  4. 4. Which is a good first step in choosing a board?

    Requirements drive the choice; clock speed is rarely the deciding factor.

Summary

  • The Uno and Nano share the ATmega328P (32 KB flash, 2 KB RAM); the Mega has far more pins and memory.
  • 32-bit boards such as ESP32 and Nano 33 IoT add speed, memory and wireless, but use 3.3 V logic.
  • Logic voltage decides what you can connect directly and how you size resistors.
  • Memory, especially RAM, is usually the first limit.
  • Choose by written requirements, and check datasheets for exact numbers.

Next: The Arduino IDE and CLI