Hi everyone, I’m running into a weird issue with my Arducam Mega 5MP color rolling shutter camera module on an Arduino Portenta. I removed the stock M12 lens (used a hair dryer to loosen the glue, as recommended by an ArduCam sales person) so I could try out a 180-degree lens from the ArduCam Lens Kit. But the images I got were completely blurred and distorted — like, totally unusable.
So I figured maybe the 180-degree lens was bad, and I swapped back to the original stock M12 lens. But now even the stock lens is giving me the same blurred, distorted images. It’s like the camera just can’t focus on anything anymore. I didn’t drop it or anything — just unscrewed one lens and screwed in another. Any ideas what’s going on? Did I damage the sensor?
Hey there — this doesn’t sound like sensor damage to me, so don’t worry too much just yet. The M12 lens mount relies on manual focusing, which basically means the sharpness depends entirely on how far the lens is screwed into the mount relative to the sensor. When you swapped lenses, the focal point almost certainly shifted.
Here’s what I’d suggest: power up the camera so it’s streaming live, and then slowly rotate the M12 lens — screw it in a few more turns, then try backing it out slightly. You’re looking for the position where the image suddenly snaps into focus. It can be a bit finicky, but once you find the sweet spot it should be clear again.
Okay, that makes sense. I didn’t realize the M12 lenses worked that way — I just screwed them in until they felt snug and assumed that was the right position. Let me try adjusting while the camera is live and report back.
Alright, that was it! I slowly backed the lens out about a turn and a half while watching the feed and suddenly everything cleared up. It was purely a positional issue with how far the lens was threaded into the mount. Working perfectly now with both the stock lens and the 180-degree one. Thanks for the help — I was worried I’d ruined the module!
Glad to hear it’s sorted out! Yeah, the M12 mount doesn’t have a hard stop for focus — the snug point just means the threads are fully seated, not necessarily that the lens is at the correct focal distance. A lot of people run into this when swapping M12 lenses for the first time. If the image ever looked distorted no matter how much you adjusted the focus, that would be worth a closer look at the sensor, but in your case it was just the thread depth. Enjoy the new lenses!