Which ESP32 Should I Buy? Pick the Right Board for Your Project

Last updated: 2026-11-22

Last updated: 2026-11-22

If you are asking which ESP32 should I buy, start here: buy an ESP32-S3 board. The ESP32-S3 Development Board DevKitC-1 gives dual-core processing at 240 MHz, WiFi, Bluetooth LE, native USB, and enough memory for almost every hobby project. Pick a different chip only for one clear need: Bluetooth audio, a 5 GHz network, a Thread or Matter device, a battery node that must sleep for months, or a large touchscreen.

This guide compares every ESP32 chip Espressif sells, then matches a chip to nine project types: WiFi sensor, camera, battery device, display, robotics, RC, Bluetooth audio, Thread and Matter, and USB HID. Pick the chip first. The board only breaks out the chip pins and adds a USB bridge, a regulator, and buttons.

Table of contents

Which ESP32 should you buy first?

The short answer to which ESP32 should I buy is the ESP32-S3. It is the default pick for 2026 because it covers the most project types: dual-core 240 MHz processing, WiFi, Bluetooth LE 5.0, native USB OTG, a camera interface, and PSRAM options up to 16 MB in the package. It runs Arduino, MicroPython, and ESP-IDF, and most current tutorials target it. Buy the classic ESP32 DevKit V1 instead if you are following an older tutorial word for word: it has the largest pile of existing tutorials and is the only ESP32 chip with Bluetooth Classic. Buy an ESP32-C3 board instead if the node must be tiny, cheap, and low power with only WiFi and Bluetooth LE. Buy an ESP32-C6 board instead if the project joins a Thread, Zigbee, or Matter network.

How do the ESP32 chips compare?

Use this table to pick the chip. GPIO counts are chip totals. A real board breaks out fewer pins, so check the board pinout before you order.

Chip Cores Max clock (MHz) Wi-Fi Bluetooth 802.15.4 USB PSRAM options GPIO on chip
ESP32 2x Xtensa LX6 240 Wi-Fi 4, 2.4 GHz Classic + BLE 4.2 No USB-serial bridge on board, none on chip WROOM none; WROVER 4 or 8 MB 34
ESP32-S2 1x Xtensa LX7 240 Wi-Fi 4, 2.4 GHz None No USB OTG full speed In-package up to 2 MB; external supported 43
ESP32-S3 2x Xtensa LX7 240 Wi-Fi 4, 2.4 GHz BLE 5.0 No USB OTG full speed + USB Serial/JTAG In-package up to 16 MB; external up to 32 MB 45
ESP32-C2 1x RISC-V 120 Wi-Fi 4, 2.4 GHz BLE 5.0 No USB Serial/JTAG only External up to 8 MB; none in package 14
ESP32-C3 1x RISC-V 160 Wi-Fi 4, 2.4 GHz BLE 5.0 No USB Serial/JTAG only External up to 8 MB; none in package 22
ESP32-C5 1x HP RISC-V + 1x LP RISC-V 240 Wi-Fi 6, 2.4 + 5 GHz BLE, Bluetooth Core 6.0 certified Yes, Thread 1.4 + Zigbee 3.0 USB Serial/JTAG only In-package 2 or 8 MB by variant; external up to 32 MB 29
ESP32-C6 1x RISC-V + 1x LP RISC-V 160 Wi-Fi 6, 2.4 GHz BLE 5.3 Yes, Thread + Zigbee USB Serial/JTAG only External up to 16 MB; none in package 30
ESP32-H2 1x RISC-V 96 None BLE 5.3 Yes, Thread + Zigbee USB Serial/JTAG only External up to 16 MB; none in package 19
ESP32-P4 2x RISC-V + 1x LP RISC-V 400 None, needs a companion chip None, needs a companion chip No USB 2.0 high speed OTG + full speed OTG + USB Serial/JTAG In-package 16 or 32 MB 55
ESP32-S31 2x RISC-V + 1x LP RISC-V 320 Wi-Fi 6, 2.4 GHz BLE 5.4 + Classic Yes, Thread 1.4 + Zigbee 3.0 USB OTG high speed In-package 8, 16, or 32 MB 60

On-chip SRAM, per Espressif published data: classic ESP32 520 KB, S2 320 KB, S3 512 KB, C2 272 KB, C3 400 KB, C5 384 KB plus 16 KB low-power SRAM, C6 512 KB, H2 320 KB, P4 768 KB, S31 512 KB. A camera frame, display buffer, or audio buffer that does not fit in SRAM needs PSRAM, and only the S3, C5, P4, and S31 offer it in the package in useful sizes.

Two warnings: the ESP32-P4 has no radio at all, so a P4 board needs a companion chip for WiFi and Bluetooth. The ESP32-S31 datasheet is pre-release v0.6 and the chip was sampling for select customers at last check, so treat the ESP32-S31 as a chip to watch, not a board to buy today.

What does each chip name mean?

The letter after ESP32 names the chip line. S means a high-performance Xtensa chip with USB and, on the ESP32-S3, AI vector instructions. C means a low-cost RISC-V chip. H means a low-power 802.15.4 chip with no WiFi. P means a high-performance RISC-V chip built for screens and video, with no radio. The number is the generation inside the line: the ESP32-S3 is the newer S chip, the ESP32-C6 is the newer C chip with WiFi 6 and 802.15.4, and the ESP32-C5 is the C chip that adds 5 GHz WiFi. Espressif is moving from Xtensa cores to RISC-V cores: the classic ESP32, ESP32-S2, and ESP32-S3 use Xtensa, and every newer chip uses RISC-V. The change does not change how you write Arduino code, because the Arduino-ESP32 core and ESP-IDF support both core types.

Which ESP32 is best for a WiFi sensor?

For a WiFi sensor, the ESP32-C3 is the pick when you ask which ESP32 should I buy. A single RISC-V core at up to 160 MHz reads a sensor and sends the result over WiFi or Bluetooth LE, and the ESP32-C3 runs the lowest deep sleep current in the WiFi group at around 5 uA. Pick the ESP32-C3 SuperMini or the Seeed XIAO ESP32C3 when the node must be small; both carry native USB, so no adapter is needed. Pick the ESP32-C6 for WiFi 6 or a path to Thread, and the classic ESP32 DevKit V1 for an older tutorial. Do not pick the ESP32-S3 for a plain sensor node: it works, but it costs more space and sleep current than the job needs.

Which ESP32 is best for a camera?

The ESP32-S3 is the best pick for a camera. The ESP32-S3-CAM board pairs the ESP32-S3-WROOM-1 N16R8 module, with 16 MB flash and 8 MB PSRAM, with a camera connector, dual USB-C ports, and a TF card slot. The PSRAM holds larger frames, and the ESP32-S3 vector instructions speed up small on-board vision work such as face detection. Compare the two camera boards in ESP32-CAM vs ESP32-S3-CAM: Which Camera Board to Pick, and set the S3 board up with How to Use the ESP32-S3-CAM Board for Camera Projects. Pick the classic ESP32-CAM instead for a simple WiFi camera: a live stream, photos to microSD, and motion alerts, with 4 MB of PSRAM and an OV2640 camera. Do not pick the ESP32-C3 or ESP32-C6 for a camera: neither chip has a camera interface or PSRAM in the package.

Which ESP32 is best for a battery-powered device?

The ESP32-C3 is the best pick for a battery-powered WiFi device, and the ESP32-H2 is the best pick for a battery-powered Thread or Zigbee device. The ESP32-C3 deep sleep current sits around 5 uA, the lowest of the WiFi chips. The ESP32-H2 sits around 7 uA with no WiFi radio to feed. The ESP32-C6 also sits around 7 uA and keeps WiFi 6 plus 802.15.4, so it is the pick when a battery node must talk WiFi today and Thread later. Battery life depends on the board as much as the chip: a board with a power LED, a USB-serial chip, and a linear regulator draws far more than the chip deep sleep figure. Measure the whole board in deep sleep, and read How to Power ESP32 and Arduino Projects on LiPo Power for charging, protection, regulation, and run-time math. Do not pick the ESP32-P4 for a battery device: it is the most power-hungry chip in the family.

Which ESP32 is best for a display?

The ESP32-S3 is the best pick for a display. With PSRAM it drives SPI TFT and OLED displays, holds the frame buffer in memory, and its USB OTG port supports touch input. The 1.9 inch TFT board and the 0.96 inch OLED board are compared pin for pin in ESP32 Boards with Built-In Displays: TFT vs OLED Compared. Pick the ESP32-P4 instead for a large MIPI panel: it drives MIPI-DSI displays up to 1080p, takes MIPI-CSI camera input, and encodes H.264 video in hardware. It has no WiFi or Bluetooth, so a P4 board pairs with a companion chip such as the ESP32-C6 for wireless. Do not pick the ESP32-C3 for a display larger than a small OLED: it has no PSRAM in the package and only 22 GPIO pins on the chip.

Which ESP32 is best for robotics?

The ESP32 DevKit V1 is the best pick for a first robot, and the ESP32-S3 is the best pick for a robot that also needs a camera, a display, or USB. The DevKit V1 gives dual-core 240 MHz processing, WiFi, Bluetooth, 30 pins, and 4 MB of flash on a board that fits a breadboard. The ESP32-S3 adds native USB, more memory, and a camera interface for a vision robot. The robot-by-robot picks, with wiring and power, are in How to Choose ESP32 Boards for Your Robotics Projects. One rule applies to every ESP32 robot: no board pin can power a servo or a motor directly. Every ESP32 runs on 3.3 V logic, so a 5 V sensor needs a level shifter, and servos and motors need their own power supply with a shared ground.

Which ESP32 is best for RC and drones?

The ESP32-C3 SuperMini and the ESP32-S3 SuperMini are the best picks for RC and drones, because size and weight decide the fit. The C3 SuperMini fits tight frames and runs WiFi telemetry, while the S3 SuperMini adds dual-core power and more pins for a flight controller companion or a camera. The ESP32-S2 Mini is the pick for WiFi and USB in a small board without Bluetooth. Drone fitting detail is in How to Choose ESP32 Boards for Drones and FPV Projects, and tiny-board pinouts are in How to Pick an ESP32 SuperMini Board for Tiny Builds. Do not pick the classic ESP32 DevKit V1 for a small drone frame: it is wider than a standard breadboard. Do not pick the ESP32-CAM for a drone that needs pins: the camera and the SD card take most of the free GPIO pins.

Which ESP32 is best for Bluetooth audio?

The classic ESP32 is the only pick for Bluetooth audio. It is the only ESP32 chip with Bluetooth Classic, which is what A2DP audio streaming and the Serial Port Profile (SPP) need. Every newer chip, including the ESP32-S3, ESP32-C3, ESP32-C5, and ESP32-C6, is Bluetooth LE only. Bluetooth LE does not carry A2DP audio, so a Bluetooth speaker or audio receiver must use the classic ESP32. For Bluetooth LE work such as beacons, phone apps, and BLE sensors, any chip with BLE 5 works. The ESP32-S3 is the usual pick, and the ESP32-C3 is the pick when the BLE node must be small and low power.

Which ESP32 is best for Thread, Zigbee, and Matter?

The ESP32-C6 is the best pick for Thread, Zigbee, and Matter. It combines Wi-Fi 6 at 2.4 GHz with an 802.15.4 radio for Thread and Zigbee on one chip, plus Bluetooth LE 5.3, and it supports Matter over Thread and Matter over WiFi. It also carries a low-power RISC-V core that runs while the main core sleeps. Pick the ESP32-H2 instead for a battery-powered Thread or Zigbee end device: same 802.15.4 radio and Bluetooth LE 5.3, no WiFi radio, and the lowest power draw of the two. Pick the ESP32-C5 instead when the Matter device also needs 5 GHz WiFi: it is the only ESP32 chip with dual-band Wi-Fi 6 at 2.4 and 5 GHz, plus 802.15.4. The XIAO family comparison is in XIAO ESP32C3 vs C6 vs S3 vs C5: Pick the Right Board.

Which ESP32 is best for USB HID?

The ESP32-S3 is the best pick for USB HID. It has native USB OTG, so the chip itself can act as a USB keyboard, mouse, MIDI device, or flash drive, with no separate USB chip. The ESP32-S2 also has USB OTG and is the lower-cost pick when the HID device needs WiFi and USB but no Bluetooth. The ESP32-C3, ESP32-C6, ESP32-H2, and ESP32-C5 have USB Serial/JTAG only, a programming and debug port, not a USB device port, so they cannot act as a USB keyboard or mouse. The classic ESP32 has no USB on the chip at all. For USB HID, the choice is the ESP32-S3 first and the ESP32-S2 second.

What about the ESP32-P4?

The ESP32-P4 is a high-performance microcontroller for screens, cameras, and video, not a general ESP32 board. Per the Espressif ESP32-P4 datasheet, it carries a dual-core RISC-V processor at up to 400 MHz, a low-power RISC-V core at up to 40 MHz, 768 KB of SRAM, 16 or 32 MB of PSRAM in the package, 55 GPIO pins, MIPI-CSI camera input, MIPI-DSI display output, an image signal processor, a JPEG codec, and a hardware H.264 encoder, plus USB 2.0 high-speed OTG at 480 Mbps and 10/100 Ethernet. The ESP32-P4 has no WiFi, Bluetooth, or 802.15.4 radio. A P4 board adds wireless with a companion chip, usually the ESP32-C6, over SDIO or SPI. Buy an ESP32-P4 board only for a large touchscreen, a MIPI camera, or hardware video encoding. For every other project, the ESP32-S3 costs less and already has WiFi and Bluetooth on the chip.

What about the ESP32-S31?

The ESP32-S31 is Espressif's newest multi-protocol chip, and it is a chip to watch rather than a board to buy today. Per the Espressif ESP32-S31 product page, it carries a dual-core 32-bit RISC-V processor at up to 320 MHz with a 128-bit SIMD data path, 512 KB of SRAM, 60 GPIO pins, 2.4 GHz Wi-Fi 6, Bluetooth 5.4 with LE and Classic, IEEE 802.15.4 for Thread and Zigbee, a Gigabit Ethernet MAC, USB OTG high speed, and 8, 16, or 32 MB of PSRAM in the package. The ESP32-S31 Series Datasheet is pre-release v0.6, and Espressif described the chip as sampling for select customers when it was announced, so finished boards are scarce and the Arduino and ESP-IDF support is still new, with ESP-IDF v6.1 as the listed target. If you need a board this week, buy the ESP32-S3 or the ESP32-C6 instead.

What about the ESP8266?

The ESP8266 is the predecessor chip, not an ESP32. It gives single-band WiFi on a single core with far fewer pins and no Bluetooth. It still fits one job: a simple WiFi sensor or switch where the board is already in hand and the sketch already works. For a new purchase, the ESP32-C3 costs about the same, adds Bluetooth LE and native USB, and runs the same Arduino code with more pins and more memory. If you already own a NodeMCU ESP8266 board, the setup and OLED guide is in How to Use NodeMCU ESP8266 with a Built-In OLED Display. If you are choosing between Arduino, ESP32, and RP2040, read Arduino vs ESP32 vs RP2040: Which Dev Board for Your Robot first.

