Find your password

Datasheets : Comparator - Process Unit

What does it do?

The comparator provides a large change in signal when the input signal only changes slightly and converts an analogue signal into a digital signal. It ‘compares’ the voltage input signal and the voltage from a potentiometer.

How does it operate?

Click on the circuit diagram to download a Livewire file of the circuit that you can investigate and add to your own circuit.

The comparator subsystem provides an output signal that stays high while the input signal is higher than the reference signal or threshold from a potentiometer. The output signal remains low otherwise.

The comparator circuit uses an operational amplifier, or op amp, to amplify the input signal relative to the reference signal thus forcing the output signal to be either high or low.

Operational amplifiers have two inputs, an inverting input ('-') and a non-inverting input ('+').

A potentiometer or potential divider connected to the inverting input provides control over the reference signal voltage.

There is a wide range of operational amplifiers available. It is important to select one that provides a clear high and low output voltage and can work from a single power supply. The LM324 is inexpensive, contains four operational amplifiers and can work from a d.c. power supply with a voltage anywhere between 3 and 32V. It can give and output current of up to 20mA, and so can drive some low current output devices directly.

Rather than using a potentiometer, the reference voltage can be provided by other analogue input sensors. For example, the light level at two places could be compared using a pair of light sensors, one to provide the input signal and the other to provide the reference signal.

Possible applications

  • Converting the signal from an analogue sensor, such as a temperature sensor, to a digital signal to feed to a gate or PIC.

Making

In the example PCB, the input signals goes to pin 3, and the output signal comes from pin 1. Any of the other three comparators in the IC could be used.

Build and test the unit that will provide the input signal before building the comparator.

Use a Dual In Line (DIL) socket for the IC. Before inserting the IC, connect the power supply and use a voltmeter to check that:

  • the voltage on pin 11 is low (0V);
  • the voltage on pin 4 is high (the supply voltage);
  • the voltage on pin 3 (the blue PCB track) varies in response to the unit that provides the input signal.

Insert the IC the right way round.

Testing

Turn the potentiometer to its mid-point. Make sure that the signal going out (on the green PCB track) changes from low to high when the input signal voltage increases above the threshold voltage.

Fault finding

If there is a fault, check that:

  • The voltage on pin 11 is low (0V)
  • The voltage on pin 4 is high (the supply voltage)
  • The threshold voltage (on pin 2) varies between 0V and the supply voltage when the knob on the potentiometer is turned

If there is a fault, check the tracks and solder joints.

Alternatives

  • Schmitt inverter can be used instead of a comparator if the input voltage change is reasonably large.

Web links

Return to list of datasheets

Go to Top
These are the details: