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 (P19)

Peak and Valley Detector Circuit: The Barcode Reader's Adaptive Eye

Executive Summary

This article provides a comprehensive exploration of the peak and valley detector circuit, a fundamental building block in barcode readers that enables adaptive thresholding for reliable digitization. We examine how this circuit captures the highest and lowest excursions of the analog barcode signal, allowing the digitizer to set a threshold that automatically tracks signal amplitude variations. Rather than focusing on abstract theory, we ground every concept in concrete design examples and real patent disclosures from industry leaders including Motorola, Microvision, and various other pioneering companies. We explore the basic structure of peak and valley detectors, the use of precision diodes and operational amplifiers for accurate capture, the employment of clamping diodes to prevent peak detector divergence, the use of pull-up and pull-down resistors to separate detectors and prevent noise digitization, and the integration of these detectors into a complete adaptive thresholding system. The article covers both the classic analog implementations and the 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 peak and valley detector circuits for barcode reading applications.

Chapter 1: Capturing the Extremes

The peak and valley detector circuit is one of the most elegant and essential components in a barcode reader's analog front end. Its job is simple but critical: capture the highest and lowest points of the incoming analog signal, and hold those values so that a threshold can be generated for digitization.

In a barcode reader, the analog signal from the photodetector rises when the scanner beam passes over a white space and falls when it passes over a black bar. The difference between the highest point (the peak) and the lowest point (the valley) represents the contrast of the barcode. By capturing these extremes, the circuit can generate a threshold that sits halfway between them, ensuring that the digitizer can reliably distinguish bars from spaces regardless of how strong or weak the signal is.

The basic operation is straightforward. The positive peak detector stores the most positive voltage reached by the input signal on a capacitor. The negative peak detector stores the most negative voltage. A resistor divider between these two stored voltages generates a threshold voltage that is a fixed fraction of the signal's peak-to-peak amplitude .

A patent from a barcode reader manufacturer explains this principle: 'The positive peak detector stores the most positive value of a continuous time varying analog input signal connected to its input. Conversely, the negative peak detector stores the most negative value of the analog input signal' .

Chapter 2: The Basic Positive Peak Detector

The positive peak detector is a circuit that charges a capacitor to the highest voltage reached by the input signal. It consists of a diode and a capacitor, often with an operational amplifier to improve accuracy.

The simplest peak detector uses a diode in series with the input signal and a capacitor to ground. When the input voltage is higher than the voltage on the capacitor, the diode conducts and charges the capacitor. When the input voltage falls, the diode blocks, and the capacitor holds its voltage.

However, the simple diode peak detector has a significant limitation: the diode's forward voltage drop (about 0.6 volts for a silicon diode) prevents the capacitor from charging to the true peak voltage. This error can be significant for small signals.

To overcome this, a precision peak detector uses an operational amplifier to effectively cancel the diode's forward voltage drop. The op-amp is connected in a negative feedback loop with the diode in the feedback path. The op-amp's high gain forces the output to rise until the voltage at the inverting input equals the input voltage, effectively eliminating the diode drop.

The patent describes a precision diode comprising 'a first operational amplifier 33 connected in series with a first conventional signal diode 34' . This configuration ensures that the capacitor charges to the true peak voltage of the input signal, regardless of the diode's characteristics.

Chapter 3: The Basic Negative Peak Detector

The negative peak detector is the complement of the positive peak detector. It captures the lowest voltage reached by the input signal, storing it on a capacitor.

The negative peak detector uses a diode oriented in the opposite direction. When the input voltage falls below the voltage on the capacitor, the diode conducts and the capacitor discharges to the input voltage. When the input voltage rises, the diode blocks, and the capacitor holds its voltage.

Like the positive peak detector, the negative peak detector can be implemented with a precision diode using an operational amplifier. The op-amp configuration is similar but with the diode polarity reversed.

The patent describes a negative peak detector that 'stores the most negative value of the analog input signal' . The negative peak detector's output provides a voltage that represents the lowest signal level, corresponding to the black bars in the barcode.

