MakerLab
ESP32Adafruit QT Py ESP32-S2

Adafruit QT Py ESP32-S2: A Tiny Powerhouse for Connected Projects

The Adafruit QT Py ESP32-S2 is a compact and capable development board featuring the ESP32-S2 chip, ideal for Wi-Fi-enabled projects requiring a small footprint.

Adafruit QT Py ESP32-S2

The Adafruit QT Py ESP32-S2 is a miniature development board designed for makers, students, and embedded engineers who need a powerful yet small form factor for their projects. It's part of Adafruit's QT Py line, which emphasizes tiny boards with USB-C connectors and STEMMA QT connectors for easy peripheral integration. This board is built around the Espressif ESP32-S2 Xtensa LX7 single-core processor, a popular choice for its balance of performance, Wi-Fi connectivity, and power efficiency.

At its heart is the ESP32-S2, a variant of the widely adopted ESP32 series. Unlike the original ESP32, the ESP32-S2 focuses on enhanced security features and a single Xtensa LX7 core, making it well-suited for applications where robust Wi-Fi connectivity is paramount and complex multi-core processing isn't a primary requirement. It offers a good range of GPIOs, analog-to-digital converters (ADCs), and support for common communication protocols like I2C, SPI, and UART, all within a low-power design.

Released around 2021, the QT Py ESP32-S2 bridges the gap between the ultra-low-power ESP32-C3 and the more feature-rich dual-core ESP32. Its compact size, measured at just 1.0 x 0.6 inches (25.4 x 15.2 mm), makes it perfect for wearables, IoT devices, and projects where space is at a premium. The inclusion of a USB-C connector simplifies power and programming, while the STEMMA QT connector allows for effortless chaining of compatible sensors and modules without soldering.

This board is an excellent choice for makers looking to build connected projects with Wi-Fi capabilities, such as remote sensors, smart home controllers, or small data loggers. Its ease of use with CircuitPython and Arduino IDE makes it accessible for beginners, while its ESP-IDF support and robust feature set appeal to more experienced embedded engineers. If you need a compact board with Wi-Fi and a good set of peripherals for your next IoT creation, the QT Py ESP32-S2 is a strong contender.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCEspressif ESP32-S2 WROVER
ArchitectureXtensa single-core LX7
Clock speedUp to 240 MHz
Flash / Storage4 MB (on-board flash, WROVER package)
RAM / SRAM520 KB SRAM
Operating voltage3.3V
Digital I/O pins21 (usable GPIOs)
Analog / ADC14 x 12-bit ADCs
PWMYes, on most GPIOs
ConnectivityWi-Fi 802.11 b/g/n (2.4 GHz)
USBUSB-C (for power and programming/UART)
Power input5V via USB-C or 3.3V pin
Dimensions25.4 mm x 15.2 mm x 3.7 mm (1.0" x 0.6")

Pinout & pin functions

PinFunction
3V33.3V Power Output
GNDGround
ENChip Enable (active high)
IO0Boot Mode Select (low for bootloader)
IO1UART TX (default programming pin)
IO2UART RX (default programming pin)
IO3GPIO, ADC1_CH3
IO4GPIO, ADC1_CH4
IO5GPIO, ADC1_CH5
IO6GPIO, ADC1_CH6
IO7GPIO, ADC1_CH7
IO8GPIO, ADC1_CH8
IO9GPIO, ADC1_CH9
IO10GPIO, ADC1_CH10
IO11GPIO, ADC1_CH11
IO12GPIO, ADC1_CH12
IO13GPIO, ADC1_CH13
IO14GPIO, ADC1_CH14
IO15GPIO, ADC1_CH15
IO16GPIO, ADC2_CH0
IO17GPIO, ADC2_CH1
IO18GPIO, ADC2_CH2
IO19GPIO, ADC2_CH3
IO20GPIO, SPI HD/VSPI MOSI
IO21GPIO, SPI HD/VSPI MISO
IO26GPIO, SPI HD/VSPI SCK
IO33GPIO, I2C SDA
IO34GPIO, I2C SCL
IO35GPIO, SPI CS (default)
IO36GPIO, SPI CS (alternative)
IO37GPIO, SPI CS (alternative)
IO38GPIO, SPI CS (alternative)
USBUSB-C Connector (Power and Serial/UART)
STEMMA QTI2C Pins (SDA/SCL) and 3.3V/GND

Wiring & circuit basics

