Part Two: How Barcodes are Printed and Read. Barcodes are "read" using some type of optical pickup. There are many different types of optical pickups, or "scanners" as they are usually called. We'll consider the simplest of these; the barcode wand. The wand is a pen shaped scanner. It is held like a pen and the scanning optics are in the tip. The wand is passed over the code with the tip in contact, like drawing a line through the bars. There are two basic components to any scanner; a light source and a light detector. The light source projects a spot of light onto the barcode. The detector looks at this illuminated area through a narrow aperture, about the width of one of the narrow bars. If the scanner is looking at a white space it receives a reflection. If it is looking at a black bar it receives little or no reflected light. White surfaces reflect light. Black surfaces absorb most of the light. As the wand is passed over the code the detector sees the white spaces and black bars. Now here's the important part. When the wand passes over a wide space the detector will see light for a longer time than when the wand passes over a narrow space. The same for the bars. A wide bar causes the detector to be dark for a longer time than a narrow bar. If we could see the electrical signal generated by the photodetector, it would look something like figure one. The top signal represents the electrical output from the photodetector, while the bottom signal has been processed in preparation for decoding. Notice that bars generate a positive signal, while spaces generate a signal close to zero. So we can tell a bar from a space by the signal level. Notice that there are both wide and narrow pulses and spaces between the pulses. These represent the bars and spaces in the code. Next this signal is analyzed by a microcomputer circuit programmed for the specific job of decoding barcodes. First the microprocessor times the duration of each of the pules and divides them into two categories wide and narrow. From this signal the microcomputer can reconstruct the original barcode as patterns of bars and spaces. In each type of barcode each character is represented by a specific pattern of bars and spaces. Also the number of bars and spaces in each character is always the same. So the microcomputer can divide up the entire code into individual characters and then translate each individual pattern into the character it represents. Next, and last, the microcomputer has to send the decoded information to some other device that will use it. This is usually done using some type of computer data transfer protocol, like RS-232. So much for the basics of printing and reading. What about all the different types of barcodes? What are they used for? How could you select one for your application? Go on to Part Three. |
|