The combination of the positive and negative peak detectors provides a complete picture of the signal's amplitude. The positive peak detector tracks the white spaces, and the negative peak detector tracks the black bars.

Chapter 4: The Voltage Divider for Threshold Generation

Once the peak and valley voltages have been captured, they are used to generate a threshold voltage for the comparator. The simplest way to do this is with a resistor divider connected between the positive peak detector output and the negative peak detector output.

The patent describes a 'voltage divider is connected across the peak detectors 26 and 27 to provide a threshold voltage VTH. The voltage divider comprises a first threshold resistor R1 connected in series with a second threshold resistor R2 between the output 35 of the positive peak detector and the output 45 of the negative peak detector' .

The threshold voltage appears at the center tap of the voltage divider. By choosing the ratio of the two resistors, the threshold can be set at any fraction between the peak and valley voltages. For example, equal resistors would set the threshold at the midpoint, while different ratios would bias the threshold toward the black level or the white level.

The patent notes that 'it has been demonstrated that the present invention operates best with high contrast, high quality bar code tags when the threshold voltage is set at 40% of the potential between the peak detectors, measured from the negative peak detector. Alternatively, the circuit operates best with tags printed with a dot matrix printer when the threshold voltage is set to equal 60% of the potential between the peak detectors' . Exemplary values for the divider resistors are 330 and 470 kilohms.

Chapter 5: The Comparator with Hysteresis

The threshold voltage from the divider is applied to a comparator that digitizes the input signal. The comparator compares the incoming analog signal to the threshold voltage. When the signal is above the threshold, the output is high (representing a white space). When the signal is below the threshold, the output is low (representing a black bar).

The comparator typically includes hysteresis to prevent chatter when the signal is near the threshold. Hysteresis is a form of positive feedback that shifts the threshold slightly when the comparator switches, creating a dead zone that rejects noise.

The patent describes the comparator connection: 'the threshold voltage appears at the center tap of the voltage divider and is connected to the inverting input of a comparator 46. The non-inverting input of the comparator is connected to the input signal through a series resistor R3 and to the output of the comparator through a feedback resistor R4. The series resistor and the feedback resistor provide hysteresis for the comparator function' .

The hysteresis ensures that the digitizer output is a clean square wave, free from the noise-induced jitter that would otherwise occur when the signal crosses the threshold.

Chapter 6: The Clamping Diode for Threshold Tracking

A significant challenge in peak detector circuits is that the peak values can drift over time. If the signal amplitude changes during the scan (for example, due to varying contrast or scanning angle), the threshold must track these changes to maintain optimal digitization.

The patent describes a clamping diode that addresses this problem: 'a clamping diode 47 is connected between the outputs of the peak detectors. Specifically, the anode of the clamping diode is connected to the output 35 of the positive peak detector and the cathode of the clamping diode is connected to the output 45 of the negative peak detector' .

The clamping diode ensures that 'the values of the peak detectors never stray more than the forward voltage drop of the clamping diode' . In an exemplary embodiment using a silicon diode, the maximum voltage potential between the peak detectors is approximately 600 millivolts.

The function of the clamping diode is best understood by example. If the barcode has black bars that gradually lighten to gray, the negative peak detector voltage (representing the bars) will rise. The positive peak detector (representing the spaces) will follow, maintaining a constant difference equal to the diode drop. This ensures that the threshold tracks the changing signal amplitude.

The patent explains that 'when the scanner encounters a bar, the negative peak detector is set at a value equal to the amplitude of the input signal. However, if the peak to peak amplitude of the input signal is greater than the forward voltage drop across the clamping diode, the positive peak detector will follow the negative peak detector' .

Chapter 7: The Pull-Up and Pull-Down Resistors for Noise Immunity

Another challenge in peak detector circuits is that they tend to converge to a common voltage when the input signal is flat. This can cause the digitizer to digitize small noise signals, creating errors.

The patent describes the use of pull-up and pull-down resistors to prevent this: 'a pull-up resistor R5 connected between the output 35 of the positive peak detector 26 and Vcc and a pull-down resistor R6 connected between the output 45 of the negative peak detector 27 and ground' .

