ATMegaZero ESP32-S2

Raspberry Pi Zero-style ESP32-S2 board - ideal for Linux-style form factor with secure IoT power.

2× Micro-USB Native USB
ATMegaZero ESP32-S2 board
65 × 30 mm
ESP32-S2
MCU
240MHz
clock
16MB
flash
320KB
SRAM
24· 6 ADC
GPIO
Wi-Fi
radio
On this page

ATMegaZero ESP32-S2 Pinout

24 pins · 2.54 mm pitch
PinGPIOLabelsStatusCapabilitiesNotes
10PD5strapping-
21T1PWMsafetouch
32T2PWMsafetouch
43A5T3PWMsafeadc · touch
54T4PWMsafetouch
65T5PWMsafetouch
76A4T6PWMsafeadc · touch
87T7PWMsafetouch
98SDAT8PWMsafetouch · i2c
109SCLT9PWMstrappingtouch · i2c
1110T10PWMstrappingtouch
1211T11PWMstrappingtouch
1312A3T12PWMstrappingadc · touch
1413A2T13PWMstrappingadc · touch
1514T14PWMstrappingtouch
1617A0DAC1PWMsafeadc · dac
1718A1DAC2PWMsafeadc · dac
1835MOSIPWMsafespi
1936SCKPWMsafespi
2037MISOPWMsafespi
2138SSPWMsafespi
2240NEOPIXELPWMstrapping-
2343TXPWMuartuart
2444RXPWMuartuart
24 GPIOs broken out 16 free · 8 need care · 0 to avoid

Start with these

16 pins with no boot or system involvement
T1GPIO1T2GPIO2A5GPIO3T4GPIO4T5GPIO5A4GPIO6T7GPIO7SDAGPIO8A0GPIO17A1GPIO18MOSIGPIO35SCKGPIO36MISOGPIO37SSGPIO38TXGPIO43RXGPIO44

Freely assignable - no strapping, flash, USB or JTAG duties. Ideal first picks for buttons, sensors and LEDs.

Fine - with a little care

8 pins · 3 things to know
PD5GPIO0 Bootstrapping pin; selects boot mode (SPI Boot vs UART Download). Strapping

Must be pulled high for normal boot; pulling low at reset enters bootloader (download mode). Also serves as SPI flash data-in (SPID) line when using external flash memory.

SCLGPIO9T10GPIO10T11GPIO11A3GPIO12A2GPIO13T14GPIO14 General-purpose SPI2 (FSPI) IO MUX pins Other

IO MUX pin of the general-purpose SPI2 (FSPI) bus, not of the in-package flash - that sits on GPIO26-32. The datasheet does not restrict it, so it is only taken if your board wires flash, an SD card or a display to FSPI.

  • SCLGeneral-purpose SPI2 (FSPI) IO MUX pin - hold/data line (FSPIHD)
  • T10General-purpose SPI2 (FSPI) IO MUX pin - chip select (FSPICS0)
  • T11General-purpose SPI2 (FSPI) IO MUX pin - data in (FSPID)
  • A3General-purpose SPI2 (FSPI) IO MUX pin - clock (FSPICLK)
  • A2General-purpose SPI2 (FSPI) IO MUX pin - data out (FSPIQ)
  • T14General-purpose SPI2 (FSPI) IO MUX pin - write-protect/data line (FSPIWP)
NEOPIXELGPIO40 JTAG test data-out pin (MTDO); also GPIO40, supports CLK_OUT2. JTAG

Part of JTAG interface (TDO); should be avoided as GPIO if JTAG debugging is needed.

These are recommendations, not hard rules - with the right pull-ups, timing and boot-state awareness most pins can be made to work. When in doubt, start green.

The ATMegaZero ESP32-S2 pinout brings out 24 GPIO pins at a 2.54 mm pitch - every one of them usable in your project.

For peripherals, I²C is mapped to SDA on GPIO8 and SCL on GPIO9; the SPI bus (MOSI, MISO, SCK, SS) is broken out in full; TX/RX on GPIO43 and GPIO44 cover serial logging and flashing.

On the analog side there are 6 ADC-capable pins for sensors and battery monitoring, 14 capacitive-touch inputs and 2 true DAC outputs.

If you want zero surprises, T1, T2, A5, T4 and 12 more are free of any such role - the safest first picks. 8 of the exposed pins carry boot-time or system duties on the ESP32-S2 (PD5, SCL, T10 and 5 more).

Getting started

