Barcode Technology

Barcode History

Barcode Label Paper

Barcode Printer

Barcode Application

Inventory Management

AI Barcode QRCode

Barcode Scanner

Barcode Software

Barcode Software B

Barcode Software C

Barcode Software D

Barcode Software E

New Technology A

New Technology B

Robot Technology

Barcode Types

Barcode Types B

Barcode Types C

Barcode Types D

Barcode Types E

Barcode Types F

Electronic Technology

Psychology at Work

Barcode Technology and Barcode Software Related   <<< Back to Directory <<<

The Barcode Reader Decoded: Principles and Practical Circuit Design (P18)

The Adaptive Threshold Comparator: The Barcode Reader's Decision Maker

Executive Summary

This article provides a comprehensive exploration of the adaptive threshold comparator, the digitizer circuit that converts a barcode reader's analog signal into a clean digital pulse stream by dynamically setting its decision point based on the signal's own characteristics. We examine how this self-adjusting threshold allows the reader to decode both strong, close-up signals and weak, distant signals without manual adjustment. Rather than focusing on abstract theory, we ground every concept in concrete design examples and real products from industry leaders including Texas Instruments, Motorola, Johnson & Johnson Clinical Diagnostics, and Symbol Technologies. We explore the fundamental concept of adaptive triggering, the use of peak and valley detectors to establish threshold levels, the implementation of hysteresis for noise rejection, and the techniques for automatically switching thresholds for different contrast levels. The article covers both classic analog implementations and modern hybrid approaches, with special attention to the practical trade-offs between sensitivity, noise immunity, and decoding accuracy. The closing summary synthesizes the key lessons and offers practical guidance for anyone designing or selecting digitizer circuits for barcode reading applications.

Chapter 1: The Decision Maker

The comparator is the barcode reader's decision maker. It takes the analog signal from the photodetector and decides, for every moment in time, whether the reader is looking at a black bar or a white space. This decision is made by comparing the signal to a threshold voltage. If the signal is above the threshold, the output is a one (white space). If the signal is below the threshold, the output is a zero (black bar).

The challenge is setting the threshold correctly. The amplitude of the barcode signal can vary dramatically from one scan to the next. A barcode pressed against the reader's window produces a strong signal with large peaks. A barcode held at arm's length produces a weak signal with small peaks. The threshold must be set correctly for both cases. If the threshold is too high, weak signals will be lost. If the threshold is too low, noise will be interpreted as bars.

The solution is an adaptive threshold comparator --- a comparator whose threshold automatically adjusts based on the amplitude of the incoming signal. The threshold tracks the signal, staying high when the signal is strong and low when the signal is weak. This ensures that the digitizer always operates at the optimal decision point, regardless of the signal amplitude.

Chapter 2: The Peak Detector --- Capturing the Signal's Highs

The peak detector is the circuit that captures the maximum amplitude of the signal. It is the key to adaptive thresholding. The peak detector charges a capacitor to the highest voltage reached by the signal, and this voltage is used as the reference for the threshold.

The peak detector must be designed to respond quickly enough to capture the signal's peaks, but not so quickly that it responds to noise. The charge time of the capacitor determines the response speed. The discharge time determines how quickly the peak detector tracks changes in the signal amplitude.

In the adaptive threshold comparator described in a patent, the positive peak detector outputs a DC voltage equal to the peak differentiated signal amplitude received from a target . The peak level is not sensed instantly but is established after a few scans, since many hundreds of scans are executed per second in typical barcode readers .

The output of the peak detector is buffered by an amplifier with a gain of +1 so that it may supply DC current at the positive peak differentiated signal voltage without disrupting the output of the peak detector . This buffered peak voltage is used to establish the upper threshold level.

Chapter 3: The Valley Detector --- Capturing the Signal's Lows

The valley detector is the complement of the peak detector. It captures the minimum amplitude of the signal, charging a capacitor to the lowest voltage reached by the signal. This voltage is used to establish the lower threshold level.

The combination of the peak detector and the valley detector provides the full range of the signal's amplitude. The difference between the peak and valley voltages is the signal's amplitude. The threshold is typically set at a fixed percentage of this amplitude, such as 70% of the peak-to-peak swing.

The adaptive threshold comparator described in the patent generates both positive and negative peak signals. The positive peak voltage is also fed to an inverting buffer that outputs a voltage approximately equal to the most negative swinging differentiated signal amplitude . This gives a true negative peak voltage that tracks the signal's minimum value.

This dual-peak approach ensures that the comparator's triggering levels are always placed symmetrically around the reference voltage, regardless of the signal amplitude. The upper and lower trigger thresholds are equally placed above and below the reference voltage .

Chapter 4: The Adaptive Hysteresis Trigger

The adaptive hysteresis trigger combines the peak and valley detector outputs with a comparator to provide clean, noise-immune digitization. The comparator's upper and lower trigger thresholds are derived from the peak and valley voltages, so they automatically track the signal amplitude.

In the adaptive trigger circuit described in a patent, a high-speed CMOS comparator is powered by a positive supply voltage and a variable pseudo-supply ground. The positive supply is connected to +Vcc, and the negative supply is connected to the output of the inverting peak detector, which represents the negative peak signal level .

The comparator's output can switch down to its negative supply rail, so its output drops to the negative peak value when in the OFF state. The output is connected through a pull-up resistor to the positive peak value supplied by the positive peak detector buffer . When the comparator is triggered ON, its output swings to the positive peak value; when OFF, it swings to the negative peak value.

This arrangement produces a comparator output that is a clean square wave with transitions symmetrically above and below the reference voltage. The trigger thresholds are set by a resistor divider, and the ratio of the resistors determines the percentage of the peak-to-peak swing at which the comparator triggers .

