Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comparator Circuits AIM:

Similar presentations


Presentation on theme: "Comparator Circuits AIM:"— Presentation transcript:

1 Comparator Circuits AIM:
To understand how Operational Amplifiers (Op-Amps) are used in comparator circuits PRIOR KNOWLEDGE: Op-Amp basics, potential dividers, potentiometers, LDRs, Thermistors and LED properties

2 Op-Amp Basics An Op-Amp used as a comparator has two inputs called:
the Non-Inverting input (+) the Inverting input (-) In reality, the output of a comparator is either ON or OFF. Learn These Names The comparator circuit takes analogue inputs and produces a digital output. It is a 1-Bit Digital to Analogue Convertor (DAC) Tech point: The difference between the inputs is multiplied by the open loop gain which is usually around 106. Therefore, unless the inputs are within a few microvolts of each other, the output saturates close to either the positive or negative supply rail.

3 You just have to know this … it is what they do
Comparator Basics The basic functionality is: Non-Inverting input is a HIGHER voltage than the Inverting input  Output will be ON (or at least as close to the positive supply as possible) Non-Inverting input is a LOWER voltage than the Inverting input  Output will be OFF (or at least as close to the negative supply as possible) You just have to know this … it is what they do

4 A note about real comparators
Op-Amps such as the 741 or the 081 are ideal as comparators but it is important to remember the following points: The maximum output voltage is about 2 volts less than the positive power supply. The minimum output voltage is about 2 volts above the negative power supply. Using a ±15V supply gives outputs of ±13V. Using a 0V and 9V supply gives outputs of 2V and 7V. The Op-Amps can source and sink only about 10mA which is enough to drive an LED but not a motor or a relay.

5 Example Circuit 1 To make the Output go OFF, the Non-Inverting input must be reduced so that it is less than 2V ON OR … increasing the Inverting input so that it is greater than 4V will also turn the Output OFF The Non-Inverting input is a higher voltage than the Inverting input and therefore the Output will be ON The positive power supply is +9V and so the Output will be +7V

6 Example Circuit 2 The Output changes from ON to OFF or vice versa when the two inputs are equal. If the Non-Inverting input is slowly increased, the Output comes ON when the Non-Inverting input reaches 3V OFF The Non-Inverting input (because it is negative) is less than the Inverting input and so the Output is “OFF” … In this case the negative power supply is -12V therefore the Output is -10V and OFF is not a very accurate description …

7 A Thermistor could be used instead of the LDR to make a temperature sensitive circuit
Using an LDR In the DARK the resistance for the LDR is high and the voltage at the Non-Inverting input will be very low. The Output is OFF. AS the light level increases the resistance of the LDR decreases, the Non-Inverting input voltage increases. The Output comes ON. The 4.5V at the Inverting input from the fixed potential divider does not change with light level and is the REFERENCE voltage. The voltage at the Non-Inverting input changes as the light level changes. When it gets brighter, V+ increases.

8 Using a potentiometer When it is COLD the resistance of the thermistor is HIGH and the Non-Inverting input voltage is HIGH meaning the Output is ON When it is HOT the resistance of the thermistor is LOW therefore the Non-Inverting input voltage is LOW meaning the Output is OFF Increasing the Reference Voltage means the Output changes at a lower temperature The Reference Voltage is provided by a potentiometer The temperature at which the Output switches from ON to OFF can be adjusted by changing the Reference Voltage

9 Example Circuit Design
The challenge: Design a circuit so that the LED comes ON when the light level drops below 200Lux. Chose to make resistor R2 an LDR. When light level drops, resistance of the LDR increases and so V+ increases and LED turns on as required. At 200 Lux, Resistance of LDR (R2) = 1k5Ω so chose a similar value for R1 – choose 2k2 as it is convenient. R1:R2 = 2k2:1k5 therefore, R3:R4 must be in same ratio. It is better to use large values (less current flows from battery) so choose R3 = 220kΩ and R4 = 150kΩ. At 200 Lux, V+ = V- at the point where the LED switches ON or OFF

10 The LED is only ON when Vin is in the range 3V to 6V
Range Detector When Vin < 3V Output 1 and 2 are both HIGH and the LED is OFF as there is no potential difference. When 3V < Vin < 6V Output 1 is ON and Output 2 is OFF and the LED is ON due to the potential difference When Vin > 6V both Outputs are OFF and the LED is OFF The LED is only ON when Vin is in the range 3V to 6V Vin could be the output from a potential divider with an LDR or a Thermistor for example

11 Sink and Source When it is COLD the Non- Inverting input is HIGH and the Output is +13V. The Op-Amp sources current through the Red LED to 0V When it is HOT the Non- Inverting input is LOW and the Output is -13V. Current flows from 0V, through the Green LED and down to the -15V supply rail. The Op-Amp sinks current Note that the Output will be ±13V but the LEDs are both connected to 0V Cold = RED Hot = GREEN

12 Summary The inputs to a comparator are called the Non-Inverting input (+) and the Inverting input () The output is either close to the positive supply (ON) or close to the negative supply (OFF) If the Non-Inverting input is greater than the Inverting input then the output is ON / HIGH / fully positive If the Non-Inverting input is less than the Inverting input then the output is OFF / LOW / fully negative / close to zero The output can SINK or SOURCE about 10mA of current Technically Vout = A0 (V+  V) where A0  106

13 Questions For a comparator run off a ±15V power supply, what are the two possible output voltages? For the comparator in question 1, what is the output voltage when V+ = 6V and V = 4V? For the comparator in question 1, what is the output voltage when V+ = 6V and V = 8V? For the comparator in question 1, what is the output voltage when V+ = 6V and V = 4V? For a comparator run off a 5V and 0V power supply, what are the two possible output voltages? What are the possible problems when using the comparator in Qn5?

14 Answers +13V and 13V +13V: the Non-Inverting input is bigger than the Inverting input 13V: the Non-Inverting input is smaller that the Inverting input 13V: the Non-Inverting input is smaller that the Inverting input even though they are both negative … 6V is less than 4V 3V and 2V The two output voltages are very similar, a logic circuit would struggle to reliably distinguish between these two states and may well read both 2V and 3V as logic 1


Download ppt "Comparator Circuits AIM:"

Similar presentations


Ads by Google