CCD Barcode Scanner, Barcode Reader,Converter

Part Two: How Barcodes are Printed and Read.
So now that you know the WHY, lets talk about the HOW. There are two important how's in barcoding. HOW the barcode symbol is made and placed on an object and HOW the barcode is "read" and translated into regular numbers or letters. Barcodes are usually made up of black bars printed on a white background. Other colors can be used, but we're trying to keep it simple here. The bars are either wide or narrow and the spaces between the bars are likewise either wide or narrow. There are codes where more than two different widths are used but, as I said, I'm keeping it simple. The length of the bars have no significance other than to make it easier for the scanner to find the code. Barcodes are printed using normal printing processes. Since most items that are identified by a barcode have some type of printed package or tag, the barcode can be added as part of the normal printing process. As I said in Part One, adding barcodes to a product should add little or no cost to that product.

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.