0
\$\begingroup\$

I would like to create a simple frame synchronihed stereo camera. I found there are cheap OV7670 boards (without FIFO memory) that work with Arduino (or compatible) boards - these sensors do not have an oscillator on board and accept external clock signal. The basic idea is to feed both cameras with a common clock signal.

The cameras are controlled via I2C interfaces where the resolution, image format etc. are being set. I think there may also be a need to configure both sensors at exactly the same time since the change of resolution/framerate will most likely affect the synchronization. This may lead to the requirement of two separate I2C buses that are able to issue a command exactly at the same time.

Could someone prove my assumptions right or wrong please? And possibly direct me to hardware capable of doing the parallel I2C stuff I need? Thanks.

\$\endgroup\$
  • 1
    \$\begingroup\$ Possible duplicate of Genlock two OV5642 camera modules on Arduino with ArduCam \$\endgroup\$ – Maple Jul 29 '18 at 1:01
  • 1
    \$\begingroup\$ What happened with the question answered 4 years ago? With that camera you even had external trigger input. \$\endgroup\$ – Maple Jul 29 '18 at 1:03
  • \$\begingroup\$ FPGA's are capable of paralleling timing \$\endgroup\$ – Voltage Spike Jul 30 '18 at 17:06
1
\$\begingroup\$

I very much doubt you will be able to achieve synchronicity by issuing I2C commands, but it is worth a try. Check with a scope how I2C commands affect the frames.

I think you could just connect the I2C pins of both cameras in parallel.(Assuming you don't need to read from the camera's, IIRc that is not needed unless you want to do something fancy.)

I it fails, you could consider clocking one camera chip from a PLL that is driven by the phase difference of the two frame (and maybe line) pulses.

\$\endgroup\$
1
\$\begingroup\$

At 640x480 resolution we are not talking about high quality images, obviously. With that in mind, 1/30 sec difference between two images should not affect the result much. Besides, human brain is very efficient in processing discrepancies and building a complete picture.

I think you should just try taking two closest frames from both cameras and see what happens. You don't need any special I2C interface for this.

If this does not work for you as expected then I second @wouter-van-ooijen suggestion on using multiple timing outputs of timing generators as inputs for PLL on XCLK of one of the cameras. Note that you don't need to do anything special with I2C for this either.

The bottom line is that I2C is not used for direct frame control or synchronization in any way. As such, there is no point of using two I2C channels at all, let alone synchronize them.

\$\endgroup\$
1
\$\begingroup\$

One idea you could try out is to supply XCLK of one of the sensors via an adjustable clock generator, and speed up / slow down that clock depending on VSYNC signal of that sensor arriving early or late. After some time, you will end up with both sensors running at the same XCLK frequency with VSYNC signals in sync.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.