Introduction: OV7670 Without FIFO Very Simple Framecapture With Arduino, Black/white

Picture of OV7670 Without FIFO Very Simple Framecapture With Arduino, Black/white

This instructable is for all the people struggling to just take a picture/grab a frame with their OV7670 without FIFO. I made this purely as an introduction. I do not yet posses the necessary coding skills to make a really great description. This was made to hopefully save some people a lot of the hours I used researching the OV7670 wanting to see if it worked.

All the coding provided is copied from these links:

http://forum.arduino.cc/index.php?topic=159557.0 (From a really cool guy but obviously not a fan of the arduino IDE or windows)

http://embeddedprogrammer.blogspot.dk/2012/07/hack... (Provides a lot of usefull information for understanding how the OV7670 works)

http://privateblog.info/arduino-uno-i-kamera-ov767... (is in russian, but with google translate you can actually extract some useful information)

Other useful documents are captured in the rar file.

Step 1: Identify Your Camera

Picture of Identify Your Camera

This might be a little redundant but before you get down to the nitty-gritty make sure that the camera you bought is the one without FIFO. I bought mine from http://www.dx.com/p/jtron-ov7670-300kp-vga-camera-.... If your pins mention fifo or you do not have 18 pins for exits this is not the tutorial for you! Btw, if you are thinking about buying the OV7670 and you don't do coding let me save you some time. Spend a more little money and go for one that is better supported by the community for non-coders.

Step 2: Connecting the Pieces

Picture of Connecting the Pieces

The OV7670 is not rated for voltages above 3.0v. Hence the voltage divider for the XCLK. Futhermore the OV7670 does not provide higher voltages than 3.0 which is a little low to be sure the arduino reads the input as high (it starts at 3.0v). Therefore we connect pull-up resistors.

Step 3: Upload Sketch to Arduino

The sketch is borrowed from this link:

https://github.com/ComputerNerd/ov7670-no-ram-ardu...

and put together in the ino file I uploaded (From_Computernerd).

Just insert the ino file in the Arduino IDE and upload it. Don't mind that it does not recognize some libraries in the beginning of the file. If it bothers you, comment the whole line out with //

Step 4: Different Option to "grab" Picture

If you only care about making the OV7670 work, proceed to the next step.

This is just to inform people of some of the different options to retrieve the pictures from the Arduino. I tried using the framegrabber from ComputerNerd:

https://github.com/ComputerNerd/simpleFrameGrabber

It seems to be written in UNIX/Linux. Hence I tried downloading the MinGW, which should be able to run the code. After adding several packages in MinGW I had to stop because MinGW does not contain the termios.h library which is used in the code.

Another option to run GNU in windows is Cygwin. In Cygwin you also install packages with different libraries. I tried running the code installing new packages whenever Cygwin told me a library was missing. In the end I was able to compile an exe file but it wouldn't run because allegedly cygjpeg-8.dll and cygSDL-1-2-0.dll was missing even though I had installed both packages.

Finally abandoning all hope of running the "original" framegrabber I found a russian website where a guy had made his own framegrabber in java instead.

Step 5: 1. Half.

Picture of 1. Half.

-Create a new folder on your c drive called out, like c:\out. This is where the pictures will end up.

