İzmir University of Economics EEE201 Electrical Circuits I Lab EXPERIMENT 7: Operational Amplifier (Opamp) I: Comparator, Inverting and Non-Inverting Amplifiers Objective: The students will be able to learn: How to use of an Opamp to perform analog signal processing tasks, in particular comparison two (constant) input voltages, amplifying an analog signal provided as a time-varying voltage in inverting and non-inverting architectures. B. Background B.1. Operational Amplifier Characteristics Operational amplifier (Opamp) is a high gain voltage amplifier with differential inputs. The input resistance is very large. The block diagram of the Opamp is given on Fig. 7.1. E-= -E V+ V- I+ + Vo I- E+= +E Figure 7.1 The inputs V+ and V- are the differential inputs. VO is the output voltage and VO is proportional to the difference voltage Vd = V+ - V-. The voltages E+ and E- (typically, E+ = +E = 15 or 10 and E- = -E = -15 or -10 Volts, respectively.) are the DC voltages connected to operational amplifier for proper operation. Since the input resistance is very large, the input currents I+ and I- are assumed negligibly small, i.e., Volts I+ = I- 0 A. The output-input voltage transfer characteristics of the OPAMP is plotted on Fig. 7.2. VO [Volts] E+ slope=A ≈ 200000 -Va Va Vd = V+ - V[mili Volts] EFig. 7.2 The output VO is proportional to the difference signal Vd = V+ - V- in a very narrow range (-Va < 1-1 VO < Va) with Va and the gain there is A which is typically 200000. In the market, there are several different operational amplifier having different characteristics. The most commonly used operational amplifier is uA741. The data sheet of the operational amplifier uA741 is given at the web page http://homes.ieu.edu.tr/~maskar/CE205/ua741OPAMP.pdf. The top view of uA741 is given in Fig. 7.5. Figure 7.3 Opamps come in several different standard packages. The opamp used in this experiment comes in a package called an 8 pin DIP (dual inline package), shown at left in Figure 7.3. DIP pins are numbered sequentially in the counterclockwise direction. Pin 1 is at the end with the half-moon cutout; looking at the IC from the top (leads pointing away), pin 1 is the first pin counter-clockwise from the cutout. This pin is sometimes indicated by a small dot. Note that the breadboard channel is designed so that the op amp neatly straddles the channel as shown to the right: The output voltage VO may not be zero when V+ - V- = 0 V, i.e., the voltage transfer characteristics may not pass through origin. It is said that there is an offset at the input. To satisfy this condition OFFSET N1 and OFFSET N2 terminals are used. This is known as offset cancellation. In the data sheet, the following circuit (Fig. 7.6) with a potantiometer is suggested for offset cancellation. E V+ + V- - Vo -E OFFSET N1 OFFSET N2 10 k -E Fig. 7.4 B.2. Comparator A comparator is a circuit that compares two voltages and specify which one is greater than the other. An opamp used without feedback can function as a comparator. If Vd = V+ − V− < 0, then the opamp gets saturated, so the output voltage will be the negative saturation voltage (Esat) which is a voltage a few volts above the negative power supply voltage (E-, typically -15V or -10V ). When Vd = V+ − V− > 0, then the opamp gets saturated, so the output voltage will be the positive saturation voltage (+Esat) which is a voltage a few volts below the positive power 1-2 supply voltage, (E+, typically +15V or +10V ). Comparators are used in control circuits. A simple example is found in nighttime sensing street lamps. The lamps use a comparator to compare a signal from a light-sensitive photo detector with a reference signal. At nightfall the photo signal falls below the reference signal and the comparator turns the street lamp on. At daybreak the photo signal rises and the comparator turns the lamp off. Modern thermostatic-controlled house heating systems also use comparators to compare the output voltage from a temperature sensor to a reference voltage corresponding to the desired temperature. When the sensor voltage falls below the reference voltage, the comparator changes state and turns on the furnace. As the furnace heats the house up, the sensor voltage rises, and the comparator eventually changes back to its original state, thereby turning the furnace off. Furnaces are inefficient when operated for very short periods of time. If a furnace was turned off the instant it raised a house’s temperature, the furnace would cycle on and off inefficiently. To avoid such cycles, thermostats are designed to turn off at a higher temperature than the temperature at which they turn on. For example the thermostat might be designed to turn on when the temperature falls below 66, and turn off once the temperature climbs above 68. This difference between the turn-on and turn-off temperatures is an example of a hysteretic effect. A hysteretic system is a system whose state depends on its history. Whether the furnace is on or off (its state) depends on both the temperature of the room and the history of the heating cycle (cooling down to the turn-on temperature, or heating up to the turn-off temperature.) The street lamp provides an amusing example of the need for hysteresis. Inevitably, some of the lamp’s light couples back into its light detector, and this light might cause the lamp to turn off every time it turned on! Hysteresis prevents the lamp from stuttering on and off. 5V E 1K Vin Vo + -E Figure 7.5 B.3. Inverting Amplifier Consider the operational amplifier circuit given in Fig. 7.3. R2 E R1 I- Vin - Vo VI+ V+ + -E Fig. 7.6 In the linear region, the input-output transfer function is obtained as. 1-3 VO Vin =− R2 R1 which is valid for − R1 R2 E < Vin < R1 R2 E. Since there is no positive feedback, then no hysteresis phenomenon occurs. So, the output R R becomes equal to E when Vin > 1 E and equal to –E when Vin < - 1 E. R2 R2 B.4. Non-Inverting Amplifier Consider the operational amplifier circuit given in Fig. 7.7. E Vin V+ + Vo -E V- R2 R1 Figure 7.7 In the linear region, the input-output transfer function is obtained as. VO Vin =( R1 +R2 R1 ) which is valid for − R1 R1 +R2 E < Vin < R1 R1 +R2 E. Since there is no positive feedback, then no hysteresis phenomenon occurs. So, the output R1 R1 becomes equal to E when Vin > E and equal to –E when Vin < E. R1 +R2 R1 +R2 C. In-Lab Experimental Work Task C.1.1: Construct the comparator circuit in Figure 7.5. Then, turn on function generator using a ramp. Display both the input and the output on an oscilloscope. Describe what is happening. Task C.1.2.: Construct the following comparator circuit in which LED (Light Emitting Diode) becomes active in the dark due to the change of resistance of LDR (Light Dependent Resistor) depending on the intensity of light. 5V 100K E 100K - 1K + LED LDR -E Figure 7.8 Task C.2.1: Construct the inverting amplifier circuit. Then, obtain input-output transfer function for R1=1K and R2=10K. Use a variable dc voltage source as the input and measure the output 1-4 voltage for different inputs. Draw the input-output transfer function from the measured inputoutput voltages. Vin= V0= Vin= V0= Vin= V0= Vin= V0= Vin= V0= Task C.2.2: Determine the voltage gain Vin= Vin= Vin= Vin= Vin= Vin= V0= V0= V0= V0= V0= V0= VO Vin . Task C.2.3: What is the output voltage range over which above relation holds? Task C.2.4: What is the input voltage range for linear operation? Task C.3.1: Construct the non-inverting amplifier circuit. Then, obtain input-output transfer function for R1=1K and R2=10K. Use a variable dc voltage source as the input and measure the output voltage for different inputs. Draw the input-output transfer function from the measured input-output voltages. Vin= V0= Vin= V0= Vin= V0= Vin= V0= Vin= V0= Task C.3.2: Determine the voltage gain Vin= Vin= Vin= Vin= Vin= Vin= V0= V0= V0= V0= V0= V0= VO Vin . Task C.3.3: What is the output voltage range over which above relation holds? Task C.3.4: What is the input voltage range for linear operation? D. Post-Lab Tasks: Lab Report The lab report should have the information contained in the pre-lab assignment and also the answers of the following questions. The lab report should be submitted at the beginning of the succeeding lab session. Explain o What you have done in this lab. o How do you measure the quantities related to the the experiment. Reply the questions in the Tasks C.1., C.2.1-C.2.4. and C.3.1-C.3.4. 1-5