Chapter 5: The Resistance Ratio --- Tuning the Trigger Thresholds

The resistance ratio in the adaptive trigger circuit determines the trigger thresholds. The upper and lower trigger thresholds are established by the ratio of the two resistors in the hysteresis network. This ratio sets the percentage of the signal amplitude at which the comparator changes state.

The patent describes that a ratio of about 0.7 for the resistor network is well suited to avoid noise levels in barcode reading applications . This means the comparator triggers ON when the signal reaches 70% of the positive peak amplitude, and OFF when the signal falls to 70% of the negative peak amplitude.

This 70% threshold provides a good balance between sensitivity and noise immunity. If the threshold were set higher, the comparator would be less sensitive to noise but might miss weak signals. If the threshold were set lower, the comparator would be more sensitive to noise but would detect weaker signals.

The patent notes that the adaptive trigger circuit triggers at +/-70% of the differentiated signal peaks 'no matter what amplitude the signal peaks may have' . This is the essence of adaptive thresholding: the trigger thresholds are always at the same percentage of the signal amplitude, regardless of how strong or weak that amplitude is.

Chapter 6: Motorola's Adaptive Reference Switching

Motorola developed an adaptive threshold comparator that uses a different approach to track the signal amplitude. Instead of using a fixed percentage of the peak-to-peak swing, it switches the reference ratio based on the last detected transition direction.

The Motorola interface circuit uses a complementary pair of peak detectors that are reset during each signal cycle, one after each transition of the digitized signal . A ratio switching circuit is coupled to both detector outputs and to the reference input of a comparator.

The reference threshold supplied to the comparator is switched by the ratio switching circuit at each transition. When a black-to-white transition is anticipated, the voltage at the reference input is one value; when a white-to-black transition is anticipated, the voltage is switched to another value . The circuit provides a reference signal with an instantaneous value equal to the last detected peak value summed with a fixed fraction of the difference between the last detected peak value and the presently detected peak value .

This switched reference approach provides enhanced accuracy by anticipating the next transition and setting the threshold appropriately. The ratio switching is controlled by the last signal transition detected, so the threshold is always set for the next expected transition.

Chapter 7: The Hysteresis Dilemma --- Balancing Sensitivity and Noise

Hysteresis is a form of positive feedback that prevents the comparator output from chattering when the signal is near the threshold. Hysteresis creates a dead zone: once the comparator switches, the threshold shifts slightly in the direction of the switch, so noise cannot cause the comparator to immediately switch back.

However, too much hysteresis can limit the dynamic range of the reader. As a patent from Johnson & Johnson Clinical Diagnostics notes, 'The use of hysteresis produced by positive feedback in comparator circuits may also limit the dynamic range of bar code speeds. Large amounts of positive feedback will tend to limit the ability of a system to detect low amplitude signals' .

At very low bar code speeds, where an unchanging input signal exists for a significant amount of time, the low hysteresis levels needed for high speed operation may not be adequate in the presence of electronic noise and the input offset voltage inherent in comparators . This creates a conflict: high-speed operation requires low hysteresis for sensitivity, but low-speed operation requires high hysteresis for noise rejection.

The adaptive hysteresis trigger addresses this dilemma by making the hysteresis proportional to the signal amplitude. When the signal is strong, the hysteresis is large; when the signal is weak, the hysteresis is small. This provides noise immunity when the signal is strong and sensitivity when the signal is weak.

Chapter 8: The Tracking Hysteresis Circuit

A more sophisticated approach to hysteresis uses a tracking circuit that provides a symmetrical hysteresis characteristic. This circuit adjusts the hysteresis to track the input signal, ensuring that both the positive and negative hysteresis values are independent of the DC operating point.

The tracking circuit described in a patent includes an operational amplifier that tracks the input signal and adjusts the hysteresis symmetrically with respect to that input signal . In this configuration, 'neither the positive nor the negative hysteresis values will be influenced by changes in the output signal of the operational amplifier' .

This symmetrical hysteresis characteristic provides consistent noise immunity regardless of the signal's DC offset. The hysteresis values are fixed relative to the signal, not relative to ground, so the comparator's performance is independent of the signal's DC level.

The tracking circuit can replace the fixed resistor in the feedback path of the slope detector. The fixed resistor provides a fixed amount of hysteresis, but the tracking circuit provides a hysteresis that is always centered on the input signal.

Chapter 9: The Symmetrical Hysteresis Advantage

The symmetrical hysteresis provided by the tracking circuit has several advantages over conventional hysteresis. Conventional hysteresis is referenced to ground, so changes in the signal's DC level change the effective hysteresis. Symmetrical hysteresis is referenced to the signal, so it is independent of the DC level.

The patent notes that the tracking circuit provides 'a symmetrical and constant amount of hysteresis for comparator, regardless of the DC operating point of the circuit' . This makes the comparator more robust to variations in the signal level and less sensitive to component tolerances.

The symmetrical hysteresis also improves the digitizer's accuracy. The comparator switches at the same percentage of the signal amplitude on both rising and falling edges, so the digitized pulse widths accurately represent the bar and space widths.

The tracking circuit can be implemented with a few additional components, providing a significant improvement in performance at a modest cost.

Chapter 10: The Differentiator --- The Edge Enhancer

Many adaptive threshold comparators operate on the differentiated signal rather than the original signal. The differentiator enhances the edges of the barcode, making them easier to detect. The differentiated signal has zero crossings at the edges, and peaks at the transitions.

The adaptive threshold comparator described in the patent receives the differentiated waveform output of a differentiator stage . The differentiator performs a first derivative function on the voltage value, enhancing transitions in the amplified voltage output which correspond to dark bar edges and white space edges of the scanned bar code symbol.

