|
How a Bar Code Reader Works
There are currently four different types of bar code readers available.
Each uses a slightly different technology for reading and decoding
a bar code. There are pen type readers (i.e. bar code wands), laser
scanners, CCD readers and camera based readers.
To learn about creating bar codes visit with TALtech software, visit our barcoding
products page.
Pen type readers consist of a light source and a photo diode
that are placed next to each other in the tip of a pen or wand.
To read a bar code, you drag the tip of the pen across all the
bars in a steady even motion. The photo diode measures the intensity
of the light reflected back from the light source and generates
a waveform that is used to measure the widths of the bars and spaces
in the bar code. Dark bars in the bar code absorb light and white
spaces reflect light so that the voltage waveform generated by
the photo diode is an exact duplicate of the bar and space pattern
in the bar code. This waveform is decoded by the scanner in a manner
similar to the way Morse code dots and dashes are decoded.

Laser scanners work the same way as pen type readers except that they use a
laser beam as the light source and typically employ either a reciprocating
mirror or a rotating prism to scan the laser beam back and forth across the
bar code. Just the same as with the pen type reader, a photo diode is used
to measure the intensity of the light reflected back from the bar code. In
both pen readers and laser scanners, the light emitted by the reader is tuned
to a specific frequency and the photo diode is designed to detect only this
same frequency light.
Pen type readers and laser scanners can be purchased with different
resolutions to enable them to read bar codes of different sizes. The
scanner resolution
is measured by the size of the dot of light emitted by the reader. The dot
of light should be equal to or slightly smaller than the narrowest element
width ("X" dimension). If the dot is wider than the width of the
narrowest bar or space, then the dot will overlap two or more bars at a time
thereby causing the scanner to not be able to distinguish clear transitions
between bars and spaces. If the dot is too small, then any spots or voids in
the bars can be misinterpreted as light areas also making a bar code unreadable.
The most commonly used X dimension is 13 mils (roughly 4 printer dots on a
300 DPI printer). Because this X dimension is so small, it is extremely important
that the bar code is created with a program that creates high resolution graphics
(like B-Coder). For a good description of the different graphic file formats
that are commonly used to create bar codes see: Raster
vs. Vector Graphics
CCD (Charge Coupled Device) readers use an array of hundreds of
tiny light sensors lined up in a row in the head of the reader.
Each sensor can be thought of as a single photo diode that measures
the intensity of the light immediately in front of it. Each individual
light sensor in the CCD reader is extremely small and because there
are hundreds of sensors lined up in a row, a voltage pattern identical
to the pattern in a bar code is generated in the reader by sequentially
measuring the voltages across each sensor in the row. The important
difference between a CCD reader and a pen or laser scanner is that
the CCD reader is measuring emitted ambient light from the bar
code whereas pen or laser scanners are measuring reflected light
of a specific frequency originating from the scanner itself.
The fourth and newest type of bar code reader currently available
are camera based readers that use a small video camera to capture
an image of a bar code. The reader then uses sophisticated digital
image processing techniques to decode the bar code. Video cameras
use the same CCD technology as in a CCD bar code reader except
that instead of having a single row of sensors, a video camera
has hundreds of rows of sensors arranged in a two dimensional array
so that they can generate an image.
The factors that make a bar code readable are: an adequate print
contrast between the light and dark bars and having all bar and
space dimensions within the tolerances for the symbology. It is
also helpful to have sharp bar edges, few or no spots or voids,
a smooth surface and clear margins or "quiet zones" at
either end of the printed symbol.
All application programs support bar code reading as long as you
have the right equipment. Bar code readers are available with two
types of output - either "keyboard wedge" output or RS232 output.
The bar code readers with keyboard wedge output plug directly into
the keyboard port on your PC and they also provide a pigtail connector
so that you can plug in your keyboard at the same time. When you
scan a bar code with the keyboard wedge bar code reader, the data
goes into the computer just as if it were typed in on the keyboard.
This makes it extremely easy to interface the bar code reader to
any application that is written to accept keyboard data.
The keyboard wedge interface is extremely simple however it has a few drawbacks.
If you swipe a bar code, the cursor has to be in the correct input field in
the correct application otherwise you end up reading bar code data into whatever
application has the focus. This can cause all sorts of potential problems as
you can imagine. The keyboard output also is limited in that you cannot modify
the data in any way before sending it into the program that is to receive the
data. For example, if you needed to parse a bar code message into multiple
pieces or remove some of a bar code message or add in a date or time stamp
you would not be able to with a normal keyboard wedge reader.
The other possible output option is to get a bar code reader with an RS232
or "Serial" interface. With these types of bar code readers, you connect the
reader to an available serial port on the back of your PC. You would then need
a program called a "Software Wedge" to take the data from the bar code reader
and feed it to the application where you want the data to go. The disadvantage
to this approach is that it is a little more complex however you gain much
more control over how and where your data ends up when you read a bar code.
Our WinWedge product line is designed
just for this purpose. WinWedge is an executable program that can pass serial
data back and forth to other programs using either DDE (Dynamic Data Exchange)
or by converting incoming serial data to keystrokes (i.e. it stuffs the keyboard
buffer with the incoming serial data). With WinWedge, you can control exactly
where the data goes in the target application and you can also perform all
sorts of modifications on the data before it is sent to the application including
parsing or translating the data as well as adding additional keystrokes or
date and time stamps to the data.
WinWedge is extremely easy to use and is designed to have you up and running
sending and receiving serial data directly from within your application in
just a few minutes. Because WinWedge can pass data using DDE, you can set your
application up to insure that the bar code data always goes where it is supposed
to go and you can also have your application running in the background and
still accept bar code input while you run some other program in the foreground.
WinWedge is without question the most robust way to interface a bar code reader
to a PC with the least amount of effort.
See Also:
Bar Code Basics
Bar Code Symbology Descriptions
Reading Bar Codes Directly From A Computer
Screen
TALtech Bar
Code ActiveX Control
TALtech B-Coder
Bar Code Software
TALtech Barcode DLLs |