View Full Version: COMPARATOR USING OPAMP(LM324)

booksbybibin >>Electronics Basics >>COMPARATOR USING OPAMP(LM324)


yogi- 07-01-2006
COMPARATOR USING OPAMP(LM324)
This tutorial is taken from the book MY EXPERIENCE IN AUTONOMOUS ROBOTICS. you can download it free from the files section(FILE-ROBO.PDF) of yahoo group-booksbybibin http://groups.yahoo.com/group/booksbybibin/ comments about this book on www.booksbybibin.blogspot.com OPAMPS(IC741,LM324) As the name implies it is an operational amplifier. It performs mathematical operations like addition,subtraction,log,antilog etc.. The main reason for OPAMPS used over transistors is that transistor can only amplify AC while OPAMPS can amplify AC and DC. You can get good amplifier gain in OPAMPS. The most commonly used OPAMPS are 741 and 324. IC741 is used in close loop configuration and LM324 in open loop configuration. i.e LM324 mainly used as comparator while 741 for amplification,addition etc... COMPARATOR(LM324) Comparator is a digital IC. The difference between the analog IC and digital IC is that in digital IC the output has only two states, while in analog IC it has more than two states. IC7404, it has two states LOGIC HIGH and LOGIC LOW,IC555 is also digital IC. IC741 is an analog IC because it has output voltage vary from -12v to 12V. Comparator has only two states +vcc or -vcc But LM324 we normally apply Vcc=5V and -vcc=0. So output will have only 5V and 0V. But LM324 output LOGIC HIGH will be aroundVcc-1.5V and LOGIC LOW around .2V. So if you use Vcc=5V then LOGIC HIGH=3.5V and LOGIC LOW=0V. But LOGIC HIGH for a digital circuit is a voltage greater than 2.4V and LOGIC LOW is less than .8V Above figure shows the general circuit diagram of a general comparator. If V1>V2 then Vout=+Vcc and if V1<V2 then Vout=-Vcc. Suppose if V1=V2, then output will be +vcc or -vcc theoretically. But practically no such condition exist, because an operational amplifier has a gain of 10^6, so there is no condition exist. Here you can use 1Kpot or 10Kpot instead of 470ohm potentiometer. Connect this circuit and start testing comparator LM324. 1. Insert IC properly into the breadboard. 2. Apply Vcc=+5v and -Vcc=0V 3. This circuit is used to test 324 the four operational amplifiers before using in the circuit. 4. Vary V1 and V2 to see the Vout. 5. Use multimeter or LED to see Vout and test the conditions of a comparator. This circuit is used to turn ON light or any equipment if the light intensity is below a level. This level is set by 470ohm pot (i.e, V2 is the reference). You can make the same circuit using power transistor, but difference between two. When Vcc=5V and I apply v+=10v and v-=4.5 then output is 3.84 when Vcc=12V same input o/p 11.45 so be careful of vcc of Lm324 TIPS: 1. When u connect Vcc of Lm324 to gnd, then it will easily get heated. 2. The input cannot be greater than Vcc 3. You should remember that when using multiple voltages, Vcc should be greater than maximum voltage. Otherwise you will get wrong results. Why Comparator is preferred over Power Transistor? In robotics we require only two levels, active HIGH or active LOW that exist in comparator, but in power transistor there is regions between cut off and saturation, so that output varies with the input voltage at the base. Second thing is that power transistor is a current controlled device. But we always require voltage comparison, so we prefer comparator. But comparator outputs cannot be connected directly to the relay or motors. I will explain in H-bridge section.


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.