The differentiated signal has several advantages over the original signal for thresholding. It is insensitive to the DC level of the signal, so the threshold does not need to track the baseline. The differentiated signal's peaks are proportional to the sharpness of the edges, providing information about the signal quality.

The patent from Microvision describes a scanner system that scans a target based on a first derivative of a reflectance profile. The threshold for generating the digital signal is set lower when the amplitude of the first derivative is lower, and higher when the amplitude of the first derivative is higher .

Chapter 11: The Slope Detector --- A Different Approach

The slope detector is an alternative to the peak-detector-based adaptive threshold comparator. Instead of setting a threshold based on the signal amplitude, the slope detector detects the slopes of the signal directly. The detector changes state when the input signal's slope exceeds a threshold.

A patent from Johnson & Johnson Clinical Diagnostics describes an 'amplitude independent slope detector' that produces a binary output signal corresponding to an information sequence carried by an analog signal . The detector includes a first circuit that detects positive and negative slopes, and a second circuit that produces binary output values in response to the detected slopes.

The first circuit uses first and second RC time constant circuits. In a preferred embodiment, one of the time constants is on the order of three times the other time constant . This difference in time constants allows the circuit to distinguish between the signal's slopes and its constant-amplitude regions.

The second circuit includes a comparator that is responsive only to the detected slopes. The output of the comparator changes state only when a slope is detected, and it maintains that state in the presence of a substantially constant amplitude.

Chapter 12: The Clipping and Smoothing Circuit

A practical challenge in threshold detection is noise on the signal peaks. If the peaks are noisy, the peak detector may capture noise spikes instead of the true peak value, causing the threshold to be set incorrectly. The clipping and smoothing circuit addresses this problem.

The Johnson & Johnson Clinical Diagnostics patent describes a clipping circuit that processes the analog input signal to eliminate noise in the peak values. The clipping circuit senses the input analog signal and substitutes non-noisy peak amplitude values for the noise-carrying peak amplitude values . The result is a substantially noise-free representation of the input analog signal.

The smoothing or clipping circuit includes a peak detector circuit, which is coupled to a peak hold circuit. An output switching circuit is coupled to the peak hold circuit, as well as an amplified representation of the input analog signal . The output of the circuit is a smoothed analog output waveform from which the noise has been removed from the peak amplitudes.

This pre-processing of the signal ensures that the peak detector captures the true peak values, not noise spikes. The result is a more accurate threshold and more reliable digitization.

Chapter 13: The Low Contrast Problem

One of the most challenging scenarios for an adaptive threshold comparator is a low contrast barcode. In a low contrast barcode, the difference in reflectance between the black bars and white spaces is small, so the signal amplitude is small. The standard threshold technique may fail to digitize the signal correctly.

Symbol Technologies recognized this problem and developed a threshold-switching technique to address it. The inventors discovered that analog signals generated by scanning low contrast bar codes are more readily digitized by comparing the analog signals to a threshold voltage that is closer to the midpoint between the detected black and white peaks .

For a high contrast barcode, a standard threshold of about 40% from the detected black peak works well. For a low contrast barcode, a non-standard threshold of about 50% from the detected black peak is more effective .

The Symbol Technologies patent describes a reader that can switch between threshold states to handle different contrast levels. The reader can switch automatically between a standard threshold and a non-standard threshold on alternating scans, improving the first-pass read rate for low contrast barcodes .

Chapter 14: The Multiple Threshold Approach

The multiple threshold approach is an extension of the threshold-switching concept. Instead of using just two thresholds, the multiple threshold approach uses several thresholds and selects the one that yields the best decoding results.

The Symbol Technologies patent notes that it would be possible to provide a threshold generating block capable of generating an unlimited number of different threshold signals. However, testing by the inventors revealed that the performance of the comparator in digitizing an analog waveform is optimized with use of only two discrete and closely spaced threshold signal states .

Adding threshold signals closer to the black peak than about 35% from black, or farther from the black peak than about 55% from black, would normally produce no significant benefit. Attempting to digitize an analog signal using threshold signals outside of the range of between about 35% from black and about 55% from black normally results in degradation of the first pass read rate .

The optimal threshold for high contrast barcodes is about 40% from the detected black peak; for low contrast barcodes, the optimal threshold is about 50% from the detected black peak . Two thresholds, one standard and one non-standard, are sufficient for most barcode reading applications.

Chapter 15: The Adaptive Validation Threshold

The concept of adaptive thresholding extends beyond the analog comparator to the decoding stage. In the decoding stage, a validation threshold is used to determine whether a detected symbol is a valid match to a reference symbol. This validation threshold can be adapted based on the characteristics of the character set.

A recent patent describes a method, system, and apparatus employing an adaptive validation threshold to decode barcodes. The validation threshold is dependent on the character set that is being employed in the barcode decoding process. The threshold is individually determined for each barcode character set based, at least in part, on a degree of difference found between reference barcode symbols included in the set of reference barcode symbols of the respective barcode character set .

Different character sets may be associated with different character positions in a barcode string. Here, a different validation threshold is employed for each of the different character sets that are employed in decoding the barcode . This ensures that the validation threshold is optimized for the specific challenges of each character set.

This approach is particularly valuable for barcodes that are deformed or poorly printed. The adaptive validation threshold provides enough tolerance for deformation while still rejecting false matches.

Chapter 16: The Edge Detection System with Positive and Negative Offsets

A more sophisticated edge detection system uses positive and negative offset signals derived from the differentiated photodetector signal. The offset signals are used to generate threshold signals that track the signal's peaks.

