beautypg.com

Chip information – Rainbow Electronics LMX339 User Manual

Page 8

background image

LMX331/LMX393/LMX339

General-Purpose, Low-Voltage,
Single/Dual/Quad, Tiny-Pack Comparators

8

_______________________________________________________________________________________

1) Find output voltage when output is high:

V

OUT(HIGH)

= V

DD

- I

LOAD

R

L

2) Find the trip points of the comparator using these

formulas:

V

TH

= V

REF

+ ((V

OUT(HIGH)

- V

REF

)R2) / (R1 + R2)

V

TL

= V

REF

(1 - (R2 / (R1 + R2)))

where V

TH

is the threshold voltage at which the com-

parator switches its output from high to low as V

IN

rises

above the trip point, and V

TL

is the threshold voltage at

which the comparator switches its output from low to
high as V

IN

drops below the trip point.

3) The hysteresis band will be:

V

HYST

= V

TH

- V

TL

= V

DD

(R2 / (R1 + R2))

In this example, let V

DD

= 5V, V

REF

= 2.5V, I

LOAD

=

50nA, R

L

= 5.1k

Ω:

V

OUT(HIGH)

= 5.0V - (50

10

-9 ✕

5.1

10

3

Ω) ≈ 5.0V

V

TH

= 2.5V + 2.5V(R2 / (R1 + R2))

V

TL

= 2.5V(1 - (R2 / (R1 + R2)))

Select R2. In this example, we will choose 1k

Ω.

Select V

HYST

. In this example, we will choose 50mV.

Solve for R1:

V

HYST

= V

OUT(HIGH)

(R2 / (R1 + R2)) V

0.050V = 5(1000 / (R1 + 1000)) V

where R1

≈ 100kΩ, V

TH

= 2.525V, and V

TL

= 2.475V.

Choose R1 and R2 to be large enough as not to exceed
the amount of current the reference can supply.

The source current required is V

REF

/ (R1 + R2).

The sink current is (V

OUT(HIGH)

- V

REF

)

(R1 + R2).

Choose R

L

to be large enough to avoid drawing excess

current, yet small enough to supply the necessary cur-
rent to drive the load. R

L

should be between 1k

Ω and

10k

Ω.

Board Layout and Bypassing

Use 0.1µF bypass capacitors from V

DD

to V

SS

. To max-

imize performance, minimize stray inductance by
putting this capacitor close to the V

DD

pin and reduc-

ing trace lengths. For slow-moving input signals (rise
time > 1ms), use a 1nF capacitor between IN+ and IN-
to reduce high-frequency noise.

Chip Information

LMX331/LMX331H TRANSISTOR COUNT: 112

LMX393/LMX393H TRANSISTOR COUNT: 211

LMX339/LMX339H TRANSISTOR COUNT: 411

LMX331

R1

R2

IN+

IN-

V

DD

V

OUT

V

SS

V

REF

V

IN

V

DD

OUT

R

L

Figure 2. Adding Hysteresis with External Resistors