Difference between revisions of "Electronics Mini-Lab"

From Course Wiki
Jump to: navigation, search
(Build the circuit)
 
(612 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
[[Category:20.309]]
 
[[Category:20.309]]
 
[[Category:Electronics]]
 
[[Category:Electronics]]
 +
{{Template:20.309}}
  
==Objectives and Learning Goals==
+
[[Image:Resistor Bug.jpg|right|300 px|thumb|Photo by Brendan Dolan-Gavitt]]
#Familiarize yourself with standard lab electronics and some common circuit elements: linear and nonlinear, passive and active.
+
#Understand fundamental electronics concepts, including:
+
#*current/voltage dividers
+
#*impedance & load
+
#*frequency response & transfer functions
+
#Analyze and build several circuits, which will be of use later.
+
  
This module is an extended self-study guide. Take this time to explore electronic circuits and really get to know all the features of our lab's instrumentation. It will pay off later. What you learn and do this week will underpin many of the experiments during the rest of the semester. Since you are mainly concerned with understanding your toolset and learning its uses and limitations, no formal write-up is necessary. However, many parts of this module work hand-in-hand with the [[Intro Electronics Lab Report]], so you will record data for that assignment.
+
==Overview==
 +
During the next lab exercise on measuring DNA melting curves, you will build and debug several electronic circuits. This bootcamp will introduce you to the electronic components and test equipment you will use. A short answer-book style writeup is required. Your writeup should include the practice problems and any '''bolded questions''' asked throughout the lab instructions. Don't forget the basics: report measurements with an appropriate number of significant figures, units, and uncertainty. Label plot axes.
  
==Roadmap and Milestones==
+
This bootcamp requires an understanding of basic circuits. If you need to review circuit concepts, start with the [[Electronics Primer]] page. If you have a lot of experience with electronics, ask one of the instructors about doing a stimulating mini-project instead of the mini-lab assignment.
#Practice making DC and AC signal measurements.
+
#Measure circuit input and output impedance and observe loading effects.
+
#Study the nonlinear characteristics of diodes, and learn how a photodiode responds to incident light.
+
#Test several unknown circuits to determine their transfer functions
+
  
==Lab Procedures==
+
==Problems==
===DC measurements===
+
====Question 1====
The simplest type of circuit is the direct current (DC) situation. This means simply that the
+
Consider the following circuit composed of a network of resistors:
applied voltage does not vary in time. Alternating current (AC) is discussed below in [[Electronics Module#Time-varying signals and AC measurements|Time-varying signals]]. Most
+
[[Image: Circuit1.png|center|250px|thumb]]
often, we separate complex signals into their DC and AC components (e.g., a sine wave with a
+
constant offset) to make analysis simpler.
+
  
To get started, wire the circuit shown in Figure 1 on your breadboard, where ''R''<sub>1</sub>=330&Omega;­­ and ''R''<sub>2</sub>=150&Omega;­. Using the power supply, set <math>V_{in}</math> to 5V. We'll make a few measurements of the behavior of ''R''<sub>2</sub> in the circuit. We want to know the voltage across it and the current through it.
+
'''a)''' Combining resistance values in parallel and in series, draw a simplified version of the circuit containing the given voltage source (10V) and one equivalent resistor. Label the equivalent resistance value.  
  
<center>[[Image:ElectronicsModuleFig-1.png|320 px|thumb|center|Figure 1: Resistive voltage divider circuit.]]</center>
+
'''b)''' Find the voltage values for the nodes <math>V_A</math> and <math>V_B</math> in the above diagram.
  
'''Measuring Voltage with the DMM:'''
+
====Question 2====
#First switch the DMM to voltage mode. Note: Make sure that the DMM test leads are plugged into the right connections. Remember, the correct configurations for current and for voltage/resistance measurements are different. See Sec. B.1
+
Referring to the circuit shown below, what value of <math>R_L</math> (in terms of <math>R_1</math> and <math>R_2</math>) will result in the maximum power being dissipated in the load?  
#Place the two leads across the terminals of ''R''<sub>2</sub> so that it is in parallel as shown in Figure 2.
+
#In voltage mode, the DMM has a very large equivalent resistance (ideally infinite) so that when placed in parallel with the circuit you are measuring, it will have minimum effect on the circuit under test.
+
To prove this:
+
(a) Assume first that the effective resistance of the DMM is small, such as 100­. What is
+
the combined resistance of the parallel combination of ''R''<sub>2</sub> and the DMM?
+
(b) Now assume the DMM's resistance is something very large, like 10M­&Omega;. Now what is the
+
resistance of the parallel combination of ''R''<sub>2</sub> and the DMM?
+
  
Why would a DMM in voltage mode with low input resistance be poor for voltage measurements? Hint: think about how it affects the voltage divider circuit in this case.
+
Hint: this is much easier to do if you first remove the load, and calculate the equivalent Thevenin output resistance <math>R_T</math> of the divider looking into the node labeled <math>V_{out}</math>. Then express <math>R_L</math> for maximal power transfer in terms of <math>R_T</math>.
  
Figure 2: Measuring voltage across ''R''<sub>2</sub>.
+
[[Image: VoltageDivider.jpg|center|200px|thumb|A voltage divider formed by <math>R_1</math> and <math>R_2</math> driving a resistive load <math>R_L</math>.]]
  
'''Measuring current with the DMM:'''
 
#Switch the DMM to current mode.
 
#Place the leads of the DMM in series with a device in the path that you want to measure, shown in Figure 3. For this type of measurement you actually need to break the circuit and insert the DMM.
 
#What would you expect to happen if you reverse the leads of the DMM? Reverse the leads and see if you were correct.
 
#The input resistance of the DMM in current mode is very small, ideally zero. Why is it important for the effective resistance of the DMM to be small in current mode? Again think about the effect on the circuit under test.
 
  
Calculate the resistance of ''R''<sub>2</sub> using Ohm's law and the current and voltage you measured. Also determine the percent error in the nominal resistance value:
+
====Question 3====
 +
In the following circuit, R = 10 k&Omega; and C = 10 nF.
 +
[[Image: Filter1.jpg|center|220px|thumb]]
  
<math>\epsilon = \frac{R_{exp}-R_{meas}}{R_{exp}} \times 100\% </math>
+
'''a)''' Find the transfer function <math>{V_{out} \over V_{in}}</math>.
  
Is this within the tolerance value indicated by the color bands on the resistor?
+
'''b)''' What type of filter is this? Justify your answer.
  
Figure 3: Measuring current through ''R''<sub>2</sub>.
+
'''c)''' What is the cutoff frequency of this filter? Write your answer in units of Hz. Remember that <math>\omega = 2 \pi f </math>.
  
 +
Note: You may find the pages on [[Impedance Analysis]] and [[Bode plots| Transfer Functions and Bode Plots]] helpful for this problem.
  
'''Measuring resistance with the DMM:'''
+
==Lab Exercises==
#Turn off power to the circuit, and disconnect the resistor you want to measure. This is important both in order to protect the DMM and because other parts of the circuit will affect the resistance you measure for one particular branch.
+
===Voltage divider===
#Switch the DMM to resistance mode.
+
[[Image:VdividerSchematic_idealsymbol.png|right|250px|thumb|Schematic diagram of voltage divider circuit.]]
#Place the leads in parallel with the resistor of interest (in this case ''R''<sub>2</sub>), as you did for the voltage measurement in Figure 2. Does this match your calculated resistance?
+
  
'''Resistor ''i-v'' characteristics'''
+
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 ''R<sub>1</sub>'' and ''R<sub>2</sub>''
  
The current-voltage (''i-v'') curve of a circuit element is simply a plot of the current through it as a function of applied voltage. In your lab notebook, sketch the ''i-v'' curve of the resistor you measured. What is the slope of this curve? (Ohm's law should make this very easy).
+
====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 &Omega; to 10 M&Omega;. Within that range, manufacturers only produce certain standard values. Check the supply bins or [http://ecee.colorado.edu/~mcclurel/resistorsandcaps.pdf this table] to see which values are available.  
  
===Impedance and load===
+
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.
From the previous section you already have a sense of the importance of considering the equivalent
+
impedances of your instruments { when making voltage or current measurements (or connecting
+
any two circuits together) we must always keep in mind the relative output and input impedance of
+
these components.
+
  
Figure 4: A voltage divider driving an LED.
+
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, <math>P=I^2R</math>. 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 &frac14; Watt. Ensure that the power dissipated by ''R<sub>1</sub>'' and ''R<sub>2</sub>'' does not exceed the maximum rating for ''V<sub>in</sub>'' values in the range of 0-15 V.
  
An easily observable example: Suppose you have a 5V power
+
You will use an oscilloscope and a volt meter to measure voltages in the circuit. The oscilloscope has an input impedance of 1 M&Omega;. Connecting the oscilloscope probe to a node of the circuit is equivalent to placing a 1 M&Omega; resistor between that node and ground. In circuits that use very large resistors, the current flowing into the oscilloscope can significantly distort measurements.
source, and need to drive an LED with approximately 2 volts. A
+
voltage divider may seem straightforward to use for this purpose,
+
but one must be careful when designing the circuit. To see why,
+
wire up the circuit in Fig. 4, first using relatively small resistors
+
(50-500­ range), then do it using resistors that are 100x larger.
+
* Why does the brightness of the LED change so drastically?
+
* Measure the voltage at the + node of the LED, before hooking it up, and after. Also, measure the current through the LED in each case. Does this help you understand what's going on?
+
* Calculate the output impedance of the driving voltage dividers in the two varieties you built.
+
  
A brief discussion:
+
Before building the divider circuit:
'''''Impedance''''' is a generalization of resistance (including capacitance and inductance), and we use the terms somewhat interchangeably here, but you should know
+
that they are not strictly speaking the same.
+
A '''''load''''' is a general way of referring to any part of a circuit that has a signal delivered to it, such as a measurement device, or a particular component. What is considered the "load" depends entirely on how the parts of the circuit are being considered. In the case of the circuit in Fig. 4 the LED is the load for the voltage divider. The output impedance of a circuit or device is seen "looking into" the output port of a circuit (i.e. between the output signal node and ground). Likewise, the input impedance of a device/circuit is the impedance seen between the input node and ground. The agent doing the "seeing" is whatever connects to the circuit in question { e.g. if an oscilloscope is hooked up to a circuit to do a measurement, that circuit "sees" the input impedance of the oscilloscope. Here, the voltage divider being used to drive the LED "sees" the LED's input impedance, and the LED "sees" the output impedance of the driving circuit.
+
  
===Photodiode ''i-v'' characteristics===
+
# '''Record the values you selected for R<sub>1</sub> and R<sub>2</sub>.'''
In this section, our aim is to measure and plot the current-voltage relationship for a diode in the transition region from non-conducting to conducting. After that, we also want to measure the
+
# '''Find the gain of the circuit, <math>^{V_{out}}/_{V_{in}}</math>'''
behavior of photodiodes (see Sec. A.3, which we'll use a number of times in the course as light
+
# '''Plot an ''I-V'' curve with ''I'' on the vertical axis and ''V<sub>in</sub>'' on the horizontal axis, over the range 0 V <  ''V<sub>in</sub>'' < 15 V.'''
detectors.  Start by covering the window of an FDS100 photodiode with black tape | with no light coming in, it is just a regular diode. Then we'll illuminate it to see its photodiode action.
+
#* A hand-drawn plot is fine.
(A) Construct the circuit shown in Fig. 5. You have at your disposal your DC power supply, and
+
# '''What is the maximum power dissipated in each resistor between 0 V <  ''V<sub>in</sub>'' < 15 V?'''
a variable resistance R (we recommend you use values of 100k­, 27k­, 8.2k­, 4.7k­, 2.2k­,
+
and 820­ (this is more straightforward than using a pot and measuring its value every time
+
you turn the knob).
+
  
Figure 5: Circuit for diode ''i-v'' measurements.
+
====Another practical issue: tolerance====
 +
[[Image:Museum_of_tolerance.jpg|right|thumb|The [http://www.museumoftolerance.com Museum of Tolerance] in Los Angeles, California contains many exhibits about the concept of tolerance.]]
  
(B) Given this circuit, come up with a scheme to measure the diode's i-v curve. Think about
+
It's easy enough to write down an exact value for a resistor like 15 k&Omega; or e<sup>&pi;</sup> &Omega; and analyze a circuit model that contains such a component. But fabricating a 15 k&Omega; or e<sup>&pi;</sup> &Omega; 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."<ref>http://www.merriam-webster.com/dictionary/nominal</ref> 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.
these questions to help guide you:
+
* Is current or voltage easier to measure?
+
* For a given setting of VS and R in Figure 5, how can you calculate the current and voltage through the diode by making a single measurement?
+
* What should you do differently for the forward and reverse bias regions of the curve? From what you know about diodes, how does their impedance in forward bias compare to that in reverse bias?
+
  
You'll want to generate a set of ID and VD values in your notebook to be used for creating
+
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 &mdash; 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.
the ''i-v'' plot. Then put a plot together using the program of your choice (MS Excel is fine).
+
(C) For photodiode behavior, uncover the window of the device, and aim a Fiber-Lite illuminator
+
at it. You should repeat the measurements you made at two or three levels of light intensity.
+
You can now combine your data to produce four ''i-v'' curves for this diode at different light
+
levels. Plot these on the same graph to see how incident light affects diode ''i-v'' characteristics. You'll need this data for the [[Intro Electronics Lab Report]].
+
  
===Time-varying signals and AC measurements===
+
Because the actual values of the resistors differ from the nominal values, the power dissipation in ''R<sub>1</sub>'' and ''R<sub>2</sub>'' 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.
Generally, we refer to signals that vary with time as AC signals (alternating current, as opposed to DC - direct current). When we leave DC behind, the DMM we've used so far is no longer enough to
+
observe what is happening. At this point, you'll need to get acquainted with the function generator (Sec. B.3) and the oscilloscope (Sec. B.4), to generate and record AC signals, respectively. We'll also start making extensive use of BNC cables and connectors.
+
First, let's look at how the resistive voltage divider with which you're already familiar behaves
+
with AC signals. Build the divider circuit as you did in Sec. 3.1, but use the function generator in place of Vin, and the oscilloscope in place of the DMM (Figure 6).
+
  
Figure 6: The familiar divider circuit, with a voltage measurement across ''R''<sub>2</sub>.
+
====Measure the resistors with a digital multimeter====
 +
[[Image:ElectronicsModuleFig-MM.png|125 px|thumb|right|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.  
  
#Set the FG503 frequency to 5kHz, and the waveform to sinusoid with no offset.
+
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 [http://en.wikipedia.org/wiki/Electronic_color_code this Wikipedia page].
#Set the voltage to 3V peak-to-peak (often written as 3V<sub>pp</sub>). Verify that the voltage is set as you intend with the scope, since the FG503 has no markings on its knob.
+
#Connect the waveform to your circuit.
+
#Use the other channel of the scope to measure ''V''<sub>pp</sub> across ''R''<sub>2</sub>. You can display both the input and output waveforms at the same time by using the scope's dual mode. Does this resistive voltage divider behave any differently at AC than it did at DC? What's the relationship between the output and input waveforms?
+
  
Now replace ''R''<sub>2</sub> with a capacitor in the 0.05-0.1 &mu;F range. Again use dual mode on the scope to see both the input and output waveforms. Qualitatively observe what happens to the output as you change the frequency of the input. What kind of circuit is this?
+
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.
  
==="Black-box" transfer functions===
+
# Plug two test leads into the DMM.
'''Assignment:''' For this part, you'll find prepared for you several metal boxes with "mystery" circuits wired up inside, labelled "A" through "D". Your goal is to determine their transfer functions.  
+
#* The black lead goes into the terminal labeled COM.
 +
#* The red lead plugs into different terminals depending on the measurement you are making. For resistance measurements, use the '''V &Omega;''' terminal. The '''A''' terminal is for current measurements.  
 +
# Select the resistance mode, which is labeled with an &Omega; symbol.
 +
# If you've inserted your resistors on the breadboard, remove them and connect the DMM leads to the resistor that you want to measure.
 +
# '''Measure your resistors and record their actual values.'''
  
==Circuit Components==
+
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 ''R<sub>1</sub>'' or ''R<sub>2</sub>''.
===Resistors===
+
Figure 7: Two ways potentiometers are shown on schematics.
+
  
The important things to know about resistors are: (1) value, (2) tolerance,
+
====Build the circuit====
and (3) power rating. The power rating indicates the maximum amount of
+
[[Image:Vdivider_Breadboard_zoom.png|right|thumb|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.]]
power a resistor can withstand, e.g. 1/4 watt, 1/2 W, etc. The value and the
+
[[Image:ElectronicsModuleFig-BB.png|right|thumb|Top view of a solderless electronic breadboard.]]
tolerance of the resistor is printed on the package in the form of a color-band
+
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.
code (see below).
+
'''''Potentiometers''''' (or "pots") are variable resistors with three leads. The
+
top half of Figure 7 shows a full schematic, but the lower picture is usually
+
used for compactness. The arm at lead #2 is called the wiper, and turning
+
the potentiometer knob controls its position. While the resistance between
+
#1 and #3 always remains the same, the knob varies the resistance between
+
leads #1 and #2 (and between #2 and #3). Another way to think of this is
+
as a variable voltage divider. The value between either #1 and #2 or #2 and
+
#3 can be varied from zero to the pot's full value.
+
  
'''Reading the Resistor Color Code'''
+
Before you go on, gather the items that you will need:
  
We provide this table here for your convenience, but you can always easily look this information
+
* solderless electronic breadboard,
up on the web. For instance, http://www.elexp.com/tips/clr code.gif contains a good table
+
* lengths of different colored wire to make jump wires,
of 4-band and 5-band resistor color codes, while this URL does it in an interactive clickable Java
+
* wire strippers (located in the lab station tool drawers).
applet: http://samengstrom.com/elec/resistor/index.html.
+
1. Orient the resistor so that the band that is most separated from the rest is on the right
+
(typically this is gold or silver).
+
2. On a four-band resistor, form the number from the ¯rst and second band by placing them as
+
the tens and ones place respectively (e.g. from the left a blue band then a green band means
+
65).
+
  
{| class="wikitable"
+
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.
|-
+
! scope="col" width="50px" | Color
+
! scope="col" width="100px" | First or Second Band (digit)
+
! scope="col" width="100px" | Third Band (multiplier)
+
! scope="col" width="100px" | Fourth Band (tolerance)
+
|-
+
| Black  || 0 || 1 ||
+
|-
+
| Brown  || 1 || 10<sup>1</sup> ||  1%
+
|-
+
| Red    || 2 || 10<sup>2</sup> ||  2%
+
|-
+
| Orange  || 3 || 10<sup>3</sup> ||
+
|-
+
| Yellow  || 4 || 10<sup>4</sup> ||
+
|-
+
| Green  || 5 || 10<sup>5</sup> || 0.5%
+
|-
+
| Blue    || 6 || 10<sup>6</sup> || 0.25%
+
|-
+
| Violet  || 7 || 10<sup>7</sup> || 0.10%
+
|-
+
| Gray    || 8 || 10<sup>8</sup> || 0.05%
+
|-
+
| White  || 9 || 10<sup>9</sup> ||
+
|-
+
| Gold    ||  || 0.1 || 5%
+
|-
+
| Silver  ||  || 0.01 || 10%
+
|}
+
  
 +
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.
  
Table 1: Table of 4-band resistor colors. For a five-band resistor, the first band becomes the 100s digit, the second band is the tens the third the ones, the fourth is the multiplier, and the fifth the tolerance.
+
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.
  
3. Multiply the resulting number by the multiplier from the third band (e.g. blue-green-red =
+
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.
65 £ 100 = 6.5k­).
+
4. The most common types of resistors are 5% and 1%, so for quick designation the bodies of
+
these resistors are often color coded (brown { 5% and blue { 1%).
+
  
===Capacitors===
+
# Mount R<sub>1</sub> 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.
Capacitors immediately make for much more interesting types of circuits than simple resistive
+
# Mount R<sub>2</sub> so that one of its leads is in the same terminal strip as one of the leads from R<sub>1</sub>. This will create an electrical connection between the two resistors.
networks, because (1) they can store energy and (2) their behavior is time-dependent.
+
An intuitive way to think about capacitor behavior is that they are reservoirs for electrical
+
charge, which take time to fill up or empty out. The size of the reservoir (the capacitance ''C'') is one of the factors that determines how quickly or slowly. Because of this, circuits with capacitors in them have time-dependent and frequency-dependent behavior. Capacitors act like open circuits at DC or very low frequencies, and like short circuits at very high frequencies.
+
  
===Diodes===
+
====Connect the power supply====
This is one of the simplest non-linear electronic devices, and is remarkably versatile. It can function as an electronic "valve", as a light-emitter (LED) or a light-detector (photodiode). Fig. 8 shows how they appear on schematics.
+
[[Image:ElectronicsModuleFig-PS.jpg|right|thumb|Triple-output DC power supply.]]
  
Figure 8: The diode symbol on a schematic.
+
Now it's time to complete the circuit by connecting a voltage source. You will use a laboratory power supply to drive 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. <ref>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>.</ref> The '''CH1''' and '''CH2''' outputs are adjustable. The '''CH3''' output always produces 5 volts with a current limit of 3 amps.  
  
A diode as an electrical "valve." In the simplest model, we can imagine
+
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.
a diode as a one-way electrical valve - it behaves almost as a short circuit (wire)
+
when a positive voltage is applied across it (called forward bias { shown in Fig. 8)
+
and as an open circuit with a negative voltage (reverse bias). As you might guess,
+
this is not the whole story, and is only true for relatively large voltages. You will
+
explore diode behavior in more detail, especially around the critical transition
+
region near 0 volts.
+
Photodiodes are optimized to work as a light detector by capturing photons
+
and converting them to electrical signals. This happens when photons absorbed in the semiconduc-
+
tor generate electron-hole pairs. Run in reverse bias, the current out of the photodiode is linearly
+
proportional to the light power striking the device.
+
Light-emitting diodes (LEDs) are designed to output light when current passes through
+
them. In this case, we have recombination of electron-hole pairs producing photons in the semicon-
+
ductor. Light is emitted in forward bias, and power output depends on the current °owing through
+
the device (what's the relationship? linear? quadratic?).
+
  
===Breadboards===
+
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.
Breadboards are a platform that allows for easily building prototype circuits without the need
+
for soldering. Their advantage is that parts can be added, swapped in and out, and different
+
configurations tested very easily and quickly. However, breadboards are bulky, pick up significant
+
excess noise from the environment, have large parasitic capacitance, as well as other limitations.
+
Once a circuit design is ¯nalized, it's typically made in a printed circuit board (PCB).
+
Figure 9 is an example of a breadboard, where each square represents a hole in which a wire
+
lead can be placed. The lines drawn over the board represent the basic connectivity. The two
+
outermost lines on each side represent power \buses" that are connected across all rows. In the
+
very center of the board is a divider that separates columns A-E and F-J. Each row is connected:
+
i.e. 1A-E are all connected to each other, as are 1F-J. However, A-E are electrically isolated from
+
  
Figure 9: A typical breadboard layout. Some breadboards have several panels such as these adjacent
+
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 &mdash; 3 amps from each of the supplies.  
to each other, with banana cable jacks for power and ground connections.
+
  
F-J. Finally, rows that are not in the power rail are also electrically isolated (these connections are
+
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.
explicitly shown only in the first five rows).
+
Of course, if connectivity is unclear, you can use the multimeter to test for electrical continuity
+
between two points on the board. Multimeter leads often don't fit in the holes directly, so you can
+
use a wire as a connector between the meter and the board.
+
An example of how to place a component in the breadboard is shown in the figure. A resistor
+
is depicted as a red box with two metal leads. There are many ways to place this resistor, and the
+
figure shows two of these ways.
+
  
Breadboard Tips and Techniques
+
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'''.
#Choose the right length of wire and clip leads to keep components and wires close to the
+
board. This has two benefits: (1) It makes debugging a circuit easier if you can easily see all
+
the connections and (2) It prevents pick-up of additional noise from the environment, since
+
big loops of conducting material make for good antennas.
+
#Utilize the power rails, e.g. use one each for the positive supply voltage and negative supply
+
voltage (referred to as +Vcc and ¡Vcc), and one for ground.
+
#Create a common ground. If you use a power supply for DC power, a function generator
+
for an AC supply, and measure using the oscilloscope, then you will have four independent
+
grounds that may not be at the same potential unless connected together (the four grounds
+
are: circuit ground, FG ground, PS ground, and scope ground).
+
# Always turn off power when building and making any changes to the circuit. Also, when
+
measuring resistance, power off the circuit and disconnect the resistor being measured.
+
#As a rule of thumb, always connect the ground lead of an instrument to the circuit ¯rst before
+
the live lead.
+
#In future labs, we will work with Integrated Circuit (IC) packages. Static electricity can
+
destroy ICs. To prevent damage, ground yourself before handling them by touching a metal
+
object, e.g. a metal case or metal bench top.
+
  
===Operational Amplifiers===
+
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).  
In the upcoming lab module we will start using integrated circuits (ICs) known as operational
+
amplifiers, or op-amps. They are an enormously versatile circuit component, and come in hundreds
+
of special varieties, built to have particular characteristics and trade-offs. We will use some very
+
common general-purpose op-amp, of which a typical example is the LM741.
+
Figure 10: A basic inverting op-amp
+
circuit.
+
Every op-amp manufacturer provides a datasheet for every IC they make, and you should always familiarize yourself with it. It provides information on everything from
+
pin and signal connections, to special features, limitations,
+
or applications of a particular IC. We have copies of the
+
datasheets available in the lab for the op-amps we are using, and you'll want to refer to them regularly as you work.
+
As you'll see in lecture, a typical op-amp circuit looks
+
something like Fig. 10. This is called the inverting configuration, because the input is connected to the inverting
+
({) input. As you might guess, the output signal is the
+
negative of the input, times a gain factor set by the circuit.
+
The LM741 package of course does not look like the
+
triangle drawn above. Instead it looks more like Figure 11. Plugged into a breadboard, the two
+
rows of pins straddle a trough.
+
  
Figure 11: The pin assignments of the LM741 in a DIP-8 package.
+
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.  
  
Besides the ({) and (+) (inverting and non-inverting) inputs, an op-amp needs DC power
+
# Use the cutting jaws of the wire stripper to trim the resistor leads so that the component bodies will be close to the board.  
connections, which is what enables it to be an active circuit element. These power connections are
+
#* In addition to being untidy, leads that are too long may make unintentional contact with the metal under the breadboard.
usually omitted on a schematic (as in Fig. 10), but always shown on the datasheet (in Fig. 11 they
+
#* Don't cut the leads too short either, or they may not make good contact with the tie point.
are pins 4 and 7). Typically §15 volts is used, but you should check the datasheet to be sure.
+
# Mount the resistors by pressing their leads into tie points in the field.
Every IC has a marking on the package to indicate Pin 1, and the datasheet shows the relative
+
# Run jump wires to connect the divider to the power and ground bus strips.
positions of the other pins. On your LM741 there is a dot near Pin 1 (or a semi-circle on one end
+
#* 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.
of the chip, as in the figure to the right). nc on the datasheet stands for No Connection.
+
#* Use the right length of wire. The right length of wire is the shortest length of wire that satisfies the previous guideline.
Important: ICs are sensitive to static electricity discharges. Your body can easily store
+
#* Use the bus strips to distribute power supplies and ground as described in the text above.
enough charge to damage an IC, especially on a dry winter day. To prevent this, always make
+
sure to touch the grounded metal case of an instrument to dissipate the charge. Use caution when
+
handling the chips.
+
  
==Instruments==
+
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 [[Optics_Bootcamp#Orientation|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 brief descriptions in this section will give you an introduction to each instrument. You can
+
always refer to the manuals available in the lab for more details.
+
  
===Digital Multimeter (DMM)===
+
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.
A very versatile tool, the multimeter serves as a voltmeter, ammeter, ohmmeter, and has a number
+
of other functions as well (see Figure 12(b)). Modern DMMs, such as our Fluke 111, are highly
+
intuitive to use: select the function you want with the central mode dial, plug the leads into the
+
appropriate connectors, and measure. The black (negative) lead always plugs into com while the
+
red (positive) lead is adjusted depending on the function. The voltage and current measurement
+
modes of the DMM are very different (you'll see why), so don't forget to reconnect the leads.
+
In alternating current (AC) mode, the multimeter gives root-mean-square (RMS) measurements,
+
which are useful when you know what the waveforms are. We'll discuss RMS later in the course.
+
  
===DC Power Supply===
+
====Measure voltage ''V<sub>out</sub>''====
The power supply we will use is a Tektronix PS503, shown in Figure 12(a). It has one ¯xed
+
[[Image:VoltageMeasurementZoomText.png|250 px|thumb|Test leads in parallel with ''R<sub>2</sub>''.]]
5V output and two adjustable ones. The (+) and ({) outputs have adjustable current limits
+
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.
and voltages up to §20V can be set either independently, or together (using the dual tracking
+
knob). The white output button on the upper right allows power to flow to the outputs: always
+
remember to turn this off or disconnect it when rewiring your circuits.
+
Note that the black common voltage connector is \°oating," i.e. not directly connected to
+
ground, and can't be assumed to have zero voltage. You'll want to connect it to the white connector
+
of the fixed 5V supply, which is tied to ground.
+
(a) Tektronix PS503A. (b) Fluke 111.
+
Figure 12: (a) The DC power supply and (b) the digital multimeter used in our lab
+
  
===Function Generator===
+
#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 '''V&Omega;'''.  
Figure 13: An FG503 function generator.
+
#Connect the test leads across the terminals of ''R<sub>2</sub>''.
(In this image, the BNC signal connectors
+
#'''Record the voltage shown on the DMM for each input voltage ''V<sub>in</sub>'' = 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.
are capped.)
+
A function generator does what its name says | gen-
+
erates signal waveforms for standard functions: sinu-
+
soids, triangles, square waves. The FG503 is very
+
basic. Its frequency range is about 0.1Hz to 300kHz,
+
and amplitude range from about §0.35V to §10.0V.
+
It can output waveforms with and without offset. The
+
large central dial in Figure 13 is the main frequency
+
knob, which sets the output frequency together with
+
the multiplier knob (labeled). Be warned that the
+
large dial's markings can be fairly inaccurate { al-
+
ways verify the actual output frequency with an os-
+
cilloscope or spectrum analyzer.
+
Note that higher-end function generators, such as
+
the DS-345 from Stanford Research Systems, have
+
much more precise controls for waveform frequency,
+
amplitude, and o®set, and may have other advanced
+
features like sweeping frequency, generating nonstan-
+
dard or arbitrary waveforms, and modulation.
+
  
===Oscilloscope===
+
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&Omega; resistor in parallel with ''R<sub>2</sub>''.
An oscilloscope is designed for observing signal waveforms that change faster than can be usefully
+
seen on a DMM. Most often, the signals observed are periodic, and the scope is effectively a "time
+
magnifier" letting you stretch and compress the timebase (as well as the waveform magnitude) for
+
convenient viewing.
+
Ours is an OS-5020 model made by EZ Digital, the front panel of which is shown in Figure 14.
+
It's about as basic as a two-channel analog scope can be. Below is a brief description of the most
+
important controls:
+
Figure 14: The OS-5020 oscilloscope.
+
  
CH1, CH2: channel inputs (2) - Signals connect to these via BNC cables. Above each input
+
#'''Add the 1 k&Omega; resistor in parallel with ''R<sub>2</sub>'' and measure the voltage across ''R<sub>2</sub>''. By what percentage did the measurement change?'''
is a three-position input coupling switch (ac - gnd - dc). Understanding the three settings
+
#Remove the 1 k&Omega; resistor and the DMM from the circuit.
is crucial to knowing how the scope is measuring incoming signals.
+
 
VOLTS/DIV: channel gain knobs (2) - Set the \magni¯cation" of the waveform in the verti-
+
====Measure current ''I''====
cal axis. The scale around the knob tells you how many volts each square of the grid represents
+
[[Image:CurrentMeasurementZoomText.png|250 px|thumb|right|DMM test leads connected in series with ''R<sub>2</sub>''.]]
at a given magni¯cation.
+
In order to measure current, you must move the red test lead from the '''V&Omega;''' 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.
MODE select - Choose whether the scope is displaying the signal on Ch. 1, Ch. 2, both simul-
+
* ''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) [http://www.fluke.com/fluke/m2en/digital-multimeters/Fluke-110.htm?PID=55988 Fluke 111] and [http://www.fluke.com/fluke/m2en/digital-multimeters/Fluke-115.htm?PID=55993 Fluke 115] multimeters.
taneously (dual), or their sum (add).
+
* For this section of the electronics mini-lab, feel free to swap R<sub>1</sub> and R<sub>2</sub> for smaller-value resistors, so the current flowing through R<sub>2</sub> 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.
POSITION knobs (2 vert., 1 horiz.) - Set the zero-position of the trace for each channel, and
+
 
the time-trace to enable accurate measurements.
+
# Switch the DMM to DC current mode and configure the leads for current measurement.
TIME/DIV: timebase selector - Like channel gain, but for the horizontal (time) axis, this sets
+
#* Move the red lead to the receptacle marked '''A'''.
how much time each square of the grid represents. In its rightmost position, it selects \X-Y
+
#* Positive current flows into the red lead and out of the black.
mode", which plots the two input channels one vs. the other, with no time dependence.
+
# Place the leads of the DMM in series with R<sub>2</sub> as show in the image at right.
Most of the other controls deal with triggering, which refers to synchronizing the scan of the
+
# '''Record the current through the circuit at each input voltage ''V<sub>in</sub>'' = 0, 2.5, 5, 10 and 15 V'''
display with the input waveform. You will get a feel for these as you use the instrument in lab.
+
# '''Plot the measured ''I-V'' curve on the same set of axes as the calculated curve.'''
You'll notice that the scope only measures voltages { there are no modes for directly measur-
+
 
ing current or resistance. It's also important to remember that scope measurements are always
+
 
referenced to ground. The shield (black lead when using grabber wires) of the BNC connector is
+
===RC low-pass filter===
hard-wired to ground. This means you can't use just one channel of a scope to measure the voltage
+
[[Image:LowPassFilter.png|275 px|thumb|RC filter circuit schematic.]]
between two non-ground nodes in a circuit.
+
In this part of the lab, you will replace R<sub>2</sub> 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 C<sub>1</sub>.
 +
 
 +
# '''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.
 +
# '''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]].)
 +
# Replace ''R<sub>2</sub>'' with a capacitor of the selected value.
 +
 
 +
[[Image:Filter_Breadboard_Zoom.jpg|300 px|thumb|RC filter on a breadboard.]]
 +
 
 +
====Replace the power supply with a function generator====
 +
[[Image:140127_FunctionGenerator.png|300 px|right|thumb|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.
 +
 
 +
# Disable the power supply and disconnect it from the circuit.
 +
# 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.
 +
# 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====
 +
[[Image:140127_Oscilloscope_LowPassRC.png|300 px|thumb|right|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 [http://www.tequipment.net/pdf/Rigol/DS1000E_DS1000D_series_manual.pdf Rigol DS1052e] and [http://micromir.ucoz.ru/Oscil/Atten/ADS1000_User_Manual.pdf ATTEN ADS1022c] oscilloscopes.
 +
 
 +
# Get two oscilloscope probes from the cable rakes on the wall next to the time machine poster.
 +
# Connect the oscilloscope to the circuit.  '''CH2''' will monitor ''V<sub>in</sub>'', '''CH1''' ''V<sub>out</sub>''.
 +
#* Connect the BNC connector of the first oscilloscope probe to the '''CH1''' oscilloscope input. Connect the probe to ''V<sub>out</sub>'', 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 ''V<sub>in</sub>'' from the function generator.
 +
# 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.
 +
# 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====
 +
 
 +
# 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.
 +
# Use the "Freq" tab on the signal generator to select a frequency of 10 Hz.
 +
# Adjust the horizontal scale on the oscilloscope to display about 3 periods of the sine wave.
 +
# Record the peak-to-peak amplitude of V<sub>out</sum> and V<sub>in</sub>.
 +
#* The oscilloscope has a built-in feature for measuring peak-to-peak voltages that will make your life much easier.
 +
#*# Press the "Measure" button in the "Menu" top panel
 +
#*# Choose the channel of interest under "Source"
 +
#*# Choose "Vp-p".
 +
# Repeat the measurement of V<sub>out</sub> and V<sub>in</sub> at frequencies of 100 Hz, 1 KHz, 10 KHz, 100 KHz, 1 MHz, and several frequencies in the vicinity of the cutoff frequency.
 +
# Make a Bode plot
 +
#* '''Plot the measured values of <math>\frac{V_{out}}{V_{in}}</math> 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.
 +
 
 +
# Use BNC cables to connect the function generator and oscilloscope to a box.
 +
# Set the scope to trigger from the input channel.
 +
# 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.
 +
# '''Generate the Bode gain plot and the Bode phase plot for each of the four black (blue) boxes: A through D.'''
 +
# '''Draw the circuit inside each box.'''
 +
# Optional: '''In Matlab, use <tt>nlinfit</tt> to fit parameters of a transfer function for each circuit.'''
 +
 
 +
 
 +
===Photodiode ''I-V'' curve===
 +
[[Image:PhotodiodeSchematic_v2.png|250 px|thumb|Photodiode measurement circuit schematic diagram. AC power supply symbol V<sub>1</sub> represents a function generator. Power supply to the ADS622 not shown.]]
 +
In this part of the lab, you will examine how light falling on a photodiode affects its ''I-V'' characteristic. You will use a function generator and an instrumentation amplifier to make simultaneous measurements of voltage across and current through the photodiode and plot an ''I-V'' curve on an oscilloscope.
 +
 
 +
In the preceding sections of this lab, you used an oscilloscope to plot voltage signals versus time. The oscilloscope also has an X-Y mode. In X-Y mode, the oscilloscope plots channel 1 on the horizontal axis versus channel 2 on the vertical axis. Using X-Y mode, it is possible to use an oscilloscope to plot an ''I-V'' curve.
 +
 
 +
''I-V'' curves usually show current on the vertical axis and voltage on the horizontal axis. Using the oscilloscope to plot ''V<sub>D1</sub>'' on the horizontal axis is easy. Just hook the channel 1 probe across the photodiode.
 +
 
 +
It is not as straightforward to plot ''I<sub>diode</sub>''. The oscilloscope measures voltage, so first it is necessary to convert ''I<sub>D1</sub>'' to a voltage. This can be done by placing a resistor (R<sub>1</sub>) in series with the photodiode. The voltage across R<sub>1</sub> is proportional to the current through the photodiode.  
 +
 
 +
It's a little harder than you might anticipate to measure the voltage across R<sub>1</sub> with an oscilloscope. You might be tempted to hook the channel 2 probe across R<sub>1</sub>. Unfortunately, the ground leads of the oscilloscope probes are wired together. Connecting the probe in this way causes a short from R<sub>1</sub> to ground. Because the ground leads of the probes are wired together, it is a very good idea to hook probe ground clips only to the ground node of your circuit.
 +
 
 +
An instrumentation amplifier produces an output equal to the difference between the voltages at its two input terminals. The instrumentation amplifier shown in the schematic diagram computes ''V<sub>R1</sub>'' = ''V<sub>in</sub>'' - ''V<sub>D1</sub>''. The input terminals of the instrumentation amplifier have very high input impedance, so current flowing into the instrumentation amplifier inputs is negligible. There are many kinds of instrumentation amplifiers available. In this lab, you will use an integrated circuit (IC) instrumentation amplifier, part number AD622 manufactured by Analog Devices. [[http://www.analog.com/static/imported-files/data_sheets/AD622.pdf Click here]] for the AD622 data sheet.
 +
 
 +
[[Image:AD622Pinout.png|thumb|250px|right]]
 +
The instrumentation amplifier comes in an 8 pin plastic package called a dual-inline package (DIP). The leads on the package have the same spacing as the tie points on the breadboard, so the amplifier can be inserted directly into a breadboard. The arrangement of component leads for the instrumentation amplifier is shown at right.
 +
 
 +
====Construct the photodiode circuit====
 +
[[Image:PhotodiodeWith_AD622DiffAmp.png|300 px|thumb|Photodiode measurement circuit with AD622 instrumentation amplifier]]
 +
 
 +
# Make sure your power supply is disabled.
 +
# Mount the instrumentation amplifier so that it straddles the notch.
 +
# Connect the signals as shown in the schematic to pins 2 and 3. The output is pin 6.
 +
#* Use a 10K&Omega; resistor for R1.
 +
#* Connect the REF signal on the amplifier (pin 5) to ground.
 +
# Configure the power supply for series mode.
 +
# Set the power supply for +/- 15V.
 +
#* In series mode, the negative terminal of the left supply will be at -15V. The positive terminal of the left supply and the negative terminal of the right supply will be connected together inside the power supply. This is the ground potential. The plus terminal of the right supply will be at +15V.
 +
# Connect the power supply leads to the +V<sub>S</sub> and -V<sub>S</sub> pins: pins 7 and 4 will be at +15V and -15V, respectively.
 +
 
 +
====Procedure====
 +
 
 +
# Connect the function generator to provide ''V<sub>in</sub>'' to the circuit. Configure the function generator to apply a triangle wave between &plusmn; 1-3 V at 1 kHz.
 +
# Connect Channel 1 of the oscilloscope to ''V<sub>d</sub>''.
 +
# Connect Channel 2 of the oscilloscope to  ''V<sub>R1</sub>'' (the output of the instrumentation amplifier).
 +
# Set the oscilloscope to X-Y display mode.
 +
# With the photodiode covered, save the curve to a USB memory stick ([[Save_the_curve_to_a_USB_memory_stick|see abbreviated instructions]]).
 +
# Load the curve into Matlab and plot the ''I-V'' curve
 +
#* Remember to convert the resistor voltage to current.
 +
# Repeat the measurement for several intensities of light illuminating the diode.
 +
# '''Plot the curves for all light intensities on the same set of axes.'''
 +
# '''What operating condition of the photodiode is best for measuring light intensity?'''
 +
 
 +
[[Image:Photodiode_Illuminated4x.gif|thumb|250px|center|Example photodiode ''I-V'' curves.]]
 +
 
 +
<references />
  
===LabVIEW and the data acquisition (DAQ) system===
 
LabVIEW is a software and hardware system designed to perform the functions of many standard
 
bench-top measurement devices. The hardware provides signal input and output for the PC (see
 
Fig. 16, while the software runs what are called \virtual instruments" (VIs), resulting in a very
 
general-purpose data collection and processing platform. In addition to collecting data, LabVIEW
 
can be used to control instruments, for example via a GPIB interface.
 
Figure 15:
 
You will use a number of di®erent VIs throughout the course that have been
 
written for you. While they will all perform di®erent functions, they all have
 
common run/stop controls in the upper left hand corner, as shown in Fig. 15.
 
The arrow at the left is used to start each VI, and the red "stop" button will halt
 
it once it is running.
 
The great advantage of LabVIEW is its breadth and °exibility. The major disadvantage is that
 
when performance is important (high speed, low noise, high precision, etc.) dedicated instruments
 
quickly outperform it.
 
Figure 16: The data acquisition (DAQ) connection board, used for signal input and output with
 
LabVIEW. The analog input channels are in two rows, labeled ach0 through ach7, and ach8
 
through ach15. The two output channels are to their right, labeled dac0out and dac1out, one
 
above the other.
 
 
{{Template:20.309 bottom}}
 
{{Template:20.309 bottom}}

Latest revision as of 18:46, 7 April 2017

20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


Photo by Brendan Dolan-Gavitt

Overview

During the next lab exercise on measuring DNA melting curves, you will build and debug several electronic circuits. This bootcamp will introduce you to the electronic components and test equipment you will use. A short answer-book style writeup is required. Your writeup should include the practice problems and any bolded questions asked throughout the lab instructions. Don't forget the basics: report measurements with an appropriate number of significant figures, units, and uncertainty. Label plot axes.

This bootcamp requires an understanding of basic circuits. If you need to review circuit concepts, start with the Electronics Primer page. If you have a lot of experience with electronics, ask one of the instructors about doing a stimulating mini-project instead of the mini-lab assignment.

Problems

Question 1

Consider the following circuit composed of a network of resistors:

Circuit1.png

a) Combining resistance values in parallel and in series, draw a simplified version of the circuit containing the given voltage source (10V) and one equivalent resistor. Label the equivalent resistance value.

b) Find the voltage values for the nodes $ V_A $ and $ V_B $ in the above diagram.

Question 2

Referring to the circuit shown below, what value of $ R_L $ (in terms of $ R_1 $ and $ R_2 $) will result in the maximum power being dissipated in the load?

Hint: this is much easier to do if you first remove the load, and calculate the equivalent Thevenin output resistance $ R_T $ of the divider looking into the node labeled $ V_{out} $. Then express $ R_L $ for maximal power transfer in terms of $ R_T $.

A voltage divider formed by $ R_1 $ and $ R_2 $ driving a resistive load $ R_L $.


Question 3

In the following circuit, R = 10 kΩ and C = 10 nF.

Filter1.jpg

a) Find the transfer function $ {V_{out} \over V_{in}} $.

b) What type of filter is this? Justify your answer.

c) What is the cutoff frequency of this filter? Write your answer in units of Hz. Remember that $ \omega = 2 \pi f $.

Note: You may find the pages on Impedance Analysis and Transfer Functions and Bode Plots helpful for this problem.

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:

  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.
    • 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.

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.

Connect the power supply

Triple-output DC power supply.

Now it's time to complete the circuit by connecting a voltage source. You will use a laboratory power supply to drive 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).

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.

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.

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. Record the current through the circuit at each input voltage Vin = 0, 2.5, 5, 10 and 15 V
  4. Plot 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.

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</sum> 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
    • Plot 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.
  6. Optional: In Matlab, use nlinfit to fit parameters of a transfer function for each circuit.


Photodiode I-V curve

Photodiode measurement circuit schematic diagram. AC power supply symbol V1 represents a function generator. Power supply to the ADS622 not shown.

In this part of the lab, you will examine how light falling on a photodiode affects its I-V characteristic. You will use a function generator and an instrumentation amplifier to make simultaneous measurements of voltage across and current through the photodiode and plot an I-V curve on an oscilloscope.

In the preceding sections of this lab, you used an oscilloscope to plot voltage signals versus time. The oscilloscope also has an X-Y mode. In X-Y mode, the oscilloscope plots channel 1 on the horizontal axis versus channel 2 on the vertical axis. Using X-Y mode, it is possible to use an oscilloscope to plot an I-V curve.

I-V curves usually show current on the vertical axis and voltage on the horizontal axis. Using the oscilloscope to plot VD1 on the horizontal axis is easy. Just hook the channel 1 probe across the photodiode.

It is not as straightforward to plot Idiode. The oscilloscope measures voltage, so first it is necessary to convert ID1 to a voltage. This can be done by placing a resistor (R1) in series with the photodiode. The voltage across R1 is proportional to the current through the photodiode.

It's a little harder than you might anticipate to measure the voltage across R1 with an oscilloscope. You might be tempted to hook the channel 2 probe across R1. Unfortunately, the ground leads of the oscilloscope probes are wired together. Connecting the probe in this way causes a short from R1 to ground. Because the ground leads of the probes are wired together, it is a very good idea to hook probe ground clips only to the ground node of your circuit.

An instrumentation amplifier produces an output equal to the difference between the voltages at its two input terminals. The instrumentation amplifier shown in the schematic diagram computes VR1 = Vin - VD1. The input terminals of the instrumentation amplifier have very high input impedance, so current flowing into the instrumentation amplifier inputs is negligible. There are many kinds of instrumentation amplifiers available. In this lab, you will use an integrated circuit (IC) instrumentation amplifier, part number AD622 manufactured by Analog Devices. [Click here] for the AD622 data sheet.

AD622Pinout.png

The instrumentation amplifier comes in an 8 pin plastic package called a dual-inline package (DIP). The leads on the package have the same spacing as the tie points on the breadboard, so the amplifier can be inserted directly into a breadboard. The arrangement of component leads for the instrumentation amplifier is shown at right.

Construct the photodiode circuit

Photodiode measurement circuit with AD622 instrumentation amplifier
  1. Make sure your power supply is disabled.
  2. Mount the instrumentation amplifier so that it straddles the notch.
  3. Connect the signals as shown in the schematic to pins 2 and 3. The output is pin 6.
    • Use a 10KΩ resistor for R1.
    • Connect the REF signal on the amplifier (pin 5) to ground.
  4. Configure the power supply for series mode.
  5. Set the power supply for +/- 15V.
    • In series mode, the negative terminal of the left supply will be at -15V. The positive terminal of the left supply and the negative terminal of the right supply will be connected together inside the power supply. This is the ground potential. The plus terminal of the right supply will be at +15V.
  6. Connect the power supply leads to the +VS and -VS pins: pins 7 and 4 will be at +15V and -15V, respectively.

Procedure

  1. Connect the function generator to provide Vin to the circuit. Configure the function generator to apply a triangle wave between ± 1-3 V at 1 kHz.
  2. Connect Channel 1 of the oscilloscope to Vd.
  3. Connect Channel 2 of the oscilloscope to VR1 (the output of the instrumentation amplifier).
  4. Set the oscilloscope to X-Y display mode.
  5. With the photodiode covered, save the curve to a USB memory stick (see abbreviated instructions).
  6. Load the curve into Matlab and plot the I-V curve
    • Remember to convert the resistor voltage to current.
  7. Repeat the measurement for several intensities of light illuminating the diode.
  8. Plot the curves for all light intensities on the same set of axes.
  9. What operating condition of the photodiode is best for measuring light intensity?
Example photodiode I-V curves.
  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>.

</div>