It would be no good having barcodes if we didn’t have the technology to read them. Barcode scanners have to be able to read the black-and-white zebra lines on products extremely quickly and feed that information to a computer or checkout terminal, which can identify them immediately using a product database. Here’s how they do it.
For the sake of this simple example, let’s assume that barcodes are simple on-off, binary patterns with each black line corresponding to a one and each white line a zero. (We’ve already seen that real barcodes are more sophisticated than this, but let’s keep things simple.)
- Scanning head shines LED or laser light onto barcode.
- Light reflects back off barcode into a light-detecting electronic component called a photoelectric cell. White areas of the barcode reflect most light; black areas reflect least.
- As the scanner moves past the barcode, the cell generates a pattern of on-off pulses that correspond to the black and white stripes. So for the code shown here (“black black black white black white black black”), the cell would be “off off off on off on off off.”
- An electronic circuit attached to the scanner converts these on-of pulses into binary digits (zeros and ones).
- The binary digits are sent to a computer attached to the scanner, which detects the code as 11101011.
In some scanners, there’s a single photoelectric cell and, as you move the scanner head past the product (or the product past the scanner head), the cell detects each part of the black-white barcode in turn. In more sophisticated scanners, there’s a whole line of photoelectric cells and the entire code is detected in one go.