The edge detection system described in a patent generates a first derivative photodetector signal and provides it to a peak detector. The peak detector is connected to a voltage-to-current converter that provides equal currents of opposite polarity. The first derivative signal is connected to the junction of two series-connected resistors .

The peak detector, voltage-to-current converter, and resistors generate positive and negative offset signals. The amount of offset is proportional to the peak signal amplitude detected by the peak detector . These offset signals are used to generate the threshold signals for the comparators.

The positive offset signal is connected to a negative peak detector, and the negative offset signal is connected to a positive peak detector. The negative peak detector detects a negative peak in the positive offset signal, using it as a threshold signal for dark-to-light transitions . Similarly, the positive peak detector detects a positive peak in the negative offset signal, using it as a threshold signal for light-to-dark transitions.

This dual-threshold approach ensures that both rising and falling edges are detected with equal sensitivity. The thresholds track the signal amplitude, providing adaptive digitization.

Chapter 17: The Reset Video and Set Video Signals

The edge detection system produces two output signals: the RTV (reset video) signal and the STV (set video) signal. These signals indicate the occurrence of low-to-high and high-to-low transitions, respectively.

The outputs of the comparators are differentiated using differentiators. One differentiator outputs the low-to-high transition output signal (RTV), and the other outputs the high-to-low transition output signal (STV) .

The low-to-high (RTV) signal resets the positive peak detector, while the high-to-low (STV) signal resets the negative peak detector. Differentiators ensure that a relatively brief reset pulse is applied to the peak detectors .

The RTV and STV signals are provided to a decoder, which measures the time between low-to-high and high-to-low transitions and thereby determines the size of features (such as bars and spaces) in the target being read .

If two adjacent transitions occur in the RTV signal without an intervening transition in the STV signal, or vice versa, the decoder can decide which transition is legitimate based on the relative amplitudes of the two consecutive pulses .

Chapter 18: The Peak Detector as an Edge Qualification Tool

In the edge detection system, the peak detectors serve not only to generate threshold signals but also to qualify edges. A peak is qualified if the original first derivative photodetector signal crosses either of the threshold signals.

The negative peak comparison circuitry comprises a comparator that compares the first derivative photodetector signal with the negative peak threshold signal to generate the RTV signal when a crossing is detected . Similarly, the positive peak comparison circuitry compares the first derivative photodetector signal with the positive peak threshold signal to generate the STV signal when a crossing is detected .

This qualification process ensures that only valid edges, not noise, are passed to the decoder. The threshold signals are derived from the signal's own peaks, so they track the signal's amplitude and reject noise that is smaller than the threshold.

The edge detection system's ability to qualify edges based on their strength is particularly valuable for reading damaged or poorly printed barcodes, where the signal may contain spurious noise spikes.

Chapter 19: The Tracking Circuit for Symmetrical Hysteresis

The tracking circuit for symmetrical hysteresis, described in the Motorola patent, ensures that the hysteresis is balanced and independent of the signal's DC level. The tracking circuit is coupled to the comparator and provides a constant amount of hysteresis regardless of the DC operating point.

The tracking circuit includes an operational amplifier that tracks the input signal and adjusts the hysteresis symmetrically with respect to that input signal . In this configuration, neither the positive nor the negative hysteresis values will be influenced by changes in the output signal of the operational amplifier.

This symmetrical hysteresis is a significant improvement over conventional hysteresis, which can be asymmetric when the signal has a DC offset. Asymmetric hysteresis can cause the comparator to switch at different percentages of the signal amplitude on rising and falling edges, distorting the digitized pulse widths.

The tracking circuit also improves the comparator's noise immunity. The hysteresis is always centered on the signal, so noise is rejected equally on both rising and falling edges.

Chapter 20: The Memory Circuit for Peak Storage

The Motorola adaptive reference switching circuit includes a memory circuit that stores the peak values of the signal. The memory circuit is coupled to the output of the scanner through a switch. The switch is closed during the active portion of the scan to update the memory.

The memory circuit is part of a sample-and-hold amplifier. The output of the sample-and-hold amplifier is coupled to the positive and negative peak detectors . The peak detector outputs are coupled to the ratio switching network, which generates the reference threshold.

The peak detectors are reset during each signal cycle, one after each transition of the digitized signal . This ensures that the peak values are updated frequently, tracking changes in the signal amplitude.

The memory circuit's fast response to signal changes ensures that the threshold is always appropriate for the current signal conditions.

Chapter 21: The Ratio Switching Network

The ratio switching network is the heart of the Motorola adaptive reference switching circuit. It generates the reference threshold from the peak detector outputs, switching the ratio based on the last detected transition.

The ratio switching network includes resistors and a voltage-controlled switch. The ratio of the resistor values determines the reference voltage . When the switch is closed, the resistor values are paralleled, changing the ratio; when the switch is open, the ratio is different.

In one example, the resistor ratio is 6:3:2. When the switch is closed, the voltage at the reference point is two-thirds of the voltage between the two peak detector outputs, meaning that a black-to-white transition is anticipated. When the switch is open, the voltage at the reference point is one-third of the voltage between the peak detector outputs .

This switching of the reference ratio at each transition ensures that the comparator threshold is always set for the next expected transition. The result is more accurate digitization.

Chapter 22: The Low Duty Cycle Power Conservation

The Motorola interface circuit includes a power conservation feature that pulses the scanner light source at a low duty cycle when a code is not being scanned. This extends the battery life of the handheld reader.

The interface examines the scanner signals to determine whether the scanner is on a white area (border). If not, the light source is pulsed at a very low duty cycle until a white area is detected . Several other conditions which indicate non-decodable scanner signals will also cause a return to the low duty cycle mode.

The power conservation is controlled by a decoding and control block that monitors the scanner signals and controls the current in the scanner light source .

