When wiring an ESP32-CAM or integrating a standalone Digital Video Port (DVP) camera module like the OV2640 or OV5640, guessing the Flexible Printed Circuit (FPC) pinout will instantly fry the sensor's 1.5V core logic. The industry standard for hobbyist and IoT embedded vision is the 24-pin DVP interface. Below is the exact pinout for the ubiquitous AI-Thinker ESP32-CAM board and standard OmniVision-compatible 24-pin FPC ribbons, mapped directly to the ESP32 GPIOs.

The 24-Pin DVP FPC Camera Connector Pinout

This table maps the physical 24-pin FPC connector on the camera module to the specific GPIO pins on the AI-Thinker ESP32-CAM board. If you are wiring a standalone ESP32-WROVER to a bare camera module, use the 'Signal Function' column to map to your own GPIOs.

PinFPC SymbolSignal FunctionESP32-CAM GPIOVoltage / Notes
1GNDSystem GroundGND0V
2SIOD / SDASCCB/I2C DataGPIO 263.3V (Needs pull-up)
3SIOC / SCLSCCB/I2C ClockGPIO 273.3V (Needs pull-up)
4VSYNCVertical SyncGPIO 253.3V Logic
5HREFHorizontal ReferenceGPIO 233.3V Logic
6PCLKPixel ClockGPIO 223.3V Logic
7XCLKSystem Clock InputGPIO 213.3V (ESP32 outputs 20MHz)
8D9Data Bit 9 (MSB)GPIO 193.3V Logic
9D8Data Bit 8GPIO 363.3V Logic
10D7Data Bit 7GPIO 183.3V Logic
11D6Data Bit 6GPIO 393.3V Logic
12D5Data Bit 5GPIO 53.3V Logic
13D4Data Bit 4GPIO 343.3V Logic
14D3Data Bit 3GPIO 353.3V Logic
15D2Data Bit 2GPIO 323.3V Logic (Shared w/ PWDN on some variants)
16D1Data Bit 1GPIO 03.3V Logic (Boot strapping pin!)
17D0Data Bit 0 (LSB)GPIO 43.3V Logic (Shared w/ Flashlight)
18RESETHardware ResetGPIO 33Active LOW
19PWDNPower DownGPIO 32Active HIGH
20DOVDDDigital I/O Power3.3V / 2.8VPowers I/O pads (3.3V on AI-Thinker)
21GNDSystem GroundGND0V
22AVDDAnalog Power2.8VPowers analog array (Internal reg on AI-Thinker)
23GNDSystem GroundGND0V
24DVDDDigital Core Power1.5VCore logic (Internal reg on AI-Thinker)

Rows People Get Wrong (and How to Fix Them)

When debugging a blank image feed or a bricked sensor, the failure almost always traces back to misinterpreting the control and power rows in the table above.

PWDN and RESET Logic States

The PWDN (Power Down) pin on OmniVision sensors is typically active HIGH. If you leave this pin floating, internal pull-ups may force the camera into a permanent sleep state. On the ESP32-CAM, GPIO 32 drives this pin; your initialization code must explicitly drive it LOW to wake the sensor. Conversely, the RESET pin is active LOW. The Espressif esp32-camera driver handles toggling these pins during the esp_camera_init() sequence, but if you are writing bare-metal I2C init code, you must pulse RESET low for at least 10ms, then release it high before attempting SCCB communication.

SIOD/SIOC: SCCB vs. Standard I2C

Pins 2 and 3 are labeled SDA/SCL on many breakout boards, but they actually use SCCB (Serial Camera Control Bus). SCCB is OmniVision's proprietary variant of I2C. The critical difference is that SCCB does not use the standard I2C Acknowledge (ACK) bit in the same way, and it relies on a specific 'don't care' bit phase. If you try to read camera registers using the standard Arduino Wire.h library, the bus will often hang or return 0xFF. Always use a dedicated SCCB implementation or the official ESP-IDF camera driver to handle the register reads.

XCLK Frequency and Power Brownouts

Pin 7 (XCLK) requires the ESP32 to output a master clock, typically 20MHz. While the OV2640 datasheet states it can accept up to 24MHz, pushing the XCLK to 24MHz on the AI-Thinker ESP32-CAM frequently causes severe 3.3V rail brownouts. The onboard AMS1117-3.3 voltage regulator struggles with the transient current spikes at higher clock speeds, resulting in the ESP32 browning out and rebooting mid-frame capture. Stick to 20MHz (or even 10MHz for long FPC ribbons) to maintain signal integrity and power stability.

Standard Variants: 24-Pin DVP vs 20-Pin vs MIPI

Not all camera ribbons are identical. While the 24-pin DVP is the universal standard for ESP32 hobbyist boards, you may encounter other interfaces when sourcing surplus or industrial camera modules. Here is how the standards compare and which applies to your microcontroller.

Feature24-Pin DVP (Standard)20-Pin DVP (Legacy/Alt)MIPI CSI-2 (Advanced)
Primary Use CaseESP32, Arduino Portenta, hobbyist SBCsOlder Raspberry Pi cam v1.3, legacy DVRsModern SBCs (Pi 4/5, Jetson), smartphones
Data Lanes8 to 10 parallel pins (D0-D9)8 parallel pins (D0-D7)1 to 4 differential serial pairs
ClockingSingle-ended PCLK & XCLKSingle-ended PCLK & XCLKEmbedded clock in serial data lanes
ESP32 CompatibilityNative (via LCD_CAM peripheral)Native (ignore D8/D9 pins)Not supported (Requires dedicated MIPI PHY)
Max Cable Length~15cm (signal degrades fast)~10cmUp to 30cm+ with active repeaters
Warning: Never force a 20-pin FPC ribbon into a 24-pin ZIF (Zero Insertion Force) connector without verifying the pin 1 alignment. The 20-pin standard often shifts the power rails (AVDD/DVDD) to different physical positions. Plugging a 20-pin camera into a 24-pin ESP32-CAM socket will likely route 3.3V directly into the 1.5V DVDD core pin, instantly destroying the sensor silicon.

Safe Interpretation When FPC Markings Are Faded

Cheap FPC ribbons from online marketplaces often arrive with pin numbers rubbed off, or the silkscreen on the camera PCB is unreadable. Before applying power, you must positively identify Pin 1 and the ground plane using a multimeter.

Finding Pin 1 Visually

Manufacturers follow the OmniVision mechanical standard for FPCs. Pin 1 is almost always indicated by:

  • A thicker copper trace on the FPC ribbon compared to the signal lines.
  • A beveled or chamfered corner on the blue/black stiffener at the end of the ribbon.
  • A small printed dot or triangle on the PCB directly adjacent to the connector.

Multimeter Verification Protocol

Never rely on visual cues alone when the markings are degraded. Use your multimeter to map the power domain before energizing the circuit.

  1. Identify Ground: Set your meter to continuity mode. Place the black probe on the metal EMI shield of the camera module (this is universally tied to system ground). Probe the FPC pins. Pins 1, 21, and 23 should beep continuously. This confirms your Pin 1 orientation.
  2. Identify Core Power (DVDD): Switch to diode-test mode. Probe the suspected Pin 24 (DVDD) with the red lead, black on ground. You should read a forward voltage drop (typically 0.4V to 0.8V) due to the internal decoupling capacitors and ESD diodes. If it reads 0.00V (short) or OL (open), your pin mapping is wrong.
  3. Verify I/O Power (DOVDD): Pin 20 will show a similar diode drop, but often slightly higher impedance than DVDD.

By mapping the ground pins and verifying the diode drops on the power rails, you can safely reconstruct the esp32 camera pinout for any unmarked DVP module. Always double-check your mapping against the official ESP-IDF hardware guidelines before writing firmware, as a single misaligned ZIF connector will permanently short the I2C bus and lock up the ESP32's GPIO matrix.