Have you been told by someone or I that you an external ram of some sort such as a FIFO or SPI ram. I previously thought external RAM was needed but that is not true.
Here is the code that uses only a non-FIFO OV7670 module GitHub - ComputerNerd/ov7670-no-ram-arduino-uno: Allows you to use a non fifo ov7670 on the arudino uno without external spi ram like other examples. Sends the data to UART.
Accompanied by the Arudino code is a frame grabber GitHub - ComputerNerd/simpleFrameGrabber: Uses SDL to display frames sent via serial. POSIX systems only.
It requires only the ov7670 without FIFO and a way to lower the 5V digital outputs to 3.3V. No other parts such as SPI ram or an AL422 are needed.
Also for those who may have been having trouble with the camera module note that PWDN should be plugged into ground and RESET# to 3.3v.
The initial post is always a work in progress. I appreciate suggestions on how to improve this post. We can avoid redundant questions with a high quality initial post.
When creating this post on the 2013-04-09 I would have never imagined that there would be so much interest in the ov7670.
I am happy that I have enabled so many people to explore the world of image processing introducing people to a valuable and fun concept.
What is the OV7670?
The OV7670 is an image sensor manufactured by OmniVision.
This image sensor is quite old by image sensor standards. According to OmniVision they started mass production of the sensor in February of 2006.
The image sensor has a resolution of 640x480 and is an Soc meaning it has built in image processing capabilities.
Why the OV7670?
The OV7670 is the lowest cost camera module that I am able to find.
There are other easy to use camera modules available that are higher quality for only a few dollars more.
What can I do with the OV7670?
The reality is you are limited not only by the sensor but by the processor you are using.
This thread focuses primarily on Arduino boards and interfacing the ov7670 to microcontrollers featured on an Arduino board. The Arduinos that I have used are both based on 8bit AVRs running at 16mhz so that is quite the limitation. I do however welcome discussion of any microcontroller. Do not expect something ridiculous such as 30fps 640x480 on an Arduino Uno.
The original reason that I wanted to use the OV7670 was time lapse purposes.
I could live with the slow speed as all I need was an image every few seconds. However using a faster microcontroller can mean reading pixels faster but remember un-optimized code on a fast microcontroller can be slower than well optimized code on a slower device.
So with all that said: What can I actually do with this sensor? The answer is pretty much anything that does not involve subjecting the sensor to unreasonable conditions or expecting something unreasonable from it such as 1000fps full resolution. What attracts me to the idea of a camera module vs just buying a webcam is the fact that I have more control over it. You are able to program it to do various tasks that suite your needs and the automatic functionality on the OV7670 (such as auto white balance, auto gain and auto exposure) can be overridden if needed.
How can I get started?
Read the documentation and check out code that I have written. Also check the code to figure out some aspects of wiring. I have already explained many aspects of wiring. Just read the thread.
Where can I get documentation?
I would like to expand this list. If you have ANYTHING from Omnivsion that would help me understand undocumented stuff in regards to the OV7670 I will take it. If you cannot or do not want it to be posted on the internet I will respect that wish fully. I will take anything regarding the OV7670 even a newer version of what I have already. In fact I would take unrelated documentation that comes from Omnivsion. It is nice to have. Seemly unrelated documentation may prove to be relevant in non obvious ways until examined.
Where do you keep up to date code?
Here GitHub - ComputerNerd/ov7670-simple: This is a simple sample code of the ov7670 on the arduino uno sends data over serial. and here GitHub - ComputerNerd/arduino-camera-tft: Arduino Mega 2560 code that uses either an OV7670 or an MT9D111 to display an image on a TFT LCD screen with SD card support. also if you don't have any other parts besides the ov7670 check out GitHub - ComputerNerd/ov7670-no-ram-arduino-uno: Allows you to use a non fifo ov7670 on the arudino uno without external spi ram like other examples. Sends the data to UART. it also contains how to enable PWM to get 8mhz.
I also made a data converter that allows you to convert raw data from the camera into a PNG file
GitHub - ComputerNerd/RawCamera-data-converter: This program was made to convert raw data from the ov7670 to a png file. It may also work with other cameras.
For windows users here is a binary.
RawCamera-data-converter/convert.exe.7z at master · ComputerNerd/RawCamera-data-converter · GitHub
I also posted some pastebin links that is old code but it covers some stuff that the code above does not
How I can I help the author?
Responding to you all guys does not happen magically. There are some things you can do to help ensure that I will continue to help you.
- Give back: Know something that I don't know regarding the OV7670? Post it.
- Avoid asking repeat questions.
- Write stuff. Maybe you can explain something better than I can. If that is the case please do such. I am always open to suggestions on how I can improving my writing.