Which board, not just which chip?

Once you know which ESP32 should I buy for the chip, pick the board that breaks out the pins you need. The same chip ships on many boards, and the board decides the USB connector, the regulator, the antenna, and the pins you can reach.

Chip Board pick Notes
ESP32 ESP32 DevKit V1, 30-pin, ESP32-WROOM-32 Most tutorials use it
ESP32-S3 ESP32-S3 DevKitC-1, 44-pin, USB-C N16R8 module, 16 MB flash, 8 MB PSRAM
ESP32-S2 ESP32-S2 Mini, USB-C 4 MB flash, 2 MB PSRAM, no Bluetooth
ESP32-C3 ESP32-C3 SuperMini or Seeed XIAO ESP32C3 Thumb-sized, native USB-C
ESP32-C6 ESP32-C6 SuperMini or Seeed XIAO ESP32C6 Wi-Fi 6 and 802.15.4, small board
ESP32-C5 Seeed XIAO ESP32-C5 Dual-band Wi-Fi 6 and Matter
ESP32-H2 ESP32-H2 SuperMini Thread and Zigbee end devices
ESP32-CAM ESP32-CAM with ESP32-CAM-MB carrier Carrier adds Micro USB for programming
ESP32-S3-CAM ESP32-S3-CAM board Dual USB-C, programs directly

Check the board pinout before you order: a 30-pin ESP32 DevKit V1, a 38-pin ESP32-DevKitC, and a 44-pin ESP32-S3 DevKitC-1 do not share a pin layout. The XIAO ESP32S3 and its Sense expansion board are covered in Seeed XIAO ESP32S3 Guide: Standard Board vs Sense Board.

Best for and not for: every chip

These Best for lines are the short answer to which ESP32 should I buy for each chip. Read the project sections above for the reasons.

  • ESP32: Best for older tutorials and Bluetooth Classic audio. Not for Thread, Matter, USB HID, or PSRAM cameras.
  • ESP32-S2: Best for WiFi and USB devices without Bluetooth, such as a USB HID gadget. Not for Bluetooth, Thread, or a camera.
  • ESP32-S3: Best for most buyers, cameras, displays, USB HID, and edge AI. Not for Bluetooth Classic audio, Thread, Matter, or 5 GHz WiFi.
  • ESP32-C2: Best for the lowest-cost simple WiFi node with Bluetooth LE. Not for many pins, PSRAM, or USB OTG.
  • ESP32-C3: Best for tiny low-power WiFi and BLE sensor nodes and battery devices. Not for cameras, large displays, Thread, or USB HID.
  • ESP32-C5: Best for dual-band Wi-Fi 6 with 5 GHz, plus Thread and Matter. Not for USB HID, a camera interface, or the lowest deep sleep current.
  • ESP32-C6: Best for Thread, Zigbee, and Matter devices, and Wi-Fi 6 sensor nodes. Not for cameras, USB HID, or Bluetooth Classic audio.
  • ESP32-H2: Best for battery-powered Thread and Zigbee end devices with Bluetooth LE. Not for WiFi, cameras, displays, or USB HID.
  • ESP32-P4: Best for large MIPI touchscreens, MIPI cameras, and hardware video encoding. Not for WiFi or Bluetooth without a companion chip, and not for battery power.
  • ESP32-S31: Best for watching: WiFi 6, Bluetooth Classic and LE, 802.15.4, Ethernet, and 60 GPIO pins on one chip, once boards ship. Not for buying today: the datasheet is pre-release and the chip was sampling at last check.

What mistakes do first-time buyers make?

First, buying for the chip name instead of the project need. A buyer who needs Thread and buys an ESP32-S3 has bought the wrong chip, because the ESP32-S3 has no 802.15.4 radio. Write down the one radio the project needs before you order. Second, buying a camera board without PSRAM. A camera frame needs memory, and a board without PSRAM holds only small frames. The ESP32-CAM carries 4 MB of PSRAM, and the ESP32-S3-CAM board carries 8 MB. Third, trusting the chip GPIO count instead of the board pinout. The ESP32-S3 chip has 45 GPIO pins, but a board breaks out fewer, and some pins are strapping, flash, or USB pins. Check the board pinout, not the chip datasheet alone. Fourth, assuming every ESP32 board has Bluetooth. The ESP32-S2 has no Bluetooth at all. The ESP32-H2 has no WiFi at all. Read the radio row in the comparison table before you order. Fifth, buying a board with no USB port for programming. The bare ESP32-CAM board has no USB port and needs the ESP32-CAM-MB carrier or an FTDI adapter. The ESP32-S3-CAM board programs directly over dual USB-C ports.

How do you check a new board works?

Run a WiFi scan sketch after the board arrives. The sketch below uses the Arduino-ESP32 core and the built-in WiFi library, so no extra library is needed. It lists the networks the board can see, which proves the radio, the antenna, and the USB connection in one step. Load it in Arduino IDE, open the Serial Monitor at 115200 baud, and check that network names appear.

// Board check: WiFi scan. Arduino-ESP32 core, built-in WiFi library.
// No extra libraries needed. Compiled 2026-11-22 with PlatformIO 6.2.0 (espressif32, esp32dev).
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  delay(1000);
  WiFi.mode(WIFI_STA);      // Station mode: the board joins networks.
  WiFi.disconnect();        // Clear any saved network before scanning.
  delay(100);
  Serial.println("Scanning for WiFi networks...");
  int networks = WiFi.scanNetworks();
  Serial.print("Networks found: ");
  Serial.println(networks);
  for (int i = 0; i < networks; i++) {
    Serial.print(i + 1);
    Serial.print(": ");
    Serial.print(WiFi.SSID(i));   // Network name.
    Serial.print(" (");
    Serial.print(WiFi.RSSI(i));   // Signal strength in dBm.
    Serial.println(" dBm)");
  }
}

void loop() {
  // Nothing to repeat. Run the scan once per reset.
}

If the scan finds no networks, check the antenna first: some boards ship with a PCB antenna and some with a U.FL connector that needs an antenna fitted. Then check the board selection in Arduino IDE, then the USB cable, because a charge-only cable carries power but no data. The full USB detection fixes are in post 10 in this series.

Frequently asked questions

Which ESP32 should I buy as a beginner?

The ESP32-S3 is the best ESP32 for beginners starting fresh, because it covers WiFi, Bluetooth LE, USB, cameras, and displays on one board. The classic ESP32 DevKit V1 is the best ESP32 for beginners following an older tutorial, because most older tutorials name the classic ESP32 pins. Either board runs the Arduino-ESP32 core.

What is the difference between ESP32 and ESP32-S3?

The ESP32 is the classic dual-core Xtensa LX6 chip at 240 MHz with Wi-Fi 4, Bluetooth Classic and BLE 4.2, and 34 GPIO pins. The ESP32-S3 is the newer dual-core Xtensa LX7 chip at 240 MHz with Wi-Fi 4, Bluetooth LE 5.0, native USB OTG, a camera interface, AI vector instructions, and 45 GPIO pins. The ESP32-S3 has no Bluetooth Classic and no 802.15.4 radio.

Which ESP32 has the most GPIO pins?

The ESP32-S31 has the most GPIO pins at 60 on the chip, per the Espressif ESP32-S31 datasheet, but the chip was sampling at last check. Among boards you can buy today, the ESP32-P4 has 55 and the ESP32-S3 has 45. A board breaks out fewer pins than the chip total, so check the board pinout.

Does the ESP32-C6 support Matter?

Yes. The ESP32-C6 supports Matter over Thread and Matter over WiFi, per Espressif, combining Wi-Fi 6 at 2.4 GHz with an 802.15.4 radio for Thread and Zigbee and Bluetooth LE 5.3. The ESP32-H2 also supports Matter over Thread, and the ESP32-C5 adds 5 GHz WiFi to the same Matter support.

Which ESP32 should I buy for a battery project?

The ESP32-C3 is the best ESP32 for a battery-powered WiFi project, with deep sleep current around 5 uA. The ESP32-H2 is the best ESP32 for a battery-powered Thread or Zigbee project, with no WiFi radio to feed. Read How to Power ESP32 and Arduino Projects on LiPo Power for the charging, protection, and run-time math: the board draws more than the chip deep sleep figure.

Parts used in this guide

If you already know which ESP32 should I buy for your project, the boards below are in stock in the store and linked to their product pages. Use the product page for the current listing. Product images in the body link to their products.

In this series

This pillar is post 1 of 10. The spoke posts below come next in this series. Their links are added here when each post publishes.

  • Post 2: ESP32 DevKit V1 (30-pin) pinout.
  • Post 3: ESP32-S3 DevKitC-1 pinout.
  • Post 4: ESP32-CAM pinout, boot mode, and flashing.
  • Post 5: ESP32-CAM troubleshooting.
  • Post 6: ESP32-CAM streaming.
  • Post 7: ESP32-CAM on battery.
  • Post 8: ESP-NOW explained.
  • Post 9: Arduino IDE vs PlatformIO vs ESP-IDF vs MicroPython for ESP32.
  • Post 10: ESP32 not detected over USB.

Sources

  • Espressif ESP32-S31 product page: dual-core 32-bit RISC-V up to 320 MHz, 512 KB SRAM, 60 GPIO pins, Wi-Fi 6, Bluetooth 5.4 LE and Classic, 802.15.4, Gigabit Ethernet, USB OTG high speed, 8 to 32 MB PSRAM. https://www.espressif.com/en/products/socs/esp32-s31
  • ESP32-S31 Series Datasheet, pre-release v0.6: HP dual-core RISC-V up to 320 MHz, LP core up to 40 MHz, 60 GPIO pins, Wi-Fi 6, Bluetooth 5.4, Zigbee 3.0, Thread 1.4. https://documentation.espressif.com/esp32-s31_datasheet_en.html
  • ESP32-P4 Series Datasheet, pre-release v0.7: dual-core RISC-V up to 400 MHz, 768 KB SRAM, 16 or 32 MB PSRAM, 55 GPIO pins, MIPI-CSI and MIPI-DSI, H.264 encoder, USB 2.0 high-speed OTG, no radio. https://documentation.espressif.com/esp32-p4_datasheet_en.html
  • Zephyr Project, ESP32-C5 features: HP RISC-V core up to 240 MHz, 384 KB SRAM, dual-band Wi-Fi 6, Bluetooth 5.4 LE, 802.15.4, 29 GPIO pins. https://docs.zephyrproject.org/latest/boards/espressif/common/soc-esp32c5-features.html
  • Espressif ESP32-C5 datasheet (mirror of the Espressif PDF): HP RISC-V core up to 240 MHz, LP core up to 40 or 48 MHz, 384 KB HP SRAM, 16 KB LP SRAM, Bluetooth Core 6.0 certified, Thread 1.4, Zigbee 3.0, 29 GPIO pins. https://www.alldatasheet.com/datasheet-pdf/pdf/2162612/ESPRESSIF/ESP32-C5.html
  • Espressif series datasheets for ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, and ESP32-H2: cores, clocks, radios, SRAM, GPIO counts, and USB support in the comparison table, cross-checked against the Espressif data quoted in the JLCPCB ESP32 versions guide, the Blynk ESP32 variant guide, and the esp32.iammanis.com specifications table.

Low-Power ESP32 Battery Projects: Deep Sleep and Solar

A battery ESP32 project lives or dies on one number: average current. Get it right and a single 3000 mAh cell runs a field sensor for months. Get it wrong and the same cell is dead before dinner.

This guide covers the five power modes, every wake source, board-level sleep drain, battery sizing, solar sizing, and the mistakes that drain a pack in days. The sensor node build is covered in ESP32 Battery Sensor Node: Deep Sleep and Power Budget, and LiPo wiring in How to Power ESP32 and Arduino Projects on LiPo Power.

How long can an ESP32 really run on battery?

Battery life in hours equals usable battery capacity divided by average current. Average current is the awake share times the awake current, plus the sleep share times the sleep current. Source: ProjectECH; DroneBot Workshop; Hubble.

Take a node that wakes for 20 seconds at 180 mA and sleeps at 15 microamps, on one 18650 cell with a realistic usable capacity of 2400 mAh. Source: ProjectECH.

Report interval Average current Battery life from 2400 mAh
Every 10 minutes (180 x 20 + 0.015 x 580) / 600 = about 6.0 mA About 400 hours, about 16 days
Every 60 minutes (180 x 20 + 0.015 x 3580) / 3600 = about 1.01 mA About 2376 hours, about 99 days

Three lessons fall out of that table. First, the interval dominates: 60-minute reports give roughly 6 times the battery life of 10-minute reports. Second, sleep current matters: with a 5 mA sleep the 60-minute column collapses to about 17 days. Third, awake time is the other lever: Wi-Fi can spend 3 to 8 seconds just joining the network, so cut the awake window to 5 seconds. Source: ProjectECH.

Radios differ too: Wi-Fi transmit runs about 160 to 260 mA, BLE about 95 to 130 mA, and LoRa about 20 to 120 mA transmit with about 0.2 microamps in sleep. Source: ProjectECH; Hubble.

Which sleep mode does your project need?

The ESP32 has five power states. The figures below are chip-level typicals; your board will draw more. Source: DroneBot Workshop; Espressif sleep modes documentation.

Mode CPU and peripherals Radio Typical chip current What survives
Active On On or off 240 mA Wi-Fi transmit peak Everything
Modem sleep On Off between checks About 3 to 20 mA Everything, Wi-Fi association kept
Light sleep Paused Off About 0.8 mA RAM and registers, resumes where it stopped
Deep sleep Off Off About 10 to 25 microamps RTC memory only, 8 KB slow memory
Hibernation Off Off About 2.5 microamps Nothing guaranteed, not even RTC memory

Active is the normal running state; the only saving is lowering the CPU clock. Modem sleep turns the radios off between transmissions while the CPU keeps running, staying associated with the router by waking the radio on the DTIM interval. Light sleep pauses the CPU clock but preserves RAM and registers. Deep sleep powers down almost everything; only the RTC domain and optionally the ULP coprocessor stay alive. Hibernation is the deepest state: even the 8 MHz RTC oscillator and the ULP coprocessor are off, and RTC memory is not guaranteed. The only wake source is an EXT0 GPIO interrupt. Source: DroneBot Workshop.

What wakes the ESP32 from deep sleep?

The wake source defines the whole power profile. Source: ProjectECH; DroneBot Workshop; Hubble.

Wake source How it works Best for
Timer wake RTC timer fires after N microseconds Periodic sensing: wake, read, send, sleep
EXT0 wake One RTC GPIO goes high or low One event: a PIR motion sensor, a float switch, a door switch
EXT1 wake Any of several RTC GPIOs changes Several events at once
Touch pad wake A configured touch pad crosses its threshold A manual “report now” button on a sealed enclosure
ULP coprocessor Runs while the main CPUs sleep, about 150 microamps typical Wake the main CPU only on a threshold