This feature significantly extends battery life in handheld scanners, where the reader may be idle for extended periods.

Chapter 23: The Comparator's Hysteresis and Dynamic Range

The balance between hysteresis and dynamic range is a central concern in comparator design for barcode readers. The Johnson & Johnson Clinical Diagnostics patent notes that large amounts of hysteresis limit the ability to detect low amplitude signals, while low levels of hysteresis may not be adequate in the presence of noise .

The adaptive threshold comparator addresses this challenge by making the hysteresis proportional to the signal amplitude. When the signal is strong, the hysteresis is large, providing robust noise rejection. When the signal is weak, the hysteresis is small, preserving sensitivity.

This adaptive hysteresis is achieved by deriving the trigger thresholds from the signal's own peak and valley amplitudes. The hysteresis is a fixed percentage of the peak-to-peak amplitude, so it scales with the signal.

The result is a comparator that has both high noise immunity and high sensitivity, regardless of the signal amplitude.

Chapter 24: The Differentiator's Second Derivative Alternative

Some scanner systems use the zero crossings of the second derivative of the reflected signal to detect black-to-white and white-to-black transitions. However, using a second derivative of the reflected signal is computationally complex and involves more circuitry or processing power .

The Microvision patent describes a scanner system that uses the first derivative amplitude as the basis for the threshold. The first derivative is simpler to compute and requires less circuitry than the second derivative.

The threshold for generating the digital signal is set lower when the amplitude of the first derivative is lower, and higher when the amplitude of the first derivative is higher . This adaptive threshold ensures optimal digitization for both weak and strong signals.

The first derivative approach provides a good balance between performance and complexity, making it suitable for cost-sensitive barcode readers.

Chapter 25: The Dual-Time-Constant Slope Detector

The slope detector described in the Johnson & Johnson Clinical Diagnostics patent uses two different time constants to detect slopes. One time constant is on the order of three times the other, which allows the circuit to distinguish between the signal's slopes and its constant-amplitude regions .

The first circuit includes first and second RC time constant circuits. Each time constant circuit includes a resistive input coupled to the input node . The difference in time constants ensures that the circuit responds to changes in the signal (slopes) but not to the steady-state value of the signal.

The second circuit includes a comparator with first and second inputs, each of which is coupled to the first circuit. The comparator changes state only when a slope is detected, not when the signal is constant.

This slope detector is amplitude independent, meaning it produces the same output for a given slope regardless of the signal's amplitude. This makes it immune to amplitude variations and well-suited for barcode reading.

Chapter 26: The Substitution of Non-Noisy Peak Amplitudes

The clipping circuit in the Johnson & Johnson Clinical Diagnostics patent substitutes non-noisy representations of peak amplitudes for noisy peak amplitudes of the analog signal. This ensures that the peak detector captures the true peak values, not noise spikes.

The clipping circuit includes circuitry for sensing the input analog signal. The sensing circuitry is coupled to circuitry for clipping or substituting non-noisy peak amplitude values for the noise-carrying peak amplitude values .

The result is a substantially noise-free representation of the input analog signal with the noise removed from the peak amplitudes. This noise-free representation is then used for slope detection and digitization.

The clipping circuit is particularly valuable for low-contrast barcodes where the signal amplitude is small and the noise is relatively large. By removing noise from the peaks, the clipping circuit ensures that the slope detector receives a clean signal.

Chapter 27: The Automatic Threshold Switching

The Symbol Technologies patent describes a bar code reader that can automatically switch between threshold states to digitize analog signals representing bar code symbols having varying contrast, from high to low.

The reader repetitively scans a bar code symbol and processes, digitizes, and reads the resulting signal after each scan. After a first scan, the reader attempts to digitize the output using a standard threshold signal suitable for digitizing analog signals representing medium to high contrast bar code symbols. After a second scan, the reader attempts to digitize using a non-standard threshold suitable for digitizing analog signals representing low to medium contrast bar code symbols .

After subsequent scans, the reader alternates between digitizing with a standard and then non-standard threshold voltage until the bar code symbol is decoded. In one example, the reader uses a threshold voltage of 40% from the detected black peak, and then 50% from the detected black peak, on alternating scans .

This automatic threshold switching ensures that both high-contrast and low-contrast barcodes are successfully digitized.

Chapter 28: The Standard and Non-Standard Threshold Values

The Symbol Technologies patent provides specific values for the standard and non-standard threshold signals. The standard threshold signal is between about 35% and 45%, and most preferably about 40% from the detected black peak. The non-standard threshold signal is between about 45% and 55%, and preferably about 50% from the detected black peak .

The standard threshold of 40% from the detected black peak is suitable for digitizing analog signals representing medium to high contrast bar code symbols (MRD between 50% and 85%). The non-standard threshold of 50% from the detected black peak is suitable for digitizing analog signals representing low contrast bar code symbols (MRD of about 25%) .

Both of these threshold signals can be used to digitize most analog signals representing medium contrast bar code symbols having MRDs of between 50% and 75% .

The inventors determined that any benefit resulting from adding a middle threshold signal would normally be outweighed by the increased complexity, cost, and decoding time in a bar code reader having a threshold generating block that generates more than two threshold signals .

Chapter 29: The Diffusion Effect and Threshold Placement

The diffusion effect is a phenomenon that occurs when scanning high-contrast barcodes. The white peaks in the analog signal have much smaller amplitudes than the black peaks, as a result of the diffusion effect . This makes it difficult for the comparator to detect the white peaks accurately.

The Symbol Technologies patent addresses this by placing the threshold slightly toward the black peak. The standard threshold signal of about 40% from the detected black peak is preferred for digitizing analog signals representing high contrast bar code signals because of the diffusion effect .

