OV2640 module for H7 cam

Dear All,

I know the cam H7 is working with ov7725 (640x480), and the cam M4 with the ov2640 (1600x1200 but used in 320x240).
Like all the code exists, i would like to know if it is possible to build an 0v2640 module for cam h7, and record jpeg image in uxvga ?

Thanks,

Yes, the driver support and everything is fully done and working. However, the OV2640 module has… bad image quality when not in UXGA mode… so, we have no plans to sell the thing. I did implement a fully featured driver with JPEG support.

A board with 24pin fpc connector could be great to test other camera.
The only problem for ov2640 is the power supply of 3v in place of 3.3v.
In M4, you could change the regulator output reference.

However I started openmv with F7, is it possible to have UXGA (1600x1200) with M4 through openmvIDE or it is only possible with H7 for memory ?

The jpeg mode will work for all cameras. You can use the OV2640 with any model.

Ok, but how do you get image without using snapshot which is not working in this mode ?

The OV2640 driver works with snapshot.

If you want to capture a jpeg image set the pixel format to JPEG.

With 3.4.0 version and this python code :

import sensor, image

if sensor.get_id() == sensor.OV2640 :
   print('OV2640')

sensor.reset()                      		# Reset and initialize the sensor.
sensor.set_pixformat(sensor.JPEG)   	# Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.UXGA)   	# Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     	# Wait for settings take effect.

while(True):
    img = sensor.snapshot()
    print(sensor.snapshot().size())

I have got “OSErroor: Operation not supported on JPEG”

Which line? Also, v3.5.0 is out online on the GitHub. Please download and install it.

Ok with the 3.5.1 firm, the mjpeg function did an uxga video on the sdcard with the ov2640 in jpeg mode.

Awesome!

Opposite to the subject of this post, i tried it on a F7 board.

Are you going to add jpeg mode for the ov5640 too ?

Yes, the driver for it still needs work.

How did you manage I/o voltage between 2.8v of sensor and 3.3v of uc ?
Did you use a level voltage switcher ?

We just send it 3.3v. The sensor will only be damaged if the voltage difference is above 0.7v.

Ok, but could you use the maximum speed to communicate ?

Yes? Not sure what you are asking.

well, i was badly thinking about rising and falling edges time consideration… but it is ok !

I tried OV5640, and VGA mode give colored images.
Do you have timeline for OV5640 driver ?

It’s my next task. I have to get the driver for this done ASAP.

Hello,

I just tested the OV5640, and in first approach i get in openmvide

  • QVGA image with violet color
  • VGA image with psychedelic color
  • no jpeg mode

I tried to modify the registers through __write_reg and __read_reg function without success ??
Therefore i did it before compiling, and i could remove qvga violet color by switching off the night mode in AEC-CTRL00 at 0x3A00[bit 2].

I have the datasheet here :
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwi1lcjG1rLmAhWoAWMBHZUMD9cQFjAAegQIARAC&url=https%3A%2F%2Fcdn.sparkfun.com%2Fdatasheets%2FSensors%2FLightImaging%2FOV5640_datasheet.pdf&usg=AOvVaw1f4ewP5M2OfEc3Z_NoK1r5
but all the registers are not explained, do you have more ?

Hope it helps for all !