Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   AVR    |    PIC    |    8051    |    Electronic Projects

Opamp as comparator


Himanshu Choudhary

This project based on op amp comparator circuit demonstrates the principle of operation of op amp (operational amplifier) as comparator. A comparator compares two voltages fed to it and gives output correspondingly. This circuit finds application as intermediate circuit in numerous circuits where there is need to compare two voltages. This circuit uses a LM324 IC, whose pin diagram has been shown in the image below:

LM 324 IC




This Op amp comparator circuit project uses opamp (IC LM324) as comparator.  The output of the comparator is high if voltage at positive end is more than voltage at negative end and gives low output if voltage at positive end is lesser than negative end. Here in this circuit if LDR1 is covered and LDR2 is in light.  The resistance of LDR1 increases and the entire voltage drop takes place across it, thus positive input pin of opamp becomes high while resistance of LDR2 becomes low and entire voltage drop takes place across 10K resistor, making negative input pin low. On comparing these voltages comparator gives high output. If the situation is reversed then positive pin becomes low and negative pin becomes high and comparator gives low output. At output end two LEDs are connected in opposite fashion one gets forward biased at high output and other at low output. Led’s are connected through 330? resistor to regulate the current flowing through them. The circuit operates at 5V DC.


Circuit Diagram


Resistor Image

Resistor is a passive component used to control current in a circuit. Its resistance is given by the ratio of voltage applied across its terminals to the current passing through it. Thus a particular value of resistor, for fixed voltage, limits the current through it. They are omnipresent in electronic circuits.

LEDs | Light Emitting Diode
Light emitting diodes (LEDs) are semiconductor light sources. The light emitted...
LDR | Light Dependent Resistor

An LDR (Light dependent resistor), as its name suggests, offers resistance in response to the ambient light. The resistance decreases as the intensity of incident light increases, and vice versa. In the absence of light, LDR exhibits a resistance of the order of mega-ohms which decreases to few hundred ohms in the presence of light. It can act as a sensor, since a varying voltage drop can be obtained...

LM324 | LM324N Datasheet
IC LM324

LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps) compensated in a single package. Op-amps are high gain...

Browse 4m+ Electronic Products

Pick the right product for your next design project with "Mouser Store". Mouser Electronics brings broadest range of semiconductors and electronic components from over 500 industry leading suppliers. 
Mouser specializes in the rapid introduction of new products and technologies for design engineers and buyers that includes semiconductors, interconnects, passives, and electro-mechanical components. Providing the best possible service with the flexibility of not requiring a minimum order and same-day shipping, Mouser has it all.
When you need the right part right now, think of Mouser
Thank you
Team EG


You are here