Timer wake is the workhorse: call esp_sleep_enable_timer_wakeup(), then esp_deep_sleep_start(). EXT0 and EXT1 wake on a pin: EXT0 watches one RTC GPIO at one level, ideal for a PIR sensor, and EXT1 watches several. On the standard ESP32, RTC-capable GPIOs are 0, 2, 4, 12 to 15, 25 to 27, and 32 to 39. Touch wake uses the capacitive touch pins. The ULP coprocessor can poll an ADC channel or a GPIO while the main CPUs sleep and wake the main CPU only on a threshold. Source: ProjectECH; DroneBot Workshop; Hubble.

Always configure a wake source first, or the chip sleeps forever. Source: ProjectECH.

State survives deep sleep through RTC slow memory: variables declared with RTC_DATA_ATTR survive deep sleep, but not a power loss or a hard reset. Source: ProjectECH; TheLinuxCode; post 23387.

Why does your dev board never reach the datasheet sleep current?

The datasheet deep sleep figure is the bare chip. A dev board adds parts that draw current around the clock, and those parts dominate the sleep budget. Source: ProjectECH; DroneBot Workshop; post 23387.

A typical 30-pin DevKit board carries an AMS1117-3.3 linear regulator with a quiescent current of about 5 mA typical. With the USB chip, power LED, and pull-ups added, a “sleeping” dev board typically draws 5 to 15 mA. At 10 mA, a 3000 mAh cell lasts 300 hours, under two weeks. Source: ProjectECH; DroneBot Workshop.

Fix it in one of three ways: power the board through the 3V3 pin from an efficient external regulator; use a bare ESP32 module on a minimal breakout; or use a board designed for battery use. Measure the sleep current yourself first. Source: ProjectECH.

The XIAO boards stocked at QRC are the battery-friendly end of this scale, and the figures conflict across sources, so they are stated here as a sourced range, never as a single bench-tested number. Seeed’s wiki lists the plain XIAO ESP32S3 at 14 microamps in deep sleep, 2 mA in light sleep, and 27 mA in modem sleep. The XIAO ESP32S3 Sense with its expansion board attached is listed at 3 mA in deep sleep: the expansion board costs roughly 200 times the plain board’s sleep current, so detach it for a battery build and use the detachable camera only when the project needs it. The XIAO ESP32S3 Plus is listed at 33.51 microamps in deep sleep, and the XIAO ESP32C3 at 44 microamps. CircuitDigest measured a plain XIAO ESP32S3 board at 130 microamps in deep sleep, against a bare ESP32-S3 chip rating of 7 to 8 microamps. Plan with the worst figure in the range. Source: Seeed Studio XIAO ESP32S3 wiki; CircuitDigest; Embedded Nerd.

How do you size the battery?

Measure the build that will actually run from the battery. Source: UMA Technology; Hubble.

Step 1: measure each operating state. Record current in each state with a USB power meter, and use a multimeter in series with the battery lead for sleep. Source: UMA Technology; Hubble.

Step 2: calculate the average current. For each state, multiply current by time in that state, then sum and divide by the cycle time. Example: wake every 15 minutes, transmit for 5 seconds at 150 mA, sleep the other 895 seconds at 15 microamps. Average equals (5 x 150 + 895 x 0.015) / 900, which is 0.85 mA. Source: Hubble.

Step 3: divide capacity by average current, then derate. A 3000 mAh battery at 0.85 mA average gives about 3,500 hours, about 146 days. Now derate: usable capacity is about 70 to 80 percent of the label after aging, temperature, and self-discharge, so plan on about 2400 mAh usable from a 3000 mAh cell. Source: ProjectECH; Hubble; e-fm.tech.

Step 4: pick the chemistry. A standard LiPo at 3.7 V is workable for 6 to 12 month projects. A LiFePO4 cell at 3.2 V has low self-discharge around 3 percent per year, so it suits solar recharging. A CR2032 at 220 mAh suits only the lowest-power applications. Source: Hubble.

The biggest lever is the awake time: every second of Wi-Fi connect time at 150 mA costs as much as 150 seconds of sleep at 1 mA. Source: post 23387.

How do you size a solar panel for an ESP32 project?

A solar panel only has to replace what the board uses, plus the charging losses. Size it from the worst month, not the average: a panel sized for summer sun dies by mid-December. Source: Hubble solar sizing guide; e-fm.tech.

Step 1: daily energy. Daily energy equals average current times supply voltage times 24 hours. The 0.85 mA node at 3.7 V uses about 76 mWh per day. Source: Hubble solar sizing guide.

Step 2: battery autonomy. Size for three cloudy days: three days at 76 mWh per day is 228 mWh, or about 62 mAh at 3.7 V. Source: e-fm.tech; post 23188; post 15185.

Step 3: worst-month peak sun hours. Peak sun hours are the hours per day of full sunlight that would deliver the same energy as the real day. Look it up for your coordinates with PVGIS or NASA POWER, and use the worst month. Source: e-fm.tech.

Step 4: panel watts. Panel watts are about equal to daily energy divided by (charging efficiency times peak sun hours times a derating factor). The worked example comes out to about 0.021 to 0.11 W. In practice, fit a panel several times larger than the paper minimum. Source: e-fm.tech; Hubble solar sizing guide.

Step 5: charge controller. A small panel charging a single lithium cell needs a charger that terminates at 4.2 V and a protection circuit. The TP4056 module below charges a single cell from USB or a solar panel at up to 1 A. Standard lithium-ion and LiPo cells should not be charged below about 0 degrees C. Source: ProjectECH; e-fm.tech.

No solar panel is stocked at QRC as of 2026-11-21, so no panel is linked in this guide. The BirdBox build in Run a BirdBox Camera for Months on Solar Power shows the same pattern: panel in full sun, short cable, battery sized for three cloudy days.

How do you charge and protect the pack?

Charging, protection, and regulation are three separate jobs, and one module does not always do all three. The full wiring chain is covered in How to Power ESP32 and Arduino Projects on LiPo Power. Source: post 19087.

The TP4056 load-sharing trap. The TP4056 has no load sharing: it cannot tell current going into the battery from current drawn by your circuit. With the load on the battery terminals, the charger sees the load current as charge current, never detects the proper termination taper, and can keep pushing current into an already-full cell. Wire battery to B+ and B-, supply to IN+ and IN-, and take system power from OUT+ and OUT-. The proper fix is a load-sharing power-path circuit. Source: ProjectECH; post 19087.

The cutoff voltage has no single agreed number. Sources disagree on the per-cell cutoff, with figures from 3.0 V to 3.5 V per cell. This guide states that range and does not pick one number. Read the cutoff from the docs for the protection module and the battery you own, and wire the protection so it disconnects the pack from everything. The stocked 3000 mAh pack below has a built-in protection board. Source: post 19087.

What mistakes drain a battery pack in days?

  • Trusting the chip sleep figure for the whole board. The chip sleeps at 10 to 25 microamps; the board sleeps at milliamps. Measure the whole board.
  • Leaving Wi-Fi on between readings. A board that idles with Wi-Fi connected draws 35 mA or more. Sleep between readings.
  • Letting Wi-Fi join slowly, every cycle. Every awake second at 150 mA costs as much as 150 seconds of sleep at 1 mA. Use a static IP and cap retries at three.
  • Sizing the solar panel for summer. The panel must cover the worst month, not the average. Size from worst-month peak sun hours, and test through a cloudy week.
  • Never measuring the sleep current. Every battery estimate in this guide is arithmetic from stated inputs. Measure your own board’s sleep current and redo the math.

How do you fix a low-power project that dies too soon?

The board draws milliamps in deep sleep. Measure the board alone, then the regulator or converter alone. The likely causes are the power LED, the USB-to-serial chip, or a regulator with high standby draw. Power the 3V3 pin directly from a regulated 3.3 V supply, or remove the power LED where the board allows it. Source: DroneBot Workshop; post 23387.

The node boot-loops when the battery gets low. A nearly empty cell sags under a Wi-Fi transmit burst, and if the sag crosses the brownout threshold the chip resets mid-transmission. Treat 3.2 to 3.3 V under load as the effective empty point. The brownout fix is covered in ESP32-CAM Troubleshooting: Brownout and Camera Init Failed. Source: ProjectECH.

The battery voltage falls every week even with solar. The panel is too small for the worst month, the panel is shaded or flat, or the charge current never tapers. Check the battery voltage after the first week, and add panel size if it keeps falling. Source: post 23188; ProjectECH.

Which low-power setup fits your project?

Project Wake source Sleep mode Battery Solar
Temperature sensor, hourly reports Timer Deep sleep 3000 mAh 1S LiPo pack Not needed
PIR wildlife or BirdBox camera EXT0 on the PIR output Deep sleep 3000 mAh pack or larger Yes, worst-month panel
Always-on display or dashboard None, it must stay awake Modem sleep between updates USB power bank or mains No, the radio stays too busy
BLE beacon Timer, duty-cycled BLE scan Deep sleep between scans XIAO board with on-board charging Optional

Parts used in this guide

Prices and stock verified live on 2026-11-21. All four items below are in stock and purchasable.

Also verified live in stock: XIAO ESP32C6 1-Pack (ID 17835) $15.99 sale; XIAO ESP32-C5 1-Pack (ID 18380) $17.99 sale; XIAO ESP32S3 Sense 1-Pack (ID 17842) $32.49 sale, detachable camera; ESP32 DevKit V1, $9.99 sale; USB-C LiPo Module 1200mAh (ID 18959) $14.99 sale; HC-SR501 PIR (ID 14636) $5.99 sale; CellMeter8 (ID 3485) $19.99. No solar panel is stocked at QRC, so none is linked.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

How long will an ESP32 run on a battery? It depends on the average current, not the pack size alone. A node that wakes 5 seconds at 150 mA every 15 minutes and sleeps at 15 microamps averages about 0.85 mA, so a 3000 mAh battery gives about 146 days. Source: Hubble.

Why does my ESP32 use milliamps in deep sleep? The datasheet figure is the bare chip. The dev board adds a linear regulator with about 5 mA quiescent current, a USB-to-serial chip, and a power LED. Source: ProjectECH; DroneBot Workshop.

What wakes an ESP32 from deep sleep? The RTC timer for periodic work, EXT0 for one pin event such as a PIR sensor, EXT1 for any of several pins, a touch pad for a button, and the ULP coprocessor at about 150 microamps. Source: ProjectECH; Hubble.

How big a battery do I need for an ESP32 sensor? Work out the average current first, then divide capacity by average current, then derate to about 70 to 80 percent usable. Source: ProjectECH; Hubble.

Can I run an ESP32 on solar power? Yes. Work out the daily energy, size the battery for three cloudy days, look up the worst-month peak sun hours, and divide daily energy by charging efficiency times peak sun hours times a derating factor. Source: Hubble; e-fm.tech.

What is a safe cutoff voltage for a LiPo on an ESP32 project? No single cutoff voltage is universal: sources disagree, with figures from 3.0 V to 3.5 V per cell. Use a protected pack or a protection module, read the cutoff from its docs, and wire it so it disconnects the pack from all loads. Source: post 19087.

Sources

Last updated: 2026-11-21

ESP32-S3 Face Detection Guide: XIAO Sense and S3-CAM

The ESP32-S3 can look at a camera frame and tell you where the faces are, on the chip itself, with no cloud account and no video leaving the board.

This guide covers what the ESP32-S3 can and cannot do with faces, detection vs recognition, which boards work, the no-code and Arduino routes, and the mistakes that waste the most time. Nothing here needs a paid app or a cloud account for the on-device routes.

What is face detection on the ESP32-S3, and what can it actually do?

Face detection on the ESP32-S3 means a small neural network model runs on the chip, looks at each camera frame, and returns a box around every face it finds, plus a confidence score for each box. Your code gets the boxes: light an LED, count people, trigger a relay, send an MQTT message, or save a snapshot.

It works on the ESP32-S3 and not well on the classic ESP32 because of the hardware. The ESP32-S3 has vector instructions that speed up neural network math, and camera boards built on it carry 8 MB of PSRAM, which holds the frame and the model weights. Source: Espressif edge AI workshop and ESP-WHO docs.

Detection runs on small frames. The models are trained on small inputs, so the camera captures at a low resolution for inference even when the sensor can shoot much higher. Espressif’s workshop lists QVGA (320 by 240) as the typical frame size for face detection and HVGA (480 by 320) for face recognition. Source: Espressif edge AI workshop, Assignment 4.

What is the difference between face detection and face recognition?

Detection and recognition are two different jobs, and mixing them up is the most common source of disappointment with these boards.

Face detection answers “is there a face in this frame, and where”. It returns boxes and confidence scores and knows nothing about who the person is. A doorbell that lights up when someone approaches and a people counter at a doorway need detection only.

Face recognition answers “whose face is this”. It runs detection first, then turns each detected face into a numerical embedding and compares it against faces you enrolled earlier. You show the board each person’s face and give it a name, and the board stores the result. A door lock that opens for family members needs recognition.

Recognition is harder, slower, and more fragile than detection. It needs the face to be larger in the frame, better lit, and facing the camera more directly. It also stores face data on the board: tell everyone in the household what the camera stores, and do not use recognition to identify people who have not agreed to be enrolled. This guide gives no accuracy percentage for recognition, because no primary source we checked publishes one.

Task Question it answers Needs enrollment Typical use
Face detection Is there a face, and where No Doorbell alert, people counting, intruder alert
Face recognition Whose face is this Yes, one enrollment per person Door lock for family, attendance
Person detection Is there a person in frame No Room occupancy, trail camera trigger

Which ESP32-S3 boards work for face detection?

Any ESP32-S3 camera board with PSRAM can run a face detection model. The classic ESP32-CAM is the exception: on-device face detection models were removed from the Arduino ESP32 core version 3, so the classic board is a poor choice for new on-device face projects. It can still capture a picture and send it to a cloud API for detection. Source: Robojax tutorial.

Board Chip Camera PSRAM Face detection
XIAO ESP32S3 Sense ESP32-S3 detachable camera 8 MB Yes, on device
ESP32-S3-N16R8 CAM ESP32-S3 OV5640, 5 MP 8 MB Yes, on device
Classic ESP32-CAM ESP32 OV2640 4 MB Not recommended on device

The XIAO ESP32S3 Sense is the smallest option: an ESP32-S3 dual-core 240 MHz board with 8 MB PSRAM and 8 MB flash, a detachable camera, a digital microphone, a microSD slot, WiFi and Bluetooth 5.0, in a 21 by 17.5 mm footprint. The detachable camera matters: mount the tiny camera where the faces are and keep the board tucked away.

The ESP32-S3-N16R8 CAM is the larger, cheaper bench board: a dual-core ESP32-S3 with 16 MB flash plus 8 MB PSRAM and an OV5640 5 MP camera, with two USB-C ports that split OTG and serial duties, so it programs over USB with no adapter. The higher resolution sensor does not make detection better, because detection runs on small frames.

Which approach should you pick?

There are four working routes. Pick one row and follow its section.

Approach Code needed Toolchain Best for
SenseCraft AI (Seeed) None, deploy in a browser Web platform, USB cable Fastest first detection
Arduino IDE with esp-dl models Arduino sketch Arduino IDE, ESP32 core 2.0.17 Full control, offline recognition
ESP-WHO with ESP-IDF C, ESP-IDF project ESP-IDF v5.5.x Espressif reference examples
Cloud API detection Arduino sketch plus an API key Arduino IDE, internet Classic ESP32-CAM

