Skip to Main Content

Sales:

texto

​​How Liquid Lens Technology Is Changing Barcode Reading​

​​The latest generation of liquid lenses make autofocusing easy - they're now the best solution for a wide range of machine vision jobs. They’re great for barcode reading, package sorting, quality inspection, automation, and other uses.​
An abstract image developed by merging a blue green over black digital waves image with a silhouetted liquid lens product image with lens flares around the product.

​​Key Takeaways​

​​Liquid lenses have key benefits and features for barcode reading:

  • ​Dynamic autofocus: Liquid lenses adjust focus in milliseconds, ensuring sharp images for varying distances and object sizes.
  • ​Compact and durable: Smaller, lighter, and resistant to shock, liquid lenses outperform traditional mechanical systems.
  • ​Long lifespan: With no moving parts, liquid lenses last up to 50 million cycles, far exceeding mechanical alternatives.
  • ​Flexible applications: Ideal for barcode reading, PCB inspection, and even laparoscopic cameras.
  • ​Better efficiency: Eliminate the need for multiple cameras by adapting to diverse industrial tasks seamlessly.​ 

The tradeoffs in choosing the appropriate lens

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

​The lens takes reflected light, from the object or area of interest, and focuses it on the camera sensor. An object gets 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 unique strengths and bend light in many ways based on shape and refractive index. This affects the focal length, the distance between the lens and imaging sensor when the object is focused. Lens choice involves tradeoffs between working distance, field of view, and the size and resolution of the camera sensor.

Barcode Readers Product Guide

Download Barcode Readers Product Guide

Explore Cognex barcode reading solutions that deliver higher accuracy, faster throughput, and smarter traceability. 

Download

​​When the job changes, so must the lens​

If the field of view (FOV) and working distance are consistent in an application, a camera with a fixed focal length is the best choice. But in most applications, either or both can vary. When they do, focus needs to change, or the image will be degraded.  

​Changing focus is a challenge in machine vision. In the past, solutions included physically moving lenses to change focal length, FOV, and focus point. Another solution is switching from one lens to another with a different focal length.  

​Recently, autofocus liquid lens technology changes the curvature. This increases the functionality of cameras and reduces complex mechanics.

What is autofocus technology, and why is it useful?

Cameras employ various methods to determine the correct 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. The choice of method depends on specific circumstances. ​Responding to a signal saying the object is out of focus, or distance to it changed, the camera lens changes its focal length until the object is back in focus.

Autofocus works in cameras and cell phones – now widely used in machine vision. But manufacturers need a simpler, more flexible way to change focus, and now there is. Liquid lenses can change their shape and light-bending ability.

How do liquid lenses work?

Liquid lenses are self-contained cells of optical-grade oil that shape themselves into 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 diagram.jpg

​Like a traditional optical lens, a liquid lens is a single optical element. An optical lens is part of a multi-element assembly, rather than used alone. A single lens produces an image with defects, called aberrations. Some of these include differing focus at different points on the lens, fringes of color, and distortions. Optical designers use one or more additional lenses to counteract these issues. 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 – to instantly adapt to objects at varying distances, different types of objects, and requirements to change FOV. Liquid lenses are speedy and easy to use.

​Liquid lenses are smaller and lighter than mechanical lenses with the same specifications. Reducing the reliance on focus mechanics, plus 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 traditional camera might 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. A significant advantage 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 Horiz.gif

Visual inspection of printed circuit boards (PCBs) can be difficult due to small deformations in the PCB, which change 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 applications in a wide range of fields, including laparoscopic cameras, unmanned aerial vehicles, and laser systems.

Liquid lenses are a transformative technology

Liquid lenses with autofocus make barcode readers more versatile in a wider range of applications, reducing the need for multiple cameras and increasing their lifespan.  

​To learn more about Cognex technology, download the Introduction to Industrial Barcode Reading Guide.

Introduction To Barcode Reading | English

Introduction to Barcode Reading Guide

Understand barcode reading basics to optimize traceability, inventory control, and compliance across manufacturing and logistics. 

Download
Last Modified on06/26/2025

Related Resources