The pull-up and pull-down resistors 'separate the peak detectors when the input signal is small' . In an exemplary embodiment, the values of the pull-up and pull-down resistors are selected to maintain at least a 100 millivolt potential between the peak detectors. This prevents the digitizer from responding to small noise signals.

The patent explains the problem: 'White paper noise results from allowing the peak detectors to converge to the same potential. Once this occurs, even the smallest noise signals will trigger the comparator since the threshold voltage is nearly the same as the value of the input signal' .

The pull-up and pull-down resistors provide a controlled separation between the peak detectors, ensuring that the threshold is always at a safe distance from the signal. This is particularly important for reading barcodes with white margins, where small impurities and shadows can produce noise.

Chapter 8: The Limiter and Separator Circuits

A more sophisticated peak detector circuit may include limiter and separator circuits to control the peak detector outputs. The limiter maintains a maximum voltage potential between the peak detectors, while the separator maintains a minimum potential.

The patent describes a separator means coupled to the outputs of the peak detectors for 'maintaining a minimum potential between the peak detectors regardless of the amplitude of the input signal' . The pull-up and pull-down resistors described in the previous chapter serve this function.

A separate patent describes a limiter circuit 'coupled to the outputs of the peak detectors for maintaining a maximum voltage potential between the peak detectors' . The limiter allows the positive peak detector to update its stored value while the negative peak detector is storing the value of the negative peak, and vice versa.

These limiter and separator circuits work together to ensure that the peak detectors operate correctly across a wide range of signal amplitudes, from very strong to very weak.

Chapter 9: The Local Peak and Valley Detectors in a DC-Coupled System

Another approach to peak and valley detection is used in a DC-coupled waveform preprocessor described in a patent . This system uses local peak and valley detectors to track the localized extremes of the signal, rather than the global extremes.

The DC-coupled system addresses the problem of specular reflection, which can cause AC-coupled circuits to distort the barcode signal. By preserving the DC content of the signal, the system can identify specular reflections by their amplitude.

The waveform preprocessor includes 'a DC offset analyzer 306, (including a local peak detector 308, a local valley detector 310 and a midpoint follower 312)' . The DC offset analyzer detects the localized peaks of the signal using the peak detector and the localized valleys using the valley detector. The midpoint follower establishes the midpoint between the peaks and valleys, which represents the DC offset.

The DC offset is subtracted from the buffered signal using a subtractor, providing a DC offset-adjusted waveform. This waveform is then clamped and digitized.

The local peak and valley detectors are designed to track the signal's local extremes, updating the peaks and valleys as the signal changes. This provides a more responsive threshold than global peak detection, especially for signals with varying contrast.

Chapter 10: The Adaptive Threshold Based on First Derivative Amplitude

A different approach to adaptive thresholding uses the amplitude of the first derivative of the reflectance profile to set the threshold. This method, described in a patent from Microvision, uses the first derivative signal to detect edges and sets the threshold based on the derivative's amplitude .

The patent explains that 'positive and negative threshold values may comprise a static portion and a dynamic portion. The static portion may comprise a constant value, and the dynamic portion may be based at least in part on a charge profile, or a discharge profile, of a capacitor' .

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 ensures that weak edges are still detected, while strong edges are digitized cleanly.

The patent also notes that the method avoids the computational complexity of using a second derivative: 'typical scanner systems utilize 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 therefore involves more circuitry or processing power' .

Chapter 11: The Hardware Symbology Locating Unit

The peak and valley detectors are often part of a larger system for locating and decoding barcodes. A patent describes a 'hardware symbology locating unit' that includes shift registers and ratio detection to locate potential barcode candidates .

The hardware unit derives values from an input seed based on the width of a detected coded symbology element. The value of a subsequent input seed is compared to values generated from a prior input seed. Based on this comparison, the unit determines whether the size of a subsequent symbology element is a ratio match of a prior symbology element .

The presence of a potential coded symbology candidate is likely when a plurality of ratio matches are detected. This hardware-based approach is computationally efficient and does not require a large amount of memory.