How do I run face detection with SenseCraft AI, with no code?

SenseCraft AI is Seeed’s edge AI platform. It deploys a prebuilt model to a supported board from a browser, with no machine learning code and no toolchain install. This is the fastest route to a working face detector.

  1. Plug the XIAO ESP32S3 Sense into your computer with a USB-C data cable. A charge-only cable will power the board but the browser will never see it.
  2. Open the SenseCraft AI model page at https://sensecraft.seeed.cc/ai/model. Under Pretrained Models, set Task to Detection and Supported Devices to XIAO ESP32S3 Sense, then search “Face”.
  3. Pick the Swift-YOLO face detection model. As of July 2025 there were two face models listed, and the Makerguides tutorial reports only the Swift-YOLO one worked.
  4. Click Deploy Model, then Connect Device, pick the COM port the board is on, and confirm. The model downloads to the board in about 1 to 2 minutes. Source: Seeed SenseCraft AI wiki.
  5. The preview starts on its own, with bounding boxes drawn around detected faces in the live feed, each box carrying a confidence score.

Two settings control what counts as a detection. The confidence threshold filters detections by how sure the model is that something is a face: every detection scores 0 to 100 percent, and anything below the threshold is discarded. A lower threshold catches more faces but also flags more non-faces. The IoU (Intersection over Union) threshold decides which overlapping boxes to keep when the model draws several boxes around one face. Source: Makerguides tutorial.

SenseCraft models also offer outputs from the sidebar: a GPIO pin that goes high when a face is detected, serial output over UART, I2C or SPI with the face count and confidence, or MQTT over WiFi for a home automation system. GPIO is enough for a door opener or an alarm; MQTT is for Home Assistant. Source: Makerguides tutorial and Seeed wiki.

How do I run face detection with Arduino IDE?

Use the Arduino route when you want the detection inside your own sketch, for example a camera that also drives a relay or serves a web page. The Robojax XIAO face recognition tutorial is the clearest Arduino reference we found, and its settings are strict: get one wrong and the sketch will not compile or will not detect anything.

  1. Install Arduino IDE and add the ESP32 board package. In Boards Manager, install ESP32 core version 2.0.17. This version matters most: Espressif removed the on-device face detection models in core 3, so the project cannot compile there. Version 2.0.17 is the last 2.x release with both those models and the XIAO_ESP32S3 board definition. Source: Robojax tutorial.
  2. Select the board as XIAO_ESP32S3, not ESP32S3 Dev Module. The board definition carries the right camera pins and PSRAM settings.
  3. Set PSRAM to OPI PSRAM. It is off by default, and nothing works without it. Set Flash Size to 8 MB, Partition Scheme to Default with SPIFFS, USB CDC On Boot to Enabled, and Upload Speed to 921600, dropping to 460800 if uploads fail. Source: Robojax tutorial.
  4. Use the face detection models from the ESP32 core: HumanFaceDetectMSR01 as stage one to find candidate faces, and HumanFaceDetectMNP01 as stage two to refine the boxes and add five facial keypoints. The pipeline captures at 240 by 240 in RGB565, runs both stages, draws the boxes into the frame, then compresses to JPEG for streaming. Source: Robojax tutorial.
  5. Get the camera stream working before adding detection. Flash a plain camera sketch first and confirm the video shows in a browser. If the stream fails, the fault is in the camera setup, not the model. Our ESP32-S3-CAM setup guide covers the first-stream steps.

How do I add face recognition, so the board knows who it is?

Recognition adds two steps after detection: enroll faces, then match new faces against them.

Enrollment means showing the board each person’s face and storing the result. In the Robojax offline recognition project, enrollment happens from the board’s own web page: you type a name into a roster slot, point the camera at the person, and save. The board makes its own WiFi network for this, so no router and no internet are involved, and no face ever leaves the board. The stored data is a numerical embedding, not a photo, but it still identifies a person.

Matching means each new detected face is turned into an embedding and compared against every stored embedding. The EloquentEsp32cam docs describe the pipeline: align the face, generate a 512-dimensional embedding, compare it against stored embeddings, and return the best match if the similarity passes a threshold. Recognition typically takes 80 to 150 ms on ESP32-S3 hardware, for the recognition step alone. Source: EloquentEsp32cam DeepWiki docs.

The ESP-WHO framework is the Espressif reference route for recognition, with a state machine for ENROLL, RECOGNIZE, and DELETE operations. It targets ESP-IDF v5.5.x and the ESP32-S3 and ESP32-P4 chips. Source: Espressif ESP-WHO get started guide.

Do not use recognition as a security lock on its own. A small on-device model can be fooled by a printed photo, and no primary source we checked publishes a spoof resistance claim for these models. Keep a separate lock, code, or key for anything that must stay secure.

What are the accuracy and speed limits?

No source we checked publishes one tested accuracy number or one tested frame rate for ESP32-S3 face detection, so this guide gives neither as a universal claim. The limits below are what named sources state on their own setups.

  • Resolution for inference is small. Face detection runs at QVGA (320 by 240) and face recognition at HVGA (480 by 320) in Espressif’s workshop, and the Arduino recognition pipeline captures at 240 by 240. A face that is small in the frame will not be detected, whatever the sensor’s maximum resolution is. Source: Espressif edge AI workshop, Robojax tutorial.
  • Recognition is slower than detection. The EloquentEsp32cam docs state recognition typically takes 80 to 150 ms on ESP32-S3 hardware, for the recognition step alone, or roughly 7 to 12 recognitions per second before capture and streaming are counted. Source: EloquentEsp32cam DeepWiki docs.
  • Frame rate depends on resolution and settings. The Tokay Lite vendor page, for an ESP32-S3 camera board with 8 MB PSRAM, states its face detection model runs at 1 to 10 frames per second depending on resolution and settings. That is a vendor claim for their board, not a measured number for the XIAO Sense or the S3-N16R8 CAM. Source: Maxlab Tokay Lite page.
  • Lighting and angle matter more than the sensor. Faces that face the camera, are well lit, and fill a reasonable part of the frame detect reliably. Backlit faces, faces in profile, and faces at a steep angle do not. Test where the camera will live before mounting it permanently.

What are the common mistakes?

  • Using Arduino ESP32 core 3 for an on-device face sketch. The face detection models were removed in core 3. Use 2.0.17. If a sketch fails to compile with a missing face detect header, check the core version first.
  • Leaving PSRAM off. OPI PSRAM is off by default on the XIAO board definition, and the face pipeline will not run without it. Set it before the first upload.
  • Picking the wrong board definition. XIAO_ESP32S3, not ESP32S3 Dev Module. The wrong definition gives the wrong camera pins.
  • Running detection at full sensor resolution. The models are trained on small inputs. Capture small for detection.
  • Trusting recognition as the only lock. No spoof resistance claim exists for these small models. Keep a separate lock or code.

How do I troubleshoot face detection that does not work?

Work through this list in order.

The camera never shows a picture. Flash a plain camera sketch first. If that fails, the fault is wiring, pins, or power, not the model. Check the USB cable is a data cable and reseat the camera ribbon cable. Our ESP32-CAM getting started guide covers first-stream failures.

The sketch will not compile, missing human face detect headers. Check the ESP32 core version in Boards Manager. It must be 2.0.17 for the on-device face models. Source: Robojax tutorial.

The board boots but detection never fires. Check PSRAM is set to OPI PSRAM in the Arduino IDE tools menu, and that the frame size is 240 by 240 or QVGA. Then lower the confidence threshold and test with a face close to the camera, well lit, facing the lens.

Faces are detected but with many false positives. Raise the confidence threshold until non-faces stop triggering, then check real faces still trigger.

Which board should you buy?

  • Buy the XIAO ESP32S3 Sense if you want the smallest camera that runs face detection or the no-code SenseCraft AI route.
  • Buy the ESP32-S3-N16R8 CAM if you want the cheapest bench board, you prefer dual USB-C with no adapter, or you want the extra flash headroom.
  • Keep the classic ESP32-CAM if you only need to stream video or send a picture to a cloud API for detection.
  • Buy neither yet if you need to identify strangers, read faces at long range, or run a security system. No small on-device model does those jobs well. Our Arducam camera guide covers the Pi side.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21. All three items are in stock and purchasable.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

Can the ESP32-S3 do face detection? Yes. The ESP32-S3 runs small on-device face detection models with no cloud. Detection runs on small frames, typically QVGA (320 by 240) or 240 by 240. Source: Espressif ESP-WHO docs and edge AI workshop.

What is the difference between face detection and face recognition on ESP32-S3? Detection finds faces and returns boxes. Recognition identifies whose face it is by comparing it against faces you enrolled earlier. Detection needs no enrollment; recognition needs one per person, stores face embeddings on the board, and is slower and more sensitive to lighting and angle. Source: Espressif ESP-WHO docs, EloquentEsp32cam docs.

Which ESP32 board is best for face detection? The XIAO ESP32S3 Sense is the best small board, and the ESP32-S3-N16R8 CAM is the best cheap bench board. Both are ESP32-S3 with 8 MB PSRAM and run the same on-device models. The classic ESP32-CAM is not recommended for new on-device face work. Source: Robojax tutorial, QRC live listings.

Can I do face detection on ESP32-S3 with Arduino? Yes, with Arduino IDE and ESP32 core version 2.0.17. Core 3 removed the on-device face detection models, so 2.0.17 is required. Select XIAO_ESP32S3, set PSRAM to OPI PSRAM, and capture at 240 by 240. Source: Robojax tutorial.

Can the ESP32-S3 do face recognition offline? Yes. Recognition runs on the board with no internet: the Robojax offline project enrolls faces from the board’s own web page over its own WiFi network. No face data leaves the board. Source: Robojax tutorial, Espressif ESP-WHO docs.

How far away can the ESP32-S3 detect a face? No primary source we checked publishes a detection range in feet or meters. Detection depends on how large the face is in the small inference frame, plus lighting and angle. Test at the real mounting distance.

Sources

Last updated: 2026-11-21

ESP32-CAM Camera Init Failed and Brownout Fixes

You upload the CameraWebServer sketch, open the Serial Monitor, and instead of a stream URL you get Camera init failed with error 0x105, or the board prints Brownout detector was triggered and reboots. Both errors are common on the classic ESP32-CAM, and both usually come down to the same two things: the board is not getting clean, steady power, or the camera sensor is not talking to the chip. Work through the checks below in order and most boards start streaming without new hardware.

This guide covers the classic AI-Thinker style ESP32-CAM with the OV2640 camera. The power and PSRAM steps also apply to the ESP32-S3-CAM, but that board has a different pin map, so verify pins against your own board variant.

What does “Camera init failed” mean?

It means the ESP32 ran esp_camera_init() and the sensor did not answer. The driver first talks to the sensor over a small two-wire control bus (SCCB, like I2C) and asks it to identify itself. If nothing answers, setup stops and the sketch prints the error code, and no stream URL appears.

The usual reasons are a loose ribbon cable, the wrong camera model or board, or a supply that sags during the camera startup spike.

What is an ESP32-CAM brownout?

A brownout is a brief dip in supply voltage below the level the ESP32 needs to run. The chip has a built-in brownout detector that watches the 3.3V rail. When the rail sags too far, even for a moment, the detector resets the chip, and the Serial Monitor prints Brownout detector was triggered, often with rst:0xf (BROWNOUT_RST).

The ESP32-CAM is more prone to brownouts than a bare ESP32 board because the camera and Wi-Fi draw sharp current spikes at the same time. MakerGuides reports the board can draw up to about 500 mA with the camera and Wi-Fi active, and Projectech puts Wi-Fi transmit bursts at 160 to 260 mA with the camera and flash LED adding more on top. A laptop USB port, a thin cable, or a weak adapter cannot always deliver those spikes fast enough. The fix is a better supply, not a code change.

Which error are you seeing?

Match your Serial Monitor output to a row first. Starting in the wrong place is the most common way to waste an evening on this board.

What you see Most likely cause Check first
Camera init failed with error 0x105 on every boot Sensor not found: loose cable, wrong model, wrong pin map Ribbon cable seating, then camera model in the sketch
Camera init failed with error 0x105 sometimes Power sags during camera startup 5V 2A supply, short thick cable, capacitor across 5V and GND
Camera init failed with error 0x20001 Sensor not detected by the driver Ribbon cable, camera model, then power
Camera init failed with error 0x20004 or 0x103 Frame buffer could not be allocated, or the control bus timed out PSRAM enabled, lower resolution, one frame buffer
frame buffer malloc failed then Camera init failed with error 0xffffffff PSRAM not enabled or resolution too high PSRAM enabled, lower resolution, frame buffer count to 1
Brownout detector was triggered or rst:0xf (BROWNOUT_RST), then reboot loop Supply sagging under Wi-Fi or camera spikes 5V 2A supply, capacitor, short thick leads
Camera starts, board reboots when streaming starts or the flash LED turns on Wi-Fi or flash LED spike collapses the rail Capacitor across 5V and GND, separate 5V supply, test with flash off
Works on a wall adapter, fails on a laptop USB port USB port current limit or thin cable voltage drop Wall adapter, powered hub, shorter cable
Detected camera not supported with error 0x106 Newer drivers report a missing sensor this way Same steps as 0x105; replace the camera module if it persists

What do the error codes mean?

The camera driver returns a numeric code from esp_camera_init(). These are the codes builders actually see.

Error code Meaning First fix
0x105 ESP_ERR_NOT_FOUND: the camera probe found no sensor on the control bus. The sensor did not answer: no power, cable not seated, or wrong pins. Reseat the ribbon cable with power off, confirm the camera model in the sketch, check the supply
0x20001 Camera not detected by the esp32-camera driver. Same practical meaning as 0x105: the sensor did not answer the probe. Same as 0x105: cable, camera model, power
0x106 Newer drivers report a missing or unrecognised sensor as Detected camera not supported. Same steps as 0x105; try a known-good camera module
0x20004 / 0x103 Reported by some guides as a PSRAM allocation failure or a control bus timeout. Secondary sources disagree on the exact mapping for these codes. Enable PSRAM, lower the resolution, check the cable
0xffffffff Frame buffer memory could not be allocated, usually after a frame buffer malloc failed line. Enable PSRAM, lower the resolution, set frame buffer count to 1
rst:0xf Brownout reset: the brownout detector tripped and reset the chip. This is a reset reason, not a camera error. Power supply checklist below

Two notes on the codes. First, 0x105 is confirmed as ESP_ERR_NOT_FOUND by the driver log line itself, Camera probe failed with error 0x105(ESP_ERR_NOT_FOUND), which appears in Arduino Forum threads and in two of the guides below. Second, one guide maps 0x105 to a power fault while others map it to a probe fault. The log line supports the probe reading, and a weak supply can cause a probe fault too. See the unverified flags at the foot of this post.

How do I diagnose it step by step?

Do these in order. Each step rules out a whole category. Do not skip ahead to replacing the camera module until steps 1 to 5 pass.

  1. Read the exact error. Open the Serial Monitor at the baud rate your sketch uses (usually 115200) and copy the full line, including the hex code. 0x105 or 0x20001 means cable, model, or power; a malloc failure means PSRAM; a brownout line means power only.
  2. Fix the power first. Connect a regulated 5V 2A supply to the 5V pin with a short, thick USB cable. Do not use a laptop USB port or an adapter 3.3V output while diagnosing. If the error changes on the wall adapter, the supply was the problem.
  3. Reseat the ribbon cable with power off. Lift the black locking flap, pull the 24-pin ribbon cable out, push it back in straight and fully, then close the flap. Check the cable is not creased or nicked, then power on and read the error again.
  4. Confirm the board and camera model in the sketch. In the Arduino IDE, select AI Thinker ESP32-CAM, and check the sketch defines CAMERA_MODEL_AI_THINKER for a classic ESP32-CAM with an OV2640. A generic ESP32 Dev Module board can disable the PSRAM mapping the camera needs.
  5. Enable PSRAM. Set Tools, PSRAM to Enabled. Then lower the resolution one step (UXGA to SVGA), set the frame buffer count to 1, and test again. If a malloc error clears, memory was the limit.
  6. Remove GPIO0 from ground. If you jumpered GPIO0 to GND to flash the board, remove that jumper before running the sketch. Held low, GPIO0 keeps the board in flash mode and the camera never initialises.
  7. Test with Wi-Fi and the flash LED off. If the board resets when streaming starts or the flash turns on, the current spike is collapsing the rail. Add the capacitor and retest.
  8. Swap one part at a time. Try a different USB cable, then a different camera module, then a different board, changing one thing per test.

Why does power cause most ESP32-CAM failures?

Three facts stack against this board. First, the classic ESP32-CAM has no onboard USB-to-serial chip, so most builders power it through an adapter whose 3.3V output typically supplies only 50 to 100 mA, far below what the camera and Wi-Fi draw together. Second, the onboard AMS1117-3.3 regulator needs a 5V input with headroom to hold the rail steady during spikes. Third, the camera and Wi-Fi spike at the same moment during startup and streaming, so the worst load lands exactly when the driver probes the sensor.

  • Power the board through the 5V pin, not the 3.3V pin. The 3.3V pin bypasses the onboard regulator, and a weak 3.3V source sags under load.
  • Use a regulated 5V 2A supply. A 1A supply is the minimum several guides quote, and 2A leaves headroom for the spikes. A phone charger rated 5V 2A works; a laptop USB port often does not.
  • Use a short, thick USB cable. Long thin cables add resistance, and resistance turns a current spike into a voltage drop.
  • Add a bulk capacitor across 5V and GND. A 470uF to 1000uF electrolytic capacitor near the board supplies the millisecond spikes the regulator cannot track. Add a 0.1uF ceramic capacitor in parallel for high-frequency noise. Watch the polarity: the marked side goes to ground.
  • Keep the serial adapter at 3.3V logic. The adapter is fine for the TX and RX signal lines, and its logic jumper should stay at 3.3V, since ESP32 GPIO pins are not 5V tolerant.
  • Do not share the rail with hungry peripherals. Motors, servos, and LED strips draw their own spikes, so give them a separate regulated supply with a common ground.

For a battery-powered build, the battery path must still deliver a steady 5V under spike load. A small lithium cell alone cannot do that without a boost stage, so use a battery module with a regulated 5V USB output and test under streaming load, not just at idle.

Power-supply checklist

Check Pass looks like Fail looks like
Supply rating Regulated 5V adapter rated 2A Laptop USB port, unbranded 5V 500 mA charger
Power pin 5V pin fed from the adapter 3.3V pin fed from an adapter
USB cable Short, thick, data rated Long thin charging cable
Capacitor 470uF to 1000uF electrolytic across 5V and GND, close to the board No capacitor, or one far from the board
Breadboard Power wired direct to the board pins Power through a breadboard with loose jumpers
Flash and stream test Board stays up with the flash LED on and the stream running Board resets when the flash turns on or the stream starts
Battery test Battery module with regulated 5V output Bare cell wired direct

Is the ribbon cable the problem?

The 24-pin ribbon cable between the camera module and the board is the most fragile part of the build, and a bad seating produces exactly the 0x105 probe failure. Power the board off first, then lift the black locking flap, slide the cable out, and look at it: the gold fingers should be clean and straight, the cable should not be creased, and the blue stiffener should sit flat. Push the cable in straight and all the way, then close the flap. If it went in crooked, the sensor gets power on the wrong pins or no connection at all.

Two more checks. Clean the gold fingers with isopropyl alcohol and a cotton swab if the module sat unused in a damp room; oxidation on the contacts is a real failure mode. If reseating changes nothing, try a different camera module on the same board. If a known-good module works, the first module or its cable is faulty.

Is PSRAM enabled and the right board selected?

The ESP32-CAM needs its external PSRAM to buffer image frames. The classic board carries 4MB of PSRAM. If the Arduino IDE is not told the PSRAM exists, the driver fails to allocate memory, and you see a malloc failure or an init error at higher resolutions.

Check three settings. First, the board must be AI Thinker ESP32-CAM, not a generic ESP32 Dev Module, because the board selection carries the pin definitions and PSRAM mapping. Second, Tools, PSRAM must be set to Enabled. Third, the partition scheme must leave enough app space. If the error clears at a lower resolution or with one frame buffer, memory was the limit.

Is the wrong camera model selected?

The sketch must define the camera model that matches the hardware. For the classic ESP32-CAM with an OV2640, that is CAMERA_MODEL_AI_THINKER. Other boards use different definitions and pin maps, so a sketch written for one board fails on another with the same 0x105 probe error. Check the definition at the top of the sketch before changing anything else.

The sensor matters too. An OV2640 and an OV5640 are not interchangeable: the OV5640 needs its own initialisation settings, and OV2640 settings fail the probe on an OV5640 module. The ESP32-S3-CAM in the parts list below carries an OV5640, so use the S3 board definition and the S3 guide for that hardware. Verify the pin table for your board variant before wiring, because published pin tables disagree on some signals.

What are the common mistakes?

  • Powering the board from the 3.3V pin of a USB-to-serial adapter instead of the 5V pin.
  • Using a laptop USB port or a long thin charging cable.
  • Leaving the GPIO0 to GND jumper in place after flashing.
  • Selecting a generic ESP32 Dev Module board instead of AI Thinker ESP32-CAM.
  • Leaving PSRAM disabled, then running UXGA resolution with two frame buffers.
  • Reseating the ribbon cable with power on, or pushing it in crooked.
  • Setting the USB-to-serial adapter to 5V logic and feeding 5V into the RX pin.
  • Changing the sketch, the cable, and the power supply all at once.

When is the board or camera module dead?

If the power checklist passes, the cable is reseated, the board and camera model are correct, PSRAM is enabled, and a known-good camera module still fails with 0x105 or 0x20001, the board itself is the suspect. Check the connector for a lifted flap or bent pins, and look for a damaged AMS1117 regulator if the board browns out on a known-good 5V 2A supply. Before replacing anything, run the same module on a second board: a module that fails on two boards is a bad module, and a board that fails with two modules is a bad board.

Parts used in this guide

These parts are in stock at Quality RC Parts in Queensbury, NY, shipping within the USA. Prices verified live on 2026-11-21.

Related guides on this site: ESP32-CAM Getting Started, ESP32-CAM Flashing and First Camera Stream, ESP32-CAM Pinout, ESP32 Brownout Reset and Boot Loop: Causes and Fixes, ESP32-CAM S3-CAM Camera Projects Guide, ESP32-S3-CAM Guide.

Frequently asked questions

How do I fix the ESP32-CAM “Camera init failed” error?

Check the error code first. For 0x105 or 0x20001, reseat the ribbon cable with power off, confirm CAMERA_MODEL_AI_THINKER for a classic board, enable PSRAM, and power the board from a regulated 5V 2A supply. For a malloc failure, enable PSRAM and lower the resolution. (Source: Bluegrays; Robotics Engineering.)

What does “Brownout detector was triggered” mean?

It means the supply voltage dipped below what the ESP32 needs and the built-in detector reset the chip. The usual cause is a weak supply, a thin or long USB cable, or current spikes from Wi-Fi and the camera. Fix it with a regulated 5V 2A adapter, a short thick cable, and a 470uF to 1000uF capacitor across 5V and GND. (Source: MakerGuides; ESPBoards.)

What does error 0x105 mean on the ESP32-CAM?

It is ESP_ERR_NOT_FOUND: the camera probe found no sensor on the control bus. The sensor did not answer, usually because the ribbon cable is loose, the wrong camera model is selected, or the power sagged at startup. (Source: Robotics Engineering; Bluegrays; Arduino Forum.)

Can I power the ESP32-CAM from the 3.3V pin?

You can, but you should not. The 3.3V output of a typical USB-to-serial adapter supplies only about 50 to 100 mA, and the board draws far more with the camera and Wi-Fi running. Power the board through the 5V pin and let the onboard regulator step it down. (Source: MakerGuides; ElectricalFlux.)

What size capacitor fixes an ESP32-CAM brownout?

A 470uF or larger electrolytic capacitor across 5V and GND, close to the board, is what MakerGuides and Projectech recommend; ESPBoards gives a 470uF to 1000uF range. Add a 0.1uF ceramic capacitor in parallel for high-frequency noise. The capacitor fixes spikes, not a supply that is too weak overall. (Source: MakerGuides; ESPBoards; Projectech.)

Sources


Last updated: 2026-11-21

ESP32-CAM RTSP Streaming: Setup Guide for VLC and NVR

The ESP32-CAM is a cheap way to build a WiFi camera, but the sketch most beginners start with does not speak RTSP. The stock Espressif CameraWebServer example streams MJPEG over HTTP, and that is all it does. If you want VLC, Frigate, Blue Iris, or an NVR to pick the camera up as a standard network camera, you need RTSP, which needs different firmware or a different library.

This guide covers the working routes, the board each one fits, the exact RTSP URL each serves, VLC viewing, Frigate and Home Assistant setup, and expected frame rate. Nothing here needs a paid app or a cloud account.

What is RTSP, and when does it beat MJPEG?

RTSP, Real Time Streaming Protocol, is the standard way network cameras hand video to players and recorders. A client asks for a stream, the two agree on transport settings, and video flows over RTP. VLC, ffmpeg, Frigate, Blue Iris, ZoneMinder, and most NVR software all speak RTSP.

MJPEG over HTTP, the /stream endpoint in the stock CameraWebServer sketch, is simpler: the camera sends one JPEG image after another in a single HTTP response, and any browser can show it. NVR software generally cannot record it, and detection tools cannot consume it directly.

Use RTSP to record footage, run motion or person detection, watch several cameras in one app, or feed the camera into Home Assistant through Frigate or go2rtc. Stick with MJPEG over HTTP for a quick live view in a browser. If you have not set up the board yet, start with our ESP32-CAM getting started guide first.

Which board works for RTSP?

Any ESP32 camera board with PSRAM can run an RTSP server. The classic AI-Thinker style ESP32-CAM has an ESP32 chip with 4 MB PSRAM and an OV2640 camera. The ESP32-S3-N16R8 CAM board runs an ESP32-S3 chip with 8 MB PSRAM and an OV5640 camera, and its two USB-C ports mean no serial adapter is needed. Both boards stream MJPEG video over RTSP, not H.264, which matters for bandwidth and Home Assistant (see the frame rate section).

Pin tables conflict across sources. A wrong camera pin map is the most common reason a build compiles cleanly and shows no video, so verify the pins against your exact board variant before flashing, using that variant’s own documentation.

What are the RTSP setup options?

There is no single official RTSP example from Espressif for the classic ESP32-CAM. The working routes are community firmware and libraries. Pick one row and follow its section.

Approach Best for Boards RTSP URL pattern Code or config needed
esp32cam-rtsp firmware by rzeldent Fastest setup, no code changes ESP32, ESP32-S2, ESP32-S3 camera modules rtsp://IP:554/mjpeg/1 Flash with PlatformIO, configure in a browser
Micro-RTSP library by geeksville Arduino or PlatformIO sketch you control Classic ESP32-CAM (OV2640) rtsp://IP:8554/mjpeg/1 Arduino sketch plus the Micro-RTSP library
Tasmota32 webcam firmware Users who already run Tasmota and want MQTT control Classic ESP32-CAM (AI-Thinker template) rtsp://IP:8554/mjpeg/1 Flash the webcam binary, run one command
ESPHome rtsp_server component ESP32-S3 boards already in ESPHome ESP32 camera boards running ESPHome rtsp://IP:554/ Add two lines to your ESPHome YAML

Sources: esp32cam-rtsp at https://www.esp32.diy/esp32cam-rtsp/ ; Micro-RTSP at https://github.com/geeksville/Micro-RTSP ; circuit.rocks tutorial at https://learn.circuit.rocks/esp32-cam-with-rtsp-video-streaming ; Tasmota guide at https://cgomesu.com/blog/Esp32cam-tasmota-webcam-server/ ; ESPHome docs at https://beta.esphome.io/components/rtsp_server/ .

How do I set up esp32cam-rtsp, the no-code route?

Recommended route for most buyers. The firmware turns the board into an RTSP server, an HTTP MJPEG streamer, and a snapshot endpoint at once, all configured through a web page, with no code changes. Latest release at the time of writing: 1.0.8 (2026-09-29).

  1. Install PlatformIO (VS Code extension or CLI) and clone the project: git clone https://github.com/rzeldent/esp32cam-rtsp.git.
  2. Enter download mode. USB-C boards do this on their own; if an upload fails, hold BOOT, press and release RESET, then release BOOT. On a classic ESP32-CAM, use a 3.3 V USB-to-serial adapter or an ESP32-CAM-MB carrier, and hold GPIO0 low while resetting. 5 V logic damages the board.
  3. Flash your board target, for example pio run -t upload -e esp32cam_ai_thinker for the AI-Thinker board.
  4. On first boot the firmware starts its own WiFi access point. Join it, open the config page shown in the serial monitor, enter your WiFi credentials and camera settings, then save. The board reboots onto your network.
  5. Open VLC and play rtsp://<ip address>:554/mjpeg/1.

The same firmware also serves MJPEG at http://<ip address>/stream and a still at http://<ip address>/snapshot. Turn on RTSP authentication in the web interface if anyone outside your household can reach your network, and never forward port 554 through your router.

How do I set up Micro-RTSP in an Arduino sketch?

Use this route when you want the RTSP server inside your own sketch, for example a camera that also reads sensors or drives outputs. Micro-RTSP is a small RTSP server library implementing RTSP and JPEG-over-RTP, with a reference streamer built for the OV2640 on the classic ESP32-CAM.

  1. Install Micro-RTSP from the ZIP in the circuit.rocks ESP32-RTSP repo, or as a PlatformIO dependency; it is not in the Arduino Library Manager. Full example: https://github.com/circuitrocks/ESP32-RTSP .
  2. Put your WiFi credentials in the sketch’s credentials header before compiling.
  3. Wire the classic ESP32-CAM: 5 V and ground to the header pins, adapter TX to board U0R and RX to U0T, and a button between IO0 and ground. Use a 5 V, 2 A supply; a computer USB port is often not enough.
  4. Hold the download button while powering up or resetting, then upload. The serial monitor at 115200 baud shows the boot message and board IP.
  5. In VLC play rtsp://<ip address>:8554/mjpeg/1. Note the port: 8554, not 554.

