Difference between revisions of "Assignment 6, Part 2: Electronics bootcamp"

From Course Wiki
Jump to: navigation, search
(Identify unknown filter circuits)
(Measure the resistors with a digital multimeter)
Line 49: Line 49:
  
 
# Plug two test leads into the DMM.  
 
# Plug two test leads into the DMM.  
#* The black lead goes into the terminal labeled COM.  
+
#* The black lead goes into the terminal labeled "COM." This is short for "common." (That isn't really much clearer, is it?)
 
#* The red lead plugs into different terminals depending on the measurement you are making. For resistance measurements, use the '''V Ω''' terminal. The '''A''' terminal is for current measurements.  
 
#* The red lead plugs into different terminals depending on the measurement you are making. For resistance measurements, use the '''V Ω''' terminal. The '''A''' terminal is for current measurements.  
 
# Select the resistance mode, which is labeled with an Ω symbol.  
 
# Select the resistance mode, which is labeled with an Ω symbol.  

Revision as of 19:06, 29 October 2017

20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


This is Part 1 of Assignment 6.

Lab Exercises

Voltage divider

Schematic diagram of voltage divider circuit.

In the first hands-on part of the bootcamp, you will analyze and build a voltage divider. The divider circuit comprises two resistors and a voltage source, as shown in the schematic diagram. You will select the values for R1 and R2.

Before you build

Choose any two resistor values you like, but there are a few practical constraints. The resistors in the lab range in value from 1 Ω to 10 MΩ. Within that range, manufacturers only produce certain standard values. Check the supply bins or this table to see which values are available.

Resistors convert electric power to heat. Since the ideal circuit model does not include heat energy, ideal resistors have the effect of making power disappear from a circuit. Of course, energy is conserved in a real circuit. The energy is converted to a form that is extrinsic to the ideal circuit model.

The fact that energy disappears from a circuit model doesn't mean that you can ignore it. Power dissipation in resistors increases in proportion to resistance and the square of current, $ P=I^2R $. Physical resistors must be able to shed their heat to the environment or else they tend to get very hot and fail. A noxious puff of smoke frequently accompanies failure. Even if a component operated at an excessive power level does not vaporize, it may no longer behave as specified. The maximum power rating of the resistors in the lab is ¼ Watt. Ensure that the power dissipated by R1 and R2 does not exceed the maximum rating for Vin values in the range of 0-15 V.

You will use an oscilloscope and a volt meter to measure voltages in the circuit. The oscilloscope has an input impedance of 1 MΩ. Connecting the oscilloscope probe to a node of the circuit is equivalent to placing a 1 MΩ resistor between that node and ground. In circuits that use very large resistors, the current flowing into the oscilloscope can significantly distort measurements.

Before building the divider circuit:


Pencil.png


  1. Record the values you selected for R1 and R2.
  2. Find the gain of the circuit, $ ^{V_{out}}/_{V_{in}} $
  3. Plot an I-V curve with I on the vertical axis and Vin on the horizontal axis, over the range 0 V < Vin < 15 V. (A hand-drawn plot is fine.)
  4. What is the maximum power dissipated in each resistor between 0 V < Vin < 15 V?


Another practical issue: tolerance

The Museum of Tolerance in Los Angeles, California contains many exhibits about the concept of tolerance.

It's easy enough to write down an exact value for a resistor like 15 kΩ or eπ Ω and analyze a circuit model that contains such a component. But fabricating a 15 kΩ or eπ Ω resistor is another matter. It is not possible to realize physical components with infinite precision. The values you specify on paper are called nominal values. Nominal means: "stated or expressed but not necessarily corresponding exactly to the real value."[1] When you go to build the circuit, the actual value of the resistors you use will be somewhat different than the nominal values you used to analyze the circuit.

