An Overview of 2D Barcode Technology
If you are already familiar with 1D or linear barcodes such as UPC and Code 128, you will find many familiar things in 2D or matrix symbologies, but some of those familiar things apply in unfamiliar ways. Generally, 2D symbols work the same as 1D barcodes: the scanning technology is based on reflectivity or more precisely, the reflective differences between the dark and light reflectance elements in the symbol. Here is an explanation of some other similarities.
The stop/start patterns in 1D barcodes signal the scanner to the presence of a barcode. Because different 1D symbols have different start/stop patterns, they also enable the scanner to identify kind of symbol it is—UPC, Code 39, or whatever. Start/stop patterns provide basic, format information that is always the same for every UPC, every Code 39 or code 128 or ITF. The “intelligent” or meaningful encoded information will vary but the start/stop pattern remains the same for each symbol type.
In 2D symbols these are called Fixed Patterns—they perform the same function as start/stop patterns in 1D codes with nuanced differences:
- they orient the scanner to the symbol directionally—what is up and down, what is left and right so the data can be decoded in its proper sequence
- they tell the scanner what type of symbol is present
- they help the scanner determine X dimension so it can select the correct aperture
- 1D barcodes must have a blank area of a specified, minimum size leading and trailing the barcode. Quiet Zone dimension is expressed as a multiple of the X dimension; for example in UPC the minimum left and right quiet zones are each 9 times X.
- 2D symbols also have a quiet zone that completely surrounds the symbol on all four sides, but it is relatively small, and differs for different types of 2D symbols. The Quiet Zone surrounding a Data Matrix code must be equal at least 1X. The Quiet Zone for QR Codes intended for mobile scanning (smart phone) is >2X; for all other scanning is >
- Quiet Zones as expressed above and in the ISO15415 Specification designate the required Quiet Zone as a > Larger Quiet Zones are always better. This is equally true of ISO15416 regarding 1D barcodes.
Bar Width Reduction
Bar width reduction is applied in a linear barcode to compensate for a predictable amount of press or dot caused by the printing process. Pigment applied to a substrate tends to spread. Bar width reduction compensates for that spread so that bars gain into their nominal width rather than exceed the allowable bar width tolerance and degrade scanning performance.
Bar width reduction for 1D barcodes affects only bar width and not bar height since bar height is not critical to scanning success.
Press or dot gain also occurs in printing 2D symbols so bar width reduction is an important consideration here too, but since 2D symbols are two dimensional, BWR must also occur in both the X and Y axis.
Since printing (with some exceptions) is an in-motion process, transport speed can affect image quality in the direction of travel. 1D barcodes printed with the bars parallel to the direction of travel are somewhat less sensitive to gain than when oriented perpendicular to direction of travel. Similarly, 2D symbols are more sensitive to gain in the perpendicular axis. Bar width gain is also related to print speed. Rather than attempt to compensate for high transport speeds when printing 1D or 2D symbols, bar width control improves at constant, lower transport speed.
1D and 2D symbols with smaller X dimensions have smaller plus or minus width tolerances than symbols with larger X dimensions. Thus, accurate bar width reduction is more critical when printing smaller symbols.
Error Detection vs. Error Correction
1D barcode check digits are like the spell checker in a word processing application: they detect an error but do not correct it. Check digits prevent misreads. Check digits are optional in some 1D barcodes, and when present, add only one or two characters to the encoded data string.
2D symbols have error correction capability, which is like the auto-correct function in word processing: it finds and corrects errors. Most 2D symbols use the Reed-Solomon error correction methodology.
Reed Solomon error correction originated in 1960, many years before barcodes. We unknowingly encounter it in mass storage systems including CD’s and DVD’s to correct for tracking errors by the reader (player).
QR Code has four levels of error correction, which is determined at the design stage; a QR Code can survive as little as 7% damage or as much as 40% damage.
Higher levels of error correction increases the data content of the QR Code, which can require it to occupy more space, or to reduce the X dimension.
Data Matrix code error correction is user-scalable depending upon the symbol size and total number of codewords.
The X dimension of a 1D barcode is the width of the narrow bar. In a 2D symbol the X dimension is called an element or module. In both symbol types, the X dimension is the basic building block of the symbol. In a 1D barcode the X dimension, in conjunction with the narrow-to-wide ratio of bars and spaces, and the amount of encoded data, determines the physical size of the entire barcode and its quiet zones. In UPC, X dimension is expressed as “magnification” but otherwise means the same thing—physical size of the symbol.
In 2D symbols, the element or module size and the amount of encoded data determines the physical size of the 2D symbol. The level of error correction factors into the amount of encoded data: more error correction increases the amount of encoded data.
In 1D barcodes, there are three factors to consider in symbol contrast.
First, there must be a minimum reflectance difference between the barcode and the background. The minimum reflectance difference for 1D barcodes is 50%.
Second, the background is always the Rmax maximum reflectance or “light” value; the barcode is the Rmin minimum reflectance or “dark” value. The Print Contrast Signal or PCS system specifies this reflectance requirement. Presently, reverse-imaged 1D barcodes with light reflectance bars and dark reflectance background (spaces and quiet zones) violate.
Third, 1D barcodes are always* scanned in 660nm light. Originally the light source was a laser but even with modern camera imagers, the light source emulates the 660nm laser. The red spectrum light source prohibits 1D barcodes printed in reddish colors, which would render the barcode invisible in red light. Neither can barcodes be printed over a green background, which would appear black in red light.
QR Code symbols are not held to the PCS system, and since the “scanners” are often smart phone cameras that do not use 660nm light. These symbols can be printed in a light color against a dark background and in a wide range of colors. Ironically this makes it more difficult to be sure the color combinations are acceptable, but the key issue is contrast: there must a minimum amount of contrast difference. However, the two reflectance values—light and dark—must be uniform. There must be no significant differences in the light reflectance value, and no significant differences in the dark reflectance value. The QR Code above violates that rule due to an ill-advised design decision.
Data Matrix symbols printed on labels and packaging are subject to the PCS system with Symbol Contrast grading based on the 50% minimum Symbol Contrast threshold.
Direct Part Mark (DPM) symbols are imaged directly onto substrates such as metal, plastic or glass, and are not held to the Symbol Contrast standard but are still verified (and scanned
) with 660nm light. The basic requirement is to achieve minimal or better contrast difference between the symbol and its substrate to be able to decode it, but no contrast threshold is expressed.
DPM verifiers are required to provide lighting at 90°,45° and 30° to optimize the likelihood of capturing a successful decode, from which it is then possible to evaluate and grade the symbol on its other properties.
*The Laetus Pharmacode 1D symbol can be printed in reddish colors and needs a special white light scanner to scan it. See Glossary.
John helps companies resolve current barcode problems and avoid future barcode problems to stabilize and secure their supply chain and strengthen their trading partner relationships.