How to barcode scanners instantly detect what an item is, despite the barcode being at any angle and often on a crinkled surface, completeley changing the look of the code from the scanner’s perspective?

917 views

How to barcode scanners instantly detect what an item is, despite the barcode being at any angle and often on a crinkled surface, completeley changing the look of the code from the scanner’s perspective?

In: Technology

6 Answers

Anonymous 0 Comments

It depends on the scanner for many of those to be true. A very simple barcode scanner will simply read one direction (allowing some but not much tilt) while others will use various techniques to account for these challenges.

In most cases, a beam of light is fired at a thin foil that is extremely sensitive to current change, allowing a rapid low current to be pulsed in to control the angle of the beam. Some, such as grocery store checkout lanes, supply multiple beams and reflectors allowing any angle to be scanned.

The reflection of the beam is sent back to the scanner when a reflection is possible, toggling an internal state between 1 and 0. During this, either the duty cycle – the time between “reads” of that 0/1 state, is constantly slowed and sped up, or the pulse rate to the reflectors is variated, changing the sampling rate very rapidly. This allows for distance to be much less of an issue. Basically, there’s always a beam of light and the hardware is asking repeatedly “Do you see the emitted IR light?”

That data is pushed into a cyclical buffer, and each read triggers a checksum calculation. Since the length of the code(s) are known, it allows the assertion “If these are the numbers, their sum should calculate to the check digit.” – if the checksum for example is just a basic digital root, and the numbers read as 6,4,8,3,7, then 6+4+8+3+7=28, 2+8=10, 1+0=1, so the check digit must be a 1.

To detect the start and end of a barcode, a specific character is often used – since were dealing with binary, it’s often a non-numeral character such as * or a,b,c – this extra data not only serves the purpose of telling a scanner where a start of a barcode is so it knows it can use more processing power to actually read the code, but the kind of code it is so it knows what checksum formula to use and how long to expect the barcode. These little details allow them to be extremely fast as it’s quick to tell, “If my buffer doesn’t start with *, it’s not a barcode, keep reading”

You can act see the effects of that on much older scanners, they’ll start flickering at a certain rate, quickly ramp up and down, then shut off when it hits that known character, often pausing for 1-2 seconds before the register receives a barcode.

tl;dr, you can take a piece of paper and put a series of dots in a Braille fashion, 1 dot for one, 2 for off. Start a metronome and “read” whatever is under your finger, even if it’s the same dots or 3 dots apart, moving your finger at a constant rate, counting on/off, and grouping every 4 dots. Convert from binary to numbers. Repeat adjusting the metronome up or down until your finger hits each dot once per tick. That’s all it’s doing just using light.

(I don’t expect you to actually do that but if you do – props – it also illustrates how much faster computers are at “thinking” than we are.

You are viewing 1 out of 6 answers, click here to view all answers.