Arduino Projects    |   Raspberry Pi  |     Electronic Circuits    |    AVR    |    PIC    |    8051    |    Electronic Projects   |   Free TI Design & Simulation Tools 

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...

TI Innovation Challenge

WEBENCH Design Center

WEBENCH Design Environments are unique and powerful software tools that deliver customized power, lighting, filtering, clocking and sensing designs in seconds. These easy-to-use tools help you generate, optimize and simulate designs that conform to your unique specifications. They allow you to make value-based tradeoffs at a design, system and supply chain level before your design is committed to production.

Design & Simulation Tools

Power Design


Sensors, Filter, Clock and Amplifier Design

Download Tools, Models and Symbols



You are here