A barcode scanner reads a printed pattern of bars or modules, decodes it into characters, and sends those characters to a computer as if they had been typed. The three parts are a light source, a sensor and a decoder; what changes between models is how the light is shaped and how much of the returned image the decoder has to work with.
That last point is the whole story. A supermarket scanner, a handheld scanner and a scanner in a phone all do the same job with different optics, and the optics decide which labels they can read at all. Two scanners that both claim “reads 1D and 2D, USB interface” can differ by a factor of three in what they read on a crumpled label.
Three engines, three different jobs
| Engine | How it works | Reads | Where it stops working |
|---|---|---|---|
| Laser / CCD 1D | A line of light swept across the bars; a photodiode times the reflections | 1D symbologies only: EAN, UPC, Code 128, Code 39 | Any 2D code, any screen, and badly wrinkled labels |
| Linear imager | A 1D sensor array photographs one line across the code | 1D, and 2D codes it can align to | Wide codes at close range; low-contrast print |
| Area imager | A 2D sensor captures a whole image and decodes it in software | Everything: 1D, QR, Data Matrix, PDF417, phone screens | Very small elements at long range; nothing else |
Almost every scanner sold into retail today is an area imager, usually a CMOS sensor of 640 by 480 pixels or larger. The reason is not that 2D codes are common on packaging — most are still 1D — but that a 2D imager reads a damaged 1D label better than a laser does, because it captures the whole symbol and can reconstruct it, where a laser only sees one line at a time.
Four numbers, and what each one really measures
Scanner datasheets are full of figures that look comparable and are not. These four decide whether a given scanner will work at a given counter.
| Figure | What it means | Typical value | How it fails |
|---|---|---|---|
| Resolution | Width of the narrowest bar or module it can decode | 4 mil (0.1 mm) | A 4 mil claim tested on a perfect label; real labels are 7–10 mil |
| Print contrast | How much darker the bar must be than the space | 25–30% minimum | A worn label at 20% contrast decodes on one scanner and not the other |
| Depth of field | Range of distances where it decodes reliably | 10–250 mm on a desktop unit | The last 20% of the quoted range is where reads get unreliable |
| Scan rate | Images captured per second | 120 fps on a presentation scanner | A slow rate misses a code waved past rather than held |
The arithmetic behind depth of field is worth doing once. A 44° horizontal field of view covers about 0.81 times the distance in width, so at 250 mm it covers roughly 202 mm across 640 pixels — about 0.32 mm per pixel. A 13 mil module is 0.33 mm, which means the far end of the quoted range is decoding a symbol that occupies barely one pixel per module. That is why a scanner which reads a large UPC at 270 mm may need to be held at 60 mm for a 4 mil serial number: the near limit is focus, and the far limit is pixels per module.
Why a laser cannot read a phone screen
Laser scanners work on returned light. A barcode printed on paper reflects the beam back with high contrast between black and white. A phone screen emits its own light, and the white parts of a QR code are usually brighter than the ambient light the scanner expects — the sensor sees a washed field with no contrast to threshold. Some laser scanners can be coaxed into reading a screen at an angle, in a dark room, on a slow refresh rate. None of that is a payment flow.
If a shop takes QR payment, uses GS1 DataMatrix on produce, or scans identity documents, the scanner has to be an area imager. That is a hard requirement, not a preference, and it is the single most common wrong-purchase in retail hardware.
The four scanner shapes in a shop
| Shape | Typical use | Example specification |
|---|---|---|
| Handheld wired | Cashier scanning at a till, short cable run | CMOS 300k pixels, 4 mil, USB-HID or USB-COM, 110 g, 1.5 m cable |
| Handheld wireless | Stocktake, floor staff, market stalls | 2.4 GHz to 30 m, 2600 mAh battery, 10 h working, 100,000-code offline store |
| Presentation / omni | Counter scanner the cashier passes items under | 640×480 global shutter, depth 10–250 mm, 115 mA, 1.5 m drop rating |
| Desktop 2D | Documents, ID cards, QR at a service desk | 44°×34° field of view, 120 fps, 437 g, USB-HID, USB-COM or RS-232 |
The wireless handheld is the one with the least obvious specification. Its working time is quoted as 10 hours on a 2600 mAh battery, and charging takes about 6 hours — which means a shop running two shifts needs either a second battery or a charging cradle at the counter. And its 100,000-code memory is the feature that makes stocktake work: the scanner stores codes with no radio link at all. That mode is called inventory or batch mode, and it is a setting on the scanner, not a feature of the app.
HID or COM: the setting that decides whether it works at all
A USB scanner presents itself to the computer in one of two ways. In HID mode it identifies as a keyboard and types the decoded characters into whatever field has focus. That works with any application, including a spreadsheet, and requires no driver — which is exactly why it fails silently: if the cursor is in the wrong field, the code goes there instead of into the sale.
In COM or CDC mode the scanner is a serial device, and the application reads a byte stream. That gives the app control over the beep, the timing and the error handling, and it needs a driver. A shop that scans into the wrong field, or gets a code with the wrong prefix, is usually in HID mode with a misconfigured suffix.
The failure that produces no error message
Scanners rarely fail loudly. The three silent failures are worth knowing because each one looks like a different problem:
- A dirty window. A film of dust or grease on the exit window scatters the illumination and reduces contrast. The scanner reads nine labels out of ten and the tenth gets keyed in by hand. Wipe with a dry lint-free cloth; solvent can cloud the plastic.
- A worn label. Thermal labels from a shelf printer fade to 20% contrast, which is below the threshold. The scanner is blamed; the label was printed three months ago.
- A symbology setting. Most scanners ship with a set of enabled symbologies, and a restricted set will refuse one code type entirely. Interleaved 2 of 5 is the usual casualty, because its variable length makes it risky to enable by default.
The 4 mil claim
A 4 mil resolution figure is measured on a high-contrast test chart under controlled lighting. A real label on a curved bottle, printed at 8 mil, with a scuff across the middle, is a different problem. Specify the element size the label actually uses and add margin: a 4 mil scanner reading a 10 mil label has room to be tolerant, and a 5 mil scanner reading the same label has none.
FAQ
Can a barcode scanner read a QR code on a phone?
Only an area imager can. A laser or a 1D CCD scanner measures reflected light along a line and cannot resolve a self-luminous screen. If the shop takes QR payment, the scanner has to be a 2D imager — there is no setting that changes this.
Do I need to install a driver for a USB scanner?
Not in HID mode, where the scanner identifies as a keyboard. In COM or CDC mode you do, and that is the mode to use if the application needs to control the beep or handle a failed read. Both modes are usually available on the same unit, selected by a configuration barcode.
What does 4 mil mean?
Four thousandths of an inch, which is 0.1 mm — the width of the narrowest bar or module the scanner can resolve. A 4 mil scanner reads a 4 mil symbol only under good conditions; for everyday retail labels at 7 to 10 mil it has margin.
Why does the scanner type the code into the wrong place?
It is in HID mode and the application’s input field does not have focus, or the code carries a prefix or suffix the application does not expect. Check the cursor position first, then the scanner’s prefix and suffix settings — both are configuration, not faults.
Can one scanner handle both a till and a stocktake?
Yes if it is a wireless unit with an offline mode: it pairs to the till for sales and stores codes in its own memory when out of range. The limit is the offline buffer — 100,000 codes is typical, and a large store can fill that in a day of counting.
Where to go next
The engine type decides what a scanner can read; the resolution, contrast and depth of field decide how often it reads it.
the barcode scanner range 1D laser versus 2D imager where the scanner fits in a POS system terminals that integrate the scanner the full hardware catalogue