General-Purpose, Low-Voltage, Single/Dual/Quad, Tiny-Pack Comparators where R1 ≈ 100kΩ, VTH = 2.525V, and VTL = 2.475V. VDD Choose R1 and R2 to be large enough as not to exceed RL the amount of current the reference can supply. R1 The source current required is VREF / (R1 + R2). The sink current is (VOUT(HIGH) - VREF) ✕ (R1 + R2). VDD Choose RL to be large enough to avoid drawing excess R2 IN+ current, yet small enough to supply the necessary cur- VREF rent to drive the load. RL should be between 1kΩ and VOUT OUT 10kΩ. IN- VIN Board Layout and Bypassing LMX331 Use 0.1µF bypass capacitors from VDD to VSS. To max- VSS imize performance, minimize stray inductance by putting this capacitor close to the VDD pin and reduc- ing trace lengths. For slow-moving input signals (rise time > 1ms), use a 1nF capacitor between IN+ and IN- Figure 2. Adding Hysteresis with External Resistors to reduce high-frequency noise. 1) Find output voltage when output is high: Chip Information VOUT(HIGH) = VDD - ILOAD ✕ RL LMX331/LMX331H TRANSISTOR COUNT: 112 2) Find the trip points of the comparator using these LMX393/LMX393H TRANSISTOR COUNT: 211 LMX331/LMX393/LMX339 formulas: V LMX339/LMX339H TRANSISTOR COUNT: 411 TH = VREF + ((VOUT(HIGH) - VREF)R2) / (R1 + R2) VTL = VREF(1 - (R2 / (R1 + R2))) where VTH is the threshold voltage at which the com- Package Information parator switches its output from high to low as VIN rises For the latest package outline information and land patterns, go above the trip point, and VTL is the threshold voltage at to www.maxim-ic.com/packages . Note that a “+”, “#”, or “-” in which the comparator switches its output from low to the package code indicates RoHS status only. Package draw- high as VIN drops below the trip point. ings may show a different suffix character, but the drawing per- 3) The hysteresis band will be: tains to the package regardless of RoHS status. VHYST = VTH - VTL = VDD(R2 / (R1 + R2)) PACKAGEPACKAGEDOCUMENTLAND In this example, let VDD = 5V, VREF = 2.5V, ILOAD = TYPECODENO.PATTERN NO. 50nA, RL = 5.1kΩ: 5 SC70 X5+1 21-007690-0188 VOUT(HIGH) = 5.0V - (50 ✕ 10-9 ✕ 5.1 ✕ 103Ω) ≈ 5.0V 5 SOT23 U5+2 21-005790-0174 VTH = 2.5V + 2.5V(R2 / (R1 + R2)) 8 SOT23 K8F+4 21-007890-0176 VTL = 2.5V(1 - (R2 / (R1 + R2))) 8 µMAX U8+1 21-003690-0092 Select R2. In this example, we will choose 1kΩ. Select V 14 TSSOP U16M+1 21-006690-0117 HYST. In this example, we will choose 50mV. Solve for R1: 14 SOIC S8+4 21-004190-0041 VHYST = VOUT(HIGH)(R2 / (R1 + R2)) V 0.050V = 5(1000 / (R1 + 1000)) V 8_______________________________________________________________________________________