Skip to content
My Account

Reference

ESP32-S2 Mini Pinout

The complete pin reference for the WEMOS/Lolin S2 Mini: native USB, 14 capacitive touch pins, and no Bluetooth at all.

  • Single-core Xtensa LX7
  • Wi-Fi only
  • no Bluetooth
  • 27 GPIOs on the headers
No ratings yet, be the first.

Overview

The S2 Mini is a compact ESP32-S2 development board made by WEMOS/Lolin, with onboard USB-C, a reset button, a 3.3 V regulator and 27 GPIOs on the headers (two rows of pins on each long side). The ESP32-S2 is Espressif’s Wi-Fi-only chip, no Bluetooth, no 802.15.4, which makes it a good fit for USB-powered sensors and gadgets that do not need a second radio.

No Bluetooth badge here on purpose: unlike every other chip in these guides, the ESP32-S2 genuinely has no Bluetooth radio at all, not even BLE.

14 touch pinsGPIO1 to GPIO14 all double as capacitive touch inputs, useful for buttonless interfaces.
Two DAC pinsGPIO17 and GPIO18 are true analog outputs, like the classic ESP32, unlike the newer RISC-V chips.
GPIO0 is strappingIt also doubles as the BOOT button: pull it low at reset to enter the bootloader.

System-on-chip and board

The ESP32-S2 is Espressif’s single-core Xtensa LX7 chip (up to 240 MHz) with Wi-Fi 4 (802.11 b/g/n, 2.4 GHz only) and a full-speed native USB interface. It has no Bluetooth at all, not even BLE, and no second core. What it adds compared with the classic ESP32 is the native USB (so no USB-to-serial chip is needed), 14 capacitive touch pads and a small RISC-V coprocessor that can run while the main core sleeps.

The S2 Mini uses the ESP32-S2FN4R2: the “F” means the flash is inside the chip package, “N4” is 4 MB of flash and “R2” is 2 MB of PSRAM.

PartWhat it does
ESP32-S2FN4R2Main processor with 4 MB flash and 2 MB PSRAM in one package
ME6211C333.3 V regulator that makes the supply for the chip from the 5 V on the USB-C port or the VBUS pin
USB-C connectorPower, flashing and the serial monitor, wired to the chip’s native USB (GPIO19 and GPIO20)
Button 0Pulls GPIO0 low: BOOT button for the bootloader. GPIO0 itself is not on the headers
Button RSTPulls the EN pin low and resets the board
Blue LEDOn GPIO15, switched on with a high level
PCB antennaWi-Fi antenna in the copper at the top of the board
Two pin rows per side32 pins at 2.54 mm pitch: 27 GPIOs, two GND, 3V3, VBUS and EN

Getting started

The S2 Mini uses the chip’s native USB peripheral directly, not a separate USB-to-serial chip, so no extra USB driver is usually needed on modern operating systems.

1. What you needA USB-C cable that carries data and a computer. No extra power supply needed, USB power is enough.
2. Install the softwareInstall the free Arduino IDE, then add ESP32 support via Boards Manager (search “esp32”, by Espressif Systems).
3. Upload your first sketchSelect “LOLIN S2 Mini” as the board, pick the port, then Upload. If it does not connect, hold BOOT (GPIO0), tap RESET, then release BOOT.

Specifications

Specifications for the ESP32-S2 chip and the S2 Mini board.

Compute

ChipESP32-S2FN4R2
CPUSingle-core Xtensa LX7, up to 240 MHz
Flash4 MB
PSRAM2 MB

Radio

Wi-Fi802.11 b/g/n, 2.4 GHz
BluetoothNone
USBNative USB 1.1 (device and host)

Physical

Operating voltage3.3 V
Size25.4 x 34.3 mm
GPIOs43 on the chip, 27 on the headers (GPIO0 only as the BOOT button)
Touch pins14
ADC2 x 12-bit, up to 20 channels

Dimensions

The board is 25.4 x 34.3 mm. The pins are on a 2.54 mm pitch, 22.86 mm between the two outer rows, so the outer rows fit a D1 mini footprint.

LOLIN S2 Mini dimensions: 25.4 by 34.3 mm, two rows of 2.54 mm pins on each long side, 22.86 mm between the outer rows

