Design a Barcode Scanner With Reduced BOM, Not Reduced Functionality

Barcode scanners are a ubiquitous technology that touch our lives on an almost daily basis. Despite the prevalence of these scanners in commercial and industrial settings, it’s easy to take the complexity of their underlying designs for granted. Barcode scanners require multiple discrete ICs and an array of passive and active circuitry to provide the functionality and reliability that end users have come to expect.

Many barcode scanners use an optical sensor, such as a charge-coupled device (CCD), which outputs an analog representation of what’s visible to the sensor to an analog-to-digital converter (ADC) controlled by a microcontroller (MCU). The MCU interprets the ADC’s output as a sequence of thick and thin black and white bars, and processes this sequence further to derive a string of characters from the pattern. The character sequence may be encoded in any one of a number of well-defined barcode protocols.

Figure 1: The barcode-scanning system shown is based on a 32-bit MCU.

Additional features found in barcode scanners include USB connectivity, regulators, audio output (usually driven by a discrete digital-to-analog converter (DAC), or simple pulse-width modulation (PWM)), and other glue logic for level-shifting between components running at 3V, such as the MCU, and other components running at 5V, such as the CCD.

The design challenge for any developer entering a mature market is to create a disruptive product. A barcode scanner design is a prime example of a well-defined application area in which developers can disrupt the market by providing a more cost-effective, reliable solution that reduces bill-of-materials (BOM) and leverages the processing power of the latest MCUs.

CCD overview
The scanner’s CCD optically scans an image and converts optical information into a sequence of analog electronic pulses. Each pulse’s voltage level represents the state of one pixel within the CCD’s scan range. Many commonly used CCDs in handheld barcode scanners produce output at a resolution of a few thousand pixels.

A CCD relies on a controlling MCU to provide a clock source. Clock pulses fed into the CCD’s shift-register clock inputs initiate a scan, and the CCD synchronously outputs a voltage proportional to the light in the provided clock. The voltage level describing the pixel state usually contains a dc bias, and the voltage swing between optical black and optical white can vary depending on the CCD used, as well as other design factors.