

The ESP32 LOLIN S2 Mini is a compact microcontroller board based on the ESP32-S2 chip. It is specifically designed for IoT (Internet of Things) applications, offering built-in Wi-Fi and Bluetooth capabilities. This board is ideal for projects requiring wireless connectivity, low power consumption, and support for multiple sensors and peripherals. Its small form factor makes it suitable for space-constrained applications.








The ESP32 LOLIN S2 Mini is packed with features that make it versatile and powerful for a wide range of applications. Below are its key technical specifications:
| Specification | Details |
|---|---|
| Microcontroller | ESP32-S2 (Xtensa® 32-bit LX7 single-core processor) |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB SPI Flash |
| RAM | 320 KB SRAM + 128 KB ROM |
| Wi-Fi | IEEE 802.11 b/g/n (2.4 GHz) |
| Bluetooth | Not supported (ESP32-S2 does not include Bluetooth functionality) |
| GPIO Pins | 27 GPIO pins (multiplexed with other functions) |
| USB Interface | USB Type-C (native USB support for programming and communication) |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via USB) |
| Power Consumption | Ultra-low power consumption in deep sleep mode |
| Dimensions | 44.5 mm x 25.5 mm |
The ESP32 LOLIN S2 Mini features a variety of pins for different functionalities. Below is the pinout description:
| Pin | Function | Description |
|---|---|---|
| 3V3 | Power | 3.3V output for powering external components |
| GND | Ground | Ground connection |
| GPIO0 | Boot Mode / General Purpose I/O | Used for entering bootloader mode during programming |
| GPIO1 | UART TX | Transmit pin for UART communication |
| GPIO2 | UART RX | Receive pin for UART communication |
| GPIO12 | ADC / General Purpose I/O | Analog-to-Digital Converter or digital I/O |
| GPIO13 | PWM / General Purpose I/O | Pulse Width Modulation or digital I/O |
| GPIO21 | I2C SDA | Data line for I2C communication |
| GPIO22 | I2C SCL | Clock line for I2C communication |
| GPIO23 | SPI MOSI | Master Out Slave In for SPI communication |
| GPIO19 | SPI MISO | Master In Slave Out for SPI communication |
| GPIO18 | SPI SCK | Clock line for SPI communication |
| EN | Enable | Resets the microcontroller when pulled low |
Powering the Board:
Programming the Board:
Connecting Peripherals:
Using Wi-Fi:
WiFi library in the Arduino IDE to connect to a network and send/receive data.The following example demonstrates how to blink an LED connected to GPIO13:
// Define the GPIO pin for the LED
const int ledPin = 13;
void setup() {
// Initialize the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(ledPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off
digitalWrite(ledPin, LOW);
delay(1000); // Wait for 1 second
}
BOOT button while pressing the RESET button. The board is not detected by the computer:
Upload fails with a timeout error:
BOOT button during upload. Wi-Fi connection issues:
Peripherals not working as expected:
Q: Can I use the ESP32 LOLIN S2 Mini with a 5V sensor?
A: No, the ESP32-S2 operates at 3.3V logic levels. Use a level shifter to interface with 5V sensors.
Q: Does the ESP32 LOLIN S2 Mini support Bluetooth?
A: No, the ESP32-S2 chip does not include Bluetooth functionality. For Bluetooth, consider using an ESP32 board with dual-core support.
Q: How do I reset the board?
A: Press the RESET button on the board to perform a soft reset.
Q: Can I power the board with a battery?
A: Yes, you can use a 3.7V LiPo battery with a suitable voltage regulator to supply 3.3V to the board.