Bar code is a graphic identifier that arranges a number of black bars and blanks with different widths according to certain coding rules to represent a group of information. Common bar codes are parallel lines composed of black bars and white bars with different reflectivity.
Barcode principle:
When barcode scanner recognizes bar codes, the wavelengths of visible light reflected by objects with different colors are different. White objects can reflect various wavelengths of visible light, while black objects absorb various wavelengths of visible light. When the light emitted by barcode scanner's light source passes through the diaphragm and convex lens 1, it shines on the black-and-white bar code.
The reflected light is focused by the convex lens 2 and irradiated on the photoelectric converter in barcode scanner. The photoelectric converter receives reflected light signals with different intensities corresponding to white bars and black bars, and converts them into corresponding electrical signals to be output to the amplification and shaping circuit in barcode scanner. The widths of white bars and black bars are different, and the duration of corresponding electrical signals is also different.
However, the electrical signal corresponding to the bar code output by photoelectric converter is generally only about 10mV, which cannot be directly used, so the electrical signal output by photoelectric converter should be sent to the amplifier for amplification first.
The amplified electrical signal is still analog. In order to avoid false signals caused by defects and stains in bar codes, it is necessary to add a shaping circuit after the amplification circuit to convert analog signals into digital electrical signals so that the computer system can accurately interpret them. The pulse digital signal of the shaping circuit is converted into digital and character information by the decoder.
It can distinguish the coding system and scanning direction of bar code symbols by identifying the start character and the end character. By measuring the number of pulse digital electric signal 0, 1, the number of bars and blanks can be distinguished. The widths of bars and spaces can be determined by measuring the duration of 0 and 1 signals.
In this way, the number of bars and spaces of bar code symbols, the corresponding widths and the coding system used are obtained. According to the coding rules corresponding to the coding system, barcode scanner converts the bar code symbols into corresponding numbers and characters, and sends them to the computer system through the interface circuit for data processing and management, thus completing the whole process of bar code reading.