We all have seen and are familiar with these arrays of thick and thin lines which can be seen printed on almost all types of products, these coded arrangement is commonly known as a bar code. A barcode strip printed on a particular product identifies quite a few crucial information regarding the product in an encoded form.
Barcode scanners are sophisticated instruments which are used for scanning bar codes for decoding the hidden information of the product for the required purpose.
Normally these devices consist of a laser beam which is thrown across the barcode, the light gets reflected from the white portions of the barcode whereas its absorbed in the black lines of the code.
The above reflected varying light intensities are appropriately captured by a photosensor and translated into a varying analogue frequency output.
The above analogue data is then converted into digital pulses through a circuit stage and these digital pulses are further converted into binary form for feeding into a PC or a software. The software finally decodes the information by recognizing the digital/binary pattern of the fed data.
A simple homemade barcode scanner is presented in the following discussion which can be used for experimenting and playing with different barcoded strips and for customizing it as a security key lock device.
Referring to the couple of diagrams below, the diagram on the left shows a LED/LDR sensor which may be positioned close to the barcode strip inside an appropriate box enclosure for sensing the barcode specification.
When the barcode card is swiped, the laser beam is reflected from across the black/white barcode lines with varying intensities and is received/detected by the LDR through an appropriately drilled aperture, as may be visualized in the left diagram above.
The barcode security lock circuit on the right shows a simple opamp comparator circuit integrated with the LDR sensor for translating the barcode data into a correspondingly varying digital signals
The 10 k preset is subtly set such that the opamp is able to respond even to the minutest difference in light sensed by the LDR.
Thus the varying light intensities from a swiping barcode card is quickly responded by the opamp and is converted into a correspondingly changing rectangular waveform across its pin6.
Since here we are only interested to use the decoded information to uniquely activate a compatible lock and key arrangement, reading only the frequency and the RMS would be sufficient for using the barcode info as a potential security locking/unlocking data.
In the next post we'll learn how to make a barcode decoder circuit or activating a relay mechanism.