Skip to content Skip to navigation Skip to collection information

OpenStax-CNX

You are here: Home » Content » Introduction to Mechanical Measurements » Operational Amplifiers and Signal Conditioning

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • NSF Partnership display tagshide tags

    This collection is included inLens: NSF Partnership in Signal Processing
    By: Sidney Burrus

    Click the "NSF Partnership" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • National Instruments display tagshide tags

    This collection is included in aLens by: National Instruments

    Comments:

    "This course is the lab portion of ME 363, an instrumentation class in the Mechanical Engineering Department at Brigham Young University. This course covers the use of oscilloscopes, function […]"

    Click the "National Instruments" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Lens for Engineering

    This module and collection are included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Operational Amplifiers and Signal Conditioning

Module by: Luke Graham. E-mail the author

Summary: In this lab, you will build several basic op-amp circuits to learn about the signal conditioning of sensor signals.

Introduction:

In this lab, you will build several basic op-amp circuits to learn about the signal conditioning of sensor signals.

Teaching Objectives

  • Understand how an op-amp works.
  • Learn about different types of op-amp circuits and their uses.
  • Gain practical experience in implementing op-amp circuits.
  • Build a voltage divider, an inverter, a differential amplifier, a gain circuit, and low-pass filter circuits.
  • Demonstrate the filtering capability of the low-pass filter and its use to prevent aliasing of sampled data.

Preliminary Reading

Figliola and Beasley

Analog Signal Conditioning: 211-226 (Sections 6.6-6.8)

Component Identification

In this lab, we will be using several types of electronic components: resistors, capacitors, trim potentiometers, and op-amps.

Resistors

Resistors come in a wide range of resistances. For op-amp circuits, values in the range of 10 k ohm to 250 k ohm work best. For this lab, we will use primarily 10 k ohm and 100 k ohmresistors and maybe a few others. Resistors are color coded so that with some practice you can decipher resistance values from the color bands on the resistors you are using.

Capacitors

Capacitors also come in a wide range of values and are made using a variety of techniques. The capacitors that we will use for signal conditioning are fairly small and have capacitances measured in Pico farads or microfarads. Some capacitors are polarized and care must be taken to ensure that they are connected to a circuit with the proper orientation.

Figure 1: Trim Potentiometer Schematic
Figure 1 (Graphic1.png)

Trim Potentiometers

A trim potentiometer is a variable resistor. It has three leads.

  1. Positive power supply
  2. Wiper
  3. Reference power

The resistance of the trim pot is measured between the wiper and one of the other two leads. A trim-pot is depicted schematically in Figure 1. An adjustment screw moves the wiper along the length of a coil resistor. The resistance between lead 1 and the wiper increases or decreases as the wiper moves further or closer.

The output voltage (Vout ) is related to the input voltages by the following relationship:

Figure 2: equation (1)
Figure 2 (Graphic2.png)

Operational Amplifier (Op-Amp)

For this lab, we will use the LM741 op-amp. The LM741 is a very common op-amp package, with one op-amp per integrated circuit (IC). (Many op-amp packages have two or four op-amps per IC.) A schematic representation of the LM 741 is shown in Figure 3. The semi-circular depression on the chip marks the top of the chip and the pins are numbered counterclockwise around the chip. The highest number pin is always opposite pin 1.

LM741 Pinout:

  1. Null offset adjustment (not used)
  2. Inverting (-) input
  3. Non-inverting (+) input
  4. Connect to -12 V
  5. Null offset adjustment (not used)
  6. Output
  7. Connect to +12 V
  8. Not used

