Skip to datasheet
Quad differential comparator

LM339 Working Principle

Learn how LM339 works with an illustrated explanation and practical readings.

Package view

LM339 at a glance

Follow the labeled connections and functional stages

LM339 working principle: illustrated functional stages, basic circuit and connections
Select the diagram to read it at full resolution.

How it works

3 stages · Explore one step at a time

Step 1 / 3

Compare the inputs

Each channel responds to IN+ minus IN−. A sufficiently positive difference releases its output; a negative difference turns the sink transistor on.

Step 2 / 3

Let the pull-up set HIGH

An open collector cannot drive HIGH by itself. The pull-up supplies the output node when the transistor is off.

Step 3 / 3

Keep a margin near equality

Offset and noise determine the state near the threshold. Add intentional hysteresis when a noisy signal would otherwise cause repeated switching.

Find the switching threshold

Adjust VIN and the reference. Remove the pull-up to see why it matters.

5 V · DC explorer
IN+ − IN−—
Output state—
Pull-up current—

Enable JavaScript to explore the comparator.

05 V5 VSignal input voltage →Output voltage →

Violet: offset-sensitive transition · Amber: input outside the recommended range.

DC teaching model for one classic LM339 channel. The ±9 mV region illustrates possible offset, not built-in hysteresis. A fixed 0.15 V LOW is illustrative; real output voltage depends on sink current and temperature. Timing and noise are not simulated.

Component view