ESP32-CAM Pinout: Complete GPIO Reference Guide

The ESP32-CAM is one of the most popular ESP32 development boards, combining an ESP32-S chip with a camera module (OV2640), PSRAM, and an SD card slot in a compact, low-cost package. However, its pinout differs significantly from standard ESP32 dev boards — many GPIOs are reserved for the camera interface.

Critical difference: The ESP32-CAM has NO built-in USB-to-Serial converter. You need an external FTDI adapter (or similar) to program it. Many first-time users are caught off guard by this!

ESP32-CAM Full Pinout Table

Pin #FunctionNotes
GPIO0Camera XCLK / Boot mode selectStrapping — LOW for flash mode
GPIO1U0TXD (Serial TX)Used for programming and debug
GPIO2Camera output / SD card CSShared between camera and SD card
GPIO3U0RXD (Serial RX)Used for programming and debug
GPIO4Camera VSYNCVertical sync signal from camera
GPIO5Camera HREFHorizontal reference signal
GPIO12Camera D7 (Data bit 7)MSB of 8-bit camera data bus
GPIO13Camera D6 (Data bit 6)
GPIO14Camera D5 (Data bit 5)
GPIO15Camera D4 (Data bit 4)
GPIO16Camera D3 (Data bit 3)
GPIO17Camera D2 (Data bit 2)
GPIO18Camera D1 (Data bit 1)
GPIO19Camera D0 (Data bit 0)LSB of 8-bit camera data bus
GPIO21Camera SCCB_SDA (I2C data)Camera configuration bus
GPIO22Camera SCCB_SCL (I2C clock)Camera configuration bus
GPIO23Camera PCLK (Pixel clock)Pixel clock output from camera
GPIO25Camera XCLK (Master clock)Or use GPIO0 — configurable
GPIO26Camera PWDN (Power down)LOW = camera active
GPIO27Camera RESETCamera reset signal
GPIO32Flash LED controlActive HIGH — drives bright white LED
GPIO33SD card CS (Chip Select)Or leave floating if not using SD

Camera Interface (OV2640) — Pin Mapping

The OV2640 camera module connects to the ESP32 via an 8-bit parallel data bus and SCCB (similar to I2C) for configuration:

SignalESP32-CAM PinDescription
SCCB_SDA (SIOD)GPIO21Camera configuration data
SCCB_SCL (SIOC)GPIO22Camera configuration clock
VSYNCGPIO4Vertical sync (frame start)
HREFGPIO5Horizontal reference (line start)
PCLKGPIO23Pixel clock (~12 MHz)
XCLKGPIO0 or GPIO25Master clock (10–20 MHz)
D0–D7GPIO19,18,17,16,15,14,13,128-bit parallel data bus
PWDNGPIO26Power down (LOW = active)
RESETGPIO27Camera reset

SD Card Interface

SD Card PinESP32-CAM Pin
CS (Chip Select)GPIO33
MOSIGPIO14
MISOGPIO2
SCKGPIO15
⚠️ Camera vs SD Card conflict: GPIO2, GPIO14, and GPIO15 are shared between the camera data bus and the SD card interface. You cannot use the camera and SD card simultaneously — the Arduino ESP32-CAM example selects one or the other at compile time via #define.

Power Requirements

ComponentVoltageCurrent (Typical)
ESP32-CAM (idle)5V input via VCC~80 mA
With camera streaming5V input~200–300 mA
With flash LED on5V input~350–500 mA peak
Deep Sleep3.3V (battery)~6 mA (higher than standard ESP32)
⚠️ Power supply warning: The ESP32-CAM has a high inrush current when the flash LED turns on. A standard FTDI adapter (500 mA limit) may brown-out the module. Use a dedicated 5V / 1A+ power supply, or disable the flash LED in software (#define FLASH_LED_GPIO -1).

Programming the ESP32-CAM

Since the ESP32-CAM lacks a USB-to-Serial chip, follow these steps:

  1. Connect FTDI adapter:
    FTDI TX → ESP32-CAM U0RXD (GPIO3)
    FTDI RX → ESP32-CAM U0TXD (GPIO1)
    FTDI GND → ESP32-CAM GND
    FTDI 5V → ESP32-CAM VCC (or 5V input)
  2. Set GPIO0 to GND during power-up to enter flash/download mode
  3. Select board: In Arduino IDE, choose "AI Thinker ESP32-CAM"
  4. Press RESET (if your board has a button) after the upload starts
  5. Remove GPIO0→GND jumper after flashing, then reset to run
Pro tip: Many ESP32-CAM boards have a built-in resistor between GPIO0 and GND for programming. If yours does, simply press the RESET button while the Arduino IDE is connecting (watch the console for "Connecting...____..." dots).

ESP32-CAM Schematic Block

The ESP32-CAM board layout differs from standard dev boards. Key components:

  • ESP32-S — A variation of ESP32 with 4 MB PSRAM and 4 MB flash
  • OV2640 camera — 2 MP camera, UXGA (1600×1200) max resolution
  • PSRAM — 4 MB external RAM for camera frame buffers
  • MicroSD card slot — 1-bit or 4-bit SD mode for image storage
  • Flash LED — Bright white LED on GPIO32 for low-light photography
  • Voltage regulator — 5V→3.3V LDO (AMS1117-3.3)

Free GPIO Pins (for your own use)

Almost every GPIO on the ESP32-CAM is tied to the camera or SD card. The truly free pins are limited:

Free GPIONotes
GPIO12 (D7)Only free if camera data bus width is reduced to 4-bit
GPIO13 (D6)Same restriction as GPIO12
GPIO14 (D5)Shared with SD SCK — free if SD is disabled
GPIO15 (D4)Shared with SD SCK — strapping pin, must be HIGH
GPIO32Flash LED — can be repurposed if not needed
GPIO33SD CS — free if SD is disabled

Common ESP32-CAM Issues & Fixes

ProblemSolution
"Camera probe failed"Check PWDN (GPIO26) is LOW; check SCCB connections; try different XCLK frequency
Brownout / reset loopUse 5V/1A+ supply; disable flash LED; add 100 µF capacitor on VCC
Garbled/fuzzy imageReduce XCLK to 10 MHz; check PCLK polarity; improve power supply
Wi-Fi disconnectsCamera streaming uses CPU heavily — lower camera resolution or use Wi-Fi only when needed
SD card not detectedCheck CS (GPIO33); ensure 4-bit SD not 1-bit; look for cold solder joints
Can't upload sketchHold GPIO0 LOW during power-up and press RESET at "Connecting..." phase

🔧 Check ESP32-CAM Pin Compatibility

Our interactive pinout tool covers ESP32-CAM pin assignments. Use it to plan your next camera project.

Open Interactive Pinout

Related Guides