Data sheets for this and other integrated circuits (IC's) can be obtained from the National Semiconductor web site (www.national.com).

Figure 3: LM741 Connection Diagram
Figure 3 (Graphic3.png)

The Prototyping Board

You will build circuits for this lab using a solderless prototyping board known as a proto-board or breadboard. Breadboards allow us to connect circuits by plugging in components and wires. No soldering is required. A drawing of a breadboard is shown in Figure 4 below. As indicated by the gray lines, horizontal rows of connectors in areas B and C are internally connected. When a chip is plugged into the board as shown, these strips give you four connections to each of the IC pins. The connections in regions A and D are intended as power and ground buses. As indicated by the gray lines, the columns in these regions are tied together vertically.

Figure 4: Breadboard
Figure 4 (Graphic4.png)

The breadboards are fairly robust; however they are susceptible to damage from wires that are too large. Do not use wires larger than 28 gauge. Components with leads that are too large can damage the breadboard as well.

Procedure

Part 1: Set Up the Power Supply

You will use a Tektronix triple-output power supply. The power supplies should be set up when you come to lab. For your reference, set-up instructions are given below. Perform the following steps before you turn the power supply on.

The power supply has three dc-power outputs; one capable of 0-5 V, and two capable of 0-15 V. To power the electronic components for the lab, we will need a +12 V supply, a –12 V supply, and a ground connection. We will use the two 0-15 V outputs in series and adjust them to output approximately 12 V each.

  1. Switch the power supply to “series”.
  2. Adjust the “A” power to ~ 12 V (the “B” output will match the “A” output).
  3. Connect a red cable to the “+” terminal for the “A” power output.
  4. Connect a black cable to the “–“ terminal for the “B” power output.

In this configuration, the negative side of the “B” output is a –12 V source. The positive side of the “A” output becomes the +12 V source. The positive side of the “B” output and the negative side of the “A” output are the ground.

Incorrectly connecting an op-amp to the power supply will destroy the op-amp. Make sure that the op-amp is connected with correct polarity.

Part 2: Preparing the Breadboard

  1. Connect the +12 V supply to one of the strips in the A region.
  2. The other strip in the A region should be tied to ground.
  3. In the D region, one of the strips should be the –12 V bus.
  4. The other D region strip should be used as a ground bus.

Your breadboard is now configured to power the circuits for this lab.

Part 3: Generate a Simulated Signal

Use the function generator to create a sine wave with the following characteristics:

  • 50 Hz
  • amplitude of 80 mV
  • offset (bias) of approximately 800 mV

For such a small signal, the Attenuator button on the function generator must be depressed. This signal will be treated as the output of a sensor. We will condition this "sensor output" with a signal conditioning circuit.

Part 4: Modify Existing VI for Multiple Inputs

In this lab, we will build on the skills that were developed in Introduction to Benchtop Equipment and Data Acquisition and Temperature Measurement and First-Order Dynamic Response. It is assumed that the student understands the concepts of a Front Panel, a Block Diagram, the Control Palette, and the Functions Palette. It is also assumed that the student can search the control and functions palette for necessary features. The student should be familiar with configuration options for voltage measurements using the DAQ Assistant.

The VI that you developed for Temperature Measurement and First-Order Dynamic Response can be easily modified to examine circuit inputs and outputs.

  1. Open the VI named Lab3 that you saved during Temperature Measurement and First-Order Dynamic Response.
  2. Open the DAQ Assistant Configuration Box.
    1. Delete the Voltage channel.
    2. Add a voltage channel for module 1, analog input 0.
    3. Add a voltage channel for module 1, analog input 1.
    4. For the Terminal Configuration, select Differential.
    5. For Acquisition Mode, select Continuous.
  3. Click File>>Save As…>>Substitute Copy for Original to save your VI with a new name.
Figure 5: Modified Block Diagram
Figure 5 (Graphic5.png)

Part 5: Op-Amp Circuits

Before building a circuit to condition the signal, you will build a couple of simple op-amp circuits to get a feel for what to do.

5.1 Inverting Circuit

The inverter is one of the simplest op-amp circuits. This circuit simply changes the sign of a signal. The schematic diagram of an inverter is shown in Figure 6.

  1. Build the inverter using two 10 k ohm resistors and an LM741 op-amp.
  2. Input the signal from the function generator to the circuit.
  3. Branch the input cable with a BNC T-connector. Connect this input to Channel 0 on Module 1 of the SCXI.
  4. Connect the output signal from the circuit to the Channel 1 on module 1 of the SCXI.
  5. When you run the VI, you may need to adjust the scales on the X and Y axes.

You should see that the output is an inverted version of the input.

Figure 6: Inverter and Inverting Gain Circuits
Figure 6 (Graphic6.png)

5.2 Inverting Gain Circuit

The inverting gain circuit changes the sign of the signal and multiplies the amplitude. Increasing the amplitude of a signal can be very important in distinguishing subtle signal characteristics. Quantization errors result when a signal characteristic is too small to be detected by a measurement system. (You will learn more about quantization errors in lecture, and on pages 249-250 in your text.)

  1. Replace the feedback resistor (R2 as shown in Figure 5) in your inverter circuit with a 100 k ohm resistor. This will cause the input signal to be inverted and amplified by a factor of ten.
  2. Run the VI again.

With the amplification, the input offset of 800 mV has increased to an 8 V output.

Note: Using the data acquisition card to view the signal, you may saturate the ADC with the amplified signal. All you will be able to see is a flat line near +5 V or –5 V.

Part 6: Bias Correction

For the amplified signal to be read correctly, the 800 mV bias must be removed. A two step process will be used to remove the bias:

  • A Trim Potentiometer will be used to step down a 12V DC signal to 800 mV.
  • A Differential Amplifier circuit will be built to subtract this stepped down voltage from the sine wave.

The result will be an 80 mV sine wave with zero mean.

6.1 Trim Potentiometer Adjustment

Use the 10 k ohm trim potentiometer provided to build a voltage divider as shown below.

  1. Connect one end lead of the potentiometer to the +12 V bus.
  2. Connect the other end lead to the –12 V bus.
  3. Connect a voltmeter across the wiper lead and ground to measure the output.
  4. Adjust the potentiometer resistance until the voltage on the wiper lead is 800 mV.
Figure 7: Voltage divider circuit
Figure 7 (Graphic7.png)

6.2 Differential amplifier

You will build a differential amplification circuit to subtract 800 mV from the sensor signal. A differential amplifier is shown in Figure 8 below.

  1. Use four 10 k ohm resistors to subtract the voltage divider output from the sensor signal. It is unlikely that the resulting output signal will be a zero-mean sine wave as desired.
  2. Adjust the screw on the potentiometer to "trim" the offset of the sine wave to zero.
  3. Amplify the difference between the signals by replacing the R2 resistors so that R2 > R1. Replace the R2 resistors with 100 k ohm resistors.

The resultant signal should be an 800 mV sine wave with minimal offset.

Using the inverting gain circuit shown in Figure 8, amplify the output of the differential amplifier circuit by an additional factor of ten. This can be done with another op-amp and a 10 k ohm resistor and a 30 k ohm resistor. The resultant output signal should have a mean of zero and amplitude of ~2.4 V. Adjust the potentiometer to remove any offset.

Figure 8: Differential Amplifier Circuit
Figure 8 (Graphic8.png)

Part 7: Low-Pass Filtering

A low pass filter can be used to attenuate high-frequency noise in an analog signal and to minimize the portion of the signal that will be aliased. Later in this lab, you will see a demonstration of the damaging effects of aliasing.

Figure 9: First-Order Low-Pass Filter
Figure 9 (Graphic9.png)

7.1 Build an Active Low-Pass Filter

  1. Build the first-order filter shown in Figure 9 with R1 = R2 = 10 k ohm and C2 = 0.1 micro F. First order filters are so-called because their dynamics are modeled by first-order differential equations.
  2. Connect the output of the circuit to Channel 1 on your DAQ system.
  3. The filter’s time constant is equal to R2C2. Calculate values for the cut-off frequency and the time constant.

7.3 Modifying Existing VI to Measure Magnitude Ratio

By measuring the magnitude of the input and output of a filter, you can determine the how much the filter attenuates the signal.

Figure 10: Completed Block Diagram
Figure 10 (Graphic10.png)
  1. Delete the Amplitude and Frequency constants from the Block Diagram.
  2. Hold Ctrl as you drag the Tone Measurements icon to make a copy.
  3. Place a Split Signals icon to the left of the Tone icons.
  4. Place a Divide function to the right of the Tone icons.
  5. Create a numeric indicator at the x/y output terminal of the Divide function.
  6. Rename the numeric indicator Magnitude Ratio. (The Magnitude Ratio represents the output amplitude divided by the input amplitude.)
  7. Wire the Block Diagram as shown in Figure 10.
  8. Save the VI.

7.2 Testing a Filter

We expect that the filter will allow frequencies below the cut-off frequency to "pass", and will attenuate signals at higher frequencies. The Magnitude Ratio will be recorded as the output magnitude divided by the input magnitude.

  1. Connect the signal going into your filter to Channel 0 of module 1 of the SCXI.
  2. Connect the signal coming out of your filter to Channel 1 of module 1 of the SCXI.
  3. Input a 1 V sine wave with zero offset into the low-pass filter circuit.
  4. Starting with a frequency of about 10 Hz, slowly increase the frequency of the input signal. What happens to the output signal?
  5. Increase frequencies to 2 kHz.
  6. Using the table below, determine the magnitude ratio at several frequencies.

Table 1: Magnitude Ratio Data for First-Order Low-Pass Filter (Active)

Table 1
frequency (Hz) Input magnitude (V) Output magnitude (V) Magnitude ratio
10 1V    
18 1V    
32 1V    
58 1V    
110 1V    
190 1V    
340 1V    
620 1V    
1100 1V    
2000 1V    
  1. Using Excel, plot the following two sets of data on a single log-log chart.
    1. Calculated magnitude ratio vs. frequency.
    2. Measured magnitude ratio vs. frequency

Do the magnitude ratio and phase difference between the input and output behave as you would expect?

  1. Input a 30 Hz square wave into the low-pass filter. Record your observations.
  2. Measure the time constant from the oscilloscope screen.

Does it correlate with your calculated values based on resistor and capacitor values?

7.3 Build a Passive Low-Pass Filter

The filter described in step 6.1 is an active filter, meaning it requires an external power source. Since it uses an op-amp, it must have a ±12 V power supply. Active filters can have a static gain greater than one. Active filters also have low output impedance, which means that they can pass up to 10 mA of current without any effects on the operation of the filter.

A passive low-pass filter does not require an external power source. A passive filter can be constructed with simply a resistor and capacitor as shown in Figure 11.

  1. Build a filter using a 10 k ohm resistor and a 0.1 micro F capacitor.
  2. Repeat section 6.2 (steps 4-11). Record your results in your lab book. You may use Table 2 to organize your data.
Figure 11: Passive First-order Low-pass filter
Figure 11 (Graphic11.png)

Table 2: Magnitude Ratio Data for First-order Low-pass Filter (Passive)

Table 2
frequency (Hz) Input magnitude (V) Output magnitude (V) Magnitude ratio
10 1V    
18 1V    
32 1V    
58 1V    
110 1V    
190 1V    
340 1V    
620 1V    
1100 1V    
2000 1V    

7.4 Build a Second-Order Butterworth filter

Figure 12 below shows a second-order Butterworth low-pass filter. A second-order filter is superior to a first-order filter in many respects, as we will investigate.

  1. Build the Butterworth filter circuit using R = 10 k ohm and C = 0.1 micro F.
  2. Perform the sine wave and square-wave input tests from step 6.2. Record your results in your lab book. You may use Table 3 to organize your data.

How is the response of this filter different from that of the first-order filter?

Figure 12: Second-order Butterworth Low-pass Filter
Figure 12 (Graphic12.png)

Table 3: Magnitude Ratio Data for Second-Order Low-Pass Filter

Table 3
frequency (Hz) Input magnitude (V) Output magnitude (V) Magnitude ratio
10 1V    
18 1V    
32 1V    
58 1V    
110 1V    
190 1V    
340 1V    
620 1V    
1100 1V    
2000 1V    

Part 8: Aliasing

Aliasing is a generally undesired phenomenon that results when periodic signals are sampled too slowly. Aliasing causes high frequency periodic signals to be recorded as signals consisting of lower frequencies, as will be apparent in the following steps.

8.1 Non-Filtered Signal

You will cause a signal to be aliased as it is converted from an analog to a digital signal.

  1. On the block diagram, create Numeric Indicators to display Frequency and Amplitude.
  2. Wire the Numeric Indicators to the Tone Measurements icon for the second channel.
  3. Change the sample rate of the DAQ Assistant to 1000 S/sec (samples per second).
  4. Calculate the Nyquist Frequency for this sample rate.
  5. Connect the output of the Function Generator directly to the second input channel on the SCXI.
  6. Adjust the function generator to create a sine wave with a frequency of 50 Hz and amplitude of 1 V.
  7. Slowly increase the frequency of the sine wave until you reach 400 Hz. Observe what happens to the sampled version of the sine wave.
  8. Increase the frequency to 500 Hz. What is the measured frequency and amplitude?
  9. Why doesn’t LabVIEW display a “true” image of the wave form?
  10. Continue to increase the frequency of the sine wave to 1000 Hz.
  11. Describe what happens to the amplitude and the frequency of the sampled signal as the frequency increases.
  12. Why is the frequency displayed in LabVIEW different from the frequency supplied by the function generator? How are the two frequencies related?

8.2 Anti-Aliasing Filter

Low pass filters are frequently employed to minimize the portion of a signal that is aliased.

  1. Input the signal from the function generator to the second-order Butterworth filter from Section 6.2.
  2. Connect the output of the filter to channel 2 of the SCXI.
  3. Set the sample rate to 1 kS/sec (as before).
  4. When used in this way, the filter is called an anti-aliasing filter. Comment on what you observe. How are your observations different from those in step 10 without the filter?

Bonus

Estimate the damping ratio of the second-order Butterworth filter through experimentation. To do this, you will probably need to take more measurements near the expected cut-off frequency of the filter (which is near the natural frequency). Support your result with plots and discussion as necessary.

Lab Report

For this lab, you will write up the Introduction and Objective sections of a full formal report. You will be provided handouts with further instruction regarding what is expected.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks