Espressif ESP32‑CAM
Wi-Fi camera module for vision projects
AI-Thinker ESP32-CAM · ESP32-S module + OV2640
A tiny Wi-Fi camera board: a dual-core 240 MHz ESP32 module, an OV2640 camera on a ribbon, a microSD slot and a flash LED. Most of the chip's pins go to the camera and card, leaving 10 GPIOs on the headers and no USB port.
Tested in the SolderHub Simulator. Opens a ready-wired circuit that runs in your browser.
- CPU
- 2 × 240 MHz
- Header GPIO
- 10
- Camera
- OV2640
- Storage
- microSD
Every header pin at a glance
- 0 safe I/O
- 7 use with care
- 3 avoid
- 0 not available
- 6 power, ground & other
01Pinout
Every pin, live
The two 8-pin headers, labelled as on the board. Hover or tap a pin to see what the camera and SD card already use.
16 of 16 pins match
Hover or tap any pin on the board
LEFT header · pin 3
IO12
Avoid
Strapping pin (MTDI)
Read at reset to set the flash supply voltage. Pulling it high at boot can stop the board starting.
microSD
microSD D2 (4-line mode only). Free when no SD card is used; with a card it belongs to the SD_MMC driver and needs its 10 kΩ pull-up.
Can be used as
- PWM out
Signals on this pad
- GPIO12
- MTDI
- SD D2
Full header tables (LEFT, RIGHT)
LEFT · left side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | 5V | Main supply input for the board. | |
| 2 | GND | Ground | |
| 3 | IO12 | MTDI, SD D2 | Avoid |
| 4 | IO13 | MTCK, SD D3 | Caution |
| 5 | IO15 | MTDO, SD CMD | Caution |
| 6 | IO14 | MTMS, SD CLK | Caution |
| 7 | IO2 | SD D0 | Avoid |
| 8 | IO4 | SD D1, FLASH LED | Caution |
RIGHT · right side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | 3V3 | 3.3 V supply. | |
| 2 | IO16 | — | Caution |
| 3 | IO0 | XCLK | Avoid |
| 4 | GND | Ground | |
| 5 | VCC | Supply output pin. Power the board through 5V or 3V3, not here. | |
| 6 | U0R | U0RXD | Caution |
| 7 | U0T | U0TXD | Caution |
| 8 | GND | Ground |
02Safety
Pins to avoid, and why
Almost every header pin is shared with the camera, the SD card or the boot process. Here is which, and when it matters.
Avoid
3 pins
Decide how the ESP32 boots. Wired wrong, the board won't start or won't take an upload.
- IO0Boot mode + camera clock. Tie it to GND at reset to enter upload mode. In your sketch it is the OV2640's XCLK, so leave it to the camera.
- IO2Boot mode. Sampled with GPIO0 at reset. Held high by an SD pull-up it can block flashing; keep it free or low when uploading.
- IO12Strapping pin (MTDI). Read at reset to set the flash supply voltage. Pulling it high at boot can stop the board starting.
Use with care
7 pins
Shared with the microSD card, the flash LED, PSRAM or the programming port.
- U0TProgramming port. UART0. The ESP32-CAM has no USB, so these two pins are how you upload code and read the serial monitor through a USB-to-serial adapter.
- U0RProgramming port. UART0. The ESP32-CAM has no USB, so these two pins are how you upload code and read the serial monitor through a USB-to-serial adapter.
- IO4Flash LED. Drives the bright white flash LED next to the camera, so the LED reacts to anything on this pin, and it is microSD D1 in 4-line mode.
- IO13microSD. microSD D3 (the card's D3 needs a pull-up even in 1-line mode). Free when no SD card is used; with a card it belongs to the SD_MMC driver and needs its 10 kΩ pull-up.
- IO14microSD. microSD CLK (both SD modes). Free when no SD card is used; with a card it belongs to the SD_MMC driver and needs its 10 kΩ pull-up.
- IO15microSD. microSD CMD (both SD modes). Free when no SD card is used; with a card it belongs to the SD_MMC driver and needs its 10 kΩ pull-up.
- IO16May be used by PSRAM. On ESP32 modules with external PSRAM, GPIO16 is reserved for it. Check your module before using it for anything else.
03Layout
How the board fits together
The ESP32-S module drives the camera and SD card directly; you program it through an external serial adapter.
USB-to-serial adapter
External: TX/RX to U0R/U0T, IO0 to GND for upload
5V / 3V3 pins
Board power
ESP32-S module
Dual-core 240 MHz · Wi-Fi · Bluetooth
OV2640 camera
8-bit parallel bus + SCCB on internal GPIOs
microSD slot
SD_MMC on GPIO2, 4, 12–15
Flash LED
GPIO4
04Specs
Full specifications
Processor
- Chip
- ESP32 (Xtensa LX6)Dual core, up to 240 MHz.
- SRAM
- 520 KB
- Module
- AI-Thinker ESP32-S
Wireless
- Wi-Fi
- 802.11 b/g/n, 2.4 GHz
- Bluetooth
- v4.2 BR/EDR and LE
Camera
- Sensor
- OV2640
- Interface
- 8-bit parallel (Y2–Y9) + SCCBSIOD GPIO26, SIOC GPIO27, XCLK GPIO0, PCLK GPIO22.
- Power-down
- GPIO32No reset line (RESET_GPIO_NUM -1).
Storage
- Card
- microSD via SD_MMC
- 4-line mode
- GPIO2, 4, 12, 13, 14, 15
- 1-line mode
- GPIO2, 14, 15Frees GPIO4 and GPIO12 (GPIO13 still needs its pull-up).
Board
- USB
- NoneUpload through a USB-to-serial adapter on U0T/U0R.
- Flash LED
- GPIO4
- Logic level
- 3.3 V
05Buses
Where each bus lives
Camera (inside the board)
D0–D7 on GPIO5, 18, 19, 21, 36, 39, 34, 35; VSYNC 25, HREF 23, PCLK 22, XCLK 0, SCCB SDA 26 / SCL 27, PWDN 32. None of these but GPIO0 reach the headers.
microSD (SD_MMC)
CLK GPIO14, CMD GPIO15, D0 GPIO2, D1 GPIO4, D2 GPIO12, D3 GPIO13. SD_MMC.begin("/sdcard", true) uses 1-line mode and frees GPIO4/12.
Serial (UART0)
U0T (GPIO1) and U0R (GPIO3): uploads and the serial monitor through an external adapter.
PWM (LEDC)
Any free output GPIO, including the flash LED on GPIO4.
06Power & start
Power it up and get connected
Power options
- 5V pinThe usual way to power the board, from a 5 V supply or the 5 V pin of a USB-to-serial adapter.
- 3V3 pinA regulated 3.3 V supply, as an alternative to 5V.
- VCC pinAn output, not an input.
- 1
Wire a USB-to-serial adapter
TX → U0R, RX → U0T, GND → GND, 5V → 5V, and a jumper from IO0 to GND.
- 2
Install ESP32 support and pick the board
Tools → Board → esp32 → AI Thinker ESP32-CAMChoose the adapter's port.
- 3
Upload CameraWebServer
File → Examples → ESP32 → Camera → CameraWebServerSelect CAMERA_MODEL_AI_THINKER, add your Wi-Fi details, upload, remove the IO0 jumper and reset. The serial monitor prints the stream address.
- 4
No board on your desk?
Open the tested ESP32-CAM circuit in the SolderHub Simulator below.
07Gotchas
Things that trip people up
01
There's no USB port
Wire a USB-to-serial adapter: its TX to U0R, RX to U0T, GND to GND, 5 V to 5V. Hold IO0 to GND while resetting to upload, then remove it and reset again to run.
02
Flash LED lights with the SD card
GPIO4 is both the flash LED and SD D1 in 4-line mode, so card activity makes it glow. Use SD_MMC.begin("/sdcard", true) for 1-line mode to free it.
03
Only a handful of pins are really free
Camera and microSD take most of them. Without a card, GPIO12–15 and GPIO2/4 are usable, minding the boot pins; with a card, plan around GPIO16 and the serial pins.
04
Board won't boot after adding a sensor on IO12
GPIO12 sets the flash voltage at reset. Anything that pulls it high at power-up can stop the board starting.
05
It's a 3.3 V board
Feed 5 V logic through a level shifter or divider.
08SolderHub Simulator
Wire up the Espressif ESP32-CAM without the hardware
The simulator runs Espressif ESP32-CAM sketches in your browser. Start from the tested board circuit, then change the wiring or the code.
Board Basics
Introduction, pinout, and protocols — all in one guide.
Sensor Modules & Library
Wiring sensors and modules, plus the library you need to talk to them.
Sensor Integration
Coming soon
Library & Setup
Coming soon
Projects
4SolderHub Simulator
Espressif ESP32-CAM circuits you can run in the browser
Ready-wired circuits with working code. Open one, press run, then change the wiring or the sketch.
More From This Board
6More Espressif ESP32-CAM guides worth reading.
XIAO ESP32S3 Pinout: D0–D10, ADC, Touch, I2C, SPI and Battery
7m
ESP32 MicroPython Weather Web Server: Live DHT22 Readings with Auto-Refresh
17m
MicroPython ESP32 Web Server: Control an LED or Relay from Your Browser
16m
MicroPython SSD1306 OLED on ESP32: Wiring, Text, Graphics and Sensors
5m
ESP32 Dual Core and FreeRTOS: Tasks on Core 0 and Core 1, Queues and Mutexes
6m
ESP32 Hall Sensor: hallRead(), Core 3.x Removal and External Sensor Alternatives
10m


