Phipps Electronics

Order within the next 

FREE SHIPPING OVER $199

50,000+ ORDERS

WORLDWIDE SHIPPING

SSL SECURED

The LM393 Analog Comparator

Contents

Learn more about the popular 8-pin LM393 Analog comparator that you can use for your projects.

The Analog Comparator

An analog comparator is a useful electronic device that can compare two analog values and output a corresponding logic. This process is useful when dealing with analog sensors (temperature or light sensors) so that a corresponding action can be taken when a threshold is reached.

The device is basically an op-amp that has an inverting (-) and a non-inverting (+) input. However, comparators are made in a way such that:

  • Has faster switching times than regular op-amps.
  • Made with open-collector/drain outputs (to drive logic).
  • Has good rail-to-rail output characteristics (to drive logic)

How to use an Analog Comparator

Since it’s an analog component, you input two analog values input to its inverting and non-inverting terminals. One is a reference (Vref) voltage that the comparator can compare voltage values to. The other is the variable voltage from a source (Vin). Depending on your configuration, the two voltage values are compared or differentiated from each other and then multiplied by the comparator’s gain (much like a regular OP-AMP). However, since the output is an open-collector-type, the value is limited by the pull-up logic. The resulting output is the logic value you desire from the difference of the comparator’s inputs.

Inverting and Non-Inverting Comparators

Difference from a Regular OP-AMP

A comparator usually does not need a feedback resistor (unless you want to add hysteresis), unlike traditional op-amp applications such as amplifiers, integrators, differentiators, etc. The reason is that a comparator simply needs to detect a small difference in the inputs and then amplify this difference with its very high gain. The output voltage of the comparator is then limited by its pull-up logic.

A comparator (such as the LM393 analog comparator) is made in such a way as to have a faster response time than regular OP-AMPS, since comparators don’t need to operate in the linear region that is required for amplification purposes when using a feedback resistor.

Example Applications

Example Application 1

Below is a sample application wherein a reference voltage of 5V (using voltage-dividing resistors) is input on the (+) non-inverting side. The input voltage source is input on the (-) inverting side. The open collector voltage output is pulled up to 5V logic via a 4.7k ohm resistor.

The graph shows the input-output relationship of the comparator. Here, a varying 12V signal is used as input on the (+) non-inverting input while a 5V reference is used on the (-) inverting input. With this, the difference between the inputs (multiplied by an infinite gain) is reflected on the output. Notice that the output is only a logic high or low, reflecting the logic output nature of the comparator.

Example Application 2

Below is a sample application wherein a reference voltage of 5V (using voltage-dividing resistors) is input on the (-) non-inverting side. The input voltage source is input on the (+) inverting side. The open collector voltage output is pulled up to 5V logic via a 4.7k ohm resistor.

Comparator where vref is at the non-inverting input

The graph shows the input-output relationship of the comparator. Here, a varying 12V signal is used as input on the (-) inverting input while a 5V reference is used on the (+) non-inverting input. With this, the difference between the inputs (multiplied by an infinite gain) is reflected on the output. Notice that the output is only a logic high or low, reflecting the logic output nature of the comparator.

Practical Applications

Note, though, that in the real world, a comparator’s output is not ideal. You may find jitter in them. The jitters can be caused by different sources. One of them is chatter when nearing the threshold when changing output states. With this, it’s a good idea to add hysteresis to your circuit by incorporating a Schmitt trigger or placing a low pass filter at the output of your LM393 analog comparator.

SUBSCRIBE FOR NEW POST ALERTS

Subscribe to be the first to know when we publish a new article!
List Subscriptions(Required)

POPULAR POSTS

Scroll to Top