OV9281 MIPI Camera Module

Ian:

I am following the instructions as per https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI to run your Arducam example on a Pi 4.

 

I suspect it has something to do with GPIO control.

I reinstalled on a Raspberry Pi 3 and followed the instructions again and got the following results:

Hardware:

Revision : a020d3
Serial : 0000000063ad5943
Model : Raspberry Pi 3 Model B Plus Rev 1.3
[email protected]:~/MIPI_Camera/RPI/utils $

[email protected]:~/MIPI_Camera/RPI/utils $ ./camera_i2c
setting GPIO for board revsion: a020d3
Raspberry Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G)
Set state of 133 to 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – 38 – – – – – – –
40: – – – – – 45 – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: 60 – – – – – – – – – – – – – – –
70: 70 – – – – – – –

[email protected]:~/MIPI_Camera/RPI $ ./capture_raw
Open camera…
Found sensor ov9281 at address 60
init camera status = 4100

[email protected]:~/MIPI_Camera/RPI $ sudo ./capture_raw
Open camera…
Found sensor ov9281 at address 60
Setting the resolution…
Can’t open the file
mmal: Failed to fix lens shading, use the default mode!
Failed to write register
mmal: Failed to start sensor.
mmal: Failed to enable camera
set resolution status = 3

Running ./capture_raw with sudo will sometimes still give the status = 4100 code.

Thank you

Ian

When using a display on the HDMI port, it worked. Using the standard code with the Raspberry PI LCD display does not work. Will change the output resolution and see if I can get it to work.

So the camera is working fine with the HDMI port, but not with the official Raspberry Pi Touch Display.

Hi,

It is due to the i2c0 bus is occupied. For the official LCD, the touch driver chip FT5x06 will use the i2c0 and our camera will also use it. You can use our lib with a software i2c bus.

 

Hi,

We are also having trouble using the MIPI OV9281 modules in parallel to a DSI touch screen (Waveshare 4.3”) on the Raspberry Pi 4. We are able to control the camera only after disabling touch at boot.

How can we still use the camera and the touch screen?

You have mentioned in this forum the software i2c - Is this really the only option? Does it affect the performance? Can you please provide detailed instructions on how to implement this?

Hi,

Due to both the touch screen and MIPI camera use the i2c0 interface, if they work together, there will be the problem of i2C resource preemption. So if you want to both of them work together, we must simulate a set of i2c feed cameras, and the GPU will driver the touch screen using the i2c0 adapter.

Don’t worry, simulate i2c will not affect the performance. The i2c interface just be used on init camera and send control command, which will not affect the frame speed.

 

Let me know if you need more help.

 

 

Hi,

Thanks very much for your fast reply!

I’m pleased to hear there won’t be any effect on the performance! Thank you!

Is the i2c0 adapter you mentioned a physical add-on, or is it just some software/firmware modification?

How shall we proceed in solving this problem?

Thanks,

Peleg

 

Hi,

The hardware i2c0 can map two set of pins. One set is for camera and the other is for display. For the official camera. it is switched by the GPU. When we use the display, the GPU will probe the i2c0 and map the pin the display’s i2c pins. On this occasion, we just need configure the camera’s i2c pin as general gpio.

Hi,

Sounds great!

Do you have instructions on how to implement this? Do I need to send you anything?

 

Thanks

Peleg

Hi,

I don’t have a detail instruction.

You don’t do anything, Just connect the sensor as normal, we have a lib using software i2chttps://www.arducam.com/wp-content/uploads/2020/03/libarducam_mipicamera.zip

 

Hi,

Perhaps I’m missing something… I replaced the libarducam_mipicamera.so file with the one you provided a link for. I then ran the “make install”, “./enable_i2c_vc.sh”, and “make clean && make” commands according to your installation instructions in: https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI

Unfortunately, the camera still fails giving the 4100 error:

" Open camera…

Hardware Platform: c03111

init camera status = 4100 "

 

It only works if I disable the touch screen by adding “disable_touchscreen = 1” to the “/boot/config.txt” file.

(Please note I’m using the RPi 4 with Waveshare 4.3" DSI screen).

Your kind help is much appreciated!

Best,

Peleg

Hi,

Perhaps I’m missing something… I replaced the libarducam_mipicamera.so file with the one you provided a link for. I then ran the “make install”, “./enable_i2c_vc.sh”, and “make clean && make” commands according to your installation instructions in: https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI

Unfortunately, the camera still fails giving the 4100 error:

" Open camera…

Hardware Platform: c03111

init camera status = 4100 "

 

It only works if I disable the touch screen by adding “disable_touchscreen = 1” to the “/boot/config.txt” file.

(Please note I’m using the RPi 4 with Waveshare 4.3" DSI screen).

Your kind help is much appreciated!

Best,

Peleg

Hi,

Perhaps I’m missing something… I replaced the libarducam_mipicamera.so file with the one you provided a link for. I then ran the “make install”, “./enable_i2c_vc.sh”, and “make clean && make” commands according to your installation instructions in: github.com/ArduCAM/MIPI_Camera/tree/master/RPI

Unfortunately, the camera still fails giving the 4100 error:

" Open camera…

Hardware Platform: c03111

init camera status = 4100 "

 

It only works if I disable the touch screen by adding “disable_touchscreen = 1” to the “/boot/config.txt” file.

(Please note I’m using the RPi 4 with Waveshare 4.3" DSI screen).

Your kind help is much appreciated!

Best,

Peleg

Hi,

Don’t worry and I will test it using Pi4 and reply you as soon as possible.

 

Hi,

Sorry to reply you so late.

The platform is being used by other engineers and there may not be time to test it today.

Hi,

You can try this library https://github.com/ArduCAM/MIPI_Camera/blob/softwareI2c/RPI/lib/libarducam_mipicamera.so

 

Hi,

I have tested it and it does exist some problems. I met the same phenomenon as yours.

I will check back later.

 

 

Hi,

I have another way to help you solve this problem. If you want to use the 7 inch screen and MIPI camera at the same time, you can choose our UCTRONICS 7inch usb touch screen.

It use the usb touch driver instead of i2c.

https://www.uctronics.com/uctronics-7-inch-touch-screen-for-raspberry-pi-1024-600-capacitive-hdmi-lcd-touchscreen-monitor-portable-display-for-pi-4-b-3-b-windows-10-8-7-free-driver.html

 

Hi,

Thanks you for your efforts. Unfortunately, our company has designed stand alone cameras based on this configuration and we are scheduled to ship the systems in 2 weeks. We must resolve this touch screen issue.

Do you think you will be able to resolve it? Isn’t this just a small adjustment of the code?

 

Thanks,

Peleg