Almost everything sold today has a universal product code, also known as a UPC. The UPC code was original created to help grocery stores checkout patrons in a quicker fashion. It was also an easier way for them keep up with their inventory. Using the UPC code proved to be so valuable that almost everyone uses it now.
Barcode scanners are the equipment used to read barcodes. There are four different types of barcode scanners that can be used to read the UPC code. One type of barcode scanner is the pen scanner. It looks like a pen but it has a light source and a photo diode in the tip. When you drag the point of the pen across a UPC code, it reads it. This works by the diode measuring the light intensity reflected back from the light. It generates a waveform that measures the size of the bars and the spaces in between each bar. By the dark bars absorbing the light and the spaced reflecting the light, the barcode scanner is able to read the UPC. The laser barcode scanners work the same way as the pens, but rather than use a light source, they use a laser beam. The laser barcode scanners are what you normally see at the grocery store.
In addition to the pen and laser barcode scanners, there is also the charge coupled device (CCD) readers. These use hundreds of light sensors in a row to read the UPC. While the pen and laser measure reflected light, the CCD barcode scanner measures the emitted ambient light.
The newest type of barcode scanner is the camera-based readers. This barcode scanner uses a tiny video camera to capture the UPC image. By using digital imaging processing, it can read the bar code.
Regardless of what type of barcode scanner you use, the UPC code must have enough contrast between the light and dark bars and have enough space between the bars for the code to be read.