If the threshold were shifted toward the white peak (to 50% from the black peak), the comparator may have difficulty in digitizing low amplitude white peaks . The 40% threshold provides a good balance, successfully digitizing both high-contrast and many medium-contrast bar codes.

For low-contrast barcodes, the diffusion effect has little or no significance, so the threshold can be moved toward the midpoint (50% from the black peak) .

Chapter 30: The Manual Activation Alternative

While automatic threshold switching is preferred, the Symbol Technologies patent also describes a manual activation alternative. If a user knows that substantially all bar code symbols to be scanned are low contrast bar code symbols, the user can manually activate switching hardware in the threshold generating block circuitry which lowers the voltage of the threshold for each scan that is performed until the switching hardware is again activated .

This manual activation provides flexibility for applications where the barcode contrast is known in advance. It also provides a fallback for situations where the automatic switching is not effective.

The manual activation could be implemented with a physical switch or through software configuration.

Chapter 31: The First Pass Read Rate

The first pass read rate is a key metric for barcode reader performance. It measures the percentage of barcodes that are successfully decoded on the first scan attempt. A high first pass read rate is essential for high-volume applications.

The Symbol Technologies patent notes that attempting to digitize an analog signal using threshold signals outside of the range of between about 35% from black and about 55% from black normally results in degradation of the first pass read rate . Such failures could be caused by an analog peak which barely crosses the value of a threshold signal.

By using two thresholds (40% and 50% from black) on alternating scans, the reader achieves a high first pass read rate for both high-contrast and low-contrast barcodes.

The automatic threshold switching ensures that the reader can handle a wide range of barcode contrasts without user intervention, maximizing the first pass read rate.

Chapter 32: The Microprocessor Control Option

The Symbol Technologies patent describes a threshold-switching feature that can be implemented with a microprocessor. The microprocessor controls the threshold generating block, switching between threshold states based on the scan results.

The threshold voltage which is input into a comparator to digitize an analog signal can be switched between various states, either manually or automatically by signals generated either by hardware circuitry or a microprocessor, to facilitate the digitizing and decoding of analog signals generated by scanning bar code symbols having varying levels of contrast .

A microprocessor-based implementation provides flexibility and programmability. The threshold switching logic can be modified in software, and the thresholds can be tuned for specific applications.

The microprocessor can also monitor the decoding success rate and adjust the threshold switching strategy accordingly, further optimizing the first pass read rate.

Chapter 33: The Complementary Peak Detectors

The complementary peak detectors in the Motorola interface circuit are key to the adaptive reference switching. The positive peak detector captures the maximum signal value, and the negative peak detector captures the minimum value.

The peak detectors are reset during each signal cycle, one after each transition of the digitized signal. This ensures that the peak values are updated frequently, tracking changes in the signal amplitude.

The reset mechanism is controlled by the output of the comparator. After each transition of the digitized signal, the peak detectors are reset, preparing them for the next signal cycle.

This continuous resetting ensures that the peak detectors always hold the most recent peak values, providing an accurate reference for the threshold.

Chapter 34: The Hysteresis Control Stage

The hysteresis control stage in the Motorola interface circuit provides symmetrical hysteresis for the comparator. The hysteresis control stage is coupled to the comparator and adjusts the hysteresis to be constant and symmetrical.

The hysteresis control stage includes a decoupling circuit that ensures the hysteresis is independent of the DC operating point of the circuit . This provides consistent noise immunity regardless of the signal's DC level.

The hysteresis control stage works in conjunction with the ratio switching network to provide both adaptive thresholding and noise rejection. The threshold is adapted based on the signal amplitude, and the hysteresis rejects noise that is smaller than the threshold.

The result is a digitizer that is both sensitive and noise-immune, capable of handling a wide range of signal conditions.

Chapter 35: The Voltage-Controlled Switch for Ratio Switching

The voltage-controlled switch in the Motorola ratio switching network is controlled by the last signal transition detected. The switch toggles between two states, changing the ratio of the resistor network and the reference threshold.

The switch is controlled by the output of the comparator or by a flip-flop that stores the last transition direction. When the signal transitions from black to white, the switch is set to one state; when the signal transitions from white to black, the switch is set to the other state.

This switching ensures that the threshold is always set for the next expected transition, improving the accuracy of the digitizer.

Chapter 36: The DC Coupling and DC Offset Addition

The Motorola interface circuit is DC coupled for stability and includes a DC offset addition feature. The input signal is given an additional DC offset in the input amplifier, allowing much greater tolerance to scanner DC output characteristics.

The DC coupling ensures that the signal is not distorted by AC coupling capacitors, which can cause baseline wander. The DC offset addition allows the comparator to operate at its optimal DC level, independent of the scanner's output characteristics.

The input amplifier adds the DC offset to the signal, centering it within the comparator's input range. This ensures that the comparator operates in its linear region, providing accurate digitization.

The DC offset addition is a simple but effective technique for improving the robustness of the digitizer to variations in the scanner output.

Chapter 37: The Sample-and-Hold Amplifier

The sample-and-hold amplifier in the Motorola interface circuit is the key to the memory circuit. It samples the input signal and holds the sampled value for the duration of the signal cycle.

The sample-and-hold amplifier includes a switch, a capacitor, and a buffer. The switch closes during the active portion of the scan, charging the capacitor to the input signal voltage. The buffer provides a high-impedance output that drives the peak detectors without discharging the capacitor.

The sample-and-hold amplifier ensures that the peak detectors receive a stable signal, free from noise and glitches. This improves the accuracy of the peak detection and the resulting threshold.

Chapter 38: The Decoding and Control Block