Source: the LOLIN S2 Mini page for the board size. Pin positions are read from the drawing of the board.

Pinout diagram

The component side with every header pin: GPIO number, touch pad, ADC channel, DAC, JTAG and the default I2C, SPI and UART pins of the Arduino core for this board. The two rows on each side are the outer and the inner pin of the same line, the outer rows are pin compatible with a D1 mini.

LOLIN S2 Mini pinout diagram, component side, with the GPIO, touch, ADC, DAC and default bus pins of every header pin

Underside and the printed pin pairs

The silkscreen on the underside prints two numbers per row. This is how to read them.

Underside of the LOLIN S2 Mini with the printed pin pairs and which number is the outer and which the inner pin

The default pins (SDA 33, SCL 35, SS 12, MOSI 11, MISO 9, SCK 7, TX 39, RX 37, LED 15) come from the LOLIN S2 Mini variant in the Arduino ESP32 core. The ADC, touch, DAC and JTAG functions come from the ESP32-S2 data sheet.

GPIO map at a glance

The same pins grouped by what they can do. GPIO1 to GPIO14 are the most flexible: touch and analog input on one pin.

LOLIN S2 Mini GPIO map grouped by touch, ADC1, ADC2, DAC and general purpose pins

Power

The board is meant to run from its USB-C port. The ME6211C33 turns the 5 V from USB into the 3.3 V the chip needs.

PinUse
VBUSThe 5 V line from the USB-C port. Use it as a 5 V output to power small things from USB, or as the 5 V input when the USB port is not connected
3V3The 3.3 V output of the regulator, or a direct 3.3 V input to the chip. Do not feed it while the board is also powered from USB
GNDTwo ground pins, one in each row
ENThe reset input. Pull it low to reset, it is also wired to the RST button

The ME6211 is a small regulator. One source lists it at 500 mA, which has to cover the chip, the Wi-Fi bursts and everything you attach to the 3V3 pin. Servos, LED strips and motors should have their own supply with a shared ground. Use only one power source at a time: the USB-C port, the VBUS pin or the 3V3 pin.

The same source gives rough consumption figures (about 310 mA peak with Wi-Fi, 12 to 19 mA in modem sleep and 20 to 190 µA in deep sleep), but marks them as not tested, so treat them as an indication and measure your own build.

USB-C, flashing and reset

The USB-C port is connected straight to the chip’s native USB (GPIO19 is D-, GPIO20 is D+). There is no USB-to-UART chip on the board, so the same cable gives you power, flashing and the serial monitor.

FunctionPinDescription
BOOT button (0)GPIO0Hold low at reset to enter the bootloader
RST buttonENReset the board
USB D- / D+GPIO19 / GPIO20Native USB. Not on the headers

In the Arduino IDE set USB CDC On Boot to Enabled, otherwise Serial.print does not show up in the serial monitor. In PlatformIO the equivalent build flag is -DARDUINO_USB_CDC_ON_BOOT=1.

If the upload does not start: hold the 0 button, press and release RST, then release 0. After the upload, press RST once (without 0) to start your sketch. Because the chip enumerates as a different USB device in bootloader mode, the port name can change between the bootloader and your running program.

ADC, DAC and touch

GPIO1 to GPIO14 are the most flexible pins of the board: every one of them is a touch pad, and the first ten are also analog inputs.

FeaturePinsNotes
ADC1GPIO1 to GPIO10Works at any time, also while Wi-Fi is on. Use these for analog sensors
ADC2GPIO11 to GPIO18 (on the headers)Shares hardware with Wi-Fi: readings can fail while Wi-Fi is active. Fine for digital use
DACGPIO17 (DAC1), GPIO18 (DAC2)Two real analog outputs, 8-bit
TouchGPIO1 to GPIO1414 capacitive touch pads, TOUCH1 to TOUCH14

With the default attenuation the ADC input range is small. At the highest attenuation (12 dB) the usable input is about 2.5 V, so do not expect to measure the full 3.3 V directly: use a voltage divider for higher signals and never feed more than 3.3 V to any pin.