The system stores both binary data and gray data in a buffer. The binary data is stored in the least significant bit, and the gray data (containing amplitude information) is stored in the remaining bits. If the binary data is insufficient for decoding, the system can use the amplitude information in the gray data .

Chapter 12: The Quantitative Peak and Valley Decoding Method

A patent from Intermec Technologies describes a quantitative peak and valley location decoding method that can extract data from unresolved bar code profiles . This method is particularly useful for variable length Code 39 and I2/5 barcodes.

The method extracts data from profiles that do not resolve the narrow elements, improving the usable depth-of-field performance of a projected aperture scanning device and a video imaging device by up to 300 percent .

The method involves measuring the features of peaks and valleys in the waveform. These features include the width, relative height, and comparative distance with respect to the maximum or minimum peak or valley for the symbol. The symbol character length provides a good indicator to determine whether the width of a given peak or valley corresponds to an acceptable width for an element within the symbol character.

The method uses rules to eliminate noisy peaks and valleys that are too small. If a peak or valley is too narrow or small in comparison with other peaks and valleys in the symbol, it is eliminated by combining it with an adjacent peak or valley. The method also includes code-specific properties that help to validate possible combinations of adjacent peaks or valleys .

Chapter 13: The Clamping and Limiting Circuits

The clamping and limiting circuits in the peak detector system are essential for handling signals with varying amplitude. The clamping diode prevents the peak detectors from straying too far apart, while the limiter circuit prevents them from being driven too close together.

The patent describes a clamping diode that ensures 'the values of the peak detectors never stray more than the forward voltage drop of the clamping diode' . This provides a controlled maximum separation between the positive and negative peak detectors.

The limiter circuit, described in another patent, maintains a minimum separation between the peak detectors. The limiter 'allows the positive peak detector to update its stored value while the negative peak detector is storing the value of the negative peak of the input signal and which allows the negative peak detector to update its stored value while the positive peak detector is storing the value of the positive peak of the input signal' .

This bidirectional limiting ensures that the threshold is always at a controlled distance from the signal, regardless of the signal's amplitude.

Chapter 14: The Midpoint Follower for DC Offset Compensation

The DC-coupled waveform preprocessor described in a patent uses a midpoint follower to establish the midpoint between the peaks and valleys . This midpoint represents the DC offset of the signal.

The DC offset analyzer detects the localized peaks using the peak detector and the localized valleys using the valley detector. The midpoint follower establishes the midpoint between the peaks and valleys, which is the DC offset. The DC offset is subtracted from the buffered signal using a subtractor, providing a DC offset-adjusted waveform .

This DC offset compensation is essential for signals that have a varying baseline. By removing the DC offset, the signal is centered on zero, making it easier to digitize.

The DC offset compensation also simplifies the subsequent clamping and limiting functions. The clamped signal is then DC level shifted to coincide with the input range of an analog-to-digital converter .

Chapter 15: The Digital-to-Analog Converter and Memory

In some systems, the peak and valley detectors are replaced by digital processing. The input signal is digitized by an analog-to-digital converter, and the peak and valley values are determined in software.

A patent describes a system where 'the system 10 stores binary data and determines the ratios and potential barcode locations' and 'stores gray data in the seven most significant bits of the gray data buffer 530' . The gray data contains the amplitude information from the signal.

The system uses a three-step process for locating and decoding potential barcode candidates. First, it attempts to decode from ratio data. If that fails, it attempts to decode from binary data. If that fails, it uses the gray data to focus on a localized area .

This digital approach provides greater flexibility than analog peak detectors. The threshold can be set in software, and multiple thresholds can be tried on the same data.

Chapter 16: The Adaptive Threshold Using First Derivative

The Microvision patent describes a circuit that generates a first derivative signal from the reflectance profile . The first derivative signal is used to detect the edges of the barcode.

The circuit includes a peak detector to detect peaks in the first derivative signal and a flip-flop circuit that is triggered when a peak exceeds the adaptive threshold . The positive and negative threshold values can be set independently.

The patent describes that 'positive and negative threshold values may comprise a static portion and a dynamic portion. The static portion may comprise a constant value, and the dynamic portion may be based at least in part on a charge profile, or a discharge profile, of a capacitor' .

