8MP IMX219 PTZ camera module problems

Hi. First of all: I’m using a Pi4
We purchased the 8MP IMX219 module with the controller PCB for two servos.
Following the setup instructions
I get stuck at
python3 -m pip install ./libcamera-1.0.2-cp39-cp39-linux_armv7l.whl libcamera-1.0.2-cp39-cp39-linux_armv7l.whl is not a supported wheel on this platform.
I googled the issue and found a support post mentioning that the installer won’t run on a kernel newer than 5.10.92, so i went hunting for an older version and found 2022-01-28-raspios-buster-armhf.img

Flashed it and got the same error. uname-a says:
Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux

I’m out of ideas, so for now i’d try just to get a picture from the sensor.
Running

vcgencmd get_camera
supported=1 detected=1

suggests that the sensor is detected, but

sudo raspistill -o test.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

fails.

Shutting down and replacing the camera module with an old 5 MP Pi camera i have (using the same flex cable) get response from raspistill and an image.

So what am I doing wrong?
Why won’t the software install, regardless of what kernel version i’m running?
Why won’t Raspistill grab an image from the sensor?

Regards,
Per.

hi, @zapro

That post refers to the fact that the libcamera_cpp_demo we wrote cannot be compiled directly on the 5.10.92 system, and the source code needs to be modified.

You can install the libcamera python library by referring to the link below.

Thank you. With the updated libcamera it installs and i get the user interface appearing.
Sadly the image sensor seems to be broken. I get this error message when launching the application:

python3 FocuserExample.py 
[0:00:57.784740093] [1157]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:00:57.882331223] [1158]  WARN RPI raspberrypi.cpp:1233 Mismatch between Unicam and CamHelper for embedded data usage!
[0:00:57.882870871] [1158] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:00:57.882992019] [1158]  INFO RPI raspberrypi.cpp:1356 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media3 and ISP device /dev/media0
[0:00:57.883648649] [1157]  INFO Camera camera.cpp:1028 configuring streams: (0) 640x360-RGB888
[0:00:57.883963575] [1158]  INFO RPI raspberrypi.cpp:751 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 1920x1080-SBGGR10_1X10 - Selected unicam format: 1920x1080-pBAA

I can move the two servos and actuate the IR filter, but the stepper motors in the lens module only twitches very little. I presume they don’t move as intended since the code is waiting for the image sensor.

The stepper motors and control board works as it should - if i twist the lens into a non-homed position and re-power the module, the stepper motors run to home position just fine.

Any other checks i should try to do before asking for a replacement image sensor from you?

Regards,
Per.

Update. I modified the /boot/config.txt to standard and plugged in a 5 Mpix camera module and re-ran the code.
Code runs with no problems:

python3 FocuserExample.py 
[0:02:18.591915197] [1414]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:02:18.598419808] [1415] ERROR CameraSensor camera_sensor.cpp:551 'ov5647 10-0036': Camera sensor does not support test pattern modes.
[0:02:18.683436279] [1415] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:02:18.683585129] [1415]  INFO RPI raspberrypi.cpp:1356 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media1
[0:02:18.684276082] [1414]  INFO Camera camera.cpp:1028 configuring streams: (0) 640x360-RGB888
[0:02:18.684557875] [1415]  INFO RPI raspberrypi.cpp:751 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA

I get preview on the screen and it reacts to button presses, but the stepper motors in the lens will still not move other than making a “click” sound. They twitch very little when told to move, but i cannot see the zoom or focus on the lens barrel moving. It’s like the controller can home the steppers by running them up against the endstop, but not actuate them otherwise.

I have checked the voltage on the board. The voltage is 5.01V on both wire pairs so it’s not a power issue.

So i have a broken image sensor and something wrong with the control board for the steppers. Not a good outcome. Any ideas?

Hi,
Please attach me your detail hardware connection. I will help you check it in detail.
What’s more, For different lens. maybe you should change hte step range, For your lens, please open the
Focuser file here : PTZ-Camera-Controller/Focuser.py at master · ArduCAM/PTZ-Camera-Controller · GitHub
try to change to range to “20000”.
“MIN_VALUE”: 0,
“MAX_VALUE”: 20000,
Because different lens has different range steps. We have two kinds of lens.

Hi.
I tried changing MAX_VALUE to 20000.

Absolutely no change. The stepper motor moves one (1) step or so in each direction and doesn’t seem to have any power at all. Same for focus and zoom.

Image sensor is completely dead. I had to plug in a 5 Mpix pi camera to be able to run this demo code at all, since it cannot init OpenCV otherwise.

The Camera module we bought is this:

Arducam 8MP Pan Tilt Zoom PTZ Camera for Raspberry Pi 4/3B+/3 and Jetson Nano / Xavier NX

SKU: B01678MP

I would like to RMA this module and order two replacements - maybe there is bigger chance of getting working parts if we buy extra.

Sorry to hear that.
Please contact us email [email protected].
Please send a video demo to that email address. Don’t worry, if the lens is defective, we will give you a replacement.