OV7670 camera and arduino

OV7670 is a small CMOS VGA camera. This camera can be interfaced to an Arduino. This page presents how the camera can be interfaced to an Arduino Uno. A breakout board is used in the following. It is very cheap as you can see:

Specifications

Key Specifications
Array 640x780
Output format YUV YCbCr 4/2/2 / RGB565 / RGB555 / GRB 4/2/2 / Raw RGB Data
Lens Size 1/6"
Maximum image transfert rate 30 fps for VGA
Sensitivity 1.1 V/Lux-sec

Wiring

The following wiring has been used to connect the OV7670 to the Arduin Uno: Schematic wiring to connect the OV7670 to the Arduino Uno

Operating principle

The Arduino requires a capture to the OV7670 camera and send the image through USB to a PC. A Windows application read the data and display the image on the screen. Arduino source code and windows application can be downloaded at the bottom of this page.

Results

Everything works out of the box, here are some examples of captures:

Capture 1 of the OB7670 camera Capture 2 of the OB7670 camera

The camera is equiped with an automatic gain control (AGC). The controler can be very slow when images are captured at low rate:

Capture 3 of the OB7670 camera Capture 4 of the OB7670 camera

Sometime, the synchronisation between the camera and the software fails:

Capture 5 of the OB7670 camera Capture 6 of the OB7670 camera

The main problem of this hardware is that the Arduino Uno process images at a very low rate. Since the Arduino Uno has a maximum frequency of 16Mhz, data conversion and transmission are very slow. On the above captures and depending on light conditions, images are updated every 4 to 5s. In my opinion, this camera must be used either with a lower resolution or with a higher performances harware.

Photos

Photo 1 of the wiring to connect the OV7670 to the Arduini Uno Photo 2 of the wiring to connect the OV7670 to the Arduini Uno Photo 3 of the wiring to connect the OV7670 to the Arduini Uno Photo 4 of the wiring to connect the OV7670 to the Arduini Uno Photo 5 of the wiring to connect the OV7670 to the Arduini Uno Photo 6 of the wiring to connect the OV7670 to the Arduini Uno Photo 7 of the wiring to connect the OV7670 to the Arduini Uno

Download

Arduino source code, Windows application and datasheet can be downloaded here:

OV7670-datasheet.pdf

ov7670.ino

ReadSerialPortWin.exe (Windows application)

See also


Last update : 07/07/2018