The threshold is set lower when the amplitude of the first derivative is lower, and higher when the amplitude of the first derivative is higher. This ensures that weak edges are still detected, while strong edges are digitized cleanly.

Chapter 17: The Scanning System Block Diagram

The scanning system in which the peak and valley detectors operate typically includes a laser, a scanning mirror, a photodetector, and signal processing circuitry.

The Microvision patent describes a MEMS-based scanner system with a processor, scan line generator, and target bar code imager . The processor sends control signals to the scan line generator to cause it to generate a laser beam swept across the target.

The target bar code imager captures light emitted from the scan line generator that is reflected off the target and converts the reflectance profile into an electrical signal. The signal is then processed by the analog edge detector, which uses the adaptive threshold to detect edge transitions .

The scanning system also includes a user interface, communications block, and power management block, making it a complete barcode reading solution.

Chapter 18: The Decoding Process from Ratio Data

The decoding process from ratio data is described in a patent as an extremely fast and efficient method of locating and decoding barcode symbols . The ratio data is based on the widths of the detected barcode elements.

The patent explains that 'the ratio data provides an extremely fast and efficient method of locating and decoding barcode symbols. However, if there are errors in the data, the system 10 must resort to 'higher level' data to perform decoding of a barcode symbol' .

The higher level data includes the binary data and the gray data stored in the buffer. The CPU focuses on the gray data in the vicinity of the location of the potential candidate. By locating candidates in hardware, the available CPU power can be focused on a localized area in greater detail .

This three-step process of locating and decoding potential barcode candidates significantly increases scanning speed and accuracy by focusing CPU resources only on the most promising candidates.

Chapter 19: The Clamp for Erroneous Data

The DC-coupled waveform preprocessor includes a saturation clamp that removes erroneous data caused by specular reflections and other out-of-range signals . The saturation clamp ensures that only valid signals are passed to the subsequent processing stages.

The patent describes that 'after the light reflected from the barcode symbol 18 has been detected by the detector circuit 301, the analog signal 160 is passed through a saturation clamp 302 and a buffer 304. The saturation clamp 302 removes erroneous data caused by specular reflections and which is also clearly outside the input range of the A/D converter 322' .

The clamp is essential for handling the wide dynamic range of barcode signals. Specular reflections can produce very high amplitudes that would otherwise saturate the A/D converter. The clamp limits these signals to the converter's input range.

Chapter 20: The Diode-Based Limiting Circuit

A diode-based limiting circuit clamps any signal portions which extend outside of a preset range . This ensures that the signal remains within the dynamic range of the subsequent processing stages.

The patent describes that 'a diode-based limiting circuit 316 clamps any signal portions which extend outside of a preset range. The clamped signal 317 is input into a DC offset adjuster 318, which ensures that the DC component of the clamped signal 317 corresponds to the midpoint of the output dynamic range of the A/D converter 322' .

The diode-based limiting circuit uses diodes to clip the signal at predetermined levels. This provides a hard limit on the signal amplitude, preventing saturation of the A/D converter.

The DC offset adjuster centers the signal within the A/D converter's range, maximizing the use of the converter's dynamic range.

Chapter 21: The Sample and Hold Capacitor

The peak and valley detectors rely on capacitors to store the peak values. The sample and hold capacitor holds the peak voltage until it is read or updated.

The patent describes that the positive peak detector comprises 'a first precision diode 28 having an anode 29 connected to the analog input signal and an cathode 31 connected to one electrode of a first storage capacitor 32. The other electrode of the first storage capacitor is connected to ground. The output of the positive peak detector, shown at reference numeral 35 in FIG. 4, is the voltage across the first storage capacitor 32' .

The storage capacitor must be chosen carefully. A larger capacitor holds the charge longer but responds more slowly to changes. A smaller capacitor responds quickly but discharges faster. The choice of capacitor value is a trade-off between speed and hold time.

Chapter 22: The Comparator Output and Digitized Signal

The comparator output is the final product of the peak and valley detector circuit. It is a digital signal that represents the barcode's bars and spaces.