To account for the difference between the nominal and actual values of a component, the manufacturer guarantees that the actual value will differ from the nominal value by no more than a certain amount. Resistor tolerances are usually specified as a percent of nominal value. Some common resistor tolerances are 10%, 5%, 2.5%, and 1%. Even smaller tolerances are available from some manufacturers — down to 0.05& in some cases. The resistors in the lab are guaranteed by the manufacturer to be within 5% of the nominal value.

Because the actual values of the resistors differ from the nominal values, the power dissipation in R1 and R2 will under some circumstances be greater than what you computed using the nominal values. To be safe, the best thing to do is compute the power dissipated in both resistors under worst-case assumptions.

Measure the resistors with a digital multimeter

Digital multimeter with test leads configured for voltage or resistance measurement.

Go ahead and get the resistors for your circuit from the bins in the lab.

The value of each resistor is indicated by a set of color-coded bands on the component body. Through negligence or malice of last semester's scholars, components occasionally end up in the wrong bin. Ensure that you have the correct resistors by reading the color bands. Instructions for reading resistor markings are available at this Wikipedia page.

Measure the actual value of both resistors with a digital multimeter (DMM). DMMs are multifunction instruments that usually include functions for measuring voltage, current, and resistance. They connect to component terminals through a pair of test leads. DMMs measure resistance by applying a small voltage across the test leads and measuring the resulting current flow. To get an accurate measurement of a resistor, its leads must be isolated from other circuit elements. If the resistor leads are connected to other components, current flowing through other paths will distort the measurement.

  1. Plug two test leads into the DMM.
    • The black lead goes into the terminal labeled "COM." This is short for "common." (That isn't really much clearer, is it?)
    • The red lead plugs into different terminals depending on the measurement you are making. For resistance measurements, use the V Ω terminal. The A terminal is for current measurements.
  2. Select the resistance mode, which is labeled with an Ω symbol.
  3. If you've inserted your resistors on the breadboard, remove them and connect the DMM leads to the resistor that you want to measure.
  4. Measure your resistors and record their actual values.


Pencil.png

What are the measured values of your resistors?


From this point on, use the actual value instead of the nominal value in your calculations. Using the actual value will reduce the error in results that depend on R1 or R2.

Build the circuit

An example voltage divider circuit implemented on a breadboard. Note that you don't need as many connections and can build the circuit however you choose.
Top view of a solderless electronic breadboard.

The next step is to build the divider circuit. If you have worked with electronic components before, you probably noticed that most of them look a little bit like bugs. They have a central body with some gangly legs sticking out, called leads. The leads carry current from the outside of a component to its innards where the magic happens. One of the first challenges facing an aspiring circuit maker is to properly connect all the bugs' legs whilst keeping the circuit robust and orderly. Solderless electronic breadboards are a convenient platform for building circuits that might require a lot of debugging or frequent reconfiguration. Breadboards are flexible and easy to use, but they have a few downsides. They have high interconnect capacitance and resistance. If you don't know why that's bad, pay closer attention in lecture.

Before you go on, gather the items that you will need:

  • solderless electronic breadboard,
  • lengths of different colored wire to make jump wires,
  • wire strippers (located in the lab station tool drawers).

The image on the right shows an example of solderless electronic breadboard. The breadboard has a large number of square holes in it called tie points. A single wire or component lead fits into each tie point. Spring-loaded contacts inside each tie point hold leads in place and provide electrical connections.

Sets of tie points are electrically connected to each other in a pattern that allows just about any circuit arrangement to be realized on the breadboard. The two central grids of tie points separated by a notch are called the field. Each row of tie points in the field is called a terminal strip. Rows of terminal strips are numbered. Columns are designated by a letter. Within a terminal strip, the five tie points A-E are connected, and tie points F-J are connected. Points A-E are not connected to points F-J. Connections between component leads are made by running jump wires between tie points that are connected to each lead, as shown in the image above on the right.

The long lines of tie points to the left, right, and above the field are called bus strips. Bus strips are highlighted by red and blue lines. All of the tie points in a bus strip are connected together. Because most circuits have a lot of power and ground connections, the bus strips are almost always connected to the power supply. Using the bus strips as a power distribution network makes it easy to connect any terminal strip to power or ground with a short jump wire.

If you are unsure whether two holes on the breadboard are connected, insert short wires in the holes. Use the resistance or continuity features of the DMM to check if they are connected.

  1. Mount R1 on the breadboard by bending its leads at a 90 degree angle and trimming them to about half an inch long. Press the leads into the breadboard.
  2. Mount R2 so that one of its leads is in the same terminal strip as one of the leads from R1. This will create an electrical connection between the two resistors.

How to use the lab power supplies

Triple-output DC power supply.

You will use a laboratory power supply to act as the voltage supply for your circuit. The lab supply has three separate DC outputs called CH1, CH2, and CH3. Each supply has a + and - terminal, from which motivated electrons begin and end their journeys. [2] The CH1 and CH2 outputs are adjustable. The CH3 output always produces 5 volts with a current limit of 3 amps.

When you turn the power supply on, all three of the outputs will be disabled (which is a rather sensible way of doing things). Press the OUTPUT button to enable all three supplies. Press OUTPUT again to disable all three supplies.

Four dials on the front of the supply set the current and voltage limits for each of the two supplies from 0-20V and 0-3A. At all times, each adjustable supply will be either current or voltage limited. Multicolor LEDs indicate which limit is currently in effect: green for voltage-limited and red for current-limited. When the supply is disabled, the numeric displays will show the values of the limit settings. When the supply is in operation, the displays show the actual current and voltage values for each supply.

Two pushbuttons near the middle of the the lab supply control panel configure the interconnection of CH1 and CH2. There are 3 possible settings: independent, series, or parallel. In independent mode, CH1 and CH2 are not connected together. The two sets of voltage and current dials operate independently. In series mode, the plus terminal of CH2 supply is internally connected to the minus terminal of CH1. Both supplies operate with the same voltage limit. The current limits are independent. This provides a split supply with equal positive and negative voltages relative to the common terminal. In parallel mode, the + terminals of CH1 and CH2 are connected together, as are the - terminals. Parallel configuration allows a maximum possible current of 6 amps — 3 amps from each of the supplies.

The post labeled "GND" in green letters is connected to earth ground. Earth ground is a wire that runs through the third prong of the electrical plug to a post driven deep into the ground somewhere near Building 16. Earth ground is not needed for this lab.

In this part of the lab, you will use a 15 volt, split supply. Configure the lab supply in series mode with a voltage of 15 V and a current limit of about 0.1 amps on CH1 and CH2.

The breadboard has four colored post terminals at the top right to facilitate power supply connections. These are called banana post terminals. Each post terminal accepts a banana connector inserted at the top and a bare wire at the base. The banana terminals are not connected to any of the tie points, so it is necessary to run wires from the post terminals to tie points on the bus strips. Wires connected to the post should pass through the hole through the base of the post. Be sure that only bare wire touches the terminal. Insulation under the screw terminal may cause an intermittent connection. Secure the wire by tightening the colored plastic nut (onto bare wire, not insulation plastic sleeve).

Connecting the power supply

Use jump wires to connect the power post terminals to the bus strips on the breadboard. Hook up the power as shown in the picture above (note that the circuit shown is not yet complete, however). Power the voltage divider circuit by connecting it to the +15 V bus strip and ground.

  1. Use the cutting jaws of the wire stripper to trim the resistor leads so that the component bodies will be close to the board.
    • In addition to being untidy, leads that are too long may make unintentional contact with the metal under the breadboard.
    • Don't cut the leads too short either, or they may not make good contact with the tie point.
  2. Mount the resistors by pressing their leads into tie points in the field.
  3. Run jump wires to connect the divider to the power and ground bus strips.
    • Keep your wiring neat, close to the board, and easy to follow. A good way to do this is to route wires horizontally or vertically, making right-angle bends to change directions.
    • Use the right length of wire. The right length of wire is the shortest length of wire that satisfies the previous guideline.
    • Use the bus strips to distribute power supplies and ground as described in the text above.

Use a cable with banana connectors on both ends to connect the power supply to the posts. You can find banana cables hanging on the cable rake near the time travel poster. Refer back to left side of the lab map in lab orientation if you need to. Convention is to use black cables and connectors and blue bus strips for ground. Red bus strips are almost always used for power supplies.

The exposed metal screws on the bottom of the banana connectors (on the back side of the breadboard) can short to the metal optical table. Cover them with electrical tape to prevent a calamity.

Measure voltage Vout

Test leads in parallel with R2.

The DMM has modes for measuring DC and AC voltages. In DC mode, the meter reads the average value of the test signal. In AC mode, the meter reads the root-mean-square value of a time varying signal. In this lab you will use DC mode, which is labeled with a solid line above a dashed line.

  1. Switch the DMM to DC voltage mode and connect the DMM test leads. Insert the black lead into the receptacle marked COM and the red lead in .
  2. Connect the test leads across the terminals of R2.
  3. Record the voltage shown on the DMM for each input voltage Vin = 0, 2.5, 5, 10 and 15 V. Hint: You can make the +15 V bus strip whatever voltage you want simply by adjusting the voltage at the power supply.


Pencil.png

Turn in your measured voltages Vout for Vin = 0, 2.5, 5, 10 and 15 V.


The DMM has a very high input impedance. We can simulate the effect of an inferior meter with lower input impedance by adding a 1 kΩ resistor in parallel with R2.

  1. Add the 1 kΩ resistor in parallel with R2 and measure the voltage across R2. By what percentage did the measurement change?
  2. Remove the 1 kΩ resistor and the DMM from the circuit.


Pencil.png

Turn in your measured voltage across R2 in the presence of the 1kΩ resistor. By what percentage did the measurement change?


Measure current I

DMM test leads connected in series with R2.

In order to measure current, you must move the red test lead from the receptacle on the DMM to the A receptacle. The reason for the change is that there is a fundamental difference between measuring voltage and current. Voltage is a measure of potential; current is a measure of flow. To make an accurate voltage measurement, the meter should have very high input impedance. High input impedance in a voltage measurement ensures that only a small percentage of the current flowing in the circuit goes through the meter. Measuring current essentially requires counting the number of electrons that flow past a certain point in a given time, so the opposite is true. To get a good count, all of the current must flow through the meter. Making a good current measurement requires a meter with very low input impedance. In addition, you must place the meter in series with the current you want to measure so that all of the current flows through the meter.

  • Note: In the 20.309 lab, the Fluke 115 DMMs can accurately measure a few milliamps of current, while the 111 models should not be trusted at very low current levels. Click these links for full documentation for the (discontinued) Fluke 111 and Fluke 115 multimeters.
  • For this section of the electronics mini-lab, feel free to swap R1 and R2 for smaller-value resistors, so the current flowing through R2 is large enough to be measured by your Fluke 11x ammeter. Simply make a note of the new resistor values and justify your choice in your lab report.
  1. Switch the DMM to DC current mode and configure the leads for current measurement.
    • Move the red lead to the receptacle marked A.
    • Positive current flows into the red lead and out of the black.
  2. Place the leads of the DMM in series with R2 as show in the image at right.
  3. Measure the current through the circuit for Vin = 0, 2.5, 5, 10 and 15 V


Pencil.png

Turn in:

  1. Recorded values of the current through the circuit for Vin = 0, 2.5, 5, 10 and 15 V
  2. A plot of the measured I-V curve on the same set of axes as the calculated curve.


RC low-pass filter

RC filter circuit schematic.

In this part of the lab, you will replace R2 with a capacitor. This will transform your humdrum voltage divider circuit into a spectacular low-pass filter. You will measure the time constant and frequency response of the filter circuit. Capacitors are available in the lab with a range of values from 0.01 - 0.1 uF. Check the supply bins to see what is available and choose a value for C1.

  1. Choose a capacitor value and calculate the cutoff frequency of your filter.
    • If the frequency is below 100 Hz or above 10 kHz, you might want to rethink your capacitor or resistor choice. Change either the resistor or capacitor to get a cutoff frequency in this range.
  2. Draw a Bode plot of the filter response using straight line segments to approximate the transfer function. (For help with drawing Bode plots, visit the page on Bode plots.)
  3. Replace R2 with a capacitor of the selected value.
RC filter on a breadboard.


Pencil.png

Turn in your choice of capacitor and resistor values and corresponding Bode plot. Make sure to label the cutoff frequency.


Replace the power supply with a function generator

An SFG-2120 digital function generator.

The behavior of ideal resistors is independent of frequency, so it was possible to measure the (frequency independent) transfer function of a voltage divider using the constant voltages produced by a lab power supply. Since the impedance of a capacitor varies in proportion to the inverse of signal frequency, it will be necessary to measure the response of the low-pass filter circuit over a range of frequencies. This requires a more sophisticated method of creating input voltages. Sine and square waves are especially useful for this task. In this part of the lab, you will also replace the power supply with a function generator, which is a piece of equipment that can generate several kinds of periodic signals: sine, triangle, and square waves. The amplitude and frequency of the function generator's output are adjustable.

There are several types of function generators in the lab. The digital function generators allow you to enter frequencies on a keypad. Press one of the unit keys (Hz, kHz or MHz) to complete your entry. Use the decade selector knob and frequency dial to set the frequency of the analog function generators. The output frequency is adjustable between about 0.01 Hz and 10 MHz. Amplitude ranges from 0.1 V to 10.0 V.

  1. Disable the power supply and disconnect it from the circuit.
  2. Connect a function generator in place of the power supply.
    • Attach a BNC cable to the Output connector on the front right of the function generator.
    • This circuit is sensitive to the parasitic capacitance added to a circuit by multiple jump-wire to tie-point connections, so use a BNC to grabby clip adapter to connect directly to the left side of the resistor as shown in the picture. Remove the jump wires between there and the +15 V bus strip.
    • The connections can also be made using BNC to bare wire adapters found in the bins on the south wall.
    • The center conductor of the BNC cable is the positive signal lead; the outer conductor/shield is the ground signal lead.
  3. Turn on the function generator.
    • Set the frequency to 10 Hz.
    • Select a sine wave output. (Press the WAVE button on the digital function generators or use the waveform knob on the analog generators.)

Connect an oscilloscope

Digital oscilloscope.

Oscilloscopes provide a graphic display of time-varying voltage signals. In the most frequently used mode, the oscilloscope screen shows a plot of voltage on the vertical axis versus time on the horizontal axis. The oscilloscopes in the lab have two inputs. Either or both of the inputs may be plotted. Two knobs adjust the voltage and time scales so that it is possible to display a wide range of waveforms. The display also includes status indicators and configurable waveform measurements such as amplitude, frequency, and phase.

Click these links for full documentation for the Rigol DS1052e and ATTEN ADS1022c oscilloscopes.

  1. Get two oscilloscope probes from the cable rakes on the wall next to the time machine poster.
  2. Connect the oscilloscope to the circuit. CH2 will monitor Vin, CH1 Vout.
    • Connect the BNC connector of the first oscilloscope probe to the CH1 oscilloscope input. Connect the probe to Vout, the top of the capacitor, using a small jump wire held in the retractable clip at the end. Connect the black alligator clip to ground, the bottom of the capacitor. CH1 is thus in parallel with the capacitor.
    • Using a BNC T-connector, attach the other oscilloscope probe to the CH2 input and to Vin from the function generator.
  3. Set the oscilloscope vertical scale for each channel to 5 V per division.
    • The Rigol oscilloscopes have one knob that controls the vertical scale for both channels. Press one of the channel select buttons before you adjust the "vertical position" knob until the bottom-row display indicates "CH1 - 5.00V" and "CH2 - 5.00V".
    • The ATTEN oscilloscopes have a knob for each channel. Software menu functions still require you to press the button for the desired channel.
  4. Make sure the scope triggers on CH2:
    • The oscilloscope begins recording and displaying the waveform when it is triggered. There are several options to configure when the trigger occurs. One of the simplest modes causes a trigger when the input signal crosses a certain voltage level.
    • On both the Rigol and the ATTEN oscilloscopes, press the "menu" button of the right "Trigger" panel, and on the screen select "CH2" as the "Source". Adjust the trigger level by rotating the "Level" knob.

Measure and plot the transfer function

  1. Set up the signal generator for 5 V peak-to-peak, sine wave output.
    • Select sine-wave mode using the mode buttons.
    • Set the peak-to-peak amplitude of the signal generator's output to 5 V using the "Ampl" tab on the function generator.
  2. Use the "Freq" tab on the signal generator to select a frequency of 10 Hz.
  3. Adjust the horizontal scale on the oscilloscope to display about 3 periods of the sine wave.
  4. Record the peak-to-peak amplitude of Vout and Vin.
    • The oscilloscope has a built-in feature for measuring peak-to-peak voltages that will make your life much easier.
      1. Press the "Measure" button in the "Menu" top panel
      2. Choose the channel of interest under "Source"
      3. Choose "Vp-p".
  5. Repeat the measurement of Vout and Vin at frequencies of 100 Hz, 1 KHz, 10 KHz, 100 KHz, 1 MHz, and several frequencies in the vicinity of the cutoff frequency.
  6. Make a Bode plot


Pencil.png

Turn in a plot of the measured values of $ \frac{V_{out}}{V_{in}} $ versus frequency on the same set of axes as your Bode plot.


Identify unknown filter circuits

In this part of the lab, you will measure the transfer function of four filter circuits made out of resistors and capacitors. The circuits will be hidden inside blue boxes marked A through D. Your goal is to figure out what type of circuit is inside of each "black box."

All of the boxes have two BNC connectors. You will use a function generator to drive sine waves of various frequencies into one connector and an oscilloscope to measure the resulting output on the other connector. Input and output are marked on the box.

Measure each box at each decade of frequency between 10 Hz and 1 MHz. You may want to measure choose additional frequencies in transition regions. The transfer function consists of two plots: one that shows the magnitude of the output divided by the magnitude of the input as a function of frequency; and another that shows the phase difference between the input and the output. The former is the Bode gain plot like that for your RC filter. The latter is the Bode phase plot. From those plots, you can derive the topology of the circuits inside and determine the cutoff frequencies of each filter.

  1. Use BNC cables to connect the function generator and oscilloscope to a box.
  2. Set the scope to trigger from the input channel.
  3. Measure the input, output, and phase difference at a range of frequencies.
    • Make sure to take enough measurements to completely identify the transfer function.
    • Take extra measurements in the vicinity of the cutoff frequency or frequencies.
  4. Generate the Bode gain plot and the Bode phase plot for each of the four black (blue) boxes: A through D.
  5. Draw the circuit inside each box.



Pencil.png

Turn in your Bode gain and phase plots and the corresponding circuit diagram for each of the four circuits A through D. Optional: In Matlab, use nlinfit to fit parameters of a transfer function for each circuit.



Navigation

Back to 20.309 Main Page.

References

  1. http://www.merriam-webster.com/dictionary/nominal
  2. Don't read this if you think you understand circuits. The electrons begin their journey at the minus terminal; however, positive current is defined to flow from plus to minus. It's all <a href="http://www.allaboutcircuits.com/vol_1/chpt_1/7.html">Benjamin Franklin's fault</a>.