OV7670 camera module (no FIFO) with ESP32
Supply 3.3 V
Bus GPIO
I2C address
0x21
Measures image
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| 3.3V | Power | 3V3 | 3.3 V only |
| GND | Ground | GND | |
| SIOC | I2C clock (SCL) | D22 | SCCB clock (I2C-like, address 0x21). Add 4.7 kΩ pull-ups |
| SIOD | I2C data (SDA) | D21 | SCCB data. Answers only while XCLK runs |
| VSYNC | Output (the part drives it) | D25 | Frame sync |
| HREF | Output (the part drives it) | D26 | Line valid |
| PCLK | Output (the part drives it) | D27 | Pixel clock |
| XCLK | Input (the ESP32 drives it) | D32 | Clock from the ESP32 (10 to 24 MHz). The camera does nothing without it |
| D7 | Output (the part drives it) | D33 | Pixel data bit 7 |
| D6 | Output (the part drives it) | D23 | |
| D5 | Output (the part drives it) | D19 | |
| D4 | Output (the part drives it) | D18 | |
| D3 | Output (the part drives it) | D4 | |
| D2 | Output (the part drives it) | D13 | |
| D1 | Output (the part drives it) | D14 | |
| D0 | Output (the part drives it) | RX2 | Pixel data bit 0 |
| RESET | Input (the ESP32 drives it) | TX2 | Reset, active LOW. Tie to 3.3 V if unused |
| PWDN | Input (the ESP32 drives it) | — | HIGH = power down. Tie to GND if unused |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Sources
- OmniVision OV7670 datasheet, Pin description; SCCB write address 0x42 (7-bit 0x21); PID register 0x0A = 0x76
- Common OV7670 2x9 header module, 3.3V, GND, SIOC, SIOD, VSYNC, HREF, PCLK, XCLK, D7 to D0, RESET, PWDN
Try it in 3D in BoardPilot
Learn the basics
Lesson: UART, I2C and SPI Lesson: GPIO: pins in and out I2C I2C address SDA and SCL Pull-up resistor GPIO
Related parts
A02YYUW waterproof ultrasonic distance (UART)A3144 hall effect switchAM312 mini PIR motion sensorATGM336H GPS/BeiDou moduleBeitian BN-220 GPS moduleBenewake TF-Luna LiDAR (UART mode)
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.