The Reference Timing - The Quiet Zone: How the Scanner Finds the Start of the Message |
Subtitle: A Deep Dive into the White Margin, Its Detection, and Its Role in Resetting the Decoder - with Real-World Designs from Symbol, Zebra, Honeywell, Datalogic, Microchip, and NXP |

|
Opening Summary |
Every barcode is surrounded by a silent margin - a white space that contains no bars. This is the quiet zone, and it is the decoder's first and most important reference point. The quiet zone tells the decoder where the barcode begins and ends. It provides a known, stable baseline - a long period of white - that the decoder can use to reset its timing and prepare for the incoming data. |
This article is dedicated to the quiet zone - its definition, its detection, and its critical role in the decoding process. We will explore how the quiet zone is used to reset the decoder's state machine, to calibrate the adaptive threshold, and to establish the reference timing for the entire barcode. We will look at how major companies have implemented quiet zone detection in their products. We will see how Symbol (now Zebra) used the quiet zone to trigger the start of the decoding process in the LS2208. We will explore Honeywell's use of the quiet zone to reset the baseline in their imagers. We will examine Datalogic's quiet zone detection algorithms for their industrial scanners. We will also look at Microchip's and NXP's reference designs, which include detailed examples of quiet zone detection. |
By the end of this journey, you will understand that the quiet zone is not just a blank margin but a critical timing reference that is essential for reliable barcode decoding. You will see how the detection of the quiet zone, the measurement of its duration, and the use of it to reset the decoder are all key steps in the decoding process. |

|
Full Article |
Section 1: The Quiet Zone - The Barcode's Silent Margin |
The quiet zone is a white margin that surrounds the barcode. It is the area where there are no bars or spaces. The quiet zone is typically at least 10 times the module width. This means that if the narrowest bar is 0.33 mm wide, the quiet zone must be at least 3.3 mm wide on each side of the barcode. |
The quiet zone is essential for reliable barcode decoding. It provides a known, stable baseline - a long period of white - that the decoder can use to reset its timing and to calibrate its threshold. The quiet zone is the decoder's reference point. |
Section 2: The Quiet Zone's Purpose - A Reset Signal |
The quiet zone serves as a reset signal for the decoder. The decoder monitors the digitised waveform. When it sees a long period of white (the quiet zone), it knows that a barcode is about to begin. The decoder resets its state machine, clears its buffer, and prepares to measure the pulse widths. |
The quiet zone also resets the adaptive threshold. The adaptive threshold is calibrated to the quiet zone's white level. The threshold is set to the midpoint between the white level and the black level that follows. |

|
Section 3: Detecting the Quiet Zone - The Long Low Pulse |
The quiet zone is detected as a long low pulse in the digitised waveform. The comparator's output is low for a black bar and high for a white space. In the quiet zone, the signal is high (white). The comparator's output is high during the quiet zone. Wait, that is the opposite of what we said earlier. The convention is that the comparator's output is high for a white space and low for a black bar. So, the quiet zone is a long high pulse. |
The decoder detects the quiet zone by looking for a long high pulse. The pulse must be longer than a certain threshold. The threshold is typically several times the module width. If the decoder sees a long high pulse, it assumes that it has found the quiet zone. |
Section 4: Symbol's LS2208 - The Quiet Zone Detection |
Symbol's LS2208 uses a simple method to detect the quiet zone. The decoder monitors the digitised waveform. When it sees a high pulse that is longer than a certain threshold, it assumes that it has found the quiet zone. The decoder then resets its state machine and prepares to decode the barcode. |
The LS2208's quiet zone detection is robust enough for most hand-scanning applications. The threshold is set to a value that is longer than the longest bar in the barcode. |

|
Section 5: The Quiet Zone Threshold - Setting the Minimum Duration |
The quiet zone threshold is the minimum duration of the quiet zone. The threshold must be longer than the longest bar in the barcode. If the threshold is too short, the decoder may mistake a wide bar for the quiet zone. If the threshold is too long, the decoder may miss the quiet zone. |
The threshold is typically set to 2-3 times the maximum expected bar width. The threshold is a multiple of the module width. |
Section 6: The Quiet Zone and the Adaptive Threshold |
The quiet zone is used to calibrate the adaptive threshold. The adaptive threshold tracks the signal's average level. In the quiet zone, the signal is at its maximum (white level). The adaptive threshold is set to the midpoint between the white level and the black level. |
The adaptive threshold is calibrated during the quiet zone. The threshold is set to the midpoint between the white level and the expected black level. The expected black level is estimated from the quiet zone's white level. |