The decoding and control block in the Motorola interface circuit monitors the scanner signals and controls the power conservation features. It determines whether the scanner is on a white area, and if not, pulses the light source at a low duty cycle.

The decoding and control block also controls the reset of the peak detectors and the switching of the reference ratio. It coordinates the various functions of the interface circuit to ensure accurate digitization.

The decoding and control block can be implemented with discrete logic or with a microprocessor. A microprocessor implementation provides flexibility and programmability.

The decoding and control block is the 'brain' of the interface circuit, orchestrating the various functions to achieve optimal performance.

Chapter 39: The Power Supply Circuit for the Scanner

The Motorola interface circuit includes a power supply circuit for the scanner (pen) amplifier. The power supply supplies current to operate the signal amplifier and, through a voltage-controlled switch, to the light source.

The voltage-controlled switch allows the decoding and control block to pulse the light source at a low duty cycle when no code is being scanned. This conserves power and extends battery life.

The power supply circuit includes regulation and filtering to ensure that the scanner amplifier receives a clean power supply. A clean power supply is essential for low-noise operation.

Chapter 40: The Scanner Light Source and Photodetector

The Motorola interface circuit is designed to work with a typical scanner consisting of a light source (such as an LED) and a photodetector for detecting light reflected from the bar code.

The light source illuminates the bar code, and the photodetector converts the reflected light into an electrical signal. The scanner amplifier amplifies the photodetector signal and couples it to the interface circuit .

The interface circuit's power conservation feature pulses the light source at a low duty cycle when no code is being scanned. This reduces the average power consumption of the scanner.

The photodetector's signal is amplified by the scanner amplifier and then processed by the interface circuit.

Chapter 41: The Improved Decoding Accuracy

The adaptive threshold comparator's primary benefit is improved decoding accuracy. By automatically adjusting the threshold to track the signal amplitude, the comparator ensures that the digitized signal accurately represents the barcode pattern.

The Motorola patent notes that the switched reference threshold 'provides for enhanced accuracy in the signal decoder' . The adaptive threshold allows the interface to handle widely varying AC amplitudes and DC levels.

The Symbol Technologies patent describes how the threshold-switching technique improves the first pass read rate for low contrast barcodes . The adaptive threshold ensures that both high-contrast and low-contrast barcodes are successfully digitized.

The improved decoding accuracy translates to higher throughput and fewer user errors in real-world applications.

Chapter 42: The Tolerance to Scanner Variations

The adaptive threshold comparator also provides tolerance to variations in scanner characteristics. The Motorola patent notes that the interface circuit provides 'increased tolerance to the DC level and widely varying AC amplitude of the interface input signal' .

This tolerance is important because scanners from different manufacturers produce different output signals. The adaptive threshold comparator can handle these variations without manual adjustment.

The DC coupling and DC offset addition further improve the tolerance to scanner variations. The interface can accommodate a wide range of scanner output characteristics without adjustment.

This tolerance simplifies the integration of barcode readers into systems and reduces the need for factory calibration.

Chapter 43: The Inexpensive and Readily Manufacturable Design

The adaptive threshold comparator designs described in the patents are notable for their simplicity and low cost. The Johnson & Johnson Clinical Diagnostics patent notes that there continues to be a need for 'accurate, noise insensitive read circuity with substantial bandwidth. Preferably, such circuitry will be inexpensive and readily manufacturable' .

The adaptive threshold comparator achieves this goal by using standard components and simple circuit topologies. The peak detectors, comparators, and resistor networks are all standard components that are widely available and inexpensive.

The designs are also readily manufacturable, with few or no adjustments required. This is important for high-volume production, where manufacturing costs must be minimized.

The low cost and simplicity of the adaptive threshold comparator make it suitable for a wide range of barcode reading applications.

Chapter 44: The Wide Dynamic Range

The adaptive threshold comparator provides a wide dynamic range, handling both weak and strong signals without adjustment. The Motorola patent notes that the interface provides 'increased tolerance to ... widely varying AC amplitude' .

The adaptive threshold comparator's wide dynamic range is achieved through the peak and valley detection. The thresholds track the signal's amplitude, so the comparator operates correctly regardless of how strong or weak the signal is.

The wide dynamic range is essential for barcode readers that must handle a wide range of scanning distances and surface reflectivities.

The adaptive threshold comparator can handle signals that vary by a factor of 100 or more, providing consistent digitization across the entire operating range.

Chapter 45: Summary --- The Adaptive Threshold Comparator in Perspective

The adaptive threshold comparator is a remarkable circuit that allows a barcode reader to digitize signals of widely varying amplitude without manual adjustment. By deriving its threshold from the signal's own peak and valley values, the comparator tracks the signal amplitude and always triggers at the optimal point.

We have examined how different companies and technologies have approached the challenges of adaptive thresholding:

Texas Instruments, through their comparators (the TLC352C), was used in an adaptive hysteresis trigger circuit that uses the positive and negative peaks of the differentiated signal as power supplies for the comparator. This unique arrangement provides trigger thresholds at a fixed percentage of the signal's peak-to-peak swing .

Motorola developed a switched reference threshold circuit that uses complementary peak detectors and a ratio switching network. The reference is switched based on the last detected transition, providing enhanced accuracy .

Johnson & Johnson Clinical Diagnostics (and Eastman Kodak) developed a slope detector that uses two time constants and a comparator to detect slopes independent of amplitude. The circuit includes clipping and smoothing to remove noise from the peaks .

Symbol Technologies developed a threshold-switching technique that uses two threshold states (40% and 50% from the detected black peak) for high-contrast and low-contrast barcodes. The reader automatically alternates between these thresholds on successive scans .