flash your first firmware in ~2 minutes
Tool:
1
Connect over USB
Native USB - shows up as a port right away, no driver needed. Not detected? Hold BOOT while plugging in.
2
Match & flash
Set the Tools options shown, then click Upload.
3
Verify it runs
GPIO1 toggles - wire an LED and resistor to it, or change the pin to your board's own LED.
Set these in Tools · leave everything else at default
Arduino IDE 2.x - Tools Copy
Board: "ESP32S2 Dev Module"▸
USB CDC On Boot: "Enabled"▸
Flash Size: "16MB (128Mb)"▸
Flash Mode: "QIO"▸
PSRAM: "QSPI PSRAM"▸
Partition Scheme: "16M Flash (3MB APP/9.9MB FATFS)" (default)▸
Upload Speed: "921600"▸
▸ every other Tools option - leave at default
Board: ESP32S2 Dev Module
USB CDC On Boot: Enabled
Flash Size: 16MB (128Mb)
Flash Mode: QIO
PSRAM: QSPI PSRAM
Partition Scheme: 16M Flash (3MB APP/9.9MB FATFS)
Upload Speed: 921600
Find it: Tools ▸ Board ▸ ESP32 Arduino ▸ ESP32S2 Dev Module
blink.ino Copy
// toggle GPIO1 - wire an LED and resistor to it
void setup() {
  pinMode(1, OUTPUT);
}
void loop() {
  digitalWrite(1, HIGH); delay(500);
  digitalWrite(1, LOW);  delay(500);
}
board to selectesp32-s2-saola-1⧉ copy
platformio.ini Copy
[env:atmegazero_esp32s2]
platform = espressif32
board = esp32-s2-saola-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.arduino.memory_type = qio_qspi
build_flags = -DBOARD_HAS_PSRAM
Find it: PlatformIO Home ▸ Boards, search esp32-s2-saola-1 - or type it after board =.
board to selectesp32-s2-saola-1⧉ copy
device.yaml Copy
esp32:
  board: esp32-s2-saola-1
  variant: esp32s2
  framework:
    type: esp-idf
psram:
  mode: quad
  speed: 80MHz

# blink - GPIO1
output:
  - platform: gpio
    pin: 1
    id: led_out
light:
  - platform: binary
    name: "LED"
    output: led_out
Find it: search ESPHome's board list for esp32-s2-saola-1 (same ids as PlatformIO).
esptool doesn't pick board settings - a prebuilt .bin already has them baked in. This is just the raw flash command.
terminal Copy
esptool.py --chip esp32s2 --port /dev/ttyACM0 \
  --baud 921600 write_flash 0x1000 firmware.bin
--port = your /dev/tty* (macOS/Linux) or COMx (Windows).
Build details: sketch space 1310720 B · data 327680 B · QIO

Specifications

ESP32-S2 · 65 × 30 mm · vs other ESP32 chips →
Compute
MCU
ESP32-S2
Clock
240 MHz
SRAM · Flash
320 KB · 16MB · 8MB (QSPI) PSRAM
Radio
Wi-Fi
802.11 b/g/n 2.4 GHz
Bluetooth
-
Antenna
PCB
I/O
GPIO · ADC
24 · 6
UART · I²C · SPI
2 · 2 · 2
PWM
8 channels
Power
USB
Micro-USB (native) · Micro-USB (native)
Serial
Native (CDC)
Boot address
0x1000
Electrical
Input
5V via Micro-USB
Consumption
-
Regulator
-
Flashing
Upload · OTA
esptool_py · esp_ota
Flash · Boot mode
QIO · QIO
Sketch · Data
1.25 MB · 320 KB

Dimensions

30 mm65 mm
65 × 30 mm · pin pitch 2.54 mm
The ATMegaZero ESP32-S2 uses esptool_py for firmware uploads, esp_ota for over-the-air (OTA) updates. Flash mode is QIO with QIO boot mode. The maximum sketch size is 1.25 MB with 320 KB available for data.

About this board

At its core is the ESP32-S2 - a single-core Xtensa with native USB-OTG and no Bluetooth.

Expect to pay about $24.99 - above the ~$20 typical for ESP32-S2 boards.

Onboard you'll find 8MB (QSPI) PSRAM, a microSD slot, an addressable RGB LED (GPIO40) and Reset buttons.

It flashes over native USB - no serial-converter driver needed, which isn't a given among ESP32-S2 boards.

  • Raspberry Pi Zero form factor with 40-pin GPIO header
  • 30-pin FPC OLED display port for SSD1306/SH1106 displays (not included)
  • 3D antenna for 2.4GHz Wi-Fi
  • 4x onboard status LEDs

Where to buy

prices are typical street prices
ATMegaZero ESP32-S2
ATMegaZero ESP32-S2
$24.99per unit, typical

Resources

Similar boards