Motorized Focus IMX219 module on Raspi zero W and RPI4

Published by knewbery on

Home Forums Cameras Modules for Raspberry Pi 8MP IMX219 V2 Cameras Motorized Focus IMX219 module on Raspi zero W and RPI4

Viewing 3 reply threads
  • Author
    Posts
    • #14263
      knewbery
      Participant

      Hi,

      I have a standard RPI zero W, with latest distribution, connected to a standard RPI2.1 camera board with the arducam IMX219 motorized focus module on the genuine Raspi V2.1 board.

      Arducam IMX219 Auto Focus IR Sensitive (NoIR) Camera Module, drop-in replacement for Raspberry Pi V2 and NVIDIA Jetson Nano Camera

      I have enabled dtparam=i2c_vc=on in /boot/config.txt and can i2cdetect /dev/i2c/0 ok,

      Going through the code for ‘Motorized_Focus_Camera_Preview.py’ i see it calls i2cset for bus 0, address 0x0C but, the write/read fails.

      https://github.com/ArduCAM/RaspberryPi/tree/master/Motorized_Focus_Camera

      I have been spying on the I2C traffic to the camera module, and when using raspistill all the traffic goes to/from I2C address 0x10.

      Running “Motorized_Focus_Camera_Preview.py” and trying to read/write with icset to bus 0, address 0x0C fails

      So, my question is what is the correct programming I2C address/method for this module? It does not seem to be as the demo python script eludes to..

      Is there a datasheet for this module that explains how to drive the motorized focus?

      thanks
      K

    • #14266
      bin
      Keymaster

      Hi,

      Don’t worry and I will try my best to help you. All of the Arducam products are guaranteed of their quality.  Please attach me some pictures of  your hardware connection setup.

      Notice, our camera need to use the i2c0 bus, please ensure you don’t have other devices occupied the i2c0 bus.

       

    • #14276
      knewbery
      Participant

      Here’s my setup

      1) RPI Zero W with RTC.

      2) /boot/config.txt has

      dtparam=i2c_vc=on

      when I run ‘raspistill -t 0’  to get constant preview … I then run i2cdetect

      [email protected]:~/RaspberryPi/Motorized_Focus_Camera $ i2cdetect 0
      WARNING! This program can confuse your I2C bus, cause data loss and worse!
      I will probe file /dev/i2c-0.
      I will probe address range 0x03-0x77.
      Continue? [Y/n] y
      0 1 2 3 4 5 6 7 8 9 a b c d e f
      00: — — — — — — — — — — — — —
      10: 10 — — — — — — — — — — — — — — —
      20: — — — — — — — — — — — — — — — —
      30: — — — — — — — — — — — — — — — —
      40: — — — — — — — — — — — — — — — —
      50: — — — — — — — — — — — — — — — —
      60: — — — — 64 — — — — — — — — — — —
      70: — — — — — — — —

      and I can take pictures with raspistill ok, but as before, I can’t work out the address of the focus control function in the camera module that can control the focus, since I2C address 0x0C does not seem to be correct.

      I have read to all addresses on bus /dev/i2c-0  and there is nothing else on that bus _besides_ the RPI 2.1 camera module at address 0x10, and the crypto chip at 0x64

      setup

    • #14277
      knewbery
      Participant

      btw. also using IONinja to monitor the i2c bus directly at the connector on the camera board.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.