$10 camera module for your next FPGA project

Here is [Voelker] showing off his FPGA-based camera hardware. He picked up an ov7670 camera on eBay for about $10 and set to work pulling pixels and processing the images. He’s now able to grab thirty frames per second and push them to his own Java display application. He’s using the Papilio board and if you want to give this a try yourself you might be able to snag a free breakout board (wing) for the unit.

[Voelker’s] approach is to grab each frame, and get it ready for quick serial transmission. The incoming frames are at 640×480 resolution. He scales that down to 80×60 and transmitted at 3M baud. The hardware resources used are actually quite light-weight. He wrote his own modules for transfer and photo processing using very little RAM for downscaling and one 128 byte buffer for data transmission. It sounds like he plans to use the camera to view and detect a line to create his own line-following robot.

Wondering where you’ve seen the ov7670 module before? It’s the part used on the TRAKR robot.

22 thoughts on “$10 camera module for your next FPGA project

  1. recently bought a bunch of Samsung AU-85 camera modules (containing a Biomorphic Bi8921 2MP sensor with on-chip jpeg compressor), they can produce up to 12 fps at 1600x1200px. Nice to see someone actually uses this stuff.

  2. Looks like the pcb’s were long gone as of yesterday’s post.

    Looks like a ploy to get everyone visit the site and have to pay for a board.

    1. Hello Joe,

      I can certainly see how it might seem that way. But I actually sent out the last PCB about 4 hours ago. As soon as I sent out the last board I changed the original blog post to say there are no more boards. It’s not a ploy to sell more boards because I don’t HAVE more boards to sell. :) I was giving away boards from a small order of 10 boards I got from Seeed’s Fusion service. We designed the boards months ago and ordered a test batch so I had them sitting around on my desk. When voelker posted his code I was actually surprised that it was for the same module we had been looking at and I figured I’d give away the extra boards since I only need two of them on hand. :) Maybe with more work and verification we will be able to offer boards for sale. But for now all I can offer is the Open Source EAGLE files if anyone wants them. They are on github at:


      Anyway, I hope you understand that the boards were not offered with any ulterior motive. I’m just glad to see voelker get exposure for his work and that some people get a free PCB too.


  3. I may be wrong here but why are we taking hardware that can do 640×480 and downsampling it considerably to use it to follow a line? Why don’t we throw more processing power at it and capture at 40+ megapixels and then perform sophisticated image analysis software algorithms on it to allow a robot to do far more than simply follow a line? Perhaps bipedal motion, more complex kinesthetic applications – that sort of thing?

    Is it the cost of hardware (both physical and monetary) that is holding us back? $25 arduinos and cheap cameras are amazing, sure, but do we need things like multi core ARM boards for $35 (raspberry pi I am looking at you) that can be aggregated together to perform some serious numbers crunching before we see somewhat of a revolution in hardware / software / robotics? What does it take?

    1. My guess is downscaling it for the serial transmission. With 60×80, 30 fps, 12bit color, you have 1728000 bits per second and that doesn’t include framing bits, error corrections, location bytes etc.

      1. The reason i started using the papilio is because i try to perform basic vision processing on the beagleboard and i was only getting 10~15 fps. With an fpga you can pipeline your vision processing at the pixel level (or 8×8 block) and thus reach far better performance. It may be more difficult due to development complexity, but the goal of this project is to provide a library of operator you can connect to form your processing pipeline (like you would with opencv).
        One of the thing i also plan to do, is to connect the papilio to the beaglebone (through the GPMC port) to perform more memory hungry tasks.

      2. Senso, I’ve used similar products with an OMAP or DaVinci processor for image processing, and can easily do 50-60 fps with a few megapixel camera… sobel filtering, thresholding, floating-point math

      1. There are already Cortex M4 ARM’s running at almost 200Mhz, and at more than 200MIPS, add some ram, and with no OS you can also do some pretty interesting thing, and the M4’s have FPU so, doing floating point is as fast as fixed point(1 or 2 clock cycles).

  4. for those who wanna to buy his 1st ov7670 ..

    ov7670 is cheap (if u think US$10 is nothing) but not that easy to use.

    if u use it as a toy, (i.e. not care about the color, not care about the white balance..etc) then it is OK to use it.

    the doc are outdated, miss leading ..

  5. for those who wanna to buy his 1st ov7670 ..

    ov7670 is cheap (if u think US$10 is nothing) but not that easy to use.

    if u use it as a toy, (i.e. not care about the color, not care about the white balance..etc) then it is OK to use it.

    the doc are outdated, miss leading ..

    good luck!!

  6. Hi,

    i’am downsampling the image just to send it to the PC. The max speed of the UART is 3Mbaud and transferring full frame @ 30hz Y channel only would require 72mbit/s. By downsampling to 80×60 the bandwith is reduced to 1.152Mbit/s. The only purpose of down sampling is to have a preview for debugging. The frame processing i intend to do inside the fpga will be performed on a full frame. I have nearly completed a convolution operator i plan to use for sobel filtering (first step to edge detection).
    For those who want to try, you can find some ov7670 module that include the 3.3v voltage regulator and can communicate at 3.3v. This kind of module fits directly into the papilio header, you just need to connect the power rail your way (i’am using some stripboard).

    1. HI Voelker,
      Good job there. I am working with beaglebone, and am trying to interface a camera to it: will OV7670 suffice? Can you please suggest me other camera options that I can try it, which comes under say 20$ which works with bb.

      Awaiting your response.

  7. Using 7670 + FIFO Buffer module at the moment in a project. It is, without a shadow of a doubt, the most awkward thing I have EVER had to use. From confusing datasheets and revisions to a hacked up I2C bus that they call SCCB, I really couldn’t recommend it.

  8. Hi,

    i did not read the full datasheet in the first place. I juste looked a the signal timing. All the register configuration was performed using values taken from ov7670.c in the linux kernel. The SCCB bus looks fine to me, no problem with it so far …
    I understand that the ov7670 is not the best sensor but it’s cheap.
    The best sensor for my application would be the MT9V034 from aptina (global shutter, HDR) , but i cannot find a (cheap) module for it.

    1. Well you can “use” it with two bits of plank as a novelty book end, or as the backup camera on your 1:1 Imperial Star Destroyer replica… perhaps a more precise definition of “use” as it pertains to your intended application, would be more helpful.

      Or maybe I should just go with, ahem. “It’s abso-fugging-lutely IMPOSSIBLE to do ANYTHING with that camera and a spartan”

      There you go, 10 hacks will be posted by the end of next week :-D

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s