Pins with a second job

  • GPIO0 is a strapping pin and wired to the BOOT button. It is not on the headers. ESP-IDF lists GPIO0, GPIO45 and GPIO46 as the strapping pins of the ESP32-S2, and only GPIO0 matters here because the other two are not broken out.
  • GPIO15 and GPIO16 are also the pins for an optional 32.768 kHz crystal (XTAL_32K_P and XTAL_32K_N). The board has no crystal, so you can use them as normal pins, but the blue LED sits on GPIO15.
  • GPIO39 and GPIO40 are the JTAG pins MTCK and MTDO. They work as normal pins, but if you want to debug with JTAG you lose them. GPIO39 and GPIO37 are also the default TX and RX of the Arduino core for this board.
  • GPIO33 and GPIO35 are the default I²C pins (SDA and SCL). Any GPIO can do I²C in software, but these two use the hardware pins of the chip.
  • GPIO7, 9, 11 and 12 are the default hardware SPI pins (SCK, MISO, MOSI and SS). The pair 13/12 is printed reversed on purpose: it keeps GPIO11 and GPIO12 on the outer rows, which follow the D1 mini footprint.

GPIO quick reference

GPIO19 and GPIO20 are the chip’s native USB D+ and D- pins and are not broken out on this board, so they are not listed below.

GPIOSpecial functionADCDACTouchBoot state
0Strapping (BOOT)–NoYesStrapping
1Touch1ADC1_0NoYesFree
2Touch2ADC1_1NoYesFree
3Touch3ADC1_2NoYesFree
4Touch4ADC1_3NoYesFree
5Touch5ADC1_4NoYesFree
6Touch6ADC1_5NoYesFree
7Touch7, SPI SCK (Arduino default)ADC1_6NoYesFree
8Touch8ADC1_7NoYesFree
9Touch9, SPI MISO (Arduino default)ADC1_8NoYesFree
10Touch10ADC1_9NoYesFree
11Touch11, SPI MOSI (Arduino default)ADC2_0NoYesFree
12Touch12, SPI SS (Arduino default)ADC2_1NoYesFree
13Touch13ADC2_2NoYesFree
14Touch14ADC2_3NoYesFree
15Onboard LED, XTAL_32K_PADC2_4NoNoFree
16XTAL_32K_NADC2_5NoNoFree
17DAC1ADC2_6Yes (DAC1)NoFree
18DAC2ADC2_7Yes (DAC2)NoFree
21––NoNoFree
33I2C SDA (Arduino default)–NoNoFree
34FSPI CS0 (IO_MUX)–NoNoFree
35I2C SCL (Arduino default), FSPI MOSI (IO_MUX)–NoNoFree
36FSPI CLK (IO_MUX)–NoNoFree
37UART RX (Arduino default), FSPI MISO (IO_MUX)–NoNoFree
38––NoNoFree
39UART TX (Arduino default), JTAG MTCK–NoNoFree
40JTAG MTDO–NoNoFree

Flashing pins

The S2 Mini flashes over its native USB port, not a separate UART bridge, so there is no TXD0/RXD0 pin pair to route externally.

FunctionPinDescription
ENEN pinResets the board
IO0GPIO0Hold low to enter the bootloader

Programming

Arduino IDE, PlatformIO and ESP-IDF all work. In the Arduino IDE install ESP32 board support (Espressif Systems), choose LOLIN S2 Mini, and set USB CDC On Boot to Enabled. If you use the 2 MB of PSRAM, enable PSRAM in the board options, otherwise it is not available to your program. In PlatformIO or ESPHome a generic ESP32-S2 board profile such as esp32-s2-saola-1 is used.

I²C scan on the default pins

#include <Wire.h>

void setup() {
  Serial.begin(115200);
  Wire.begin();            // SDA = GPIO33, SCL = GPIO35 on this board
  delay(2000);
  for (uint8_t a = 1; a < 127; a++) {
    Wire.beginTransmission(a);
    if (Wire.endTransmission() == 0) Serial.printf("Found 0x%02Xn", a);
  }
}

void loop() {}

Read a touch pad and an analog input

void setup() {
  Serial.begin(115200);
  analogSetPinAttenuation(1, ADC_11db);   // GPIO1 is on ADC1
}