The example loop sends a frame about every 100 ms, roughly 10 fps at 800 by 600, per the Micro-RTSP docs for that example. Run only one streaming server at a time; enabling both web and RTSP makes streaming very slow.

How do I enable RTSP on Tasmota?

Use this route only if you already run Tasmota or want its MQTT control and web interface. Flash the tasmota32-webcam firmware, apply the AI-Thinker template, then enable the RTSP server from the Tasmota console:

WcRtsp 1

The stream is then live at rtsp://<device IP>:8554/mjpeg/1. Enable it once; the RTSP server runs independently of the HTTP stream. The Tasmota guide reports VLC is the most reliable viewer. Full steps: https://cgomesu.com/blog/Esp32cam-tasmota-webcam-server/ .

How do I add RTSP to an ESPHome camera?

If your camera already runs ESPHome, add the RTSP server component next to your configured esp32_camera block:

rtsp_server:

That is the whole configuration. The stream is served at rtsp://<device IP>:554/ with no path after the port. Optional settings: port (default 554), max_connections (1 to 4, default 2), and allowed_ips (addresses or networks allowed to connect).

Two facts catch people out. First, the stream is MJPEG over RTSP, and the camera only streams while at least one client is playing. Second, there is no encryption or authentication; allowed_ips filters by address but authenticates nobody, so use it only on a trusted local network. Source: ESPHome RTSP docs.

How do I watch the stream in VLC?

VLC is the best first test for any of the four routes, because its RTSP support is solid and its error messages point at the real problem.

  1. Open VLC, go to Media, then Open Network Stream, or press Ctrl+N.
  2. Paste the RTSP URL for your firmware: port 554 for esp32cam-rtsp and ESPHome, port 8554 for Micro-RTSP and Tasmota. The path is /mjpeg/1 for esp32cam-rtsp, Micro-RTSP, and Tasmota, and the root path / for ESPHome.
  3. Click Play. If the picture appears, the camera, firmware, and network path all work, and any later failure is in the next app, not the camera.

If the video lags by a second or more, the cause is usually VLC network caching, not the camera. VLC buffers network streams at 1000 ms by default. In the stream dialog, click Show more options and lower caching to 300 ms, or to 0 ms for the lowest delay. Zero caching makes the picture more sensitive to WiFi jitter, so on a weak signal keep some caching and fix the signal instead.

How do I add the camera to Home Assistant and Frigate?

Two warnings first, because most tutorials get this part wrong.

Warning one: Home Assistant Generic Camera cannot play this stream. Its pipeline plays only H.264 and HEVC, and every RTSP route in this guide serves MJPEG. The ESPHome docs state this directly. Source: ESPHome RTSP docs.

Warning two: if the camera runs ESPHome, Home Assistant does not need RTSP at all. The ESPHome native API already exposes the camera entity. RTSP is for other software.

The route that works is Frigate, with go2rtc if your Frigate version uses it. Frigate reads the MJPEG RTSP stream with ffmpeg and handles detection and recording. A working Frigate camera entry from the Home Assistant community, using the Tasmota or Micro-RTSP URL:

cameras:
  esp32_cam:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.72:8554/mjpeg/1
          roles:
            - detect
            - record
    detect:
      width: 640
      height: 360
      fps: 5

Replace the IP address with your camera IP, and use port 554 with the matching path for esp32cam-rtsp or ESPHome. Keep detection resolution low; community users run 640 by 360 at 5 frames per second. Source: Home Assistant community Frigate thread.

If you only want a live dashboard view, skip RTSP and use the ESPHome native camera entity or the HTTP MJPEG stream. RTSP earns its place when Frigate or an NVR must record or analyze the feed.

What latency and frame rate should I expect?

No source gives one tested frame rate for every board and firmware, so this guide gives no universal number. The numbers below are what named sources measured on their own setups. Your result moves with resolution, JPEG quality, WiFi signal, and client count.

  • ESPHome measured about 5 fps over WiFi and 10 over Ethernet at 640 by 480 on an ESP32-S3 with an OV5640, using its high performance network settings; without them the same test ran at about 1 fps over WiFi. Source: ESPHome RTSP docs.
  • The Micro-RTSP example sends a frame about every 100 ms, roughly 10 fps at 800 by 600 in its own documentation. Source: Micro-RTSP docs.
  • The esp32cam-rtsp project states that resolution and frame rate are bounded by the ESP32 processor and available PSRAM. Source: esp32cam-rtsp project page.

Start at 640 by 480 and raise resolution only after the stream is stable. MJPEG uses more bandwidth than H.264 at the same picture quality, since every frame is a full JPEG. Assume one viewer at a time on a classic ESP32-CAM; ESPHome defaults to two RTSP clients.

What are the common mistakes?

  • Flashing the stock CameraWebServer sketch and expecting RTSP. It serves MJPEG over HTTP only.
  • Using the wrong port. Port 554 belongs to esp32cam-rtsp and ESPHome; port 8554 belongs to Micro-RTSP and Tasmota. The wrong port gives a connection refused error even when the camera runs fine.
  • Using the wrong path. The path is /mjpeg/1 for esp32cam-rtsp, Micro-RTSP, and Tasmota, and the root path / for ESPHome.
  • Powering the classic ESP32-CAM from a weak USB port. The board needs a stable 5 V, 2 A supply. Brownouts during WiFi connection look like firmware bugs and are usually power.
  • Running two streaming servers at once in the Micro-RTSP sketch. The tutorial warns this makes streaming very slow. Pick one.
  • Pointing Home Assistant Generic Camera at an MJPEG RTSP URL. It cannot play it. Use Frigate or go2rtc, or the ESPHome native camera entity.
  • Opening RTSP to the internet. None of these routes is built for that, and ESPHome RTSP has no authentication at all. Keep the camera on your local network.
  • Trusting a pin table from a different board variant. Pin maps conflict across sources. Verify the camera pins against your exact board variant before blaming the firmware.

How do I troubleshoot a stream that will not play?

Work through this list in order; each step rules out one layer.

VLC says “Your input can’t be opened” or times out. Check the board IP in the serial monitor or your router, confirm the camera and computer share a network, and confirm the port and path match your firmware in the table above. Check the router is not isolating WiFi clients (AP isolation) and that no firewall blocks the RTSP port.

VLC connects but shows a black or frozen frame. Drop to 640 by 480 and move closer to the router. The ESP32-CAM is 2.4 GHz only, so a 5 GHz network name will never work.

The stream stutters or drops frames. Lower the resolution and frame rate, disconnect other viewers, and check the power supply, since a marginal 5 V supply causes this under load. In VLC, force RTP over RTSP (TCP) when UDP packets drop.

The camera boots but never joins WiFi. Re-enter the network name and password, watching case and trailing spaces. Check the serial monitor at 115200 baud for connection messages and the assigned IP. A reboot loop usually means power first, then a loose camera ribbon cable.

The camera works in VLC but Frigate reports “Unable to read frames”. Confirm the URL in VLC first, then copy it exactly into Frigate. The common cause is port 554 when the firmware serves on 8554, or an ESPHome web server port, which is HTTP, not RTSP. Source: Home Assistant community thread.

Wrong colors or artifacts. Reseat the camera ribbon cable and lower the resolution.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21 through the public Store API. All three items are in stock and purchasable; the live product page is the current price.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

Does the ESP32-CAM support RTSP out of the box? No. The stock CameraWebServer example serves MJPEG over HTTP only, with no RTSP server. Add RTSP with esp32cam-rtsp firmware, the Micro-RTSP library, Tasmota webcam firmware, or the ESPHome rtsp_server component. Source: Home Assistant community, Tasmota guide.

What is the RTSP URL for an ESP32-CAM? It depends on the firmware: rtsp://IP:554/mjpeg/1 for esp32cam-rtsp, rtsp://IP:8554/mjpeg/1 for Micro-RTSP and Tasmota, rtsp://IP:554/ for ESPHome. Replace IP with the camera IP from your router or serial monitor. Source: esp32cam-rtsp, Micro-RTSP, Tasmota, and ESPHome docs.

Can I add an ESP32-CAM RTSP stream to Home Assistant? Not through Generic Camera: its pipeline plays only H.264 and HEVC, and ESP32-CAM RTSP serves MJPEG. Feed the stream to Frigate or go2rtc instead, or use the ESPHome native camera entity. Source: ESPHome RTSP docs.

Why does VLC say it cannot open my ESP32-CAM stream? The usual causes are a wrong IP address, the wrong port (554 vs 8554), the wrong path (/mjpeg/1 vs the ESPHome root path), AP isolation, or a firewall blocking the RTSP port. Check the stream in VLC first, then copy that working URL into any other app. Source: Micro-RTSP and circuit.rocks docs.

What frame rate will I get from an ESP32-CAM over RTSP? There is no single tested number. ESPHome measured about 5 fps over WiFi and 10 over Ethernet at 640 by 480 on an ESP32-S3 with an OV5640, and the Micro-RTSP example runs about 10 fps at 800 by 600. Start at 640 by 480. Source: ESPHome and Micro-RTSP docs.

Is RTSP better than MJPEG for an ESP32-CAM? RTSP is better when a recorder, NVR, or detection tool needs the feed, because those tools speak RTSP and generally cannot consume an MJPEG HTTP stream. MJPEG over HTTP is better for a quick live view in a browser. Both carry the same MJPEG video, so RTSP does not improve the picture, it makes the feed usable by more software. Source: ESPHome docs, esp32cam-rtsp page.

Can I view an RTSP stream in a web browser? No, not directly. Browsers do not play RTSP. Use VLC or an NVR app for RTSP, the HTTP MJPEG stream at http://IP/stream for a browser view, or Frigate or go2rtc between the camera and the browser. Source: circuit.rocks docs, esp32cam-rtsp page.

Sources

Last updated: 2026-11-21

ESP32-S2 vs ESP32-S3: USB, Bluetooth, and Camera Compared

ESP32-S2 Mini board beside an ESP32-S3 DevKitC board

ESP32-S2 vs ESP32-S3: USB, Bluetooth, and Camera Compared

Pick the ESP32-S3 for most new projects. It adds a second core, Bluetooth LE, more SRAM, PSRAM support and vector instructions to the same Wi-Fi and native USB base as the S2. Pick the ESP32-S2 only when you need Wi-Fi plus native USB without Bluetooth, or when you need its built in DACs.

ESP32-S2 vs ESP32-S3 at a glance

The table below uses the Espressif ESP32-S2 Series Datasheet v1.9 and the Espressif ESP32-S3 Series Datasheet v2.2 (2026-03-05).

Spec (unit) ESP32-S2 ESP32-S3
CPU Single Xtensa LX7 Dual Xtensa LX7
Max clock (MHz) 240 240
SRAM (KB) 320 512
GPIO pins (count) 43 45
Wi-Fi Wi-Fi 4, 2.4 GHz Wi-Fi 4, 2.4 GHz
Bluetooth None BLE 5
USB USB OTG full speed USB OTG full speed plus USB Serial/JTAG
PSRAM Up to 2 MB external Up to 16 MB in package
ADC channels (count, bits) 20, 12-bit 20, 12-bit
DAC channels (count) 2, 8-bit 0
Vector instructions No Yes, 128-bit SIMD
Camera interface Yes, DVP 8 to 16 bit (via I2S, up to 40 MHz) Yes, DVP 8 to 16 bit
Touch pins (count) 14 14

How do the CPUs compare?

Both chips use the Xtensa LX7 architecture at up to 240 MHz. The difference is core count: the S2 has one LX7 core and the S3 has two. A single core at 240 MHz handles a Wi-Fi connection plus a sensor task without strain. Two cores handle that same load plus a display, a camera or an audio pipeline at the same time.

The S3 also has 512 KB of SRAM against 320 KB on the S2. That 192 KB gap matters when a project holds a display buffer or a network buffer plus application state. The S3 adds 128-bit vector instructions that speed neural network and signal processing work. The S2 has no vector unit, so on-device AI runs slower or not at all.

For a simple Wi-Fi sensor that wakes, reads and posts, the second core is invisible. For a project that streams, displays and networks at once, the second core is the difference between smooth operation and dropped frames.

What is the Bluetooth difference?

The ESP32-S2 has no Bluetooth radio at all. It cannot do Bluetooth LE, Bluetooth Classic, beacons or phone pairing, and no software adds a radio that is not on the chip. The ESP32-S3 has Bluetooth LE 5, with 1 Mbps, 2 Mbps and coded PHY data rates plus extended advertising. It does not have Bluetooth Classic, so classic audio streaming and classic serial port profile links are still out.

This is the most common reason a builder regrets an S2 pick. A Wi-Fi sensor that later gains a phone app for setup needs Bluetooth LE for provisioning, and the S2 cannot provide it. If there is any chance your project will need Bluetooth, buy the S3. The price gap between S2 and S3 boards is small, and a board swap late in a project costs far more.

How does USB compare?

Native USB is the shared strength of both chips. The S2 and the S3 each have a full speed USB OTG peripheral with an integrated transceiver. Either chip can act as a USB device, such as a keyboard, a MIDI device or a serial port, or as a USB host that reads a flash drive or a keyboard. That is a step up from the original ESP32, which needs an external USB to serial chip for every USB connection.

The S3 adds a USB Serial/JTAG controller, which gives flashing and debugging over the same USB cable without a separate debug probe. The S2 has USB OTG but no dedicated Serial/JTAG controller, so its debug path is less direct. For a USB gadget project, both chips work. For a USB gadget that also needs debugging over USB, the S3 is the smoother board.

Which chip handles cameras and displays?

Both chips have a DVP camera interface at 8 to 16 bit, implemented with the I2S hardware, so the S2 can run a camera. The S3 is still the camera pick in this pair. It has an LCD interface, PSRAM support up to 16 MB in package, dual cores and the vector instructions that make image work practical. A camera frame needs a buffer that the S2 struggles to hold: the S2 has 320 KB of SRAM and only up to 2 MB of external PSRAM, and it lacks the LCD interface and the vector unit that the S3 uses for image work.

Displays follow the same split. A small SPI display works on either chip. A large parallel RGB display with a frame buffer needs the S3 PSRAM and LCD interface. If your project has a large display, the S3 is the only pick in this pair. If it has a small SPI OLED or TFT, either chip works, and the S2 is the cheaper board.

What does the S2 still do better?

The S2 has two built in 8-bit DAC channels, which the S3 lacks. A project that needs a true analog voltage output, such as a simple waveform generator or a control voltage, can use the S2 DAC directly, while the S3 needs an external DAC chip or a filtered PWM signal. The S2 DACs are DAC_1 on GPIO 17 and DAC_2 on GPIO 18 in the S2 datasheet. That DAC difference is the one S2 advantage that decides a real project.

