Skip to content
Board reference

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

5VGNDIO12IO13IO15IO14IO2IO43V3IO16IO0GNDVCCU0RU0TGND

Hover or tap any pin on the board

LEFT header · pin 3

IO12

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.PinSignalsStatus
15VMain supply input for the board.
2GNDGround
3IO12MTDI, SD D2Avoid
4IO13MTCK, SD D3Caution
5IO15MTDO, SD CMDCaution
6IO14MTMS, SD CLKCaution
7IO2SD D0Avoid
8IO4SD D1, FLASH LEDCaution

RIGHT · right side

No.PinSignalsStatus
13V33.3 V supply.
2IO16—Caution
3IO0XCLKAvoid
4GNDGround
5VCCSupply output pin. Power the board through 5V or 3V3, not here.
6U0RU0RXDCaution
7U0TU0TXDCaution
8GNDGround

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. 1

    Wire a USB-to-serial adapter

    TX → U0R, RX → U0T, GND → GND, 5V → 5V, and a jumper from IO0 to GND.

  2. 2

    Install ESP32 support and pick the board

    Tools → Board → esp32 → AI Thinker ESP32-CAM

    Choose the adapter's port.

  3. 3

    Upload CameraWebServer

    File → Examples → ESP32 → Camera → CameraWebServer

    Select CAMERA_MODEL_AI_THINKER, add your Wi-Fi details, upload, remove the IO0 jumper and reset. The serial monitor prints the stream address.

  4. 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.

Board basics guide coming soon

Sensor Modules & Library

Wiring sensors and modules, plus the library you need to talk to them.

Sensor Integration

Coming soon

Library & Setup

Coming soon

SolderHub 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.

Tested on Espressif ESP32-CAM