Home / Tutorials / Arduino Tutorial / Arduino Camera (OV7670) Tutorial

Arduino Camera (OV7670) Tutorial

Electronics projects like movement and obstacle detection, drones, and robots require a camera for capturing images. I personally recommend using a Raspberry Pi or BeagleBone Black for these kind of projects because the Arduino doesn’t have enough juice to handle the complexities of pictures and, more so, videos. However, if the project doesn’t require a high resolution image then the OV7670 camera module might be for you. This arduino camera tutorial features such camera and how you can use it to capture VGA-sized pictures.

I managed to buy a OV7670 camera module that looks like this:

[the_ad id=”3059″]

As you can see, the module has 18 output pins with the following functions:

Some modules contain 16 pins; these lack the RESET and PWON pins. Since I own the 18-pin OV7670 module, the rest of the tutorial will be based on such module.

If you noticed, the OV7670 camera module has a serial data and clock pin. This means that the Arduino can communicate with the module using I2C. Also, the module operates on 3.3 V so if we are to send data to the OV7670 from the Arduino, we must use a voltage divider to bring the level down.

Here is a common wiring diagram used to build an Arduino camera using the OV7670 camera module:

[the_ad id=”3059″]

Note that there is no efficient way for the Arduino to display the captured image. What it only does is command the module to take a picture, acquire the image and then send it to a computer via the Arduino’s USB port. Thus, you need to have another application that will display the image from the USB port to your desktop computer.

Here is a code to be used to capture an image using the Arduino and OV7670 camera module:

Note that this code requires the ov7670 library which was originally done by ComputerNerd. Download the library on this repository.

[the_ad id=”3059″]

Next, we need a desktop application that will read the image data from the Arduino’s USB port and display it on screen. Download this C/C++ package and run it using G++ for Linux or DevC++ for Windows. Unfortunately, C/C++ programming on desktop computers is beyond the scope of this tutorial so I can’t help you with this further.

Hopefully I’ve helped you in setting up the OV7670 camera module with the Arduino UNO. However, I would still recommend you use more advanced boards like Raspberry Pi or BeagleBone Black to handle images as the Arduino UNO is simply not powerful enough. Check out my tutorial on using a web camera with the Raspberry Pi and create cool projects!

Check Also

MAX30102 black board

MAX30102: An Improved Heart Rate Sensor for Arduino

Have you read the MAX30100 tutorial and are still having trouble making that chip work? …


  1. Thank you very much for sharing your hard work. It helps people like me immensely

  2. Christophe Trouillefou

    I’m trying desparately to make the camera OV7670 that contains a FIFO work with an arduino uno and record pictures on an SD card. If you have a simple code to make this dream become true (or even a good link to help).
    Everywhere on the web I only find info about OV7670 (without Fifo) + Uno.

  3. very usefull .thanks for this hard work. I am also working on this project and i really want to know how to print images and treat them to prohibit that a car start.thank
    i am waiting

  4. i’m working with the OV7670 module on an altera FPGA Board and i’m encountering some problems wich i cannot solve.
    The YCbCr422 encoding is the default format used by the camera module right?
    If so what are the exact data position/order that the camera is using on it’s D0-7 pin?
    When you explain how the data is stored for the YCbCr format you make a block scheme.
    What those blocks represents? Are they Bytes? If so one block would be the information present on D0-7 pins at a certain pclk edge?

  5. I need to connect OV7670 camera module with Begalebone black . Please share the connection and reference code for video streaming.

Leave a Reply

Your email address will not be published.