How to Connect Arduino with OV7670 Camera Module

OV7670 camera module is an image sensor, small size, low operating voltage, and provides all the features of the single-chip VGA camera and image processor. Users can fully control the image quality, data format and transmission mode. The process of image processing functions including gamma curves, white balance, saturation, chroma, and so can be programmed through the SCCB interface. OmmiVision image sensor applications unique sensor technology to improve image quality by reducing or eliminating the optical or electronic defect, such as fixed pattern noise, tail-blooming, clear and stable color image.

<img src="ov7670_camera_module.png" alt="ov7670_camera_module.png">

  • Optical size 1/6 inches
  • Resolution 640×480 VGA
  • Onboard regulator, only single 3.3V supply needed
  • Standard 0.1inch (2.54mm) pin pitch header connector
  • Mounted with high quality F1.8 / 6mm lens
  • Output support for Raw RGB, RGB (GRB 4:2:2, RGB565/555/444), YUV (4:2:2) and YCbCr (4:2:2) formats
  • High sensitivity for low-light operation
  • Low operating voltage for embedded portable apps
  • Standard SCCB interface compatible with I2C interface
  • Supports image sizes: VGA, CIF, and any size scaling down from CIF to 40×30
  • VarioPixel® method for sub-sampling
  • Automatic image control functions including: Automatic
  • Automatic Exposure Control (AEC), Automatic Gain Control (AGC), Automatic White Balance (AWB), Automatic Band Filter (ABF), and Automatic Black-Level Calibration (ABLC)
  • Image quality controls including color saturation, hue, gamma, sharpness (edge enhancement), and anti-blooming
  • ISP includes noise reduction and defect correction
  • Supports LED and flash strobe mode
  • Supports scaling
  • Lens shading correction
  • Flicker (50/60 Hz) auto detection
  • Saturation level auto adjust (UV adjust)
  • Edge enhancement level auto adjust
  • De-noise level auto adjust
  • Temperature operation from -30° C to 70° C
  • Dark current 12 mV/s at 60° C
  • Field of view angle of 25°
  • Sensitivity 1.3V/Lux-sec

  • Cellular phones
  • PDAs
  • Toys
  • Other battery-powered products
  • Can be used in Arduino, Raspberry Pi, Maple, ChipKit, STM32, ARM, DSP, FPGA platforms

The following schematic diagram show a basic camera based system. The camera module is powered from a single +3.3V power supply. An external oscillator provide the clock source for camera module XCLK pin. With proper configuration to the camera internal registers via I2C bus, then the camera supply pixel clock (PCLK) and camera data (Data[9:0]) back to the host with synchronize signal like HREF and VSYNC.

<img src="camera_module_schematic.png" alt="camera_module_schematic.png">

The host may have integrate camera interface like STM32F2 or STM32F4 series MCUs, or ARM9/11 which has dedicate camera port, and DPS like TI TMS320DM series, as well as FPGAs that user can design special logic for camera application. The typical connection between these system and camera module would show like following diagram.
For the host that doesn’t have a dedicate camera interface, additional hardware is needed. User need to buffer a entire frame before read them out with low speed MCUs. For example ArduCAM shield is a additional hardware that can be connected to Arduino UNO/Mega board, user can take a photo or something like that easily. The following diagram show the system without dedicate camera interface.