-Download and install java SDK 32bit (don't install the 64 bit version even if your system is 64 bit) I've tested this with version 8u74.(I've included it as a rar-file because it wouldn't let me upload the exe-file)

-Find out what USB port your Arduino is connected to, something like COM3 or COM4. Check pictures to understand how.

-Depending on what port number your Arduino is connected to, download the corresponding file: COM1 = com_1.rar etc.

Step 6: 2. Half.

Picture of 2. Half.

-Go to the "bin" folder, where you installed the Java SDK. By default it should be C:\Program Files (x86)\Java\jdk1.8.0_74\bin.

-Unpack your corresponding com_#.rar files in the directory. Check picture for help. (it might ask for adm. permission)

-Download and extract the Extra.rar file. The "win32com.dll" is placed in the "...\jdk1.8.0_74\jre\bin" direktory.

the "comm.jar" in "...\jdk1.8.0_74\jre\lib\ext" and the "javax.comm.properties" in the "...\jdk1.8.0_74\jre\lib" directory.

-Open cmd

-Open the folder wherein the code is (mine is): cd C:\Program Files (x86)\Java\jdk1.8.0_74\bin

Write: java code.SimpleRead

Enjoy! (It isn't much but at least you got it working)

Step 7: Troubleshooting and Pictures

Picture of Troubleshooting and Pictures

-If your cmd does not "FIND" images try switching the USB of the arduino from a USB2.0 to a USB3.0 (blue socket) or vice versa.

-If your cmd does not "FIND" images or if you recieve SCRAMBLED pictures, you need to edit the ino file. Edit the line: wrReg(0x11, 12);

try changng the 12 to 11 or 10 or 9 or 13. Upload it to the arduino and run the cmd code again.

Good luck!

Comments

aj31197 (author)2017-12-15

how to connect arduino mega2560 with ov7670 non fifo module? bro

ThiagoR51 (author)2017-11-30

Hello people

I'm working as an ov7670 on a project. The camera has an automatic calibration adjustment function. In the same way as our eyes, where the iris fits when we are in dark surroundings and suddenly we are subject to an external clarity. I read that the camera has a similar function. However, in my project, I need to disable this function.

Could someone help me with this?

Thanks in advance.

YousufM7 (author)2017-11-21

Hi,

Thank you for the instructions.

I hava a problem of: (Error: Could not find or load main class code.SimpleRead

Caused by: java.lang.ClassNotFoundException: com.epam.SimpleRead)

How can I fix this issue??

KasalaV (author)2017-11-15

I actually did everything according to given instructables , but I'm unable to get the image . I'm getting Looking for image in the command prompt . What I must do now!!???

AgusA12 (author)2017-11-01

https://www.youtube.com/watch?v=AH13reXFjNQ&t=221s

I got new video about OV7670,, and it's work

HuấnV2 (author)AgusA122017-11-11

Hello, HREF pins need to be connected?

AgusA12 (author)HuấnV22017-11-13

yes i connected href

AgusA12 (author)HuấnV22017-11-12

in my experience better if you connect href

HuấnV2 (author)AgusA122017-11-12

A.In the code I do not see D8 pins or any registers, please help me

SuperD4 (author)2017-10-04

How do I do it? To save to a memory card

PascalE5 made it! (author)2017-10-03

I thought I bought this camera for nothing! But it works well with your good work ! Thank you for sharing !

吳喜舒 (author)2017-03-05

I meet the same problem too

the cmd is stop in "Looking for image"

I follow the steps 100% and I download your JDK version as well

and my ov7670 is without FIFO too

My arduino upload files in port4 and I use your port4 files too"

What can I do?

this project is important to me

plz help me!!!

wyf (author)吳喜舒2017-03-06

I have the same problem as you and how can you fix it?I have done an important project as you, can you please help me?

吳喜舒 (author)wyf2017-03-06

hey, i done it

I think the problem is because the wiring

plz check the schematic sir

I AM SO HAPPY

"HERF" don't need to connect

and then "SIOC" ->A4 NOT A5

"SIOD:->A5 NOT A4

"XCLKF" ->D11 directly (Don't use any Resistance)

PLZ TRY THIS

AND I can capture now

wyf (author)吳喜舒2017-03-06

And the Uno L red light keeps flashing and I am wondering if it is noraml.Did you have the same situation before?

brlch (author)wyf2017-10-03

in my case, switching a4 and a5 did trick

wyf (author)吳喜舒2017-03-06

Thanks for ur detailed explanations,though it still doesn't work.May I ask u one more question, what value of resistors u use to connect with the SIOC and SIOD?

吳喜舒 (author)wyf2017-03-06

10k

let try this schematic.

and SIOD,SIOC connect with 3.3v

wyf (author)吳喜舒2017-03-07

Really thanks for your help.I can take pictures now. But it seems the resolution is too low which cannot be acceptable.How can you tune he resolution?

吳喜舒 (author)吳喜舒2017-03-06

if you keep stop in "looking for image"

Switch SIOC>D4 /SIOD>D5 OR SIOC>D5/SIOC>D4

吳喜舒 (author)wyf2017-03-06

I am done now.

plz check the wiring.

A4>SIOD

A5>SIOC

XCLK>D11 directly (don't use any resistance)

and don't connect HREF

Just try it

I am not following the top of schematic

SpeedOfSpin (author)吳喜舒2017-04-07

Hi

I wouldn't recommend this as the OV7670 is can only take around 3v on its inputs. Although it "may" work at 5v it probably wont last long.

thanks

arduinoguru (author)2016-12-28

My Arduio is using COM 7 and no other port is free. Where to get the codes for more than com 5 ports?

CésarA94 (author)arduinoguru2016-12-28

I didn't like the java app either, so I wrote a simple Windows Forms application which basically does the same thing, but it's easier to use and to setup. You only have to run the app, select your COM port and start listening.

The app is here: https://cesarab.blob.core.windows.net/public/ReadSerialPortWin.exe

It only requires .net framework 3.5 (just run the app, and if it shows you an error saying you don't have the .net framework installed, follow these instructions to enable it on your Windows: https://msdn.microsoft.com/en-us/library/hh506443(v=vs.110).aspx)

吳喜舒 (author)CésarA942017-03-06

sir, I load the arduino code to port 4

and then i install the .net framwork3.5

then,i run your app

and select serial port (com4)> click start

the status :com 4 port opened

but no any image i can get?

how to solve it?

FaysalH (author)吳喜舒2017-09-28

how did you solve it ?

PriyankaM21 (author)吳喜舒2017-03-16

sir, even i am facing the same issue. Have you got any improvements..?

JeebitaM (author)CésarA942017-05-25

I tried this but its not working. It shows something like this... Please help..

:( :(

FaysalH (author)JeebitaM2017-09-28

How did you solve it ?

prasadideas made it! (author)CésarA942016-12-30

Hi CésarA94, Thank you very much Your Application is working perfectly. I am modifying this project to get the colour image.

Can You Please Share me the source code of your windows application.

prasadideas@gmail.com

Thank you very much in advance.

--Prasad

s_mile (author)prasadideas2017-07-10

HI,

Have you got the color image from OV7670?

If so can you please mention the changes required in the code.

CésarA94 (author)prasadideas2017-01-08

Sure. Here it is: https://cesarab.blob.core.windows.net/public/ReadSerialPort.zip

zoomx (author)CésarA942017-06-01

Thank you very much!

吳喜舒 (author)CésarA942017-03-06

sir ,if i stop in "looking for image"

can i use your app and get the picture?

bting (author)CésarA942017-02-06

Hi CesarA94,

I have tried out your application and it is work for me. Hovewer, I have face this problem that the image is not completed and scattered by pieces. may I know what cause of this? It wont not happen when i using java application from tutorial

ratnick66DK (author)CésarA942017-01-22

Hi César,

Your app is much needed since it seems like the java solution is getting outdated.

I installed and compiled your app (in Visual Studio) and it runs fine.

And yet - there seems to be a port conflict when I start sending data from the Arduino on the COM port.

What is the correct startup sequence of the app and the arduino (given the arduino first need to load the program)?
Can I use the port monitor simultaneously?
How do I set bitrate, parity etc. to match the Arduino settings?

thanks, Nikolaj

ratnick66DK (author)ratnick66DK2017-01-22

System.UnauthorizedAccessException was unhandled

Message: An unhandled exception of type 'System.UnauthorizedAccessException' occurred in System.dll

Additional information: Access to the port COM6" was denied

shariq azim (author)CésarA942017-04-15

Hi CesarA94,.

Thanks for your update and kind gesture to help others. But unfortunately im not sure what to do after the files are downloaded. Can you please help me with steps.

Regards,

Shariq

CésarA94 made it! (author)CésarA942016-12-29

I forgot to attach a screenshot of the app running:

吳喜舒 (author)CésarA942017-03-06

hey sir. How can you get the picture.

i use cmb but I stop in "Looking for image"

plz help me !!

EthanK38 (author)CésarA942017-01-08

Do you mind to share me the source code of your windows application?

ethankiu@gmail.com

thanks.

CésarA94 (author)EthanK382017-01-08

https://cesarab.blob.core.windows.net/public/ReadSerialPort.zip

arduinoguru (author)CésarA942017-01-23

Thanks. That worked. Sorry for the late reply.

ZackH5 (author)CésarA942017-01-02

Thanks for the app, I'll try it.

MahmoudE116 made it! (author)arduinoguru2017-04-24

its not a problem :) just follow thoses steps

PC> devise manager > PORT(COM and LPT) > arduino uno (com#) >port settings>advanced > port number .

changed it what ever you want

SaiP88 made it! (author)arduinoguru2017-01-03

Even I faced the same problem.

Solution:

Goto ControlPanel>DeviceManager.

In the tool bar,go to "View" and check the "Show hidden devices" option.

Now you must be able to see all the devices which are using your COMs. Just right-click on them and uninstall that which you aren't using.

This worked for me!

Seik0 (author)2017-09-19

Hi everyone

Im Stuck in "looking for the image" there

anyone could teach me how to solve it?

(urgent)

thx

ProbudhaB made it! (author)2017-09-12

Thanks a ton 吳喜舒. you made my day.

PrajwithU made it! (author)2017-08-14

I tried many times but at cmd stage on output available, please help me author

PrajwithU (author)2017-08-14

Hi, very nice, I am using Arduino MEGA what changes should be done, please help me I am an Engineering student.

About This Instructable

104,145views

68favorites

License:

More by Kepp27:Mini LED Lamp With Movement- (PIR) and Lightssensor (LDR)Lightning LED RGB cloud with mechanical switchOV7670 without FIFO very simple framecapture with Arduino, black/white
Add instructable to: