Hi everyone, I’m struggling to get sharp focus with my Arducam 12MP IMX477 Pan-Tilt-Zoom camera. The factory-set focus wasn’t true infinity out of the box, so I ended up adjusting the lens by hand and then trying to focus electronically. The problem is that anything further than about 1 meter away comes out soft and out of focus, and I really need sharp focus at 3-5 meters for my application. I noticed the lens appears to be threaded and the focus changes slightly when I rotate it. Two other questions: would this PTZ camera even work on a Raspberry Pi 2, and is there any way to get a unit with a less wide lens?
Thanks for the details. Just to confirm the setup before we dig in: you’re using the Arducam 12MP IMX477 Pan-Tilt-Zoom camera (the one for Raspberry Pi/Jetson Nano) on a Raspberry Pi 2, correct? And how are you driving the focus motor right now — through the i2c bus with the Python Focuser class Arducam provides, or something else? That’ll help narrow this down.
Yes, it’s the Arducam 12MP IMX477 PTZ camera running on a Raspberry Pi 2. I’m using the i2c bus together with the Python Focuser class provided by Arducam to control the focus motor. What I found during testing is that any focus number greater than 0 moves the focal point nearer to the camera, not farther away. I manually adjusted the lens first and then focused electronically, but I still can’t get distant objects sharp. Here’s a shot showing the focus test results: ![]()
That behavior actually makes sense given how this camera is designed. This camera is not meant to be focused by twisting the lens — it has a built-in focusing motor and the lens has damping oil added, so rotating the lens manually isn’t the intended focusing method. The reason increasing the focus number only pulls the focal point closer is that the lens was manually moved out of its designed range. Please stop twisting the lens and use the motorized focus workflow instead. You can use AutofocusTest.py to drive it properly, as described here: Quick start - Arducam Wiki
Understood, I’ll stop adjusting the lens by hand and stick to the motorized focus. I do need motorised focus for this project though, because the factory-set focus wasn’t true infinity out of the box. Can you also confirm whether this camera is okay to use on a Raspberry Pi 2? I couldn’t find it listed and I’m a bit worried about compatibility.
On the Pi 2 question: the Raspberry Pi 2 is not listed as a supported option on the product page, mainly due to performance and memory concerns with the 12MP IMX477 sensor. It is theoretically possible to use the PTZ camera with a Pi 2, but it’s not officially listed or supported, so you could run into performance issues. Also, if manual lens-rotation focusing is something you actually need for your use case, there’s an alternative camera with an M12 mount lens that’s designed for that: Arducam MINI High Quality Camera with M12 mount lens for Jetson Nano and Xavier NX, 12.3MP 1/2.3 Inch IMX477 HQ Camera Module
Thanks for the clarification. So just to confirm — if I stick with the Pi 2, it might work but I’d be on my own if there are performance problems? And the M12 mount alternative would only make sense if I want to focus by twisting the lens, right?
Correct on both. For the focus problem, the key is to use the built-in motorized focus via AutofocusTest.py and not twist the lens, since the focusing motor and damping oil aren’t meant for manual rotation. For the Raspberry Pi 2, running this PTZ camera is theoretically possible but not recommended or officially supported due to performance and memory concerns, so treat it as an unsupported setup. The M12 mount camera would only be the right choice if manual lens-rotation focusing is what you actually need.