|
Section 7: The Quiet Zone and the Baseline Restorer |
The quiet zone is used to reset the baseline restorer. The baseline restorer clamps the signal's baseline to a reference voltage. The baseline restorer is reset during the quiet zone. |
The baseline restorer ensures that the signal's baseline is at the correct level at the start of the barcode. |
Section 8: The Quiet Zone and the Decoder's State Machine |
The quiet zone triggers the decoder's state machine. The decoder's state machine has several states: idle, scanning, decoding, and done. The quiet zone transitions the decoder from the idle state to the scanning state. |
The state machine is implemented in the microcontroller's firmware. |

|
Section 9: The Quiet Zone and the Buffer Reset |
The quiet zone triggers the reset of the pulse width buffer. The buffer is cleared. The new pulse widths are written to the buffer starting from the first element. |
The buffer reset ensures that the buffer contains only the pulse widths from the current barcode. |
Section 10: The Quiet Zone and the Scanning Speed |
The quiet zone is used to estimate the scanning speed. The quiet zone's duration is known (it is at least 10 modules). The decoder measures the quiet zone's duration and uses it to estimate the module width. |
The module width is estimated by dividing the quiet zone's duration by 10 (or the expected number of modules in the quiet zone). This provides an initial estimate of the module width. |

|
Section 11: Honeywell's Quiet Zone Detection - A Digital Approach |
Honeywell's imagers use a digital approach to detect the quiet zone. The decoder processes the captured image. The decoder finds the quiet zone by looking for a white margin around the barcode. The quiet zone is the area of the image that has no black pixels. |
The digital quiet zone detection is more accurate and more robust than the analog approach. The decoder can find the quiet zone even when the barcode is distorted or damaged. |
Section 12: The Quiet Zone in a 2D Imager |
In a 2D imager, the quiet zone is the white margin that surrounds the 2D barcode. The quiet zone is detected by analyzing the image. The decoder finds the barcode's finder pattern and then looks for the quiet zone around the finder pattern. |
The quiet zone in a 2D barcode is essential for determining the barcode's orientation and size. |

|
Section 13: Datalogic's Quiet Zone Detection - A Robust Algorithm |
Datalogic's industrial scanners use a robust algorithm for quiet zone detection. The algorithm is designed to handle noisy, distorted, and low-contrast barcodes. The algorithm uses a combination of edge detection and histogram analysis to find the quiet zone. |
Datalogic's algorithm is part of their patented Auto-Adaptive Decoding technology. |
Section 14: The Quiet Zone and the Print Quality |
The quiet zone's quality affects the decoding. A poorly printed quiet zone (e.g., with spots or stains) can cause the decoder to miss the quiet zone. The decoder must be robust to print quality variations. |
The quiet zone detection algorithm must be able to handle variations in the quiet zone's contrast and uniformity. |

|
Section 15: The Quiet Zone and the Noise |
The quiet zone can be affected by noise. Noise can create false edges in the quiet zone. The decoder must be robust to noise. |
The quiet zone detection algorithm must be able to filter out the noise. The use of a threshold and a minimum duration helps to filter out the noise. |
Section 16: The Quiet Zone and the Distortion |
The quiet zone can be distorted. The distortion can be caused by print quality variations, scanning speed variations, or image distortion. The decoder must be robust to distortion. |
The quiet zone detection algorithm must be able to handle the distortion. The use of a flexible threshold and a tolerance helps to handle the distortion. |

|
Section 17: The Quiet Zone and the Scanning Speed Variations |
The quiet zone's duration varies with the scanning speed. A faster scan produces a shorter quiet zone. A slower scan produces a longer quiet zone. The decoder must be able to handle the variations in the quiet zone's duration. |
The quiet zone detection algorithm must use a threshold that is relative to the scanning speed. The threshold is typically a multiple of the module width. |
Section 18: The Quiet Zone and the Symbology |
The quiet zone is independent of the symbology. All barcode symbologies have a quiet zone. The quiet zone is a universal feature of barcodes. |
Section 19: The Quiet Zone and the Start/Stop Characters |
The start and stop characters are the first and last characters of the barcode. The quiet zone is before the start character and after the stop character. The quiet zone is not part of the data. |

|
Section 20: The Quiet Zone and the Checksum |
The checksum is not related to the quiet zone. The checksum is calculated from the decoded data. The quiet zone is used to find the barcode's boundaries. |
Section 21: The Quiet Zone and the Decode Security |
The 'Decode Security' setting in Honeywell's scanners is related to the decoder's tolerance for variations. The quiet zone detection is not affected by the Decode Security setting. The Decode Security setting affects the decoder's tolerance for variations in the pulse widths. |
Section 22: The Quiet Zone and the Minimum Contrast |
The 'Minimum Contrast' setting in Datalogic's scanners is not related to the quiet zone. The Minimum Contrast setting is related to the signal amplitude. The quiet zone detection is based on the pulse timing. |

