How Barcode Scanners WorkEngineering360 News Desk | June 23, 2015
Barcode scanners are designed to read imprinted bar/matrix code symbologies. The device consists of a light source, a lens and a light sensor translating optical impulses into electrical ones.
Barcodes, also known a universal product codes (UPCs), are machine-readable data representations made up of bars of dark and light areas which represent a set of data, often a string of numbers. These codes are printed by a standard printer onto a label or other visible surface.
Codes may also contain check digits at the beginning and end of the code. These are a form of redundancy check used for error detection and are used to ensure the code is read correctly.
Check digits can be implemented in a number of ways. For example, a three-digit code might be a code of 123 with a check digit of 6. The complete code would therefore be 1236 and the scanner would know that the code should always have three digits that add up to the fourth digit.
Actual barcode checks are much more complex and many different encoding schemes exist, though the reader must know the code standard to be able to read the code.
How barcodes work
Reading a barcode involves a method to detect the code and transform it into a digital representation. The most common method uses light that is aimed onto one part of the code at a time and detected by a light sensor that reads the reflected light. (Watch a video on how it works)
A dark area will not reflect as much light as a light colored area. The difference is detected with the sensor and sent to the computer. The code is determined by the thickness and spacing of the dark and light areas. A very basic barcode scanner uses a single LED light and light sensor. In this case, the user would need to slide the reader directly over the code.
More advanced readers use a laser beam that is automatically scanned over the code with a rotating mirror to illuminate one part of the code at a time. Other methods include a camera to see the code which is interpreted into the corresponding light and dark areas.
Barcodes scanners consist of a scanner, a decoder (either built-in or external), and a cable used to connect the reader to a computer. The scanner captures and translates the bar code into numbers and/or letters. The data is then sent to a computer and analyzed by a software application.
- Slot card bar/matrix code scanners are designed to read imprinted bar or matrix code cards that are passed through the aperture on the reader. These are stationary devices which involve manually pulling the coding item through the shot. Slot scanners are typically used to scan bar codes on identification cards.
- A horizontal scanner is tabletop device where the code is passed over the scanner face.
- A vertical scanner sits on top of a counter or stands where the code is passed in front of the scanner face.
- A wand scanner is typically made from 1/2" stainless steel tubing or from plastic; the optics are in front of the scanner. This is the simplest bar code reader since it contains no moving parts. The wand scanner must be moved by the user's hand across and in contact with the barcode. While the wand is moving across the barcode, the reflected light is converted to electrical signals through a photocell in the wand. It is durable and inexpensive but may present a challenge for the user who must move the wand at a particular speed and angle.
- A hand held or gun type scanner can be a non-contact or near-contact scanner, which generally uses a beam of focused light to read the barcode. Also known as a charge-couple device (CCD) scanner, this type of scanner is most commonly used in retail since it takes several readings each time to reduce error. A disadvantage of this type of scanner is that it cannot read a barcode that is wider than its input face.
- An image scanner is a more advanced type of barcode scanner. Also known as a camera reader, the device uses a small video camera to capture an image of the barcode. Sophisticated digital image processing techniques are then used to decode the barcode. Advantages of image scanners include a longer scan distance (3 to 9 inches) and lower cost when compared to a laser scanner.
- Laser scanners can be handheld or stationary. The device uses a system of mirrors and lenses to read the barcode from 24 inches up to 30 feet away. To reduce the possibility of errors, a laser scanner may perform up to 55 scans per second.
- Active non-contact scanners use a laser beam that is automatically scanned back and forth across the symbol at a high rate.
- Near-contact scanners utilize a CCD device.
Active non-contact or near-contact scanners may be stationary as an option. Gun type readers can also be fitted with optional fixed mounting.
There are several specifications to consider when selecting a barcode scanner: light source, laser class, and barcode symbologies.
- LED/CCD - CCD devices use one or more LEDs to flood the barcode area with light and transfer an image of the code to an array of photodetectors. It is a near-contact or contact device with a smaller depth of field than a laser. For these devices, it is important that all the lights produce the exact same light intensity and color.
- Infrared light - Infrared light barcodes are used for high security black-on-black barcodes. They are also used in other specialty applications such as photo processing, where visible light would expose photographic products. The reader can read visible bar codes however; barcodes printed with inks other than carbon base black will not be visible to infrared scanners.
- Visible light - A visible light scanner is used if the actual bars and lines of the barcode can be seen with the human eye. The light produced by the device is often red so that the user can see where the scanner is 'looking' in order to better align the product being scanned and ensure the device is working. Visible scanners can also read codes where the bars may be printed on a color other than black.
- Laser - Lasers provide a non-contact device allowing for a large depth of field. They capture data by measuring the laser light reflected back from a barcode. The reflected light receptor is a diode that converts the reflectance impulses into a digital signal. There are several disadvantages to barcode scanners with laser light sources. Performance can vary by user during movement of the laser and over time, parts may wear of or become damaged.
Barcode scanners can be configured to recognize a variety of barcode symbologies. These include, but are not limited to, Codablock, Codabar, Code 1, Code 11, Code 128, Code 16K, Code 39, Code 49, Code 93, Data Matrix or Data Code, EAN, Interleaved 2 of 5, Matrix 2 of 5, Maxicode, MSI/Plessey, NW-7 Code, PLANET, POSTNET, Telepen, UPC, and VeriCode. More information on bar code symbologies can be found at Barcode Symbologies.
Barcode scanners can be equipped with one of two basic user interfaces, including keyboard connection and RS232 serial.
- A keyboard connection is usually made through a keyboard decoder wedge. When a barcode is scanned by the keyboard wedge barcode reader, the barcode enters the computer as if it were typed in on the keyboard. Keyboard connections are simple to interface with the computer and no software is required. However, the keyboard output is limited in application since the data cannot be modified before sending it into the program on the computer.
- Serial output is a standard digital output protocol (serial) which includes RS232, RS422, RS485, etc. Barcode scanners with this type of interface are connected to an available serial port on the back of a computer. This enables the user to control where the data goes and modify any data when a barcode is scanned. The disadvantage of this interface is that it is more complex than keyboard connections.
Other user interfaces include:
- Parallel output is a standard digital output protocol (parallel) such as IEEE488, Centronics port, printer port, etc.
- A modem is a modulator-demodulator. It is a device or program that enables a computer to transmit data over telephone lines. Computer information is stored digitally, whereas information transmitted over telephone lines is transmitted in the form of analog waves. A modem converts between these two forms.
- Ethernet is a local-area network (LAN) protocol developed by Xerox Corporation in cooperation with DEC and Intel in 1976. Ethernet uses a bus or star topology and supports data transfer rates of 10 Mbps. The Ethernet specification served as the basis for the IEEE 802.3 standard, which specifies the physical and lower software layers. Ethernet uses the CSMA/CD access method to handle simultaneous demands. It is one of the most widely-implemented LAN standards.
- A wireless interface is usually RF or IR.
- PCMCIA devices (PC cards) are credit-card-sized peripherals predominantly used in laptop computers. The PCMCIA adapter takes the place of a COM port on a standard bus. The card is plugged into a 68-pin host socket that is connected either to the motherboard or an expansion bus. An adapter then translates the PCMCIA signals into signals usable by the computer's bus.
Common features on barcode scanners include audible or visual "good reading" indicators, omni-directional reading ability, numeric or alphanumeric keypad included, and memory for data and program storage.
- Auto-start - Auto-start barcode scanners begin to scan as soon as the card is inserted. They are energy efficient since they are not always running.
- Audible or visual 'Good Reading' indicator - Good reading indicators provide the user with a positive feedback that the card was swiped correctly. For example, the 'ding' in the grocery store is an audio indicator that the products are checked out.
- Battery powered - The unit can be run off using a battery, and is therefore cordless. This is helpful for scanning products throughout a store or manufacturing facility.
- Bi-directional - Bi-directional scanners can have the product swiped at any orientation and does not have to be left-to-right.
- Internal time clock - A time clock is used for time-stamping of scans or scheduled access. This is especially helpful in shipping and inventory tracking.
- Numeric or alphanumeric keypad - The unit contains an integral numeric or alphanumeric keypad for user input. May be used to override a malfunctioning light source or adjust product data (such as price).
- Memory - Memory for data and program storage is used for inventory tracking purposes.
- Omni-directional - Can accurately read barcode in more than one-direction.
- Programmable - Programmable barcode scanners are able to achieve scheduled access, date and time stamps, data formatting etc.
- Portable - The portable option allows the barcode reader to be used in different locations conveniently, such as to track attendance at different trade shows and expositions.
- Ruggedized - This feature is useful if the reader will be used to control access to a building, which is exposed to the environment.
Barcode scanners must adhere to certain standards and specifications to ensure proper design and functionality. Additional standards may be found on the IHS standards store.
- CSA ISO/IEC 15423 - This international standard defines the test equipment and procedures to be used to determine the performance of barcode scanning and decoding equipment. The standard deals with barcode scanning and decoding equipment both as integrated reading systems and as discrete units. It defines performance of the equipment in a particular configuration (e.g. a specific model) irrespective of the individual components used. This standard also defines normative annex operational parameters for the test equipment, and describes, in an informative annex, a means of classifying scanners.
- ISO/IEC 15423 - This international standard defines the test equipment and procedures to be used to determine the performance of barcode scanning and decoding equipment. The standard deals with barcode scanning and decoding equipment both as integrated reading systems and as discrete units. It defines performance of the equipment in a particular configuration (e.g. a specific model) irrespective of the individual components used.