Cool Components: Compact C-Mount Autofocus Lens
In the past, I’ve always used fixed focus lenses for machine vision because although autofocus lenses are cool, they added a lot of cost and size and I could manage without them.
Last year at Photonics West, Varioptic had an impressive demo: two tiny 2D barcode readers (from Cognex and Microscan) that both sported autofocus lenses using Varioptic’s liquid lens technology.Â Back then, Varioptic only made autofocus modules in M12 size or smaller.Â Most machine vision cameras, however, use C or CS mount.Â (In the future, maybe Micro 4/3 (M43) will become common for machine vision, which would add a lot of affordable autofocus lenses, although they might not be optimized for machine vision).
Recently, however, Varioptic introduced a compact C-mount autofocus lens.Â It’s not a cure-all; I don’t know the price and currently only one model is available (16mm).Â Control options are analog, I2C, SPI, or RS-232.Â Next time I have to use machine vision, I might not use this lens, but I’ll definitely check out the details.
Here’s one example of why an autofocus lens can be handy: suppose I need to inspect different parts of various sizes.Â The camera is in a fixed location.Â The parts are picked up byÂ a robot, so I can move the parts to any desired distance from the camera.Â Ideally, I’d like to be able to position the part so that it fills most of the camera’s field of view, thus providing the best image.
However, if my depth of field is less than the distance between the optimal positions for the biggest and smallest parts, I will get less than optimal images, since I will have to position the smaller parts farther away (in my diagram above, at position 2 instead of 1).Â With an autofocus camera, I can either use an autofocus routine, or have a set focus position for each part size.Â Also, at times maximum depth of field is not desirable: sometimes a shallow depth of field gives an better inspection image, or you need to use less light (larger depth of field requires smaller aperture, which means more light is required for the same image brightness).
Blog note: I’m still working on the robot series, but the next few posts are taking more research and time than I expected.