LOLIN S2 Mini

Compact ESP32-S2 board by Wemos with USB-C in a small castellated form factor - great for space-saving embedded builds.

USB-C Native USB
LOLIN S2 Mini board
34.3 × 25.4 mm
ESP32-S2
MCU
240MHz
clock
4MB
flash
320KB
SRAM
27· 14 ADC
GPIO
Wi-Fi
radio
On this page

Pinout

30 pins · 2.54 mm pitch
View:
LOLIN S2 Mini pinout diagram
PinGPIOLabelsStatusCapabilitiesNotes
1-5Vpower-5V power input for the board
2-GNDground-Ground connection
3-3V33.3Vpower-3.3V power output
41IO1GPIO1safe-GPIO
52IO2GPIO2safeadcGPIO, ADC
63IO3GPIO3safe-GPIO
74IO4GPIO4safeadcGPIO, ADC
85IO5GPIO5safe-GPIO
96IO6GPIO5safe-GPIO
107IO7GPIO5safe-GPIO
118IO8GPIO5safe-GPIO
129IO9GPIO5strapping-GPIO
1310IO10GPIO5strapping-GPIO
1411IO11GPIO5strapping-GPIO
1512IO12GPIO12strappingadcGPIO, ADC
1613IO13GPIO13strappingadcGPIO, ADC
1714IO14GPIO14strappingadcGPIO, ADC
1815IO15GPIO15strappingadcGPIO, ADC
1916IO16GPIO16strapping-GPIO
2017IO17GPIO17safe-GPIO
2118IO18GPIO18safe-GPIO
2221IO21GPIO21safe-GPIO
2333IO33GPIO33strappingadcGPIO, ADC
2434IO34GPIO34strappingadcGPIO, ADC
2535IO35GPIO35strappingadcGPIO, ADC
2636IO36GPIO36strappingadcGPIO, ADC
2737IO37GPIO37strappingadcGPIO, ADC
2838IO38GPIO38safeadcGPIO, ADC
2939IO39GPIO39strappingadcGPIO, ADC
3040IO40GPIO40strappingadcGPIO, ADC

Start with these

12 pins with no boot or system involvement
IO1GPIO1IO2GPIO2IO3GPIO3IO4GPIO4IO5GPIO5IO6GPIO5IO7GPIO5IO8GPIO5IO17GPIO17IO18GPIO18IO21GPIO21IO38GPIO38

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

Fine - with a little care

sampled at boot or shared with debug/serial
PinLabelWhat to knowRole
IO9FSPIHDIO 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.Other
IO10FSPICS0IO 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.Other
IO11FSPIDIO 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.Other
IO12FSPICLKIO 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.Other
IO13FSPIQIO 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.Other
IO14FSPIWPIO 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.Other
IO15XTAL_32K_PIf an external 32 kHz crystal is used for RTC, this pin is dedicated to the crystal and cannot be used as GPIO.Other
IO16XTAL_32K_NIf using an external 32 kHz crystal, this pin is connected to the crystal and should not be used as general I/O.Other
IO39MTCKUsed for JTAG debugging interface; using this pin for other purposes will disable JTAG clock input.Other
IO40MTDOPart of JTAG interface (TDO); should be avoided as GPIO if JTAG debugging is needed.Other

Only if you know the tricks

wired to flash or USB - expect a fight
PinLabelWhat to knowRole
IO33SPIIO4 (GPIO33)The datasheet keeps GPIO33-37 for "the higher 4 bits data line interface and DQS interface for the SPI0/1 interface in 8-line SPI mode, and can be GPIO pins if the chip is not connected to flash or PSRAM in 8-line SPI mode". Quad-SPI parts leave it free.Flash
IO34SPIIO5 (GPIO34)The datasheet keeps GPIO33-37 for "the higher 4 bits data line interface and DQS interface for the SPI0/1 interface in 8-line SPI mode, and can be GPIO pins if the chip is not connected to flash or PSRAM in 8-line SPI mode". Quad-SPI parts leave it free.Flash
IO35SPIIO6 (GPIO35)The datasheet keeps GPIO33-37 for "the higher 4 bits data line interface and DQS interface for the SPI0/1 interface in 8-line SPI mode, and can be GPIO pins if the chip is not connected to flash or PSRAM in 8-line SPI mode". Quad-SPI parts leave it free.Flash
IO36SPIIO7 (GPIO36)The datasheet keeps GPIO33-37 for "the higher 4 bits data line interface and DQS interface for the SPI0/1 interface in 8-line SPI mode, and can be GPIO pins if the chip is not connected to flash or PSRAM in 8-line SPI mode". Quad-SPI parts leave it free.Flash
IO37SPIDQS (GPIO37)The datasheet keeps GPIO33-37 for "the higher 4 bits data line interface and DQS interface for the SPI0/1 interface in 8-line SPI mode, and can be GPIO pins if the chip is not connected to flash or PSRAM in 8-line SPI mode". Quad-SPI parts leave it free.Flash
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.
Pinout notes The LOLIN S2 Mini pinout brings out 30 pins at a 2.54 mm pitch - 27 usable GPIO alongside the 5V, GND and 3V3 power rails. On the analog side there are 14…

The LOLIN S2 Mini pinout brings out 30 pins at a 2.54 mm pitch - 27 usable GPIO alongside the 5V, GND and 3V3 power rails.

On the analog side there are 14 ADC-capable pins for sensors and battery monitoring.

If you want zero surprises, IO1, IO2, IO3, IO4 and 8 more are free of any such role - the safest first picks. 10 of the exposed pins carry boot-time or system duties on the ESP32-S2 (IO9, IO10, IO11 and 7 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: "4MB (32Mb)"
Flash Mode: "DIO"
PSRAM: "QSPI PSRAM"
Partition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)" (default)
Upload Speed: "921600"
▸ every other Tools option - leave at default
Board: ESP32S2 Dev Module
USB CDC On Boot: Enabled
Flash Size: 4MB (32Mb)
Flash Mode: DIO
PSRAM: QSPI PSRAM
Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
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:lolin_s2_mini]
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 · DIO

Specifications

ESP32-S2 · 34.3 × 25.4 mm · vs other ESP32 chips →
Compute
MCU
ESP32-S2
Clock
240 MHz
SRAM · Flash
320 KB · 4MB · 2MB PSRAM
Radio
Wi-Fi
802.11 b/g/n 2.4 GHz
Bluetooth
-
Antenna
PCB
I/O
GPIO · ADC
27 · 14
UART · I²C · SPI
2 · 2 · 2
PWM
8 channels
Power
USB
USB-C
Serial
Native (CDC)
Boot address
0x1000
Electrical
Input
-
Consumption
-
Regulator
ME6211C33
Flashing
Upload · OTA
esptool_py · esp_ota
Flash · Boot mode
DIO · QIO
Sketch · Data
1.25 MB · 320 KB
25.4 mm34.3 mm
34.3 × 25.4 mm · pin pitch 2.54 mm
The LOLIN S2 Mini uses esptool_py for firmware uploads, esp_ota for over-the-air (OTA) updates. Flash mode is DIO 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 $5.00 - less than the ~$20 most ESP32-S2 boards go for.

Onboard you'll find 2MB PSRAM, status LEDs (Blue (GPIO15)) and Reset/Button (GPIO0) buttons.

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

Where to buy

prices are typical street prices
LOLIN S2 Mini
LOLIN S2 Mini
$5.00per unit, typical
As an Amazon Associate, ESPboards earns from qualifying purchases.

Resources

Similar boards