Microvision developed a scanner system that uses a first derivative amplitude-based adaptive threshold, setting the threshold lower when the amplitude is lower and higher when the amplitude is higher .

An edge detection system patent describes the use of positive and negative offset signals derived from the first derivative signal to generate RTV and STV signals for a decoder .

A recent patent describes adaptive validation thresholds for decoding, where the validation threshold is dependent on the character set being employed .

The key lessons from our exploration are:

Adaptive thresholding is essential for wide dynamic range. A fixed threshold cannot handle the wide variations in signal amplitude that occur in barcode reading.

Peak and valley detectors provide the signal envelope. The peak and valley voltages define the signal's amplitude and can be used to set the threshold.

The threshold is a fixed percentage of the peak-to-peak swing. A threshold of about 70% of the peak-to-peak swing provides a good balance between sensitivity and noise immunity.

Hysteresis must be adaptive too. The hysteresis should scale with the signal amplitude, providing more noise immunity for strong signals and more sensitivity for weak signals.

Different contrast levels require different thresholds. High-contrast barcodes are best digitized with a threshold slightly toward the black peak (about 40% from black). Low-contrast barcodes require a threshold closer to the midpoint (about 50% from black).

Automatic threshold switching improves the first pass read rate. By alternating between threshold states, the reader can handle a wide range of barcode contrasts.

Differentiated signals simplify thresholding. The differentiated signal is insensitive to the DC level and provides peaks at the edges.

In the end, the adaptive threshold comparator is a testament to the ingenuity of engineers who have developed circuits that are both simple and powerful. It is a device that makes decisions with near-human intelligence, adapting to changing conditions and always choosing the optimal threshold. The art of adaptive thresholding lies in the careful balance of sensitivity, noise immunity, and simplicity, creating a digitizer that is robust, reliable, and cost-effective.

 

EasierSoft Barcode Label Design & Bulk Printing Software

---- Use Excel Data to Batch Print Barcodes on Label Sheets or Roll Labels  

---- How to use this barcode software

Download:  Free Barcode Software + Barcode Label Designer

Download Free Barcode Software at Softonic

     Download at CNET

Once you obtain a GS1/UPC/EAN barcode, or other barcode type and QR code, you can use our free software to batch print barcode labels onto Roll label paper using a professional label printer, or to batch print barcodes onto Avery 5160 label sheets using a regular laser or inkjet printer. Our software has free and paid versions.

The free version fully meets your needs for batch printing GS1/UPC/EAN barcodes. The paid version can import data from Excel and databases to batch print barcode labels with different values.

How to Start

Input Data

Import Excel Data

Print Barcode

Barcode Format

Label Designer

All Screen Shot

Export Barcode Image

Save Template

Output Word Excel

How to Use & FAQ:

Example: Print portrait orientation 5164

Example: Print barcodes to 5167 label

Example: Print barcodes to 5168 label

Example: Print portrait orientation 5168

Example: Print barcodes to 5169 label

Example: Print barcodes to 5660 label

Example: Print barcodes to 5661 label

Example: Print barcodes to 5662 label

Example: Print barcodes to 5663 label

Example: Print barcodes to 5664 label

Example: Print portrait orientation 5664

Example: Print barcodes to 5873 label

Example: Print barcodes to 5874 label

Two ways to import Excel data

Import Excel Data - Pro Edition

Import Excel Data - Std Edition

Import Data from Excel - Detail

Load Data From Excel File

Data Editing Table

Copy Data From Excel

Four ways to input barcode data

Add ASCII Key E

Input Multiple Lines of Text for Barcodes

Generates Sequential Serial Numbers

Import or copy data from Excel sheets

Special sequence number generation

Std Details: Simple Input Form

Std Details: Multiple Line Text Input

Details: Sequence Barcode Generator

Examples: Sequence Barcode Generator

Import Data From Excel Spreadsheet

Barcode Data Correspondence Diagram

Data Editor

Editing a Single Row Data in Form

Batch Editing Multiple Rows of Data

Batch Data Editing - Example 2

Design & print complex barcode labels

Configuring Text Elements on Label

Configuring Barcode Elements on Label

Configuring Image Elements on Label

Setting Line Elements on Label

Designing Labels for 5164 Sheet

Advanced Page Layout Settings

Add Barcode Elements to a Label

Configuring Parameters of a Barcode

Entering Multiple Values for a Barcode

Print barcode labels

Print bulk barcodes - How to start

Four sections of print bulk barcodes

Barcode Filter & Repeat Print Quantity

Highlights

Excel integration: Import data directly from Excel to generate and print barcodes in bulk.

Label designer: Create complex labels with multiple barcodes, text, logos, and shapes.

Batch printing: Print thousands of barcodes at once using standard inkjet/laser printers or professional barcode printers.


Flexible editions:

Standard Edition: Simple batch printing with Excel data.

Professional Edition: Adds command-line automation for workflow integration.

Label Designer Edition: Advanced design features for complex labels.


Why Choose Our Barcode Solutions?

Cost-effective: Free online generator and permanent free desktop version available.

Easy to use: No technical expertise required—just input data and print.

Versatile: Supports nearly all 1D and 2D barcode types, including QR codes.

Trusted: Recommended by CNET and widely downloaded by users worldwide.


Suitable Use Cases

Small businesses and startups needing quick barcode labels for products.

Retailers and online sellers managing inventory with batch barcode printing.

Manufacturers requiring sequential or custom barcode labels for packaging.

Educational and testing environments where barcodes are used for tracking.

 

 

CONTACT

cs@easiersoft.com

If you have any question, please feel free to email us.

 

https://free-barcode.com

 

<<< Back to Directory <<<     Barcode Generator     Barcode Freeware     Privacy Policy