AutoFocus Module on Compute Module

Hello,

I purchased recently a Autofocus module to use with my Raspberry Compute Module CM3+ and I am having trouble in getting the module to work.

I am working with 2 cameras, 1 raspberry camera and the arducam module and both are working fine when taking pictures/preview images.

When I run the scripts to autofocus or manual focus and press the key ‘UP’ or ‘DOWN’ I get erros like ‘Failed to write’.

What can I do to make it work? Is it a I2C problem?

Thanks in advance,

Guilherme Paulo

Error

Hi,

It seems the i2c bus exist problem. For the CM3+, you should config the i2c bus information in the dts file. Are you sure you are using the i2c0 bus? For our focus demo, we default use thei2c0, You can see the test code here, https://github.com/ArduCAM/RaspberryPi/blob/master/Motorized_Focus_Camera/C/manualFocusPreview.c

Some suggestions:

  1. Please ensure which iwc bus you have connected to your camera?

  2. Please ensure you have enabled the i2c0 bus.

I am using the dt-blob-dualcam.dts provided by Raspberry in order to get both cameras working, I modified the /boot/config.txt to enable i2c0, as you were doing with the file enable_i2c_vc.sh and still can’t seem to get it working…

I’ve included some images to show you the different files and setup that I have

config.txt

Hi, It can’t detected the camera’s i2c and motor driver i2c address. Please attach me your hardware connection and I will help you check it.

 

The hardware connection is the same as the one on here: https://www.raspberrypi.org/documentation/hardware/computemodule/cmio-camera.md

Sorry for the long time

 

Hi,

Thanks for your hardware diagram. Now we are in Chinese New Year’s holiday.

After we come back to company, I will help you test it and reply you as soon as possible.

It still does not detect the sensor’s i2c address.

Any clue on how to fix the problem?

Hi,

I advice you test the camera on Raspberrypi Mode 3 platform firstly to ensure the camera’s hardware is normal.

We are still on holiday now. Sorry for help you later.

 

Hi,

I tried the camera on a RaspberryPi 3B+ today and I get the same results as the Compute Module, I can preview and take pictures but when I run the focus script I get an error saying Write Failed.

When running the i2cdetect -y 1 I can only detect on the adress 64, the same as on Compute Module

Thank you in advance

Hi,

You should use i2cdetect -y 0 to check it the focus motor exist .

i2cdetect -y 0 detects nothing, no adresses found

Hi,

It seems the focus motor is defective, Please contact our [email protected] for replacement.

 

I’m getting this error when I try to do so

Hi,

Sorry for our error address which should be [email protected]

Don’t worry and I have copied your requirement to our sales and he will process it as soon as possible.

 

Hi ,could you please send your email address to us , if you cannot send email to us, we will conatct you

[email protected]

Hello,

i seem to have been run in the same problem, what to do?

 

kind regards

hk

Hello,

The CM3 module is different from the pi3 module B. We have provide preview-camera0 demo for CM3. I advise you try to test our demo firstly to ensure the hardware is normal.