The technology used to read barcodes is relatively simple, but there is little information available for the novice. This is intended to be an introduction to the scanning, processing and presentation of barcode information.


Scanners

A scanner is a device that converts the image of a barcode into electrical pulses. There are four basic ways of doing this: contact wands, active non-contact (AKA laser scanners), and passive non-contact, which can be cameras or linear CCDs (charge coupled devices). All of these devices have similar outputs, strings of electrical pulses that mimic the white/dark and width of the bars. With the exception of cameras, a scanner will always include a light source, either LED or laser.

Wands are the simplest, but have the most limitations. A wand has a light source, focusing lens and a light detector. It has no moving parts, which makes it the most rugged of scanners, but it also means the operator must move the wand over the code. This takes some practice. The second major limitation: the wand must touch the barcode. A barcode under a plastic case or an overly-thick wrapper cannot be read by a wand.



Laser scanners
have moving parts that are easily damaged. They consist of a laser light, a set of mirrors and a detector. At least one of the mirrors moves, which allows the laser beam to scan a code. Multiple mirrors can redirect the beam in many directions. A laser beam is very thin and this allows the scanner to read barcodes at long distances. They can also make multiple scans of the same code in very short periods. These properties make them ideal for retail stores and factory use where the distance between the barcode and the scanner can very from scan to scan.



CCD scan engines
will contain a light source (most often LED), lenses and a linear CCD. The barcode is illuminated and the lenses focus the image on the CCD. Scanning is performed by reading the reading the charge levels on each of the CCD elements. CCD detectors can have 1024, 2048 or even more elements. Like a wand, a CCD scanner has no moving parts. These scanners do not make contact with the barcode, so they can work at a distance. Because of the need to focus the barcode’s image on the CCD strip, the distances within which a CCD scanner works is much more limited than for a laser scanner.



Camera scanners
use an array of CCDs and lenses, and some them include a light source. They have lower-resolution detectors, which limits their use to special 2D matrix barcodes, unless close-up focusing is an option on the camera. Webcams and cellphones can be used in this way.



Light to data



The output of a scanner is a string of electrical pulses. Generally two voltages are used for the pulses, a high-state and zero. If viewed with the right equipment, the high & low states would map directly to the black & white bars of a code. The conversion is done by part of the reader, or in some applications by a keyboard wedge.

The pulse string is processed in several ways. The first is a look at the lengths of the pulses. Many barcodes use constant width bars and spaces, but the most common barcode, the UCC/EAN code, uses four widths. Each barcode type has a font. Most of them also have guard bars, which indicate where the code starts and stops. The guard bars may also give a clue as to the direction of the scan. The UPC barcode uses three bars at the ends and five in the middle. The guard bar patterns are not used for numbers or characters. So by noting the locations of the guard bars, the scanner can actually combine scans of the left and right sections to make a complete code.

Once the type of barcode has been identified, the pulse string is broken into groups of bars that form characters. When decoding a UPC, each character is four bars: 2 black, 2 white.

Once each character has been identified, there might be a check sum calculation to verify the complete code is valid. The UPC barcode performs a calculation determined by each digit’s position and compares that to the last digit of the code.



Data to information



The converted data is now in a digital form. This may be a coding pattern like ASCII or it might be keyboard codes. The former is standard for stand-alone readers, the latter more common in point-of-sale or office use.

Keyboard wedges that connect scanners to computers will use keyboard codes, so the computer accepts the input as if someone were typing the code.

A wireless reader can either store the digital codes or transmit them to a central system. Many handheld, portable readers contain small amounts of memory that can store 100-150 barcodes before they need to be connected to a computer to download. Connections can be via USB or a serial port. In almost all cases, specialized software is required to read the data. Wireless readers that transmit to a central system do not need data storage, but they are limited in their range. This is most useful within a warehouse or a factory.



Making use of the data



If a barcode is not routed to a central computer, it needs to be displayed in a human-readable format. Devices that can do this are called portable data terminals (PDT).This is a bad term, because only the portable part is true. A portable data terminal is a free-standing barcode-reading system.

A PDT will contain a scanner, a processor, memory, storage and a display. Often, they are actually laptop or palm computers to which a scanner has been added. A few are purpose-built and optimized to read barcodes and translate that to useful, human-readable form. A PDT can contain tables or databases which allow it to look up scanned codes and tell the user what they represent and how many there are.

A PDT tends to be very expensive, because it has so many capabilities. Those based on laptops can cost several thousand dollars. Even palm devices can be $600-$1000 dollars once the scanner has been added. Businesses can integrate PDTs into their inventory systems, and some of the lower-cost devices can be placed in the hands of all of their field personnel. Items used while servicing customers’ equipment can be scanned on site and the information loaded into the main inventory system later for billing and inventory management.

Some purpose-built PDTs are small enough and inexpensive enough to be used as consumer devices. Given a scanner, storage and a display, consumers can use these devices to inventory their music, movie and book collections.

The inventories can be stored on their home computers or stored remotely, or both. Websites that cater to collectors can frequently convert barcodes to more useful information like titles, authors and composers. Small, pocket-sized devices designed for portability can actually be carried at all times, and used to check new purchases against items already collected, just by scanning codes.