Powering the Adafruit QT Py ESP32-S2 is straightforward. The primary method is via the USB-C connector, which supplies a stable 5V. This voltage is regulated down to 3.3V on-board for the ESP32-S2 chip and its peripherals. You can also power the board by supplying 3.3V directly to the 3V3 pin, but ensure it's a regulated supply. Avoid applying more than 3.3V to the 3V3 pin or attempting to power the board through the USB-C port and the 3V3 pin simultaneously with different voltages. The board's onboard regulator can typically handle current demands for most small projects, but for high-power peripherals, consider an external 5V supply connected to the USB-C port.

It's crucial to remember that the QT Py ESP32-S2 operates at a logic level of 3.3V. Connecting 5V logic devices directly to its GPIO pins can damage the microcontroller. If you need to interface with 5V devices, use a logic level converter (e.g., bi-directional level shifter) for bidirectional communication or ensure the 5V device has 3.3V-compatible inputs. For outputting signals from the QT Py to 5V devices, a simple resistor can sometimes suffice if the 5V device has a high input impedance, but a level shifter is the safer and more reliable approach.

For a basic LED project, connect an LED's anode (longer leg) to a GPIO pin (e.g., IO33) and its cathode (shorter leg) to one end of a current-limiting resistor (e.g., 220-330 ohms). Connect the other end of the resistor to a GND pin. This setup ensures the LED receives power through the GPIO pin when it's HIGH, with the resistor protecting both the LED and the microcontroller. For an I2C sensor, connect the sensor's SDA pin to the QT Py's IO33 (or the STEMMA QT SDA pin), the sensor's SCL pin to IO34 (or STEMMA QT SCL), the sensor's VCC to the QT Py's 3V3 pin, and the sensor's GND to a GND pin on the QT Py.

Programming & getting started

The Adafruit QT Py ESP32-S2 is well-supported by several popular development environments. For beginners and rapid prototyping, CircuitPython and MakeCode are excellent choices, offering a Python-based or block-based graphical interface respectively. The Arduino IDE is also a robust option, leveraging the vast Arduino library ecosystem. For more advanced users or those needing fine-grained control, the Espressif IoT Development Framework (ESP-IDF) provides the most comprehensive features and performance.

To upload your first program using Arduino IDE: 1. Install the Arduino IDE. 2. Install the ESP32 board support package via the Board Manager (search for 'esp32'). 3. Select the 'Adafruit QT Py ESP32-S2' board from the Tools > Board menu. 4. Connect the QT Py ESP32-S2 to your computer via USB-C. 5. Select the correct COM port. 6. Write or load a simple sketch (e.g., Blink). 7. Click the Upload button. For CircuitPython, you'll typically download the UF2 bootloader, put the board into bootloader mode (often by pressing the reset button twice quickly), drag and drop the CircuitPython firmware file onto the USB drive that appears, and then use a code editor like Mu to write and save Python files directly to the board.

Project ideas

Wi-Fi Connected Temperature SensorMonitor ambient temperature using an external sensor (like a TMP36 or I2C sensor) and send readings over Wi-Fi to a web server or MQTT broker. Uses ADC or I2C pins and Wi-Fi.
Tiny Web ServerHost a simple web page directly from the QT Py ESP32-S2, allowing you to control an LED or display sensor data via a web browser on your local network. Utilizes Wi-Fi and a digital output pin.
Bluetooth Low Energy (BLE) BeaconBroadcast sensor data or a simple message using BLE. This is useful for proximity detection or triggering actions on a smartphone. Uses the ESP32-S2's BLE capabilities.
Smart Home ButtonCreate a wireless button that triggers actions on a smart home hub (like Home Assistant) via Wi-Fi or MQTT. Uses a digital input pin and Wi-Fi.
Wearable Activity TrackerCombine the QT Py's small size with an accelerometer and a small display (via I2C) to create a basic step counter or activity monitor. Uses I2C and GPIO pins.
USB HID DeviceProgram the QT Py ESP32-S2 to act as a USB Human Interface Device, such as a custom keyboard or mouse, for automating tasks or creating unique input methods. Uses the USB capabilities.

Buying tips & gotchas

When purchasing the Adafruit QT Py ESP32-S2, ensure you are buying from a reputable source like Adafruit or their authorized distributors to avoid counterfeit or lower-quality clones. Always use a good quality USB-C cable for reliable power and data transfer. Be mindful of the 3.3V logic level; use level shifters when interfacing with 5V components. Consider pairing it with a small breadboard or Adafruit's Stemma QT ecosystem for easy prototyping. A common pitfall is attempting to power it with more than 5V through USB or directly applying 5V to the 3V3 pin, which can damage the board. Accessories like small OLED displays, sensors, and batteries are readily available and compatible.