Hi everyone. I’ve got a B0182 (IMX219 Auto Focus) module, the RPi Camera V2 drop-in replacement. Lately the autofocus starts to focus, then it gets stuck and hangs - after that it won’t move or focus at all. It worked fine before this started. Has anyone run into this? I’m not sure where to begin.
Sorry to hear that. To point you in the right direction, can you tell me a bit more about the setup? Which platform is the B0182 connected to, and is it on a stock Arducam carrier board or a custom board? Also, is there anything physically near the lens that could be interfering with the focus motor?
It’s on a Jetson Nano EMMC with a custom carrier board. The custom board integrates the camera module, and the power circuitry follows the published Raspberry Pi circuitry. The camera module sits on top of the carrier board with an acrylic sheet over it. The power supply and I2C chips are on the bottom side, so there’s no mechanical interference with the lens itself.
Thanks. First thing to check is whether the focus motor still has full travel. Can you watch the live stream while autofocus triggers and confirm whether the lens actually moves through the whole range? If it moves a little and then stops, that’s different from no movement at all.
Okay, I’ve done more testing. In the stream I can see the lens start to move, but then it just stops - it won’t complete the focus. I put a scope on the camera I2C lines and the focus controller is returning ACKs, so the I2C side looks functional, but the lens still doesn’t move. I also placed a brand new B0182 (same model) on the same PCB and focusing works, so the problem seems to be inside the old module. Then I flushed the old module with isopropyl alcohol and it started working again. I’m going to leave it running a lifetime test to see if it fails again.
Good progress. When it came back after the IPA flush, did you confirm the motor has full travel across the entire focus range, or only part of it? I want to rule out a partial recovery. Also, if you have a video of the failure, could you re-share it? The last one wouldn’t play - .mp4 or .mov would be easiest.
I checked again, and no - full travel is not confirmed. The focus motor only works for the first portion of the focus length and then it gets stuck. I’ll re-upload the video as .mp4.
Thanks, I’ll watch it once it’s up. In the meantime, two things worth flagging. One: since you’re on a custom carrier board, the VCM (voice coil motor) driver compatibility isn’t 100% guaranteed. I’d suggest writing a small test script that drives the VCM back and forth to verify the driver stays stable on your board, separate from the autofocus algorithm. Two: another possible cause is the adhesive inside the module melting after prolonged use - these modules tend to get hot - which can make the motor stick. Cleaning with isopropyl alcohol sometimes frees it, which matches what you saw after the IPA flush.
An update: I verified the module was non-functional before I sent it in for testing, but your team said it worked, which is confusing. I was actually able to reproduce the working-to-failing transition by splashing the camera with IPA and letting it dry. Could you try the same process on your side if you have IPA available? That would tell us if it’s the same failure mode.
Here’s what we found after receiving the returned imx219 motorized module. We tested it on an Arducam imx219 standard carrier board with a Raspberry Pi 4b, and the focus motor works fine on our carrier board. Setup was: Raspberry Pi 4b, kernel 6.1.21 32-bit, camera driver imx219,vcm, Arducam imx219 standard carrier board with your returned imx219 motorized module. We ran these validation commands exactly as follows:
libcamera-still -t 0 --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx219_af.json
libcamera-vid -t 30000 -o test.h364 --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx219_af.json
Thanks. Did you happen to try the IPA splash/dry condition? And is there any video of the autofocus working on your side?
I’ve sent you a short video via private message showing the returned module autofocusing on our setup. The way we triggered it: we covered the lens with a finger and then removed/moved it, which forces the lens to refocus - that’s what the video shows. The lens responds to the autofocus commands in our RPi 4b setup, so the motor itself is responding on the standard carrier board.
Okay, so if it works on your standard carrier board, is the thinking still that it’s my custom board’s VCM driver, or the adhesive? I’m trying to figure out what to change on my side.
On the IPA reproduction, I checked with our production team about available cleaning materials. They only have trichloro ethylene (circuit board cleaner) and industrial alcohol on hand - no isopropyl alcohol - so we can’t reproduce your exact IPA splash/dry condition. As it stands, the returned module’s autofocus is functional on our standard carrier board with the Raspberry Pi 4b using the imx219,vcm driver and the imx219_af.json tuning file. That points more toward either VCM driver compatibility on your custom carrier board or adhesive contamination on the module, rather than a defect we can reproduce here. If you can run that VCM driver test script on your board, it should help isolate which one it is.