The S2 also suits a Wi-Fi only USB device with no Bluetooth requirement, such as a USB sensor dongle or a Wi-Fi to USB bridge. Its single core and lower SRAM are ample there, and its 43 GPIO pins are only two fewer than the S3. An existing S2 design that works should stay on the S2; a redesign to the S3 buys nothing if the project uses neither Bluetooth nor a camera.

Which board should you pick?

Project type Pick this chip Why
Camera or AI vision ESP32-S3 Both have DVP, S3 adds PSRAM, LCD interface and vector instructions
Bluetooth LE sensor or beacon ESP32-S3 S2 has no Bluetooth radio
Colour display or HMI ESP32-S3 PSRAM and LCD interface
USB keyboard, MIDI or HID Either, S3 preferred Both have USB OTG; S3 adds Serial/JTAG debug
Wi-Fi only sensor, no Bluetooth ESP32-S2 Single core is ample, lower cost, 43 GPIO pins
Analog voltage output ESP32-S2 Built in DACs, two 8-bit channels
Existing S2 design in production ESP32-S2 No redesign cost when Bluetooth and camera are not needed

How do you migrate a project from S2 to S3?

Migrating a project from the ESP32-S2 to the ESP32-S3 is mostly a board selection change, because both chips run the same Arduino core and the same ESP-IDF. Start by listing the pins your S2 project uses and mapping each one to the S3 board, because the pin numbers differ between the S2 Mini and the S3 DevKitC-1. Check the strapping pins on the new board before you wire anything, and move any sensor off a pin that is a strapping pin on the S3.

Next, check the libraries. Code that uses Wi-Fi, I2C, SPI, UART and USB OTG ports across both chips with no change, because the APIs are the same. Code that uses the S2 DAC needs a rework, because the S3 has no DAC: replace the DAC output with a filtered PWM signal or an external DAC chip. Code that uses Bluetooth needs a fresh start on the radio side, because the S2 had no Bluetooth stack to port from, so add the BLE setup from an S3 example and test it on the bench.

Then check memory and partitions. The S3 has 512 KB of SRAM against 320 KB on the S2, and its DevKitC-1 boards offer 8 MB or 16 MB of PSRAM, so a project that was tight on the S2 has room to breathe. Raise the display buffer or the network buffer only after the basic port works, and test the migrated project on the bench before you deploy it. Wi-Fi signal strength, boot behaviour and deep sleep wake timing all differ between the chips, and a project that worked on the S2 can behave differently on the S3 if a pin that was safe on one board is a strapping pin on the other.

For the S2 pins in this comparison, see the ESP32-S2 Mini pinout guide.

FAQ

Does the ESP32-S2 have Bluetooth?

No. The ESP32-S2 has no Bluetooth radio. If your project needs Bluetooth LE, choose the ESP32-S3.

Is the ESP32-S3 better than the S2 for Wi-Fi?

Wi-Fi itself is the same on both chips: 2.4 GHz Wi-Fi 4. The S3 is better at everything around the Wi-Fi, because it has a second core, more SRAM and Bluetooth LE.

Can the ESP32-S2 run a camera?

Yes. The S2 has a DVP 8 to 16 bit camera interface, implemented with the I2S hardware, with a clock up to 40 MHz. It holds smaller frames than the S3, because it has only 320 KB of SRAM and up to 2 MB of external PSRAM, and it has no LCD interface or vector unit. Camera projects that need large frames belong on the S3.

Do both chips have native USB?

Yes. Both have full speed USB OTG, so either can act as a USB device or host. The S3 adds a USB Serial/JTAG controller for flashing and debugging.

Should I upgrade an S2 project to the S3?

Upgrade when the project gains Bluetooth, a camera, a large display or AI work. Keep the S2 when the project is a working Wi-Fi only USB device with no new radio or display requirement.

Parts used

ESP32-S2 Mini Development Board: the S2 board for Wi-Fi only USB projects. ESP32-S3 Development Board DevKitC-1 N8R2 N16R8: the S3 board for camera, display, Bluetooth and AI projects.

Sources

Last updated: 2026-11-21. Search volume: not verified. Product links use the store short link form with the product ID; confirm the product slug at publish time.

Seeed XIAO ESP32S3 Pinout: GPIO, Camera, and Power

XIAO ESP32S3 board with USB-C port and pin pads. Caption: XIAO ESP32S3 board with USB-C port. Description: Top view of the XIAO ESP32S3 board used in this pinout guide.

XIAO ESP32S3 Pinout: GPIO, Camera, and Power Pins

Answer in brief: The XIAO ESP32S3 gives you 11 GPIO pins, named D0 through D10. It also gives you native USB, I2C, SPI, UART, and ADC on those same pins. The Sense version adds a camera and a microSD card on a rear connector. This guide maps each pin and its shared uses.

Quick Facts

Item Detail Source
Board XIAO ESP32S3 Seeed Studio XIAO ESP32S3 wiki
GPIO pins 11 pins, D0 to D10 Seeed Studio XIAO ESP32S3 wiki
Logic voltage 3.3 volts Seeed Studio XIAO ESP32S3 wiki
USB port USB-C, native USB Seeed Studio XIAO ESP32S3 wiki
Native USB pins GPIO19 D- and GPIO20 D+ Seeed Studio XIAO ESP32S3 wiki
Boot pin GPIO0 Seeed Studio XIAO ESP32S3 wiki
I2C pins D4 SDA and D5 SCL Seeed Studio XIAO ESP32S3 wiki
SPI pins D8 SCK, D9 MISO, D10 MOSI Seeed Studio XIAO ESP32S3 wiki
UART pins D6 TX and D7 RX Seeed Studio XIAO ESP32S3 wiki
Sense SD chip select GPIO21 Seeed Studio XIAO ESP32S3 wiki

XIAO ESP32S3 Pinout Table

This table is an original pinout table built from the Seeed wiki pin multiplexing page. It is not a copied image. The D names are the printed pad names on the board. The GPIO numbers are the chip pin numbers in code.

Pad GPIO Main function Shared functions
D0 GPIO1 ADC input Touch input
D1 GPIO2 ADC input Touch input
D2 GPIO3 ADC input Touch input, strapping pin
D3 GPIO4 ADC input Touch input
D4 GPIO5 I2C SDA ADC input, touch input
D5 GPIO6 I2C SCL ADC input, touch input
D6 GPIO43 UART TX UART transmit only
D7 GPIO44 UART RX UART receive only
D8 GPIO7 SPI SCK ADC input, touch input
D9 GPIO8 SPI MISO ADC input, touch input
D10 GPIO9 SPI MOSI ADC input, touch input
BOOT GPIO0 Boot button Hold low at reset for download mode
5V Power 5 volt input USB 5 volt rail when USB is connected
3V3 Power 3.3 volt output Power for low-current 3.3 volt parts
GND Power Ground Common ground for all wiring

Power Pins

Power the board through the USB-C port or the 5V pad. The USB-C port supplies 5 volts from the host. The 5V pad accepts 5 volts from an external supply. Use one 5 volt source at a time. Do not feed 5 volts into the 3V3 pad.

The 3V3 pad is a 3.3 volt output from the SGM6029 buck converter on the board. The schematic v1.3 marks that converter Imax 600 mA, so keep external 3.3 volt loads under 600 mA in total. The Seeed wiki says 700 mA can be drawn from the 3V3 pad, which is above the schematic Imax, so the 600 mA schematic figure is the safe limit to plan on. The 5V pad is the USB VBUS rail. No separate 5V input current limit is published in schematic v1.3, so the USB source and cable set that limit in practice.

Strapping and Boot Pins

GPIO0 is the BOOT pin. The board has a BOOT button tied to GPIO0. Hold BOOT low at reset to enter download mode. The Arduino IDE and esptool handle this step in most cases. Press BOOT only when an upload fails to start.

GPIO3 on pad D2 is also a strapping pin. Keep D2 free of strong pull-downs at boot. A wrong level at boot can change the boot mode. Check the Seeed wiki strapping notes before you wire a sensor to D2.

ADC and Touch Pins

ADC input is available on D0, D1, D2, D3, D4, D5, D8, D9, and D10. That is 9 ADC pins in total. Each ADC pin reads a voltage from 0 volts to 3.3 volts. Use a voltage divider for any higher voltage. Never feed 5 volts into an ADC pin.

D11 is GPIO42 and D12 is GPIO41 on Sense and Plus variants. Those two pins serve the PDM microphone on the Sense board. Note that D11 and D12 do not support ADC on the S3 chip. Do not plan an analog read on those two pins. Use them only for their Sense roles unless the wiki for your variant says otherwise.

PWM Pins

PWM output works on the GPIO pins through the LEDC peripheral. Use PWM for a dim LED, a small buzzer, or a servo signal. The servo signal is a control signal only. It does not power the servo. Power the servo from a separate supply.

Every D pad can carry a PWM signal in code. The limit is the pin count, not the PWM peripheral. Pick a free D pad for each PWM output. Keep I2C and SPI pins free when those buses are in use. A PWM output on D4 would clash with I2C SDA.

I2C Pins

I2C uses D4 for SDA and D5 for SCL. The chip GPIO numbers are GPIO5 and GPIO6. Those two pins are the default I2C pair in most XIAO examples. Use them for an OLED display, a sensor, or a real-time clock.

Both I2C pins also support ADC and touch. That sharing means a choice. A pin on the I2C bus cannot read an analog voltage at the same time. Plan the pin budget before you add a second sensor.

SPI Pins

SPI uses D8 for SCK, D9 for MISO, and D10 for MOSI. The chip GPIO numbers are GPIO7, GPIO8, and GPIO9. Pick any free GPIO pin for the SPI chip select. D0 is a common chip select choice when it is free.

All three SPI pins also support ADC and touch. That sharing is the same trade as I2C. A SPI device claims all three pins. Plan for that claim before you add an analog sensor to D8, D9, or D10.

UART Pins

UART uses D6 for TX and D7 for RX. The chip GPIO numbers are GPIO43 and GPIO44. Those two pins carry the hardware serial port on the board pads. Use them for a GPS module, a serial sensor, or a second microcontroller.

The USB-C port carries a separate native USB serial link. That link is the programming and debug console. It does not use D6 or D7. You can use D6 and D7 for a device while the USB console stays open. That split is handy for GPS logging.

USB Pins

Native USB uses GPIO19 for D- and GPIO20 for D+. Those pins are internal. They do not appear on the D pads. The USB-C connector ties to them on the board. You cannot reassign them to other uses.

Native USB supports serial, HID, and mass storage modes in code. The Arduino core exposes USB serial by default. Use the USB link for uploads and debug output. Use D6 and D7 when you need a separate hardware UART.

Sense Camera and SD Card

The Sense version adds an OV2640 camera and a microSD card slot. Both sit on a rear board-to-board connector. The standard XIAO ESP32S3 has no camera and no SD slot. Check which version you hold before you follow the Sense wiring.

Sense feature Detail Source
Camera OV2640 on rear connector Seeed Studio XIAO ESP32S3 wiki
SD card chip select GPIO21 Seeed Studio XIAO ESP32S3 wiki
PDM microphone pins GPIO42 and GPIO41 Seeed Studio XIAO ESP32S3 wiki
Standard board camera None fitted Seeed Studio XIAO ESP32S3 wiki

The Sense camera uses the rear connector, not the D pads. That design keeps D0 through D10 free for your own wiring, except for the SD card sharing below. The SD card chip select is GPIO21. The SD card shares the SPI lines D8, D9, and D10, which are GPIO7, GPIO8, and GPIO9, with chip select on GPIO21. Do not put a second SPI device on D8, D9, and D10 while the SD card is mounted unless it has its own chip select pin. GPIO21 is also the user LED, so the LED flickers with card access.

