This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
university:courses:electronics:electronics-lab-1 [25 Oct 2012 20:30] – created Doug Mercer | university:courses:electronics:electronics-lab-1 [03 Nov 2021 20:25] (current) – [Activity 1. Simple Op Amps] Doug Mercer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Activity | + | ====== Activity: Simple Op Amps, For ADALM2000====== |
===== Objective: ===== | ===== Objective: ===== | ||
Line 7: | Line 7: | ||
===== Materials: ===== | ===== Materials: ===== | ||
- | Analog Discovery Lab hardware</ | + | ADALM2000 Active Learning Module\\ |
- | + | Solder-less breadboard, and jumper wire kit\\ | |
- | Solder-less breadboard, and jumper wire kit</ | + | 1 1 kΩ resistor\\ |
- | + | 2 4.7 kΩ resistors\\ | |
- | 1 1 kΩ resistor</ | + | 2 10 kΩ resistors\\ |
- | + | 2 OP97 ( Low slew rate amplifier supplied with the recent versions of ADALP2000 | |
- | 2 4.7 kΩ resistors</ | + | 2 0.1uF Capacitors (radial lead)\\ |
- | + | ||
- | 2 10 kΩ resistors</ | + | |
- | + | ||
- | 2 uA741 ( Low slew rate amplifier | + | |
- | + | ||
- | 2 0.1uF Capacitors (radial lead)</br> | + | |
===== 1.1 Op-Amp Basics ===== | ===== 1.1 Op-Amp Basics ===== | ||
Line 27: | Line 21: | ||
Op amps must always be supplied with DC power and therefore it is best to configure these connections first before adding any other circuit components. Figure 1.1 shows one possible power arrangement on your solder-less breadboard. We use two of the long rails for the positive and negative supply voltages, and two others for any ground connections that may be required. Included are the so-called “supply de-coupling” capacitors connected between the power-supply and ground rails. It is too early to discuss in great detail the purpose of these capacitors, but they are used to reduce noise on the supply lines and avoid parasitic oscillations. It is considered good practice in analog circuit design to always include small bypass capacitors close to the supply pins of each op amp in your circuit. | Op amps must always be supplied with DC power and therefore it is best to configure these connections first before adding any other circuit components. Figure 1.1 shows one possible power arrangement on your solder-less breadboard. We use two of the long rails for the positive and negative supply voltages, and two others for any ground connections that may be required. Included are the so-called “supply de-coupling” capacitors connected between the power-supply and ground rails. It is too early to discuss in great detail the purpose of these capacitors, but they are used to reduce noise on the supply lines and avoid parasitic oscillations. It is considered good practice in analog circuit design to always include small bypass capacitors close to the supply pins of each op amp in your circuit. | ||
- | < | + | {{ : |
- | <center>Figure 1.1 Power connections</ | + | <WRAP centeralign> Figure 1.1 Power connections </WRAP> |
Insert the op amp into your breadboard and add the wires and supply capacitors as shown in figure 1.1. To avoid problems later you may want to attach a small label to the breadboard to indicate which rails correspond to Vp, Vn, and ground. Color coding your wires, red for Vp, black for Vn and green for ground, can also help to keep the connections organized. | Insert the op amp into your breadboard and add the wires and supply capacitors as shown in figure 1.1. To avoid problems later you may want to attach a small label to the breadboard to indicate which rails correspond to Vp, Vn, and ground. Color coding your wires, red for Vp, black for Vn and green for ground, can also help to keep the connections organized. | ||
- | Next, attach the supply and GND connections from the Analog Discovery | + | Next, attach the supply and GND connections from the ADALM2000 |
==== Unity-Gain Amplifier (Voltage Follower): ==== | ==== Unity-Gain Amplifier (Voltage Follower): ==== | ||
+ | |||
+ | === Background: === | ||
Our first op-amp circuit is a simple one, shown in figure 1.2. This is called a unity-gain buffer, or sometimes just a voltage follower, defined by the transfer function Vout = Vin. At first glance it may seem like a useless device, but as we will show later it finds use because of its high input resistance and low output resistance. | Our first op-amp circuit is a simple one, shown in figure 1.2. This is called a unity-gain buffer, or sometimes just a voltage follower, defined by the transfer function Vout = Vin. At first glance it may seem like a useless device, but as we will show later it finds use because of its high input resistance and low output resistance. | ||
- | <center>{{ : | + | {{ : |
+ | |||
+ | <WRAP centeralign> Figure 1.2 Unity Gain Follower </ | ||
+ | |||
+ | === Hardware Setup: === | ||
+ | |||
+ | Using your breadboard and the ADALM2000 power supplies, construct the circuit shown in figure 1.3. Note that the power connections have not been explicitly shown here; it is assumed that those connections must be made in any real circuit (as you did in the previous step), so it is unnecessary to show them in the schematic from this point on. Use jumper wires to connect input and output to the waveform generator and oscilloscope leads. Don’t forget to ground the scope negative input leads C1- and C2- (ground connections are not shown in the schematic). | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | === Procedure: === | ||
- | < | + | Use the first waveform generator as source Vin to provide a 2V amplitude peak-to-peak, |
- | Using your breadboard and the Discovery power supplies, construct the circuit shown in figure | + | A plot example is presented |
- | Use the first waveform | + | {{: |
+ | <WRAP centeralign> | ||
==== Slew Rate Limitations: | ==== Slew Rate Limitations: | ||
Line 52: | Line 61: | ||
For an ideal op-amp the output will follow the input signal precisely for any input signals, but in a real amplifier the output signal can never respond instantaneously to the input signal. This non-ideality can be observed when the input signal is a rapidly changing function of time. For large-amplitude signals this limitation is quantified by the slew rate, which is the maximum rate-of-change (slope) of the output voltage that the op-amp is capable of delivering. The units of slew-rate are usually expressed as V/μs. | For an ideal op-amp the output will follow the input signal precisely for any input signals, but in a real amplifier the output signal can never respond instantaneously to the input signal. This non-ideality can be observed when the input signal is a rapidly changing function of time. For large-amplitude signals this limitation is quantified by the slew rate, which is the maximum rate-of-change (slope) of the output voltage that the op-amp is capable of delivering. The units of slew-rate are usually expressed as V/μs. | ||
- | < | + | {{ : |
- | <center>Figure 1.3 Slew Rate</center> | + | <WRAP centeralign> Figure 1.5 Slew Rate </WRAP> |
- | Set the waveform generator to a square wave signal with a 1V amplitude | + | Set the waveform generator to a square wave signal with a 2V amplitude |
+ | |||
+ | A waveform that exemplifies the slew rate is presented in figure 1.6. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
==== Buffering Example: ==== | ==== Buffering Example: ==== | ||
- | The high input resistance of the op-amp (zero input current) means there is very little loading on the generator; i.e., no current is drawn from the source circuit and therefore no voltage drops on any internal (Thevenin) resistance. Thus in this configuration the opamp acts like a “buffer” to shield the source from the loading effects from other parts of the system. From the perspective of the load circuit the buffer transforms a non-ideal voltage source into a nearly ideal source. figure 1.4 describes a simple circuit that we can use to demonstrate this feature of a unity-gain buffer. Here the buffer is inserted between a voltage-divider circuit and some “load” resistance: | + | The high input resistance of the op amp (zero input current) means there is very little loading on the generator; i.e., no current is drawn from the source circuit and therefore no voltage drops on any internal (Thevenin) resistance. Thus in this configuration the op amp acts like a “buffer” to shield the source from the loading effects from other parts of the system. From the perspective of the load circuit the buffer transforms a non-ideal voltage source into a nearly ideal source. figure 1.7 describes a simple circuit that we can use to demonstrate this feature of a unity-gain buffer. Here the buffer is inserted between a voltage-divider circuit and some “load” resistance: |
- | < | + | {{ : |
- | <center>Figure 1.4 Buffer Example</ | + | <WRAP centeralign> Figure 1.7 Buffer Example </WRAP> |
- | Turn off the power supplies and add the resistors to your circuit as shown in figure 1.4 (note we have not changed the op-amp connections here, we’ve just flipped the op-amp symbol relative to figure 1.2). | + | Turn off the power supplies and add the resistors to your circuit as shown in figure 1.7 (note we have not changed the op-amp connections here, we’ve just flipped the op-amp symbol relative to figure 1.2). |
- | Turn on the power supplies and set the waveform generator to a 1 kHz sine signal with a 2 V amplitude | + | Turn on the power supplies and set the waveform generator to a 1 kHz sine signal with a 4V amplitude |
Remove the 10 kΩ load and substitute a 1 kΩ resistor instead. Record the amplitude. | Remove the 10 kΩ load and substitute a 1 kΩ resistor instead. Record the amplitude. | ||
Line 78: | Line 93: | ||
==== Inverting Amplifier: ==== | ==== Inverting Amplifier: ==== | ||
- | Figure 1.5 shows the conventional inverting amplifier configuration with a 10 kΩ “load” resistor at the output. | + | === Background: === |
- | < | + | Figure 1.8 shows the conventional inverting amplifier configuration with a 10 kΩ “load” resistor at the output. |
- | < | + | {{ : |
- | Now assemble the inverting amplifier circuit shown in figure | + | <WRAP centeralign> |
- | Turn on the power supplies and observe the current draw to be sure there are no accidental shorts. Now adjust the waveform generator to produce a 1 volt amplitude, 1 kHz sine wave at the input (Vin), and again display both the input and output on the oscilloscope. Measure and record the voltage gain of this circuit, and compare to the theory that was discussed in class. Export a plot of the input/ | + | === Hardware Setup: === |
+ | |||
+ | Now assemble the inverting amplifier circuit shown in figure 1.9 using R< | ||
+ | |||
+ | Turn on the power supplies and observe the current draw to be sure there are no accidental shorts. Now adjust the waveform generator to produce a 2 volt amplitude | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <WRAP centeralign> | ||
This is a good point to comment on circuit debugging. At some point in this class you are likely to have trouble getting your circuit to work. That is not unexpected, nobody is perfect. However, you should not simply assume that a non-working circuit must imply a malfunctioning part or lab instrument. That is almost never true; 99% of all circuit problems are simple wiring or power supply errors. Even experienced engineers will make mistakes from time to time, and consequently, | This is a good point to comment on circuit debugging. At some point in this class you are likely to have trouble getting your circuit to work. That is not unexpected, nobody is perfect. However, you should not simply assume that a non-working circuit must imply a malfunctioning part or lab instrument. That is almost never true; 99% of all circuit problems are simple wiring or power supply errors. Even experienced engineers will make mistakes from time to time, and consequently, | ||
+ | === Procedure: === | ||
+ | |||
+ | Use the first waveform generator as source Vin to provide a 2V amplitude peak-to-peak, | ||
+ | |||
+ | A plot example is presented in Figure 1.10. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <WRAP centeralign> | ||
==== Output Saturation: ==== | ==== Output Saturation: ==== | ||
- | Now change the feedback resistor | + | Now change the feedback resistor |
==== Summing Amplifier Circuit: ==== | ==== Summing Amplifier Circuit: ==== | ||
- | The circuit of figure 1.6 is a basic inverting amplifier with an additional input, called a “summing” amplifier. Using superposition we can show that Vout is a linear sum of Vin1 and Vin2, each with their own unique gain or scale factor. | + | === Background: === |
+ | |||
+ | The circuit of figure 1.11 is a basic inverting amplifier with an additional input, called a “summing” amplifier. Using superposition we can show that Vout is a linear sum of Vin1 and Vin2, each with their own unique gain or scale factor. | ||
+ | |||
+ | {{ : | ||
- | <center>{{ : | + | <WRAP centeralign> Figure 1.11 Summing Amplifier configuration |
- | < | + | === Hardware Setup: === |
- | With the power turned off, modify your inverting amplifier circuit as shown in figure 1.6. Use the second waveform generator output for Vin2. Turn the amplitude all the way down to zero so that you can adjust up from zero during the experiment. | + | With the power turned off, modify your inverting amplifier circuit as shown in figure 1.12. Use the second waveform generator output for Vin2. Turn the amplitude all the way down to zero so that you can adjust up from zero during the experiment. |
- | Now apply a 1 volt amplitude sine wave for Vin1 and 2 volts DC for Vin2. Observe and record the input/ | + | Now apply a 2 volt amplitude |
Adjust the DC offset of waveform generator W1 (Vin1) until Vout has zero DC component. Estimate the required DC offset by observing the input waveform on the scope (note: it is not Vin2 , be sure to understand why). | Adjust the DC offset of waveform generator W1 (Vin1) until Vout has zero DC component. Estimate the required DC offset by observing the input waveform on the scope (note: it is not Vin2 , be sure to understand why). | ||
- | Reset the offset of waveform generator W1 to zero. With channel 2 of the scope (the channel connected to the op-amp output) set for 2V/div, increase the offset voltage of waveform generator W2, Vin2 slowly. What happens to Vout? Record the DC voltage of the output. | + | Reset the offset of waveform generator W1 to zero. With channel 2 of the scope (the channel connected to the op amp output) set for 2V/div, increase the offset voltage of waveform generator W2, Vin2 slowly. What happens to Vout? Record the DC voltage of the output. |
Return the offset voltage of waveform generator W2 to approximately +1V. Set the scope to 1V/div, and adjust the scope offset so you can see the complete Vout waveform. Turn Vin2 back up to the value you increased it to in the previous step. What does the oscilloscope trace for Vout look like? Does the amplifier appear to be amplifying? | Return the offset voltage of waveform generator W2 to approximately +1V. Set the scope to 1V/div, and adjust the scope offset so you can see the complete Vout waveform. Turn Vin2 back up to the value you increased it to in the previous step. What does the oscilloscope trace for Vout look like? Does the amplifier appear to be amplifying? | ||
- | ==== Non-Inverting Amplifier: ==== | + | {{:university: |
- | The non-inverting amplifier configuration is shown in figure | + | <WRAP centeralign> |
- | < | + | === Procedure: === |
- | < | + | Use the first waveform generator as source Vin to provide a 2V amplitude peak-to-peak, |
- | Assemble the non-inverting amplifier circuit shown in figure | + | A plot example is presented |
- | Apply a 1 volt amplitude, 1 kHz sine wave at the input, and display both input and output on the scope. Measure the voltage gain of this circuit, and compare to the theory discussed in class. Export a plot of the waveforms and include it in your lab report. | + | {{: |
- | Increase the feedback resistor (R2) from 1 kΩ to about 5 kΩ. What is the gain now? | + | <WRAP centeralign> |
- | Increase the feedback resistance further until the onset of clipping, that is, until the peaks of the output signal begin to be flattened due to output saturation. Record the value of resistance where this happens. Now increase the feedback resistance to 100 kΩ. Describe and draw waveforms in your notebook. What is the theoretical gain at this point? How small would the input signal have to be in order to keep the output level to less than 5V given this gain? Try to adjust the waveform generator to this value. Describe the output achieved. | + | ==== Non-Inverting Amplifier: ==== |
- | The last step underscores an important consideration for high-gain amplifiers. High-gain necessarily implies a large output for a small input level. Sometimes this can lead to inadvertent saturation due to the amplification of some low-level noise or interference, | + | === Background: === |
- | ===== 1.3 Using an Op-Amp as a Comparator ===== | + | The non-inverting amplifier configuration is shown in figure |
- | The high intrinsic gain of the op-amp and the output saturation effects can be exploited by configuring the op-amp as a comparator as in figure 1.8. This is essentially a binary-state decision-making circuit: if the voltage at the “+” terminal is greater than the voltage at the “-” terminal, Vin & | + | {{ :university: |
- | <center>{{ : | + | <WRAP centeralign> Figure 1.14 Non-inverting Amplifier with gain </WRAP> |
- | < | + | === Hardware Setup: === |
- | Comparators are used in different ways, and in future sections we will see them in action in several labs. Here we will use the comparator in a common configuration that generates a square wave with a variable pulse width: | + | Assemble the non-inverting amplifier circuit shown in figure 1.15. Remember to shut off the power supplies before assembling the new circuit. Start with R< |
- | Start by shutting off the power supplies | + | Apply a 2 volt amplitude peak-to-peak, |
- | Again configure | + | Increase |
- | Now slowly | + | Increase the feedback resistance further until the onset of clipping, that is, until the peaks of the output signal begin to be flattened due to output saturation. Record the value of resistance where this happens. |
+ | |||
+ | The last step underscores an important consideration | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | === Procedure: === | ||
+ | Use the first waveform generator as source Vin to provide a 2V amplitude peak-to-peak, | ||
- | Repeat the above for a triangular input waveform and record your observations for your lab report. | + | A plot example is presented in Figure 1.16. |
- | ==== Extra Credit ==== | + | {{: |
- | For experimenters who finish early or want an additional challenge, see if you can modify the comparator circuit using your red and green LEDs (from the last lab) at the output so that the red LED lights for negative voltages and the green LED lights for positive voltages. Turn down the frequency to 1Hz (or less) so you can see them turn on-and-off in real time. Don’t forget that the LEDs will need a current-limiting resistor so that the current through it is no more than 20mA. | + | <WRAP centeralign> |
=== Congratulations! You have now completed Lab Activity 1 === | === Congratulations! You have now completed Lab Activity 1 === | ||
Line 160: | Line 205: | ||
Some specific ideas for the report might be as follows: | Some specific ideas for the report might be as follows: | ||
- | ■ Slew rate: discuss how you measured and computed the slew rate in the unity-gain buffer configuration, | + | ■ Slew rate: discuss how you measured and computed the slew rate in the unity-gain buffer configuration, |
- | ■ Buffering: explain why the buffer amplifier in figure 1.6 allowed the voltage divider circuit to function perfectly with differently load resistances. | + | ■ Buffering: explain why the buffer amplifier in figure 1.7 allowed the voltage divider circuit to function perfectly with differently load resistances. |
■ Output saturation: explain your observations of output voltage saturation in the inverting amplifier configuration and your estimate of the internal voltages drops. How close does the output come to the supply rails in this experiment and also later when used as a comparator with different power-supply voltages? Can you guess what the output voltage swing would be for an op-amp that is advertised as a “rail-to-rail” device? | ■ Output saturation: explain your observations of output voltage saturation in the inverting amplifier configuration and your estimate of the internal voltages drops. How close does the output come to the supply rails in this experiment and also later when used as a comparator with different power-supply voltages? Can you guess what the output voltage swing would be for an op-amp that is advertised as a “rail-to-rail” device? | ||
- | ■ Summing circuit: using superposition, | + | ■ Summing circuit: using superposition, |
■ Comparator: discuss your measurements and what would happen if the polarity of Vref is reversed | ■ Comparator: discuss your measurements and what would happen if the polarity of Vref is reversed | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP round download> | ||
+ | **Resources: | ||
+ | * Fritzing files: [[downgit> | ||
+ | * LTSpice files: [[downgit> | ||
+ | </ | ||
+ | |||
+ | **Continue to next Op Amp Lab Activity: [[university: | ||
+ | **More on Op Amps in amplifier configuration: | ||
+ | \\ | ||
+ | \\ | ||
+ | **Return to Lab Activity: [[university: | ||