Pages: 1 ... 22 23 [24] 25 26 27   Go Down
Author Topic: ov7670 with both arduino uno and now mega  (Read 72458 times)
0 Members and 3 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 2
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mr_Arduino and the broader community,

Thank you for posting all of the information and code to enable this project.  Your help is much appreciated.  I am having a tough time understanding the connections.  Is there any chance you can post a detailed photo or a diagram of the wiring between the OV7670 with FIFO and the Arduino Mega? 

I am having a tough time visualizing how to incorporate the 74HC25 chip.

Thanks in advance.
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 74hc125 allows for you to easily to convert the 5v clock signal generated by the AVR processor into a 3.3v signal. What you do is simply power the 74hc125 with 3.3v and plug in the 5v signal into the input and out will come a 3.3v signal. Note that the 74hc125 has a output enable pins. Pull the ones you are using to ground to enable output. As for a schematic I do need to get going on that.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Mr_Arduino

Would you mind use your OV7670 and capture your skin / hand in the YUV/YCbCr format?

Are you getting results similar to these?



Thanks
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No the colors I get from the camera look quite nice especially indoors. Try changing your registers. I have disucessed the registers that I have on github multiple times in this thread. Please refer back to them. Check out these page https://github.com/ComputerNerd/arduino-camera-tft/blob/master/ov7670_regs.h https://github.com/ComputerNerd/arduino-camera-tft/blob/master/twicam.h https://github.com/ComputerNerd/arduino-camera-tft/blob/master/twicam.c
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear Mr_arduino,

I am currently working with a group of students trying to get the OV7670 working as a sensor with an Arduino Due or Uno.  How exactly do we drive the XCLK and connect HREF?  And is which code best suits our interests?  We are very confused.  Thanks!  

Edit: We are trying to configure this using i2C configuration
« Last Edit: July 02, 2014, 03:44:20 pm by TeamAlpha » Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HREF just goes to an arduino PIN if you want to do that. Just don't plug it in if you don't need to use it. I use VREF. As for XCLK generate it with fast PWM and use a buffer to get it from 5v to 3.3v
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

anyone have success in making the ov7670 output QQVGA (160 by 120) ?

Thanks. What are the proper register settings?

Ive done my research and I tried putting these



yet the signals(href) is not stopping at the 320th data.


Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have used qqvga before check out the registers that I used on my github pages.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HREF just goes to an arduino PIN if you want to do that. Just don't plug it in if you don't need to use it. I use VREF. As for XCLK generate it with fast PWM and use a buffer to get it from 5v to 3.3v

Just a few basic follow up questions.  

How do you buffer the the XCLK?   Is it just simple voltage division with a pull-up resistor?  
How do you drive the XCLK using PWM?   What is the connection/code?

Sorry for the redundant questions, thanks!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Mr_Arduino
Hello, how do I remove the white glare in my face?



Heres my register setting


Write(0xb0,0x84); //adding this improve the color a little bit
  Write(AWBC7,0x88);
     Write(AWBC7,0x88);
    Write(AWBC8,0x88);
    Write(AWBC9,0x44);
    Write(AWBC10,0x67);
    Write(AWBC11,0x49);
    Write(AWBC12,0x0e);
    Write(AWBCTR3,0x0a);
    Write(AWBCTR2,0x55);
    Write(AWBCTR1,0x11);
    Write(AWBCTR0,0x9f);

  Write(0x14,0x6a);
  Write(0x4f,0x80);
  Write(0x50,0x80);
  Write(0x51,0x0);
  Write(0x52,0x22);
  Write(0x53,0x5e);
  Write(0x54,0x80);


Heres the second image



The background looks ok but my body and my shirt is full of brightness, we cant see details (unlike in the back). Any suggestions thanks?
« Last Edit: July 04, 2014, 01:48:22 am by vvavepacket » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this item good? I think there are variations of OV7670 with FIFO buffer

http://www.ebay.com/itm/OV7670-FIFO-AL422B-VGA-CIF-Camera-SCCB-I2C-for-AVR-STM32-Arduino-Compatible-/230980005304?pt=LH_DefaultDomain_0&hash=item35c77b2db8


What do you suggest when someone is looking for OV7670 with FIFO?
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright I will answer both vvavepacket's two questions and TeamAlpha's question. I will be going in reverse order by post.
@vvavepacket
First of all you can get the same thing for cheaper http://www.ebay.com/itm/640-x-480-VGA-CMOS-AL422-3M-Bits-OV7670-FIFO-Camera-STM32-Driver-Module-I2C-/161333211986?pt=LH_DefaultDomain_0&hash=item2590357352
they both appear to be at-least similar.
To fix the glare you are going to have to first of all make sure that bits 7 and 6 in register 0x40 are set to one by default (according to the datasheet) they are set.
Also make sure register 0x55 is set to 0 (brightness should never be changed using this register)
and that register 0x56 is set to 0x40. (Contrast should not be changed like this).
if you want a different brightness you should instead vary the exposure and/or gain settings. It may be that the ov7670 is picking the wrong exposure and gain settings if that is the case the https://github.com/dalmirdasilva/ArduinoCamera/blob/master/CameraAL422B/datasheet/OV7670%20Implementation%20Guide%20%28V1.0%29.pdf explains auto exposure and auto gain best.
There are some undocumented registers that I have pulled from various places. I just write all those and end up with a nice looking image. I wish I could find out what all the registers do. Is that all the registers that you are writing to the ov7670?
I have attached some pictures I have taken with the ov7670 to show you the quality that can be achieved with better register settings.

@TeamAlpha I have not tried a resistor voltage divider. I have heard that resistor voltage dividers may be noisy so look at the output using an oscilloscope. I just use a buffer IC chip. Also to generate the XCLK clock you need to use PWM. The way you set this up is slightly different depending on which microcontroller you are using. If you could tell me what you have I can further help you with this.


* led macro.png (429.53 KB, 640x480 - viewed 22 times.)

* ledcloseup3.png (338.08 KB, 640x480 - viewed 21 times.)

* push button.png (408.99 KB, 640x480 - viewed 12 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which should we get, version 1 or version 2 of fifo version?
Logged

Offline Offline
Sr. Member
****
Karma: 11
Posts: 332
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The difference is minor and is more of a preference issue you can read about the difference here http://wiki.beyondlogic.org/index.php/OV7670_Camera_Module_with_AL422_FIFO_Theory_of_Operation
Also any luck improving the image quality?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Going to try when i get home. I feel sad since i cant get a good capture as you do. Bpught 2 sensors of non fifo version woth same rrsults
Logged

Pages: 1 ... 22 23 [24] 25 26 27   Go Up
Jump to: