Component guide · Intermediate · 3 min read
OV2640 2MP, OV3660 3MP, OV5640 5MP FPC and OV7670 VGA Camera Modules

SCCB/DVP), and OV2640 Binocular for STM32
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
These are bare image sensor modules with a parallel (DVP) data bus and an I2C-like SCCB control bus. The OV2640 (2MP, JPEG out) is the sensor on ESP32-CAM boards and a common replacement; the OV3660 and OV5640 are higher resolution drop-ins for many ESP32 boards; the OV7670 is an old VGA sensor without JPEG. You need a microcontroller with a camera interface, such as an ESP32 or STM32 with DCMI.
Key specs at a glance
- Resolution
- 0.3MP (OV7670), 2MP (OV2640), 3MP (OV3660), 5MP (OV5640)
- Data
- 8-bit parallel DVP
- Control
- SCCB (I2C compatible)
- Output
- JPEG (OV2640, OV3660, OV5640) or raw RGB/YUV (OV7670)
- Supply
- 3.3 V with on-board regulators for 1.2 to 2.8 V cores
- Connector
- 24-pin FPC or 2x9 header
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1OV2640 2MP CMOS Camera Module w/ 4.3mm Lens₹269
Option 2OV2640 2MP Camera Module w/ SCCB Connector₹259
Option 3OV3660 Camera Module 3MP Compatible w/ OV2640 Program₹229
Option 4Teledyne FLIR OV5640 FPC Camera Module₹2,879
Option 5OV7670 640×480 VGA CMOS Camera Image Sensor Module₹128
Option 6OV7670 0.3MP Camera Module w/ SCCB Connector₹156
What the OV2640, OV3660, OV5640 and OV7670 camera modules is
The OV2640 (2 MP, JPEG output) and OV7670 (0.3 MP, raw output) are low-cost camera modules used with ESP32, STM32 and Arduino for snapshots, streaming and simple vision.
An Uno cannot read these sensors: it is too slow and lacks the memory for a frame. Use an ESP32 with PSRAM, an STM32 with DCMI, or a board made for cameras.
When swapping an ESP32-CAM sensor, match the FPC pinout and lens length; OV3660 and OV5640 are supported by the esp32-camera driver.
OV2640, OV3660, OV5640 and OV7670 camera modules pinout
The pins on the OV2640, OV3660, OV5640 and OV7670 camera modules and what each one does.
| Pin | Function |
|---|---|
| SIOC / SIOD | SCCB clock and data |
| XCLK | Clock input (about 20 MHz) |
| PCLK / VSYNC / HREF | Pixel clock and sync |
| D0 to D7 | Pixel data |
| PWDN / RESET | Power down and reset |
| 3V3 / GND | Supply |
- SIOC / SIOD
- SCCB clock and data
- XCLK
- Clock input (about 20 MHz)
- PCLK / VSYNC / HREF
- Pixel clock and sync
- D0 to D7
- Pixel data
- PWDN / RESET
- Power down and reset
- 3V3 / GND
- Supply
Wiring the OV2640, OV3660, OV5640 and OV7670 camera modules
Connect the OV2640, OV3660, OV5640 and OV7670 camera modules like this.
| OV2640, OV3660, OV5640 and OV7670 camera modules pin | Uno | ESP32 with PSRAM |
|---|---|---|
| SIOC / SIOD | Not supported (too slow) | Camera SCCB pins |
| D0 to D7, PCLK, VSYNC, HREF | Not supported | Camera data pins per board map |
| XCLK | Not supported | XCLK pin |
- SIOC / SIOD
- Uno:
- Not supported (too slow)
- ESP32 with PSRAM:
- Camera SCCB pins
- D0 to D7, PCLK, VSYNC, HREF
- Uno:
- Not supported
- ESP32 with PSRAM:
- Camera data pins per board map
- XCLK
- Uno:
- Not supported
- ESP32 with PSRAM:
- XCLK pin
Example code
Use the pin map for your board. The OV7670 needs raw pixel format and lower frame sizes.
#include "esp_camera.h"
// Set these pins for YOUR board (see its pin map). Example values are for an AI-Thinker style board.
camera_config_t c = {
.pin_pwdn = 32, .pin_reset = -1, .pin_xclk = 0, .pin_sccb_sda = 26, .pin_sccb_scl = 27,
.pin_d7 = 35, .pin_d6 = 34, .pin_d5 = 39, .pin_d4 = 36, .pin_d3 = 21, .pin_d2 = 19, .pin_d1 = 18, .pin_d0 = 5,
.pin_vsync = 25, .pin_href = 23, .pin_pclk = 22,
.xclk_freq_hz = 20000000, .ledc_timer = LEDC_TIMER_0, .ledc_channel = LEDC_CHANNEL_0,
.pixel_format = PIXFORMAT_JPEG, .frame_size = FRAMESIZE_SVGA, .jpeg_quality = 12, .fb_count = 1
};
void setup() {
Serial.begin(115200);
if (esp_camera_init(&c) != ESP_OK) { Serial.println("Camera init failed - check pins and PSRAM"); return; }
camera_fb_t *fb = esp_camera_fb_get();
Serial.printf("Got a %u byte JPEG\n", fb->len);
esp_camera_fb_return(fb);
}
void loop() {}Setup and tuning
the OV2640 outputs JPEG, so it suits the ESP32-CAM and Arducam boards; the OV7670 gives raw pixels and needs a fast MCU.
both use a parallel (DVP) data bus plus SCCB (I2C-like) control, XCLK, PCLK, VSYNC and HREF lines.
the sensors run at 3.3 V logic with a 2.8 or 1.8 V core supplied by the module; never use 5 V signals.
feed XCLK (often 20 MHz for OV2640) from a PWM or clock pin.
use the esp32-camera driver on ESP32; on Arduino Uno the OV7670 is too slow without a FIFO (AL422B) version.
What you need
Shop this list9 of 9 found in our store · ₹7,627
OV2640 2MP CMOS Camera Module w/ 4.3mm Lens: the part this guide coversOV2640 2MP CMOS Camera Module w/ 4.3mm Lens₹269
OV2640 2MP Camera Module w/ SCCB Connector: another version this guide coversOV2640 2MP Camera Module w/ SCCB Connector₹259
OV3660 Camera Module 3MP Compatible w/ OV2640 Program: another version this guide coversOV3660 Camera Module 3MP Compatible w/ OV2640 Program₹229
Teledyne FLIR OV5640 FPC Camera Module: another version this guide coversTeledyne FLIR OV5640 FPC Camera Module₹2,879
OV7670 640×480 VGA CMOS Camera Image Sensor Module: another version this guide coversOV7670 640×480 VGA CMOS Camera Image Sensor Module₹128
OV7670 0.3MP Camera Module w/ SCCB Connector: another version this guide coversOV7670 0.3MP Camera Module w/ SCCB Connector₹156
OV2640 Binocular Camera Module for STM32 3D Measurement: another version this guide coversOV2640 Binocular Camera Module for STM32 3D Measurement₹3,029
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
Raspberry Pi camera (OV5647 class): a CSI alternative for the PiRaspberry Pi 5MP CSI Camera Module for Pi Zero W₹289Closest match, check the specs
Alternatives and when to choose them
- ESP32-CAM: complete board with OV2640.
- ESP32 camera boards: ready boards.
- Arducam SPI cameras: work with small boards.
Common mistakes to avoid
- Driving the camera with 5 V logic.
- Using a plain OV7670 on a slow 8-bit Arduino.
- Long jumper wires on the high-speed data bus.
- Forgetting to supply XCLK.
Frequently asked questions
Can I use an OV7670 with an Arduino Uno?
Only the FIFO version works well; the plain module needs a faster board such as an STM32 or ESP32.
What is the difference between the OV2640 and OV7670?
The OV2640 is 2 MP with JPEG output; the OV7670 is 0.3 MP and outputs raw pixels.
Why are my images green or striped?
XCLK, PCLK timing or data wiring is wrong; check every data line and the clock speed.
Can the OV2640 stream video over Wi-Fi?
Yes, on an ESP32 it streams MJPEG using the CameraWebServer example.
Are these modules 5 V tolerant?
No. Use 3.3 V signals only, or level shifters with 5 V boards.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