The patent describes that 'the comparator switches between binary values, i.e. LOW and HIGH, according to the relative values of the comparator's inputs. When the non-inverting input is more positive than the inverting input, the comparator output is HIGH. When the non-inverting input is more negative than the inverting input, the comparator output is LOW' .

This binary output is the digital representation of the barcode. The width of the HIGH pulses corresponds to the width of the spaces (or bars, depending on the polarity), and the width of the LOW pulses corresponds to the opposite.

The digitized signal is then passed to the decoder, which measures the pulse widths and decodes the barcode.

Chapter 23: The Adaptive Threshold in AC Coupled Circuits

While peak and valley detectors can be used in AC coupled circuits, the DC-coupled approach is often preferred for its ability to handle specular reflections.

A patent notes that 'most barcode scanner analog preprocessing circuits utilize alternating current (AC) coupling. AC coupled circuits automatically remove the DC portion of a scanning signal by using a series RC circuit to couple gain stages. ... Although this coupling technique works well under ordinary conditions, specular reflection causes the RC circuit to distort the detected barcode signal during the recovery stage, often rendering the barcode symbol unrecognizable' .

The DC-coupled approach preserves the DC content of the signal, allowing specular reflections to be identified by their amplitude. This is a significant advantage for applications that may experience specular reflections.

Chapter 24: 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 signal crosses the threshold signals.

The negative peak comparison circuitry compares the first derivative signal with the negative peak threshold signal to generate a transition signal when a crossing is detected. Similarly, the positive peak comparison circuitry compares the signal with the positive peak threshold signal.

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 25: The Inter-Extreme Time Measurement

The extreme validity determination in the barcode reader patent uses a time measurement technique to distinguish valid extremes from noise. The technique measures the time difference between successive extremes and compares it to a threshold.

The inter-extreme time measurement unit measures the time between successive extremes, and the time comparison unit compares this time to a predetermined threshold. If the inter-extreme time is too short, the extreme is determined to be invalid (noise).

This technique is particularly effective for rejecting high-frequency noise that produces rapid, spurious extremes. By measuring the time between extremes, the system can distinguish between valid barcode edges and noise spikes.

The technique reduces the storage requirements and processing time, because only valid extremes are stored and processed.

Chapter 26: The Performance of the Adaptive Threshold Comparator

The adaptive threshold comparator's performance is measured by its ability to digitize barcodes with varying contrast. High-contrast barcodes are digitized accurately with a threshold set to about 40% of the peak-to-peak swing. Low-contrast barcodes require a threshold closer to the midpoint (about 50%).

The patent notes that 'the circuit operates best with tags printed with a dot matrix printer when the threshold voltage is set to equal 60% of the potential between the peak detectors' . This demonstrates the flexibility of the peak and valley detector approach.

The adaptive threshold comparator can handle signals that vary by a factor of 100 or more, providing consistent digitization across the entire operating range. This wide dynamic range is essential for barcode readers that must handle a wide range of scanning distances and surface reflectivities.

Chapter 27: The Implementation of the Peak and Valley Detector

The peak and valley detector can be implemented using discrete components, integrated circuits, or as part of a custom ASIC. The choice of implementation depends on the performance requirements, cost constraints, and volume of the application.

The patent describes an implementation using standard operational amplifiers and diodes . This is a cost-effective approach for low-volume production.

For high-volume applications, the peak and valley detector can be integrated into a custom ASIC. The single-chip custom linear circuit described in a patent is an example of a highly integrated implementation.

The integration of the peak and valley detector with other functions reduces the component count, the PCB size, and the cost.

Chapter 28: The Peak and Valley Detector in the Full Signal Chain

The peak and valley detector is part of a larger signal chain that includes the photodetector, the transimpedance amplifier, the gain stages, the digitizer, and the decoder. The signal chain prepares the photodetector signal for digitization.

The signal chain typically includes a transimpedance amplifier that converts the photodiode current to a voltage, amplifier stages that provide gain, a filter that removes noise, and the peak and valley detector that generates the threshold .

The digitizer compares the signal to the threshold, producing a digital pulse stream that represents the barcode. The decoder measures the pulse widths and decodes the barcode.