|
Section 23: The Quiet Zone and the ROI Threshold |
The 'ROI Threshold' in Datalogic's scanners is not related to the quiet zone. The ROI Threshold is related to the image contrast. The quiet zone detection is based on the pulse timing. |
Section 24: The Quiet Zone and the Object Sense Mode |
The 'Object Sense' mode in Datalogic's scanners is not related to the quiet zone. The Object Sense mode is used to detect the presence of an object. The quiet zone detection is used to decode the barcode. |
Section 25: The Quiet Zone and the Derivative-Based Threshold |
MicroVision's derivative-based threshold is not directly related to the quiet zone. The derivative-based threshold is used to improve the comparator's decision. The quiet zone detection is done after the comparator. |

|
Section 26: The Quiet Zone and the Static/Dynamic Threshold |
MicroVision's static/dynamic threshold is not directly related to the quiet zone. The static/dynamic threshold is used to improve the comparator's decision. The quiet zone detection is done after the comparator. |
Section 27: The Quiet Zone and the Ternary Barcode System |
The ternary barcode system has a quiet zone, just like binary barcodes. The quiet zone is a white margin. The ternary barcode decoder uses the quiet zone to reset its timing. |
Section 28: The Quiet Zone and the 2D Ternary Barcode System |
The 2D ternary barcode system also has a quiet zone. The quiet zone is a white margin around the 2D code. The 2D decoder uses the quiet zone to find the code's boundaries. |

|
Section 29: The Quiet Zone in Texas Instruments' TIDA-00857 |
Texas Instruments' TIDA-00857 reference design includes a quiet zone detection algorithm. The algorithm monitors the digitised waveform for a long high pulse. The algorithm is simple and effective. |
Section 30: The Quiet Zone in Analog Devices' Reference Design |
Analog Devices' reference design includes a quiet zone detection algorithm. The algorithm uses a combination of edge detection and timing analysis to find the quiet zone. |
Section 31: The Quiet Zone in Microchip's Reference Design |
Microchip's reference design includes a quiet zone detection algorithm. The algorithm is part of the complete code example for Code 39, UPC, and Code 128. |

|
Section 32: The Quiet Zone in NXP's Reference Design |
NXP's reference design includes a quiet zone detection algorithm. The algorithm is optimized for the DMA-based edge capture. |
Section 33: The Quiet Zone and the Decoder's Initial State |
The quiet zone sets the decoder's initial state. The decoder is in the idle state. When the quiet zone is detected, the decoder transitions to the scanning state. The scanning state is where the decoder measures the pulse widths. |
Section 34: The Quiet Zone and the Decoder's Final State |
The quiet zone also sets the decoder's final state. After the barcode is decoded, the decoder looks for another quiet zone. The second quiet zone indicates the end of the barcode. The decoder transitions to the done state. |

|
Section 35: The Quiet Zone and the Decoder's Error Handling |
If the quiet zone is not detected, the decoder may not decode the barcode. The decoder may report an error. The error handling is part of the decoder's firmware. |
Section 36: The Quiet Zone - A Summary of Best Practices |
Based on our exploration, let us summarize the best practices for quiet zone detection in a barcode scanner: |
1. Look for a Long High Pulse: The quiet zone is a long high pulse in the digitised waveform. |
2. Set a Threshold: The threshold must be longer than the longest bar in the barcode. The threshold is typically 2-3 times the maximum bar width. |
3. Use the Quiet Zone to Reset the Decoder: The quiet zone resets the decoder's state machine, clears the buffer, and calibrates the adaptive threshold. |
4. Use the Quiet Zone to Estimate the Module Width: The quiet zone's duration provides an initial estimate of the module width. |
5. Be Robust to Noise and Distortion: The quiet zone detection algorithm must be robust to noise, distortion, and print quality variations. |
6. Test the Algorithm: The quiet zone detection algorithm must be tested with a variety of barcodes, under a variety of conditions, to ensure it is working correctly. |

|
Final Summary |
The quiet zone is the barcode's silent margin. It is a white space that surrounds the barcode. The quiet zone is essential for reliable barcode decoding. It provides a known, stable baseline that the decoder uses to reset its timing and calibrate its threshold. |
We have seen how major companies have implemented quiet zone detection in their products. Symbol's LS2208 uses a simple method based on a long high pulse. Honeywell uses a digital approach based on image analysis. Datalogic uses a robust algorithm for noisy and distorted barcodes. Microchip and NXP provide reference designs with detailed quiet zone detection examples. |
The quiet zone is the decoder's first and most important reference point. It is the key to finding the barcode's boundaries and to resetting the decoder's state machine. |