• Menu
  • Product
  • Email
  • PDF
  • Order now
  • Programmable comparator circuit with hysteresis or latching output

    • SLAAE20 May   2021 DAC43701 , DAC43701-Q1 , DAC53701 , DAC53701-Q1

       

  • CONTENTS
  • SEARCH
  • Programmable comparator circuit with hysteresis or latching output
  1.   Design Objective
  2.   Design Description
  3.   Design Notes
  4.   Design Simulations
    1.     Transient Simulation Results
  5.   Register Settings
  6.   Pseudo Code Examples
  7.   Design Featured Devices
  8.   Design References
  9. IMPORTANT NOTICE
search No matches found.
  • Full reading width
    • Full reading width
    • Comfortable reading width
    • Expanded reading width
  • Card for each section
  • Card with all content

 

CIRCUIT DESIGN

Programmable comparator circuit with hysteresis or latching output

Design Objective

Key Input Parameter

Key Output Signal

Recommended Device

0-V to 5.5-V analog input, programmable threshold voltages, GPI feedbackDigital output of a comparator, GPI feedbackDAC53701, DAC43701,
DAC53701-Q1, DAC43701-Q1

Objective: Create a comparator with adjustable hysteresis thresholds or a latching output.

Design Description

This design uses a buffered voltage output DAC to create a comparator with a programmable threshold value. Additional features such as hysteresis or a latching output can be configured as well. In this design, the integrated buffer will act as a comparator and the output of the DAC will act as the threshold for the comparator. The 8-bit DAC43701, and 10-bit DAC53701 have a general-purpose input pin, GPI, that can be used to trigger a function generator, switch between a high and low DAC value, or power down the DAC. The DAC43701 and DAC53701 integrated buffer has an exposed feedback path via the feedback pin (FB) which will act as the voltage input to the comparator. All register settings can be saved using the non-volatile memory (NVM) on the DAC43701 and DAC53701 meaning that the devices can be used without a processor, even after a power cycle. This circuit can be used in applications such as laser distance measurement, cordless vacuum cleaner, medical accessories, retail automation, or grid infrastructure.

GUID-20210304-CA0I-HBGQ-JVWT-STMH3VR0MJND-low.gif

Design Notes

  1. The DACx3701 10-Bit and 8-Bit, Voltage-Output Smart DACs With Nonvolatile Memory and PMBus™ Compatible I2C Interface With GPI Control Data Sheet recommends using a 100-nF decoupling capacitor for the VDD pin and a 1.5µF or greater bypass capacitor for the CAP pin. The CAP pin is connected to the internal LDO. Place these capacitors close to the device pins.
  2. An external reference of 1.8V to 5.5V can be applied to the VDD pin of the device. In addition, there is an internal precision 1.21-V reference with ×1.5, ×2, ×3, and ×4 gain options. If using a noisy supply, it is best to use the internal reference instead of VDD as the reference because noise on the reference translates directly to noise on the output of the DAC53701.
  3. The input signal should not exceed VDD. Also, the maximum threshold voltage is limited by the reference voltage used. If necessary, larger input voltages can be scaled using a voltage divider and the threshold voltage can be adjusted accordingly.
  4. The GPI_CONFIG field in the CONFIG2 register maps the GPI pin to the various functions.
    1. To configure a programmable comparator with hysteresis, the GPI will be set to Margin-High, Low function. Set the high threshold in the DAC_MARGIN_HIGH register, and the low threshold in the DAC_MARGIN_LOW register.
    2. To configure a latching comparator, the GPI pin will be set to Power-Up, Down (10kΩ) function. Set the threshold in the DAC_DATA register.
  5. Comparator with Hysteresis: In this design, the 5-V VDD supply input is used as the reference. The high threshold value for the comparator is set to is set to 3V using the DAC_MARGIN_HIGH register, and the low threshold is set to 1V using the DAC_MARGIN_LOW register. The codes programmed to these registers, in decimal, is calculated using:
    GUID-20210309-CA0I-QNXF-N5VG-T7KDKNBFMMCX-low.gif
    GUID-20210309-CA0I-6PWG-1PGJ-GK0WRBF7NC5P-low.svg

    With a 5-V reference, unity gain, and threshold values of 3V and 1V, the equation becomes:

    GUID-20210309-CA0I-DQJ3-MDR9-P6QFQRCLBQMW-low.svg
    GUID-20210309-CA0I-4FJN-RDTJ-M5HC3SMQGS5V-low.svg

    This is rounded to 614d and 205d to give a high threshold of 2.998V and low threshold of 1V.

  6. Latching Comparator: In this design, the 5-V VDD supply input is used as the reference. The threshold value for the comparator is set to is set to 3V using the DAC_DATA register. The code programmed to this register, in decimal, is calculated using:
    GUID-20210309-CA0I-5CSM-FKFG-6C4WJBC14CPQ-low.svg
    With a 5-V reference, unity gain, and a threshold value of 3V, the equation becomes:
    GUID-20210309-CA0I-RMHJ-QJHM-NKQCBPF076SG-low.gif
    This is rounded down to 614d to give a threshold of 2.998V.
  7. Using a 5-V reference and the 10-bit DAC53701, the LSB size, or step size between each code, is about 4.88mV. Using lower reference voltages decreases the LSB size and increases the resolution of the threshold value. Using a smaller reference limits the upper limit of the threshold value, but as previously discussed, input voltages can be scaled down if necessary.
  8. The DAC53701 can be programmed with the initial register settings described in the Register Settings section using I2C. The initial register settings can be saved in the NVM by writing a 1 to the NVM_PROG field of the TRIGGER register. After programming the NVM, the device loads all applicable registers with the values stored in the NVM after a reset or a power cycle.
  9. The GPI pin starts with a low voltage at start-up due to the pulldown resistor on the output. A high start pulse must be applied to the GPI pin of the latching comparator to power-on the DAC53701. The comparator with hysteresis starts at the low threshold value at start-up.

Design Simulations

This schematic is used for the following simulations of the DAC53701 programmable comparator with hysteresis and latching comparator.

GUID-20210309-CA0I-FDKD-C9RW-CFDPC44QDG9C-low.svg

 

Texas Instruments

© Copyright 1995-2025 Texas Instruments Incorporated. All rights reserved.
Submit documentation feedback | IMPORTANT NOTICE | Trademarks | Privacy policy | Cookie policy | Terms of use | Terms of sale