How Liquid Lens Technology is Changing Barcode Reading

Liquid Lens Autofocus Technology Banner

The latest generation of liquid lenses make autofocusing easy, and are now the best solution for a wide range of machine vision problems. They are ideal for barcode reading, package sorting, quality inspection, automation, and other uses.

The tradeoffs in choosing the appropriate lens

When setting up any barcode reading application, choosing the best lens for that application is crucial. A lens that works well for one application may noticeably degrade performance for another, depending on lighting conditions, distance, the size of what needs to be imaged, and a variety of other factors. 

The lens takes light reflecting from the object or area of interest and focuses it on the camera sensor. An object is in focus when a point of light on the object is the smallest possible area on the camera sensor, ideally a point. 

Different lenses have different strengths and bend light by different amounts based on their shape and refractive index. This affects the focal length, the distance between the lens and the imaging sensor when the object is in focus. Lens choice involves tradeoffs between working distance, field of view, and the size and resolution of the camera sensor. 

When the job changes, so must the lens

If required field of view and working distance in an application are constant, a camera with a fixed focal length is best. But in most applications, either or both of them can vary, sometimes continuously, sometimes in discrete steps. When they do, focus needs to change, or the image will be unacceptably degraded. 

Changing focus is a long-standing problem in machine vision. In the past, solutions to this have included physically moving the lens to change focal length and thus field of view and focus point. Another solution is simply switching from one lens to another with a different focal length. 

Recently, autofocus technology using liquid lenses that change their curvature has been increasing the functionality of individual cameras and eliminating a lot of complex mechanics, transforming a wide range of industrial and other applications.

What is autofocus technology, and why is it useful?

Cameras can use a variety of methods to find the appropriate focus point. Passive methods analyze the target image via various types of algorithms, including phase detection and contrast detection. Active methods use an external sensor that measures distance to the target directly, via a laser or ultrasound. Choice of method depends on specific circumstances.

In response to the signal that the object is out of focus, or the distance to it has changed, the camera lens changes its focal length until the object is back in focus. 

Autofocus certainly works in personal cameras and cell phones, and is widely used in machine vision. But there has long been a desire for a simpler, more flexible way of changing focus, and now there is: liquid lenses, which can change their shape, and thus their light bending ability.

How do liquid lenses work?

Liquid lenses are self-contained cells of optical-grade oil that shape themselves into precise lenses through an effect called electrowetting, changing curvature in predictable ways when subjected to an electric current. This change in curvature, which modifies focal length and working distance, happens in milliseconds, as does the return to the original, uncharged shape. 

Liquid lens explanation diagram

Like a traditional optical lens, a liquid lens is a single optical element, and like an optical lens, is typically part of a multi-element assembly, rather than used alone. A single lens on its own produces an image with various defects, called aberrations, such as differing focus at different points on the lens, fringes of color, and various distortions. Optical designers use one or more additional lenses to counteract these optical issues, depending on the specific applications. Depending on the application, the liquid lens is placed at different points in the lens stack.

What are the advantages of liquid lenses?

Autofocus is key to an image-based barcode reader that can instantly adapt to objects at varying distances, different types of objects, and requirements to change field of view. Liquid lenses are far superior to any other method in speed and ease of use.

Liquid lenses are also significantly smaller and lighter than mechanical lenses with equivalent specifications. Eliminating focus mechanics, as well as the need to physically move lenses to change focus, shrinks the camera and reduces its weight. Cameras with liquid lenses can be used on a space-constrained manufacturing line and parcel processing applications where a conventional camera would not fit.

In industrial settings, shock and vibration can significantly degrade image quality, often requiring repositioning or recalibration. A liquid lens has no moving mechanical parts. Aside from not suffering wear, they are also much more resistant to shock and vibration. If some movement throws the lens out of focus, it can instantly respond.

They last much longer than conventional lens assemblies. Mechanical focusing systems, which include motors and mechanical guides, wear out after about 100,000 cycles, but liquid lenses, with no moving parts, can last up to 50 million cycles.

Liquid lenses are completely silent. This may not be significant in industrial applications, but can be an advantage if they are used in clinical settings.

Specific uses of liquid lenses

Liquid autofocus lenses solve many problems on modern high-speed lines. In 2D code reading, where objects are of various sizes, with codes in various orientations, focus can shift quickly between one package to the next.

Liquid lens variable scanning

Visual inspection of printed circuit boards (PCBs) can be difficult due to small deformations in the PCB, which changes the optimal focus point. A liquid lens can refocus whenever necessary to keep the appropriate portion of the PCB under inspection. Liquid lenses are finding uses in a wide range of applications, including laparoscopic cameras, unmanned aerial vehicles, and lasers.

Liquid lenses are a transformative technology

Liquid lenses with autofocus make a barcode reader useful in a wider range of applications, reducing the number of cameras that need to be acquired, and increasing their lifespan. To learn more about Cognex technology, download the Barcode Readers Product Guide.


More Posts on


Join MyCognex