IMX477 Motorized AF: i2cset command results in "Error: Write failed"

1.Which seller did you purchase the product(s) from?
Amazon
2.The Model number of the product(s) you have purchased?
UC-517 link:https://www.amazon.com/gp/product/B08PDZ68D7/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
3.Which Platform are you using the product(s) on?
Jetson Nano production module quark carrier board. https://connecttech.com/product/quark-carrier-nvidia-jetson-nano/
4.Which instruction are you following?
https://github.com/ArduCAM/MIPI_Camera/blob/master/Jetson/IMX477/AF_LENS/Focuser.py
5.Has your product ever worked properly?
Yes, worked fine on dev kit.
6.What problems are you experiencing?
The problem I am running into is that I am not able to set the focus of the motorized lens on either of my two IMX477 cameras. For some reason on this carrier board, the cameras appear on address 0x64, on buses 7 and 8. I verified this by plugging and unplugging the cameras and saw the devices disappear when the cameras were unplugged (address change perhaps due to the mux but idk).

I tried to run the following commands:

  • โ€œsudo i2cset -y 7 0x0c 0 160โ€
  • โ€œsudo i2cset -y 7 0x64 0 160โ€
  • โ€œsudo i2cset -y 8 0x0c 0 160โ€
  • โ€œsudo i2cset -y 8 0x64 0 160โ€
    I also tried running the Focuser.py class to focus the camera that didnโ€™t with either even when I changed the chip address in Focuser.py. Every attempt resulted in an Error: Write failed. I also tried using the smbus2 library in python and that didnโ€™t work either.

dmesg output:
[ 2307.081360] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x64
[ 2344.048234] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x64

I tried changing the bus speed to 100khz but that didnโ€™t help either.
Running the command: i2cdetect -r -y 7 gave me this out put:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
10: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ UU โ€“ โ€“ โ€“ โ€“ โ€“
20: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
30: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
40: UU โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
50: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
60: โ€“ โ€“ โ€“ โ€“ 64 โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
70: UU โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
Running the command: i2cdetect -r -y 8 gave me this out put:

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
10: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ UU โ€“ โ€“ โ€“ โ€“ โ€“
20: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
30: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
40: UU โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
50: โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
60: โ€“ โ€“ โ€“ โ€“ 64 โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
70: UU โ€“ โ€“ โ€“ โ€“ โ€“ โ€“ โ€“
7.What attempts at troubleshooting have you already made?
Details of my troubleshooting were discussed in the previous question.
8.How would you like us to help you?
Please help me be fix the probe so that I can focus my cameras.

Hi @lunar_kapi

If you want to use i2cdetect to detect the ic of the motor, you need to turn on the camera first, and then run i2cdetect. The address of the IMX477 focus motor is 0x0c, please refer to MIPI_Camera/Focuser.py at master ยท ArduCAM/MIPI_Camera ยท GitHub to access the focus motor.

1 Like

Ahh, I see so the motor is only visible when the camera is active!! I got it now thanks!! Thank you for your reply.