void loop() {
  Serial.printf("touch=%u adc=%dn", touchRead(2), analogRead(1));
  delay(200);
}

I did not run these two sketches on a board, they follow the Arduino ESP32 API. Start with the I²C scan: attach any I²C sensor to GPIO33 and GPIO35.

Tips

  • Use ADC1 for sensors. If your project uses Wi-Fi, put analog sensors on GPIO1 to GPIO10.
  • Keep GPIO0 free. Do not wire anything to the BOOT button that pulls it low at power-up.
  • Use the hardware buses. I²C on GPIO33 and GPIO35, SPI on GPIO7, 9, 11 and 12. Software SPI works but is much slower.
  • Header sockets. The board does not fit a normal breadboard, so solder female headers, or use the pins with jumper wires or a D1 mini-style shield.
  • Use the touch pads. A wire or a copper pad on GPIO1 to GPIO14 gives you a button without any extra part.

Real gotchas

  • No Bluetooth. This chip has none. Projects that use BLE (HomeKit pairing over Bluetooth, phone setup) need an ESP32, S3 or C3 instead.
  • It is not a D1 mini. The outer rows follow the D1 mini footprint, but the GPIO numbers and the LED pin do not. Check every pin when you port an ESP8266 sketch.
  • ADC2 and Wi-Fi. Analog reads on GPIO11 to GPIO18 fail while Wi-Fi is on.
  • The blue LED is on GPIO15. An example that blinks the built-in LED on another pin will do nothing. Use LED_BUILTIN.
  • Serial output missing. Enable USB CDC On Boot, and give the port a moment to appear after a reset.
  • 3.3 V logic. All pins are 3.3 V only. Do not connect 5 V signals directly.
  • Limited current. The regulator is small. Power motors, strips and servos from their own supply.
  • Soldering. Do not overheat the board and watch for solder running into the through-holes, it can short the two pin rows.

Compared with other boards

Common versions of these boards, with the facts that matter when you choose.

ESP32-S2 (S2 Mini)ESP32-S3ESP32 (classic)ESP8266 (D1 mini)
CPU1 x Xtensa LX72 x Xtensa LX72 x Xtensa LX61 x Tensilica L106
WirelessWi-Fi 4Wi-Fi 4 and Bluetooth 5 LEWi-Fi 4 and BluetoothWi-Fi 4
Native USBYesYesNoNo
Touch pads141410None
DAC2 (8-bit)None2 (8-bit)None

Take the S2 Mini when you want a very small, cheap board with native USB (keyboards, mice, USB devices) or capacitive touch and you do not need Bluetooth. For Bluetooth or more power see the ESP32-S3-DevKitC-1 or the ESP32-WROOM-32D.

What to build with it

  • A USB keyboard, mouse or macro pad: the native USB makes the board show up as an HID device.
  • A touch-controlled lamp or panel using the 14 touch pads.
  • A small Wi-Fi sensor node that logs temperature or humidity with an I²C sensor on GPIO33 and GPIO35.
  • A tiny audio or waveform generator with the two DAC pins.
  • A compact USB-powered display or LED controller.

Safety notes

Before you wire anything up

  • GPIO0 is a strapping pin, check its boot-time state before using it as an output.
  • GPIO19 and GPIO20 are reserved for native USB internally and are not on the headers.
  • This board runs at 3.3 V logic, a 5 V signal on any pin can damage the chip.
  • Do not assume Bluetooth is available: this chip genuinely has none, unlike most other ESP32 variants.

Conclusion

The LOLIN S2 Mini is a small, low-cost board with 27 GPIOs, native USB, 14 touch pads and two DACs, and no Bluetooth. Plan analog sensors on ADC1, use the default I²C and SPI pins, enable USB CDC On Boot and give motors and strips their own supply. For the family overview see the ESP32 family explained.

Sources: the LOLIN S2 Mini page, the LOLIN S2 Mini variant in the Arduino ESP32 core, the ESP-IDF documentation and the ESP32-S2 data sheet. The consumption figures and the regulator rating come from a third-party page and are not tested.

Advertisement
All guides

More guides

Keep building.

From ESP32 HomeKit accessories to Arduino and ATtiny reference guides, there’s more where this came from.

All guides