The peak and valley detector is a critical component of this signal chain, ensuring that the digitizer always operates at the optimal threshold.

Chapter 29: The Peak and Valley Detector in Handheld Scanners

The peak and valley detector is particularly important for handheld scanners, where the signal amplitude can vary dramatically due to changes in distance and scanning angle.

Handheld scanners must handle a wide range of signal amplitudes, from very strong signals when the scanner is close to the barcode to very weak signals when the scanner is far away. The peak and valley detector ensures that the threshold tracks these changes, providing reliable digitization.

The power conservation features described in the patents are also important for handheld scanners, extending battery life. The low-power surface detection technique uses the peak and valley detector to detect the presence of a barcode and reduce the pulse duty cycle when no surface is detected.

Chapter 30: Summary --- The Peak and Valley Detector in Perspective

The peak and valley detector is an essential circuit in barcode reader digitization, enabling adaptive thresholding that tracks the signal amplitude and ensures reliable digitization across a wide range of signal conditions.

We have examined how different companies and technologies have approached the challenges of peak and valley detection:

Motorola developed a peak and valley detector circuit with a clamping diode to maintain a controlled separation between the peak detectors, pull-up and pull-down resistors to prevent convergence on small signals, and a voltage divider to set the threshold at a desired fraction of the peak-to-peak swing .

Microvision developed an adaptive threshold circuit using the first derivative amplitude, with positive and negative threshold values comprising a static portion and a dynamic portion .

A DC-coupled waveform preprocessor uses local peak and valley detectors to track the localized extremes of the signal and a midpoint follower to establish the DC offset .

A hardware symbology locating unit uses ratio data derived from element widths to locate potential barcode candidates, with gray data used for more detailed processing when binary data is insufficient .

Intermec Technologies developed a quantitative peak and valley decoding method that extracts data from unresolved profiles, improving depth-of-field performance by up to 300 percent .

The key lessons from our exploration are:

Peak and valley detectors capture the signal's extremes. The positive peak detector stores the highest voltage, and the negative peak detector stores the lowest voltage.

The threshold is set between the peaks and valleys. A voltage divider between the peak detector outputs generates a threshold at a desired fraction of the peak-to-peak swing.

Clamping diodes prevent peak detector divergence. A clamping diode limits the maximum separation between the peak detectors, ensuring that the threshold tracks the signal amplitude.

Pull-up and pull-down resistors prevent noise digitization. These resistors maintain a minimum separation between the peak detectors, preventing the digitizer from responding to small noise signals.

The threshold can be adapted based on signal conditions. The threshold can be set lower for weak signals and higher for strong signals, optimizing digitization for all conditions.

Digital processing provides flexibility. The peak and valley functions can be implemented in software, allowing multiple thresholds to be tried on the same data.

In the end, the peak and valley detector is a testament to the ingenuity of engineers who have developed circuits that adapt to changing conditions and always choose the optimal threshold. The art of peak and valley detection 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:

Load Excel data (pro)

Manually copy data from Excel files

Filter some data for printing

Edit imported barcode data

Input data (Pro)

Label Designer

Edit data in Label designer

Label Designer - Add new label

Label Designer - Printing

Set the barcode label format to be printed

Other Barcode Label Format Settings

Barcode types supported by this program

Barcode Label Font Settings

Configuring the Barcode Print Rotation

Text Alignment for Barcode Labels

Automatically Adjusting Barcode Width

Text Beneath the Barcode

Configuring Barcode Size

Auto Calculate the Barcode Size

Export Barcode images

Export Barcode Image Format

File Names for Exported Barcode

Resolution of Exported Barcode Images

Fixed Folder for Exporting Barcode

Default Barcode Image Export Format

Print bulk barcodes quickly

Print barcodes to Avery 5160 label

How to bulk Barcode Printing

Sample - Avery 5162 (2x7) Label Sheet

Example: Print barcodes to 5*3cm roll

Example: Print barcodes to 5161 label

Example: Print barcodes to 5162 label

Example: Print barcodes to 5163 label

Example: Print barcodes to 5164 label

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

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