For the Sense board guide, see the live post Seeed XIAO ESP32S3 Guide: Standard Board vs Sense Board (live post #18362). That guide compares the standard board and the Sense board in full.

Pins to Avoid

Avoid GPIO19 and GPIO20 for general wiring. They are the native USB pins. Avoid GPIO0 as a permanent output. It is the BOOT pin. Avoid D2 as a boot-time output. It is a strapping pin.

Avoid D11 and D12 for ADC reads. Those pins do not support ADC on the S3 chip. Avoid 5 volt logic on any D pad. This board uses 3.3 volt logic. A 5 volt signal needs a level shifter.

Avoid using D4 and D5 for other roles when I2C is active. Avoid D8, D9, and D10 for other roles when SPI is active. A shared pin causes a clash that is hard to trace in code.

Max Current and Logic Voltage

Logic voltage is 3.3 volts on every D pad. That value comes from the Seeed Studio XIAO ESP32S3 wiki. Treat 3.3 volts as the high level. Treat 0 volts as the low level. Keep sensor outputs at 3.3 volts or below.

At the strongest drive setting, a GPIO pin sources about 40 mA (IOH) and sinks about 28 mA (IOL), per the Espressif ESP32-S3 Series Datasheet v2.2, Table 5-4. Those are drive-strength values at 3.3 volts, not a recommended continuous load. Cumulative IO output current for the chip is 1500 mA at absolute maximum, per section 5.1 of the same datasheet. Treat a small LED through a resistor as the practical per-pin load, not 40 mA.

Use a driver for any load above a small LED. Keep LED current low with a series resistor. A 220 ohm resistor is a common bench value for a 3.3 volt LED test. Check the LED datasheet for its own forward voltage before you pick a resistor.

Wiring and Power Warnings

Power the board at 5 volts through USB-C or the 5V pad. Do not feed 5 volts into the 3V3 pad. Double-check the pad labels before you connect power. The pads are small and close together.

Keep wires short. Use a cable under 3 feet for bench tests when you can. Long wires pick up noise. Noise causes I2C errors and ADC jitter. Twist power and ground wires together when the run is long.

Solder the header pins with care. A solder bridge between two small pads shorts the board. Check each joint with a magnifier. Test for shorts with a meter before first power-up. A short on the 5 volt rail can damage the USB host.

Pin Test Sketch

Language: Arduino. Library: Arduino ESP32 core version 2.0.14. No extra library install is needed for this test. Code status: code not compiled. No arduino-cli or PlatformIO is installed in this environment.

// XIAO ESP32S3 pin test sketch
// Board: XIAO ESP32S3
// Arduino ESP32 core version 2.0.14
// Code status: code not compiled

// D pad to GPIO map from the Seeed wiki.
const int pinD0 = 1;  // ADC and touch.
const int pinD1 = 2;  // ADC and touch.
const int pinD4 = 5;  // I2C SDA, ADC, touch.
const int pinD5 = 6;  // I2C SCL, ADC, touch.
const int pinD6 = 43; // UART TX.
const int pinD7 = 44; // UART RX.
const int pinD8 = 7;  // SPI SCK, ADC, touch.

void setup() {
  // Start USB serial at 115200 baud for debug output.
  Serial.begin(115200);
  delay(1000); // Wait 1 second for the monitor to open.

  // Set D0 as an output for the blink test.
  pinMode(pinD0, OUTPUT);

  // Set the ADC pins as inputs.
  pinMode(pinD1, INPUT);
  pinMode(pinD4, INPUT);
  pinMode(pinD5, INPUT);

  Serial.println("XIAO ESP32S3 pin test started");
}

void loop() {
  // Read the ADC value on D1.
  // ADC range is 0 to 4095 counts on the ESP32-S3.
  int adcValue = analogRead(pinD1);
  Serial.print("D1 ADC value: ");
  Serial.println(adcValue);

  // Blink D0 for 500 milliseconds on and 500 milliseconds off.
  digitalWrite(pinD0, HIGH);
  delay(500); // Wait 500 milliseconds.
  digitalWrite(pinD0, LOW);
  delay(500); // Wait 500 milliseconds.
}

Expected result: the serial monitor shows a D1 ADC value each 1 second. The value changes when you touch a wire on D1 or feed it a voltage below 3.3 volts. The D0 output blinks at a 1 second period. If no serial output appears, check the USB cable and the board selection in the IDE.

Frequently Asked Questions

How many GPIO pins does the XIAO ESP32S3 have?

It has 11 GPIO pins on the pads, named D0 through D10. The GPIO numbers run from GPIO1 to GPIO9, plus GPIO43 and GPIO44. Native USB uses GPIO19 and GPIO20 internally.

Which pins are I2C on the XIAO ESP32S3?

D4 is SDA and D5 is SCL. The chip numbers are GPIO5 and GPIO6. Both pins also support ADC and touch. They cannot serve two roles at once.

Does the standard XIAO ESP32S3 have a camera?

No, the standard board has no camera. The Sense version adds an OV2640 camera and a microSD slot on a rear connector. The SD chip select is GPIO21 on the Sense board.

Can I use 5 volt sensors with this board?

No, not directly. The board uses 3.3 volt logic. A 5 volt sensor output needs a level shifter. A direct 5 volt input can damage the pin.

Boards That Match This Pinout

These boards use the pinout in this guide. Check the product page for current stock before you order. Stock changes over time.

Related reading: compare this board with the wider ESP32 family in the staged pillar ESP32 vs ESP32-S3 vs ESP32-C3 vs ESP32-C6 (row 22, staged). For sibling pinouts, see ESP32-CAM Pinout and ESP32 38-Pin Boards Compared: Narrow, DevKitC, and 32E.

Sources

  • Seeed Studio XIAO ESP32S3 pin multiplexing, https://wiki.seeedstudio.com/xiao_esp32s3_pin_multiplexing/
  • Seeed Studio XIAO ESP32S3 wiki, https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/
  • Seeed Studio XIAO ESP32S3 schematic version 1.3, https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/
  • Espressif ESP32-S3 Datasheet v2.2, https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf

Last updated 2026-11-21.

ESP32-CAM Pinout: Camera, SD Card, and Free GPIO Pins

ESP32-CAM board with OV2640 camera module and pin headers. Caption: ESP32-CAM board with OV2640 camera module. Description: Front view of the ESP32-CAM board used in this pinout guide.

ESP32-CAM Pinout: Camera, SD Card, and Free GPIO Pins

Answer in brief: The ESP32-CAM uses most of its GPIO pins for the camera and the microSD card. Only a small set of pins stays free for sensors and outputs. This guide maps the camera pins, the SD card pins, and the free pins. It also covers power, boot mode, and safe wiring.

Quick Facts

Item Detail Source
Board AI-Thinker ESP32-CAM Espressif ESP32 Series Datasheet
Logic voltage 3.3 volts Espressif ESP32 Series Datasheet
USB port None on board ESP32-CAM camera driver pin map
Programming pins GPIO1 TX and GPIO3 RX ESP32-CAM camera driver pin map
Flash mode pin GPIO0 held low at reset ESP32-CAM camera driver pin map
Camera pins used 15 pins ESP32-CAM camera driver pin map
SD card pins in 4-bit mode 6 pins ESP32-CAM camera driver pin map
SD card pins in 1-bit mode 3 pins ESP32-CAM camera driver pin map
Free pins with no SD card 6 pins ESP32-CAM camera driver pin map

ESP32-CAM Pinout Table

This table is an original pinout table built from the source data listed below. It is not a copied image. Check the board print against this table before you wire anything. Some boards print VCC on one header and 5V on the other header.

Header pin label GPIO Function Notes
5V Power 5 volt input Use a stable 5 volt supply
GND Power Ground Common ground for all wiring
GPIO12 GPIO12 SD DATA2, ADC, touch Free only when SD card is not used
GPIO13 GPIO13 SD DATA3, ADC, touch Free only when SD card is not used
GPIO15 GPIO15 SD CMD, ADC, touch, strapping Free only when SD card is not used
GPIO14 GPIO14 SD CLK, ADC, touch Free only when SD card is not used
GPIO2 GPIO2 SD DATA0, ADC, touch, strapping Free only when SD card is not used
GPIO4 GPIO4 SD DATA1, ADC, touch Free only when SD card is not used
3V3 Power 3.3 volt output Do not use as a 5 volt input
GPIO16 GPIO16 PSRAM chip select Do not use for other wiring
GPIO0 GPIO0 Camera XCLK, strapping, boot Hold low at reset for flash mode
GND Power Ground Common ground for all wiring
VCC Power 5 volt input Same 5 volt rail as the 5V pin
U0R GPIO3 UART receive Connect to adapter TX for programming
U0T GPIO1 UART transmit Connect to adapter RX for programming
GND Power Ground Common ground for all wiring

Power Pins

The board takes 5 volts through the 5V pin or the VCC pin. Both pins sit on the same 5 volt rail on this board. Use one 5 volt input at a time. Do not feed 5 volts into the 3V3 pin. That mistake can damage the board.

Strapping and Boot Pins

GPIO0 controls flash mode. Hold GPIO0 low at reset to enter flash mode. Release it after programming starts. Normal run mode needs GPIO0 high or floating at reset. A jumper wire to ground works for this step. Remove the jumper after the upload.

GPIO0 also carries the camera clock, XCLK. That dual role is normal on this board. Do not add a permanent pull-down to GPIO0. A permanent pull-down would force flash mode at every reset. Use a temporary jumper only during programming.

GPIO2 and GPIO15 are also strapping pins. They share SD card duties on this board. Keep them free of strong pull-downs at boot when the SD card is in use. Check the Espressif ESP32 Series Datasheet for the full strapping table before you add boot-time wiring.

Camera Pins

The camera uses 15 pins on this board. Those pins are fixed. Do not reassign them to other parts. The list below is the camera driver pin map for the AI-Thinker board.

Camera signal GPIO Notes
Data D0 GPIO5 Camera data line
Data D1 GPIO18 Camera data line
Data D2 GPIO19 Camera data line
Data D3 GPIO21 Camera data line
Data D4 GPIO36 Camera data line, input only
Data D5 GPIO39 Camera data line, input only
Data D6 GPIO34 Camera data line, input only
Data D7 GPIO35 Camera data line, input only
XCLK GPIO0 Camera clock, also boot pin
PCLK GPIO22 Camera pixel clock
VSYNC GPIO25 Camera vertical sync
HREF GPIO23 Camera horizontal reference
SDA GPIO26 Camera control bus data
SCL GPIO27 Camera control bus clock
PWDN GPIO32 Camera power down control

SD Card Pins

The microSD slot uses 6 pins in 4-bit mode. That mode gives the fastest SD writes on this board. The 6 pins are GPIO14, GPIO15, GPIO2, GPIO4, GPIO12, and GPIO13. All 6 pins are then busy. No free GPIO remains from that set while 4-bit mode runs.

SD signal GPIO Mode
CLK GPIO14 4-bit and 1-bit
CMD GPIO15 4-bit and 1-bit
DATA0 GPIO2 4-bit and 1-bit
DATA1 GPIO4 4-bit only
DATA2 GPIO12 4-bit only
DATA3 GPIO13 4-bit only

Free GPIO Pins

Free pins depend on SD card use. With no SD card, 6 pins are free. Those pins are GPIO2, GPIO4, GPIO12, GPIO13, GPIO14, and GPIO15. With 1-bit SD mode, 3 pins are free. Those pins are GPIO4, GPIO12, and GPIO13. With 4-bit SD mode, none of those 6 pins are free.

GPIO33 is the red LED pin. You can blink it in code. It is not a good general output for a load. GPIO16 is the PSRAM chip select. Leave GPIO16 alone. GPIO32 is the camera power-down pin. Leave it under camera driver control.

ADC, Touch, and PWM

GPIO2, GPIO4, GPIO12, GPIO13, GPIO14, and GPIO15 all support ADC input. They also support touch input on the ESP32 chip. That overlap is useful. It is also a limit. A pin in SD use cannot serve as an ADC input at the same time.

I2C, SPI, and UART

The camera control bus uses GPIO26 for SDA and GPIO27 for SCL. Those pins are busy. Do not add a second I2C device on the same two pins without checking the camera driver first. A shared bus can clash with camera control.

USB and Programming

This board has no USB port. Program it with a 3.3 volt USB-to-serial adapter. Set the adapter to 3.3 volts. A 5 volt adapter setting can damage the 3.3 volt logic. Check the adapter jumper before every upload.

Connect adapter TX to board U0R, which is GPIO3. Connect adapter RX to board U0T, which is GPIO1. Connect ground to ground. Connect adapter 3.3 volt output only if the adapter can supply enough current. A separate 5 volt supply on the 5V pin is often more stable.

Hold GPIO0 low. Press reset. Start the upload. Release GPIO0 after the upload starts. Remove the GPIO0 jumper after the upload ends. Press reset once more to run the new code. For a full setup walkthrough, see the live post How to Start with ESP32-CAM for WiFi Camera Projects (live post #15173). For the flash steps in detail, see the live post ESP32-CAM Flashing and First Camera Stream: From Unboxing to WiFi Video (live post #22720).

Pins to Avoid

Avoid GPIO16 for any new wiring. It is the PSRAM chip select. Avoid GPIO32 for general use. It controls camera power down. Avoid GPIO0 as a permanent output. It is the boot pin and the camera clock.

Avoid GPIO36, GPIO39, GPIO34, and GPIO35 as outputs. They are input-only pins. Avoid GPIO6 through GPIO11. Those pins connect to the on-board flash memory. They do not appear on the headers. Do not try to use them.

Avoid 5 volt logic on any GPIO pin. This board uses 3.3 volt logic. A 5 volt signal needs a level shifter. A direct 5 volt input can damage the pin.

Max Current and Logic Voltage

Logic voltage is 3.3 volts on every GPIO pin. That value comes from the Espressif ESP32 Series Datasheet. Treat 3.3 volts as the high level. Treat 0 volts as the low level. Keep sensor outputs at 3.3 volts or below.

At the strongest drive setting, a GPIO pin sources about 40 mA (IOH) and sinks about 28 mA (IOL), per Table 5-4 of the Espressif ESP32 Series Datasheet v5.3. Those are drive-strength values at 3.3 volts, not a recommended continuous load. Cumulative IO output current for the chip is 1200 mA at absolute maximum, per section 5.1 of the same datasheet. Treat a small LED through a resistor as the practical per-pin load, not 40 mA.

Use a transistor or a driver for any load above a small LED. Keep LED current low with a series resistor. A 220 ohm resistor is a common bench value for a 3.3 volt LED test. Check the LED datasheet for its own forward voltage before you pick a resistor.

Wiring and Power Warnings

Power the board before you connect a 5 volt sensor. Keep the USB-to-serial adapter at 3.3 volts. Double-check the adapter jumper. A wrong jumper is a fast way to damage the board.

Keep wires short. Use a cable under 3 feet for bench tests when you can. Long wires pick up noise. Noise causes SD errors and camera glitches. Twist power and ground wires together when the run is long.

Pin Test Sketch

Language: Arduino. Library: Arduino ESP32 core version 2.0.14, with the built-in esp_camera driver. No extra library install is needed for this test. Code status: code not compiled. No arduino-cli or PlatformIO is installed in this environment.

// ESP32-CAM pin test sketch
// Board: AI-Thinker ESP32-CAM
// Arduino ESP32 core version 2.0.14
// Code status: code not compiled

#include "esp_camera.h"

// Camera pin map for the AI-Thinker board.
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22

// Free pin test uses GPIO4 when no SD card is fitted.
// GPIO4 is SD DATA1 in 4-bit mode, so remove the card first.
const int testPin = 4;

void setup() {
  // Start serial at 115200 baud for debug output.
  Serial.begin(115200);
  delay(1000); // Wait 1 second for the monitor to open.

  // Set the test pin as an output and blink the red LED pin.
  pinMode(testPin, OUTPUT);
  pinMode(33, OUTPUT);

  // Start the camera with a small frame size for the test.
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sccb_sda = SIOD_GPIO_NUM;
  config.pin_sccb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000; // 20 megahertz camera clock.
  config.pixel_format = PIXFORMAT_JPEG;
  config.frame_size = FRAMESIZE_QVGA; // Small size for a fast test.
  config.jpeg_quality = 12; // Lower number means higher quality.
  config.fb_count = 1;

  // Report the camera start result on serial.
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed, error 0x%x\n", err);
    return;
  }
  Serial.println("Camera init OK");
}

void loop() {
  // Blink the test pin and the red LED pin in turn.
  digitalWrite(testPin, HIGH);
  digitalWrite(33, LOW);
  delay(500); // Wait 500 milliseconds.
  digitalWrite(testPin, LOW);
  digitalWrite(33, HIGH);
  delay(500); // Wait 500 milliseconds.
  Serial.println("Pin test tick");
}

Expected result: the serial monitor shows “Camera init OK” and then a tick line each 1 second. The red LED blinks in turn with the test pin. If camera init fails, check the ribbon cable seating first. Then check the 5 volt supply.

Frequently Asked Questions

How many free GPIO pins does the ESP32-CAM have?

It has 6 free pins with no SD card. The pins are GPIO2, GPIO4, GPIO12, GPIO13, GPIO14, and GPIO15. The count drops to 3 pins in 1-bit SD mode. It drops to 0 pins from that set in 4-bit SD mode.

Can I use GPIO0 as a normal output?

No, not as a normal output. GPIO0 is the boot pin and the camera clock. It must be high at reset for normal run mode. Use a free pin from the SD set instead.

Why does my ESP32-CAM reset when WiFi starts?

A weak 5 volt supply is the most common cause. WiFi draws a current spike at start. Use a stable 5 volt supply rated at 1 ampere or more. Keep wires short and check the ground.

Does the ESP32-CAM have a USB port?

No, it has no USB port. Program it with a 3.3 volt USB-to-serial adapter. Connect adapter TX to U0R and adapter RX to U0T. Hold GPIO0 low at reset for flash mode.

Boards That Match This Pinout

These boards use the pinout in this guide. Check the product page for current stock before you order. Stock changes over time.

Related reading: compare this board with the wider ESP32 family in the staged pillar ESP32 vs ESP32-S3 vs ESP32-C3 vs ESP32-C6 (row 22, staged). For sibling pinouts, see How to Use the ESP32 DevKit V1 Board for WiFi Projects and XIAO ESP32S3 Pinout.

Sources

  • Espressif ESP32 Series Datasheet v5.3, https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
  • ESP32-CAM camera driver pin map, Espressif Arduino ESP32 core, https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h

Last updated 2026-11-21.