Difference between revisions of "DNA Melting Part 1: Measuring Temperature and Fluorescence"

From Course Wiki
Jump to: navigation, search
m (Data Analysis: I fail at wiki markup!)
m (Wire the Peltier device and test it)
 
(495 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Lab Manuals]]
 
 
[[Category:20.309]]
 
[[Category:20.309]]
 
[[Category:DNA Melting Lab]]
 
[[Category:DNA Melting Lab]]
 
{{Template:20.309}}
 
{{Template:20.309}}
  
{|
+
<center>
|- valign="top"
+
| __TOC__
+
| [[Image:DNA Melting Apparatus Picture.jpg|thumb|center|top|500px|DNA Melting Apparatus]]
+
|}
+
 
+
==Introduction==
+
 
+
[[Image:Example Melting Curve.jpg|thumb|right|250px|Example DNA melting curves showing the effect of varying ionic strength. The data has been filtered to reduce noise.]]
+
[[Image:Example Melting Curve Derivative.jpg|thumb|right|250px|Differentiating the melting curve simplifies finding T<sub>m</sub>.]]
+
In this lab, you will measure the melting temperature of several DNA samples to determine the effect of sequence length, ionic strength and complementarity. A common application of this technique exploits the length dependence of DNA melting temperatures to examine PCR products in order to determine whether a desired sequence was successfully amplified. 
+
 
+
The measurement technique utilizes a fluorescent dye that binds preferentially to double stranded DNA (dsDNA). This characteristic of the dye allows the relative concentration of dsDNA to be determined by measuring the intensity of fluorescent light given off by an excited sample.
+
 
+
The DNA melting apparatus you will construct consists of five major subsystems: excitation, fluorescence measurement, heating, temperature sensing, and data acquisition. Major components of these subsystems include an LED, a photodiode and amplifier, a thermoelectric cooler (TEC), a resistance temperature detector (RTD), and a PC data acquisition system.
+
 
+
The goal of your time in the lab will be to measure fluorescence intensity versus temperature for each of the samples over a range of about 90°C to room temperature. This will provide a basis for estimating the melting temperature, T<sub>m</sub> of each sample. (T<sub>m</sub> is defined as the temperature where half of the DNA in the sample remains hybridized.)
+
 
+
You will measure samples of both known and unknown composition. THe samples may vary in length, complementarity (complete match, single mismatch, or complete mismatch), or salt concentration. You will compare the data you gather to theoretical models and you will attempt to identify unknown samples.
+
 
+
Links to websites, videos, and academic papers about DNA melting and PCR can be found here: [[Resource list:DNA melting and PCR]]
+
 
+
===Overview of the apparatus===
+
 
+
SYBR Green I is a fluorescent dye with peak sensitivity to 498 nm blue light. The dye emits green light with a wavelength of 522 nm.<ref name="SYBR Green Datasheet">[http://www.sigmaaldrich.com/sigma-aldrich/datasheet/s9430dat.pdf SYBR Green I online datasheet]</ref> You can easily observe this – a room-temperature sample of dsDNA and SYBR green looks yellow from the combination of blue excitation and green fluorescence. At higher temperatures, when there is no dsDNA to bind the dye, the sample will appear blue or clear. In order to produce a melting curve, your apparatus will measure the amount of fluorescent emission from the SYBR Green dye over a range of temperatures.
+
 
+
Temperature will be measured by an RTD, which is a kind of resistor that predictably varies in value with temperature. Fluorescence intensity will be measured by a photodiode (and associated optical system). The sample will be heated by a thermoelectric device. A computer data acquisition system will record the signals from the photodiode and RTD. These signals must be processed to convert them from raw quantities to temperature and relative dsDNA concentration. The melting temperature, T<sub>m</sub> can be estimated from a graph of this data or its derivative.
+
 
+
<center>[[Image:DNA Melting Block Diagram.jpg|frame|The DNA melting apparatus includes excitation, fluorescence measurement, temperature sensing, and data acquisition functions.]]</center>
+
 
+
As shown in the diagram, an aluminum heating block holds a cuvette containing the sample under test. The sample contains a combination of DNA, SYBR Green, and salt. In addition to being a convenient holder, the block transfers heat to the cuvette and sample, while also allowing the block's temperature to be measured without affecting the block temperature. (What are the practical problems with this approach?)
+
 
+
Blue light from an LED illuminates one side of the cuvette. A 470 nm bandpass optical filter shapes the output spectrum of the LED so that only the desired wavelengths of light fall on the sample.
+
 
+
A photodiode placed at 90 degrees to the LED source detects the green light emitted by SYBR Green bound to the minor groove of dsDNA. The photodiode is placed behind a 515 nm long pass optical filter to ensure that only the fluorescent light given off by the sample is detected.
+
 
+
Since photodiodes produce only a very small amount of current, it will be necessary to build a very high gain transimpedence amplifier to produce a signal that is measurable by the PC data acquisition (DAQ) cards. Photodiode amplifiers are particularly challenging because many of the non-ideal characteristics of op amps become apparent at high gain.
+
 
+
An RTD attached to the heating block and wired to a voltage divider provides an indication of temperature. The temperature of the heating block will be a proxy for the sample temperature. It is not a perfect proxy, however, and you will need to determine the transfer function between the temperature you measure on the outside of the block, and the temperature inside the cuvette, say, in the middle of your DNA sample.
+
 
+
The DAQ digitizes the amplified photodiode and RTD signals. A LabVIEW virtual instrument (VI) records the signals over time so that data from the DNA melting VI can be saved to a file. The file can be loaded into Matlab for analysis, or if you prefer, Python or equivalent.
+
 
+
The LabVIEW VI also implements a lock-in amplifier.  This is done by driving the LED at a desired carrier frequency, then performing the necessary mixing and filtering in software.  The lock-in amplifier greatly improves signal quality by reducing the effect of 1/f noise on the signal. 
+
 
+
===Objectives and learning goals===
+
 
+
*Build an optical system for exciting the sample with blue light and gathering the fluorescence output on the photodiode.
+
*Measure light intensity with a photodiode.
+
*Build a heating system to reliably heat and cool your sample.
+
*Measure temperature with an RTD and an appropriate transfer function.
+
*Implement a high gain transimpedance amplifier.
+
*Use a lock-in amplifier to reduce noise.
+
*Record dsDNA concentration versus temperature curves for several samples.
+
*Analyze the data to find the dsDNA fraction as a function of temperature.
+
*Estimate T<sub>m</sub> from your data.
+
*Compare the measured curves with theoretical models.
+
*Identify unknown DNA samples.
+
 
+
===Suggested readings and references===
+
 
+
[http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=484200 Zipper H, Brunner H, Bernhagen J, Vitzthum F. Investigations on DNA intercalation and surface binding by SYBR Green I, its structure determination and methodological implications. ''Nucleic Acids Res.'' 2004;'''32''':e103–10.]
+
 
+
==Lab procedure==
+
 
+
===Roadmap ===
+
 
+
#Build an optical system containing the LED, heating block, sample, photodiode, filters, and lenses.
+
#Hook up a three terminal voltage regulator to create an electrical power supply for the LED.
+
#Build, test, and calibrate the temperature-sensing circuit.
+
#Build an amplification/offset circuit for the DNA fluorescence signal.
+
#Troubleshoot and optimize your system.
+
#Heat a samples of DNA with SYBR Green dye and record DNA melting curves both as the samples heat up, and as they cool.
+
#Analyze the data: For your known samples, compare your observations to theoretical models. Identify your unknown samples.
+
 
+
===Optical system===
+
 
+
<center>[[Image:DNA Melting Optical System Diagram.jpg|700 px|thumb|center|DNA Melting Optical System Diagram]]</center>
+
 
+
The optical system consists of an LED, excitation filter, sample cuvette, heating block, emission filter, photodiode, optional lenses, and associated mounting hardware. Construct your system on an [http://www.thorlabs.com/thorProduct.cfm?partNumber=MB1224 optical breadboard]. The breadboard has a grid of tapped holes for mounting all kinds of optical and mechanical hardware. [http://www.thorlabs.com ThorLabs] manufactures most of the hardware stocked in the lab. A few of the components you will certainly use include:  [http://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=1266 1/2" diameter posts], [http://www.thorlabs.com/thorProduct.cfm?partNumber=CP02 CP02 cage plates], and [http://www.thorlabs.com/NewGroupPage9.cfm?ObjectGroup_ID=1521 1” diameter lens tubes].
+
 
+
Use [http://www.thorlabs.com/thorProduct.cfm?partNumber=RLA0300 optical rails] and [http://www.thorlabs.com/thorProduct.cfm?partNumber=RC1 rail carriers] or [http://www.thorlabs.com/NewGroupPage9.cfm?ObjectGroup_ID=47 optical bases] to mount 1/2” posts on the breadboard. [http://www.thorlabs.com/thorProduct.cfm?partNumber=RA90 RA90] right angle post clamps and [http://www.thorlabs.com/thorProduct.cfm?partNumber=PH2-ST post holders]can also be useful.
+
 
+
There are a variety of ways to construct the apparatus. A good design will be compact, stable, and simple. It is a good idea to shield the optical system from ambient light, so a small footprint will be advantageous.
+
 
+
====Illumination====
+
 
+
You will use a high-brightness blue LED manufactured by LedEngin, Inc. to excite the sample ([http://www.ledengin.com/led_products.htm datasheet]). This LED has a dominant wavelength of 465 nm. A Chroma Technology [http://web.mit.edu/~20.309/Students/Datasheets/Chroma%20D470-40.pdf D470/40] filter eliminates unwanted parts of the spectrum that might interfere with detection of the fluorescence signal, such as the very wavelengths you want to measure as fluorescent output. The filters have exposed, delicate coatings and must be [http://www.chroma.com/index.php?option=com_content&task=view&id=56&Itemid=65 handled carefully]. In addition, the filter [http://www.chroma.com/support/ordering-information/orientation-instructions works better in one direction than the other].
+
 
+
Light from the LED diverges in a cone with an angle of about 100 degrees. It may be advantageous to include optics in your system to concentrate light from the LED on to the sample.
+
 
+
====Fluorescence detection====
+
 
+
The [http://www.thorlabs.com/Thorcat/8700/8770-D02.pdf SM05PD1A] photodiode is mounted in a short tube with SM05 threads. Use a [http://www.thorlabs.com/thorProduct.cfm?partNumber=SM1A6 SM1A6] adapter to mount the photodiode in a CP02 cage plate or lens tube. Mount the photodiode assembly to the breadboard at 90 degrees to the LED. Build a system to hold the Chroma [http://web.mit.edu/~20.309/Students/Datasheets/Chroma%20E515lpv2.pdf E515LPV2] emission filter in front of the photodiode. You can use a lens to focus light from the sample on to the detector to improve performance, if you like.
+
 
+
===Electrical System===
+
====Temperature detection====
+
 
+
[[Image:rtd2.png|right|thumb|250px|Temperature Detection Circuit]]
+
 
+
The electrical resistance of most materials varies with temperature. RTDs are a special resistors (usually made out of platinum) that exhibit a nearly linear change in its value with temperature. An RTD may be used to accurately measure temperature by including it as an element in a voltage divider. As the resistance of the RTD changes, so will the voltage across it.
+
 
+
A [http://www.ussensor.com/prod_rtds_thin_film.htm  PPG102A1 RTD] has been pre-mounted to the DNA heating block. This RTD has a nominal resistance of 1 K&Omega; and its value increases with temperature. Note that the maximum current carrying capacity of this device is 1 ma. Hook up the RTD in a voltage divider. Make sure the divider has no more than 1 mA flowing through it. Use freeze spray or heat the block on the warmer to test the circuit.
+
 
+
The Labview VI calculates the temperature of the heating block based on the voltage across the RTD.  This calculation assumes the use of +15V and 15K&Omega;.  The diagram to the right shows the suggested circuit.  The capacitor across the RTD implements a low pass filter.  The purpose of this filter is to eliminate noise in your temperature reading.  Consider the following points when choosing a capacitor value:  What is the frequency range that you want filtered?  The time constant of the filter is determined by the two resistors in parallel with the capacitor.  What is the time constant of your filter?  If it is too large compared to the rate of change of temperature, it could cause a delay in your temperature reading.
+
 
+
====Heating control====
+
 
+
We will use a thermoelectic cooler (TEC) to heat the sample in this lab.  A TEC is a device that becomes warm on side and cold on the other side when a DC voltage is applied across it.  Before heating the sample, make sure that the TEC makes good thermal contact with the heating block.  If there is not good thermal contact, hot spots will develop damaging the TEC.  To ensure good contact, use the MINIMUM amount of thermal grease, and make sure that the heating block lies flat on the TEC.  Wooden sticks are available in the DNA Melting drawer (far right of the prep bench) to help you apply an extremely thing schmear.
+
 
+
To control the TEC we will use a digital output from the Labview VI and a solid state relay.  The relay is an electronic switch with four pins.  Two pins are for the control voltage and the other pins are the two sides of the switch.  When the control voltage is "high", the switch is turned "on"  (this means the switch is closed = the two pins are connected together).  The Labview VI provides a digital output from your DAQ that will serve as the control voltage.  Be sure to see your TA for a TEC Safety Circuit that you must add in series with the DAQ digital output.
+
 
+
The Labview VI allows you to set the temperature that you want.  The VI compares the desired temperature to the current temperature (determined by the voltage across the RTD).  If the desired temperature is higher than the current temperature, then the digital output is "high".  If the desired temperature is equal to or lower to the current temperature, the output is "low".
+
 
+
The diagram below is the suggested schematic for the lab. The positive side of the TEC is always connected to +12V through the 250W computer power supply.  The supply is capable of sourcing 5 A at 12 V.  The negative side of the TEC is connected to the first pin of the relay (one side of the switch).  The other side of the relay is connected to ground, which is also connected to the ground of the 250W power supply.
+
 
+
When the control voltage is high, the switch is closed and the negative side of the TEC is connected to ground.  Now that the negative side of the TEC is connected to ground, there is a DC voltage across the TEC and current flowing through it, which will cause the TEC to heat up.  When the switch is open, the TEC does not have a path to ground and the TEC will not heat up.
+
 
+
<center>[[Image:Heatcontrol.png|500 px|thumb|center|Heating Control Circuit]]</center>
+
 
+
====LED driver====
+
 
+
[[Image:Led2.png|right|thumb|250px|LED Driving Circuit.]]
+
 
+
The LED used in this lab can consume 1.5 Amps of current when maximally on, but this is MUCH more than you need.  You will need only roughly 100 mA, but even this low current is 50x what the [[20.309:DAQ System|20.309 USB-6212]] DAQ system is capable of driving.  It is possible to drive an LED with a voltage source; however, the steepness of a diode's I-V curve results in large current swings in current for small changes in supply voltage. LED brightness is proportional to current, so a current source tends to provide a more stable light output.
+
 
+
To amplify the current drive to the LED, you will be using a Darlington Transistor.  The transistor is a three terminal device, consisting of a Base, Emitter, and Collector, which should be wired into the circuit shown below.  The base contact of the BJT could be used to deliver a small amount of current from the DAQ, which would cause the device to conduct a much larger current through the LED.
+
Therefore in this lab you will linearize the behavior of the LED and transistor by using the op amp circuit we discussed in class.  Recall that this is simply a buffer implementation, with gain of 1, where the feedback voltage is directly proportional to the LED current.  Note that the voltage to the BJT and LED setup comes from the fixed 5V supply, whereas the op amp operates on +/– VCC (+/-15V).
+
 
+
Double check your wiring before connecting the LED. The LED can be damaged by excessive current. Remember the rule of thumb: if you can't keep your finger on a component indefinitely, it is too hot. Use a larger feedback resistor to keep the electronics cooler (at the expense of light output).
+
 
+
If the LED is too bright the sample will become photobleached very quickly.  You will be able to set the amplitude and offset of the the sinusoid driving the LED.  This is set in the Labview VI.  Set the offset so that the sinusoid is always positive (i.e. if the amplitude is 100mV then the offset should be at least 100mv).
+
 
+
====Photodiode amplifier====
+
Excited SYBR Green molecules emit photons in all directions, some of which pass through the emission filter and strike the photodiode. This generates a tiny current, which must be converted to a voltage and amplified to a level that can be conveniently measured. From past experience, the photodiode output current will be on the order of 15 nA. (Can you calculate it from first principles?)
+
 
+
=====Amplification circuit=====
+
 
+
The NI-DAQ interface card used in lab can digitize a voltage between positive and negative 10 Volts. A first approach to providing this voltage swing at the digitizer inputs was demonstrated in the homework:  a transimpedance amplifier (sometimes called a current-to-voltage converter) with a gain of approximately <math>5x10^8</math> V/A will produce an output that is in this range, with some room for a stronger sample response, given a 15 nA input.  (Why not simply use a resistor, and omit the op-amp?)
+
Implementing the photodiode amplifier in a single stage presents a number of challenges, however, as many of the non-ideal behaviors of op amps become apparent at such high gain values.  You will be implementing a three-stage photodiode amplifier, as shown in the figure below.  You are not limited to the topologies shown here; you may use others for one of the stages, such as the transimpedance amplifier from your homework.  If you have another in mind, feel free to discuss with your TA and/or Instructors.  Your job as circuit designers will be to at least fill in the appropriate filtering capacitor and feedback resistor values, in the topology shown here, in order to achieve the desired gain at the output.
+
 
+
Think carefully about how you want to distribute the gain of the system across the three stages:  how does feedback affect the noise of the amplifier?  What are the dominant sources of noise in the DNA melting setup, which ones do you have most control over, and how will you control for them?  Applying your knowledge of feedback and transfer functions, you should be able to determine the optimal gain configuration of each stage for lowest output noise.
+
 
+
<center>[[Image:amp2.png|700 px|thumb|center|Multi-stage photodiode amplification circuit]]</center>
+
 
+
Even with these optimizations, it will be important to keep your wiring short and neat. The amplifier and wiring will also be susceptible to physical movement, so prevent things from getting bumped during experimental runs. Select an op amp that has as low input bias current as possible. (Why?)  The DNA melting lab is stocked with a variety of op amps – you should familiarize yourself with the data sheets provided with these devices when making your selections.  Finally, a note about resistors and capacitors:  recall that resistors introduce thermal noise, while capacitors do not.  Therefore, the optimized system will use as low resistor values as are reasonable in filters and feedback paths.
+
 
+
===Practical matters===
+
 
+
<blockquote>
+
<div>
+
''As with most amplifiers, care should be taken with lead dress, component placement and supply decoupling in order to ensure stability.''
+
 
+
''&mdash;[http://www.ortodoxism.ro/datasheets/nationalsemiconductor/DS005655.PDF LF411 Datasheet]''
+
 
+
 
''In theory, there is no difference between theory and practice. But, in practice, there is.''  
 
''In theory, there is no difference between theory and practice. But, in practice, there is.''  
  
 
''&mdash;[http://en.wikiquote.org/wiki/Jan_L._A._van_de_Snepscheut Jan L. A. van de Snepscheut]/[http://en.wikiquote.org/wiki/Yogi_Berra Yogi Berra]/and or [http://c2.com/cgi/wiki?DifferenceBetweenTheoryAndPractice Chuck Reid]''  
 
''&mdash;[http://en.wikiquote.org/wiki/Jan_L._A._van_de_Snepscheut Jan L. A. van de Snepscheut]/[http://en.wikiquote.org/wiki/Yogi_Berra Yogi Berra]/and or [http://c2.com/cgi/wiki?DifferenceBetweenTheoryAndPractice Chuck Reid]''  
 +
</center>
  
</div>
+
<br />
</blockquote>
+
<br />
The universe is rife with electrical noise. Keeping the noise out of sensitive electronic instruments requires a great deal of care. Unfortunately, electronic breadboards are a poor environment in which to construct high gain amplifiers. A few simple tricks can improve things.
+
  
*Use power supply bypass capacitors. Connect a large capacitor between all supply voltages and ground. Large, electrolytic capacitors of at least 0.1 &mu;F work well for this purpose. Electrolytic capacitors are polarized. Make sure to put them in the right direction (They may explode, but they will definitely start to smell bad.).
+
==Overview of part 1==
*Use the binding posts on the breadboard to connect your power supplies.  
+
[[Image:Normalized DNA melting curve.gif|thumb|right|386 px|Normalized DNA melting curve. (Plot from [http://www.gene-quantification.de/hrm-dyes.html gene-quantification.de] )]]
*Power Supplies: Use a seperate power supply for the op-amp circuits, LED driving circuit, and the heating control. Make sure to tie the 5V ground to +15V/-15V ground at the power supply.  If you connect the grounds on the breadboard, there will be a potential difference between the grounds. This voltage difference is due to the large current swing of the LED driver flowing through the parasitic resistance of the breadboard.
+
In this part of the lab, you will construct a crude version of a temperature-cycling fluorometer and measure a DNA melting curve or two. Even though this first version of the instrument has some shortcomings, it will give you a good idea of how all of the parts work together to make melting curves. The instrument includes a resistance temperature detector (RTD) to measure the temperature of the sample holder, a blue LED to excite the sample, a Peltier device that will heat the sample, optical filters, a photodiode for detecting fluorescent emission, a high-gain transimpedance amplifier to convert photocurrent to voltage, and a computer data acquisition system to record the voltages that come out of the instrument.  
  
===PC Data Acquisition System===
+
When you get it all put together, the instrument will produce two voltages: one related to the sample temperature and another that depends on the amount of fluorescence coming out of the sample. The goal of part 1 is to produce at least one reasonable quality melting curve. This involves recording the temperature and fluorescence voltage as you heat a sample of DNA + dye from room temperature to about 95&deg;C and then let it cool back down. Computer software for recording the voltages has already been written for you. After you have a melting curve, you will use nonlinear regression to fit thermodynamic parameters to your data and do a little planning for part 2 of this lab. You will probably notice some shortcomings your instrument as you work. Don't worry about that &mdash; in part 2, you will make many improvements to your machine that will make it [https://youtu.be/3rQEbQJx5Bo sing like Elvis].
  
{{:20.309:DAQ System}}
+
There are instructions below for assembling your DNA melter.
  
====LabVIEW VI====
+
==Before you get started in the lab &hellip;==
 +
Two parts of the DNA melter require you to do some design work. You will have to decide what lenses (if any) you would like to use in your system and you will also need to select component values for your transimpedance amplifier. Come up with at least a preliminary design both of these before you start building.
  
The DNA Melting LabVIEW VI is located in the <code>Students/Labs/DNA Melting</code> folder of the course locker. Double click to launch the VI. (The current version is R1.0)
+
===Excitation and emission optics===
 +
It's possible to build a DNA melter with no lenses at all. Most people find that they can get a better signal-to-noise ratio if they use lenses. The goal is to get as much of the light from the LED to fall on the sample as possible and to get as much of the fluorescent emission on to land on the photodiode as possible. The active area of the photodiode is 3.6 mm x 3.6 mm. Take a little time to think about what lenses you'd like to use between the LED and the sample and photodiode and the sample. It wouldn't hurt to draw a ray diagram.
  
Click the run arrow or select Operate->Run from the menu to start the VI. The top two charts show the digitized voltage at the RTD and diode inputs over time. Use the range settings to get a good view of the signal.  
+
===Transimpedance amplifier===
 +
[[File:Transimpedance amplifier part 1.png|thumb|right|400px|Two-stage transimpedance amplifier for converting photocurrent to voltage.]]
 +
Fluorescent light from the sample falls on the photodiode and produces a photocurrent. The amount of current depends on the irradiance of the sample and the light collection efficiency of your optical system (and probably some other stuff). In most instruments, the photocurrent is around a microamp, but this number can vary up or down by a few orders of magnitude depending on the details of your optics. This small current must be amplified to a level where it can be easily measured. The voltage measurement range of the data acquisition system is &plusmn;10 V. It makes sense to shoot for an output voltage that fills most of the range of the data acquisition system. The circuit shown to the right is a two-stage amplifier which converts the photodiode current to a voltage, and amplifies this voltage.
  
At the end of an experimental run, use the <code>Write Data</code> button to save the most recent result in a comma delimited file that can be read into Matlab or Excel.
+
Before you build the circuit, you will need to choose values for the resistors and capacitors to get the right amount of gain and an appropriate cutoff frequency. The following questions will guide you in selecting these components (note that these questions are very similar to PSet 3).  
  
===Debugging the apparatus===
+
<ol type = "1">
 +
<li> For the amplifier circuit shown at the above right, in what case can we ignore the effect of the capacitor? At high or low frequencies? </li>
 +
<li> Stage 1 of the circuit (shown below) is a transimpedance amplifier, which converts the current coming from your photodiode into a voltage. Ignoring the effect of the capacitor for now (for the case you described in the above question), write an expression for the gain (<math>V_1/i_{in}</math>) of Stage 1 of your amplifier circuit in terms of the resistor values.
 +
[[File:Transimpedance_Stage1_NoCap.png|thumb|center|220px|Stage 1.]] </li>
 +
<li> Let’s look at Stage 2 of the amplifier circuit. This stage is a voltage amplifier to further amplify the signal from Stage 1. We need this second stage because when the gain of a single stage is very high (~10<sup>6</sup> &Omega;), the circuit starts to misbehave. At very high gains, you can't ignore the nonidealities of the op amp as casually as you can at low gains. Thus, to achieve an adequate gain, we need the second stage of amplification. What is the gain (<math>V_2/V_1</math>) of Stage 2?
 +
[[File:Transimpedance_Stage2.png|thumb|center|200px|Stage 2.]] </li>
 +
<li> Now that you know the gain of each stages of your amplifier circuit. Pick resistor values such that 1uA current from your photodiode will produce ~10V signal at the final output of the circuit (<math>V_2</math>). Remember that it is best to put as much gain in early stages of a multi-stage amplifier as possible. Since you won’t know the exact current values from your photodiode until you build your system, you will start with these values and adjust them as necessary after you build it. </li>
 +
<li> It is now time to reconsider the capacitor in Stage 1 of the amplifier circuit. What does this capacitor do at high frequencies? What kind of filter is this? Using impedance analysis, find the gain (<math>V_1/i_{in}</math>) of Stage 1 in terms of the capacitor and resistor values. </li>
 +
<li> What value capacitor will you choose to filter out 60 Hz and 120 Hz noise from the lab? </li>
 +
</ol>
  
#Use freeze spray and the heat gun to make sure the temperature circuit is working properly.
+
==Assembling the system==
#Cover and uncover the photodiode to verify operation of the fluorescence measurement system.
+
If you have forgotten your way around the lab, consult the [[Lab orientation]] page.
#Use a box and a piece of black cloth to shield your apparatus from ambient light. Can you measure the difference between a cuvette filed with water and one with DNA and SYBR Green?
+
#Observe every electrical signal node with the oscilloscope. Are any signals noisy? Is there a way to improve the quality of poor signals?
+
#Watch the fluorescence readout over time. Is it stable or does it drift?
+
#Is your temperature reading nonsensical?  Make sure you are using 15V supply and 15kohm resistor, for your voltage supply.  Also make sure that the DAQ input is placed across the RTD not the 15Kohm resistor.
+
#Is your LED being driven at the desired carrier frequency?  Try turning the carrier frequency down low enough to see it turn on and off (try 5Hz).  Try pointing the LED directly at the photodiode.  Is the frequency of the photodiode signal what you expect?
+
#Is your sampling photobleaching quickly?  Turn the amplitude of the LED signal down at the Labview VI.  Try an amplitude of 0.25 V and an offset 0.50 V. Turning the amplitude down decreases signal strength, but you can gain signal strength by focusing the green fluorescent light on the photodiode with lenses.
+
  
==Experimental procedure==
+
Start by mounting all of the main structural components on an optical breadboard. Onward!
  
Samples are in limited supply, as usual, so to receive your test samples you must first confirm that your apparatus is functioning properly and that your analysis script is functional.  Your group can actually get your code running at the same time as your instrument is being created.  You may either generate some data from the [[Matlab:Simulating DNA melting|Simulating DNA melting]] wiki page, or you may use previous-run data that we provided on Stellar.
+
===Mount the DNA melting chassis on an optical breadboard===
 +
<gallery widths=216px caption="Stuff you need:">
 +
File:DNA melting chassis.jpg|1 DNA melting chassis (on top of Center Cabinets)
 +
File:Optical breadboard.jpg|1 aluminum optical breadboard (1 foot by 2 foot, part number MB1224, located in the Instructor Cubbies)
 +
File:Quarter twenty by half screws.jpg|4 &frac14;-20x&frac12;" screws
 +
File:Three wire nuts.jpg|3 wire nuts (DNA melting drawer &mdash; rightmost drawer on the wet bench.)
 +
File:DNA_part_1_TEC_wire_assembly.jpg| TEC extension wire assembly (on top of Center Cabinets)
 +
</gallery>
  
To demonstrate a properly running instrument, your TA will provide a sample of 20bp DNA and will evaluate your raw data. As a first step, turn your apparatus on and measure the difference between a cool DNA sample and water. Run the DNA melting LabVIEW VI in the DNAMelting directory of the course locker (First make a copy for yourself in your directory.).  
+
The chassis includes a support bracket, fan, heat sink, and sample holder. There are two Peltier devices sandwiched between the holder and the heat sink. When current is applied to the Peltier device, the sample block will either heat up or cool down, depending on the direction of the current. There is a temperature sensor embedded inside the sample holder.  
  
Once your instrument is running to your (and your TA's) satisfaction, you may measure melting curves of each of the test samples.  And if you have time, you can run additional experiments. For example, you could gather additional ionic strength data points.
+
# Mount the chassis on the optical breadboard using the &frac14;-20x5&frac12;" screws.
 +
#* Leave room for your optical setup and an electronic breadboard.
  
The DNA melting apparatus will generate the best data when both the amplifier circuit and LED have been on for a while and all the components have reached their steady state temperature. Make sure the outputs of the system are stable before you begin taking data.  
+
===Wire the Peltier device and test it===
 +
[[Image:Diablotek switching power supply.jpg|thumb|right|Diablotek switching power supply (inside east cabinet) provides power to the Peltier devices.]]
 +
Heating and cooling the sample with a Peltier device requires a lot of current. In part 1 of the lab, you will hook the Peltier device (also called a thermoelectric cooler, or TEC) directly to its own power supply. When you turn the power supply on, the sample will heat up. After you turn the supply off, the sample will return to room temperature by radiation, conduction, and convection &mdash; all that heat stuff. This is a pretty crude way to control the sample temperature. We'll come up with something better in part 2.
  
The steps for each experimental run are:
+
[[Image:DNA part 1 TEC hookup.jpg|thumb|right|Power supply connected to Peltier devices (TECs).]]
 +
# Hook up the Peltier devices (TECs) in series.
 +
#* There are two Peltier devices (TECs) sandwiched between the sample holder and the heat sink.
 +
#* They must be connected in series.
 +
#* The black lead of the top device should be connected to the red lead of the bottom device.
 +
#* If these two wires are not already connected, twist them  together and secure the connection with a wiring nut.
 +
# Connect the TEC to the power supply
 +
#* Use the TEC extension wire assembly (the correct one has black/white/black/yellow colored wires) 
 +
#* Join the white wire to the red lead of the top TEC and the black wire to the black lead on the bottom TEC using wire nuts.
 +
# Warning: there are two connectors on the Diablotek power supply that the connector on the TEC extension wire can fit into. Make sure to use the '''black''' connector, not the white one.
 +
#* Connect the TEC extension to the '''black''' connector on the Diablotek power supply.
 +
# Test the TECs by touching the base of your heating block and turning the Diablotek on.
 +
#* The base should start to feel warm within 10-15 seconds.
 +
#* If the power supply immediately shuts off (the fan inside the power supply stops spinning) it is likely that you either used the wrong connector or there is a short circuit. Double check your wiring.
  
#Open the LabView VI
+
===Measure temperature===
#Set the carrier frequency, the LED amplitude, the desired temperature, and the filter cutoff frequencies
+
<gallery widths=216px caption="Stuff you need:">
#Then prepare a sample and place cuvette in heating block
+
File:Electronic breadboard.jpg|1 electronic breadboard (on top of east cabinet)
#Run the Labview: recording RTD and photodiode output during heating
+
File:CL5 clamps.jpg|2 CL5 clamps (on top of center cabinet)
#Switch off the heater and record RTD and photodiode output during cooling
+
File:15 KOhm resistor.jpg|15 K&Omega; resistor
#Make any modifications to the code that will help you
+
File:Jump wires.jpg|jump wires (on top of east cabinet)
 +
File:Banana cables.jpg|3 banana cables &mdash; preferably two red and one black or three different colors
 +
</gallery>
  
===Make a sample===
+
A platinum RTD is embedded inside the heating block. The resistance of the RTD varies with temperature according to the equation ''R<sub>RTD</sub>''=1000 &Omega; + 3.85 ''&theta;'', where ''&theta;'' is the temperature of the RTD in degrees Celsius.
  
{{Template:Safety Warning|message=SYBR Green I in DMSO is readily absorbed through skin. Synthetic oligonucleotides may be harmful by inhalation, ingestion, or skin absorption. Wear gloves when handling samples. Wear safety goggles at all times when pipetting the SYBR Green/DNA samples. Do not create aerosols. The health effects of SYBR Green I have not been thoroughly investigated. See the SYBR Green I and synthetic oligonucleotide MSDS in the course locker for more information.}}
+
# While the output is off, set the power supply to 15 V and 0.1A  (SERIES operation) and connect to the breadboard.
 +
# Connect the 15k&Omega; resistor in series with the RTD on the breadboard as shown in the diagram. [[Image: DNA_Lab_RTD_circuit.png|thumb|right|RTD circuit]]
 +
#* The maximum current of the RTD is 1 mA. Since you will use a 15 V supply to the circuit, the resistor must be at least 14 k&Omega;.
 +
#* Measure the actual resistance of the 15 k&Omega; resistor with a DMM and record the value in your lab report.
 +
# Making sure your circuit is powered and grounded properly, turn on the output of the power supply.
 +
#* Make note of the actual supply voltage measured by your DMM.
 +
#* Measure the voltage across the RTD using the DMM.
 +
# You may mount your electronic breadboard to your optical breadboard using the CL5 clamps, along with some screws and washers, as shown in right image. [[Image: CL5clamp.JPG|thumb|right|Clamp usage]]
  
Pipet 500&mu;l of DNA plus dye solution into a glass cuvette.  (Ask your TA or an Instructor for one of these reusable, and expensive, cuvettes). Pipet 20&mu;l of mineral oil on top of the sample to help prevent evaporation. Put a disposable top (available in a drawer under the bench) on the cuvette and mark it with a permanent marker. Keep the sample vertical to make sure the oil stays on top. You should be able to use the same sample for several heating/cooling cycles (What makes it go bad? What can you do to limit this effect?). Only discard it if you lose significant volume due to evaporation or your signal gets too low. If you need to leave the sample overnight, store it in the lab refrigerator. If you finish with a sample and it is still in good shape, pass it on to another group.
+
* Find an equation for the voltage across the RTD as a function of temperature. What voltage do you expect given an input voltage of 15 V with the RTD at room temperature?
 +
* What is the measured voltage of the RTD at room temperature and how does it compare to your predictions above?
 +
* What is the temperature, based on your measured voltage and how does it compare with the clock on the wall (or some better measure)?
 +
* How is the temperature calculation affected by a 1% change in the 15 V input voltage? In other words, if you assume the same measured voltage across the RTD, but have a 1% change in the input voltage, how much does your calculated temperature change? Note the importance of keeping track of your input voltage.
  
===Sample Disposal===
+
===Excite the sample with blue light===
 +
<figure id="fig:DNA_LED_circuit_part_1">[[File:DNA_LED_Circuit_part_1.svg|thumb|right|50 px|<caption>Schematic diagram of LED circuit</caption>]]</figure>
 +
The circuit for illuminating the sample is pretty simple &mdash; just a blue LED in series with a resistor, powered by the 15 V supply. The circuit is shown in <xr id="fig:DNA_LED_circuit_part_1"/>. In this connection, the LED will shine with a roughly constant intensity. This part of the circuit will more complicated in part 2. For part 1, a constant, blue light source will do the trick.
  
{{Template:Environmental Warning|message=Discard pipette tips with DNA sample residue in the ''Biohazard Sharps'' container. Do not pour synthetic oligonucleotides or SYBR Green down the drain. Empty the liquid into the waste container provided.  Clean your glass cuvettes by flushing with alcohol in the waster container, rinsing with water at the drain, and if you wish by also soaking/rinsing with the Lysol cleaner. You can suck out residual liquid with the vacuum and drawn pipette to the left of the sink.}}
+
Light coming out of the LED diverges pretty quickly. You might be able to get more light to fall on the sample with a lens.
  
==Data Analysis==
+
<gallery widths=216px caption="Stuff you need:">
Use Matlab or another environment of your choosing to analyze the raw data. If you prefer Python, consult [[Python:DNA melting data analysis | this page]]. In outline, the steps are:
+
File:Blue LED with mounting ring.jpg|1 blue LED with mounting ring (rightmost drawer of west drawers)
 +
File:62 ohm resistor.jpg|1 62 &Omega; resistor
 +
File:D470 filter.jpg|1 D470/40 excitation filter (DNA melting drawer- rightmost drawer on wet bench)
 +
File:SM1L05.jpg|1 &frac12;" SM1 lens tube (on shelves)
 +
File:Optical parts for excitation.jpg|lenses and mounts for excitation optical path
 +
</gallery>
  
#Load data file produced by LabVIEW VI into Matlab
+
# Mount the LED in its mounting ring and secure it in a lens tube with a retaining ring.
#Apply median filter to reduce impulse noise
+
# Assemble your excitation optical path.
#Apply FIR filter to reduce other sources of noise
+
#*  LEDs have a broad emission spectrum, so it's necessary to put an optical filter between the LED and the sample.
#Convert RTD voltage to temperature
+
#* The arrow on the side of the filter should point toward the sample.
#Normalize fluorescence signal
+
# Use your electronic breadboard to wire the 62 &Omega; resistor in series with the LED, as shown in <xr id="fig:DNA_LED_circuit_part_1"/>.
#Apply transfer function to measured RTD temperature to calculate sample temperature
+
# Use banana cables to route the 5V output of the lab power supply to the LED circuit.
#Sort or bin the data to ensure that fluorescence versus temperature is a function
+
#* Don't forget to connect the resistor &mdash; if there is no resistor in series the LED will blow out.
#Average data from multiple experimental runs, if necessary
+
# Turn on the power supply and enable the output.
#Apply correction for photobleaching, if necessary
+
#* If the LED doesn't glow, it's time for some debugging.
#Apply correction or SYBR Green temperature dependence, if possible
+
#Compute the finite difference &Delta;fluorescence/&Delta;temperature
+
#Estimate the melting temperature
+
#Create plots
+
  
===Organization of data analysis script===
+
===Detect green fluorescence===
Since you will be analyzing several experimental runs in a similar way, it makes sense to save the particulars of each experimental run (such as the name of the file that the data is stored in and the KCl concentration) in an array of data structures. Matlab implements a data type called a ''cellular array''. Cellular arrays use pointy braces {} instead of parenthesis (). If <code>foo</code> is a cellular array, then <code>foo{1}</code> is the first element.
+
You will use a photodiode, a transimpedance amplifier, an emission filter, and possibly some lenses to detect fluorescent light from the sample. It's time to put all of that together. Start by building and testing the amplifier. Then put the optical system together.
  
The following code demonstrates how to create the cellular array of data structures. The code fills in the first element of a cellular array (<code>DnaMatchSampleInfo</code>):
+
====Construct the emission optical path====
 +
<gallery>
 +
File:SM05PD1A Photodiode.jpg|1 SM05PD1A photodiode (DNA melting drawer)
 +
File:SM1A6 adapter.jpg|1 &frac12;" to 1" adapter (DNA melting drawer)
 +
File:E515LPv2 filter.jpg|1 E515LPv2 emission filter (DNA melting drawer)
 +
File:Optical parts for emission.jpg|lenses and mounts for emission optical path
 +
</gallery>
  
<pre>
+
# Mount the photodiode in its adapter and place the whole thing inside a lens tube.
DnaMatchSampleInfo = {}  % null cellular array
+
# Mount and secure the emission optical path. Don't forget the filter (the arrow should be pointing toward the sample).
 +
# Consider using a lens to focus the light emitted from your sample onto your photodiode.
  
DnaMatchSampleInfo{1}.filename = 'DNA Melting Data\20bp 100mM.txt';
+
====Build the transimpedance amplifier====
DnaMatchSampleInfo{1}.SampleName = '20 bp 100mM';
+
It's time to build the transimpedance amplifier that will convert the tiny current produced by the photodiode into a measurable voltage. If you didn't already select component values, you are probably not very good at following directions. Pick component values before you start building.
DnaMatchSampleInfo{1}.KclConcentration = 100;
+
DnaMatchSampleInfo{1}.DnaConcentration = 30;
+
DnaMatchSampleInfo{1}.FilterNormalizedCutoffFrequency = 0.1;
+
DnaMatchSampleInfo{1}.FilterOrder = 25;
+
DnaMatchSampleInfo{1}.NormalizationMin = 0.01;
+
DnaMatchSampleInfo{1}.NormalizationMax = 0.99;
+
DnaMatchSampleInfo{1}.TrimStart = 0;
+
DnaMatchSampleInfo{1}.TrimEnd = 0;
+
  
... fill in more entries here ...
+
<gallery widths=216px caption="Stuff you need:">
</pre>
+
File:LF411 op amps.jpg|2 LF411 op amps (rightmost drawer of west drawers)
 +
File:Resistors for transimpedance amplifier circuit.jpg|Resistors for amplifier circuit
 +
File:DNA bypass capacitors.jpg|4 capacitors > 1 &mu;F (rightmost drawer of west drawers)
 +
File:SMA to BNC.jpg|1 SMA to BNC adapter (DNA melting drawer)
 +
File:BNC cable.jpg|1 BNC cable
 +
File:BNC to wires adapter.jpg|1 BNC wire adapter (on center cabinet)
 +
</gallery>
  
After initializing <code>DnaMatchSampleInfo</code>, each element will contain a data structure with the parameters of a particular experimental run. You can create additional cellular arrays for different sets of experiments. For example, <code>DnaLengthSampleInfo</code> might contain parameters for the 20, 30, and 40 base pair samples.  
+
# Disable the power supply before you start.
 +
# Configure the lab power supply for series mode and set the voltage to &plusmn;15 V.
 +
# Use banana plugs to wire +15 V, ground, and -15 V to the breadboard terminals.
 +
# Mount the two op amps a short distance apart on the electronic breadboard. The amplifiers should straddle the notch on the breadboard that separates the two sets of bus strips.
 +
#* Make sure to use the correct kind of amplifier &mdash; there are several types in the drawer that look very similar. The package should say "LF411" on it.
 +
#* Orient the op-amps so that pin 1 (marked with a dot on the package) is at the upper left.
 +
#* Use jump wires to connect the power supplies from the breadboard terminals to the bus bars on the left and right of the op amps.
 +
#** Wire the +15 V power supply to the red bus bar on the right of the op amps.
 +
#** Wire the -15 V power supply to the red bus bar to the left of the op amps.
 +
#** Connect the blue bus bars on either side of the amplifiers to ground.
 +
#* Use short wires to connect the power pins of the op amps to the correct power supplies. Double check your connections &mdash; there is no faster way to ruin an op amp than to wire the power backwards.
 +
#* Add the bypass capacitors (the blue ones in the above image) to your circuit to reduce noise from the power supply. Do this by straddling a capacitor between the +15 V supply (pin 7) to ground, and another capacitor between the -15 V supply (pin 4) to ground. Be sure to note the polarity of your capacitor (the black stripe should go toward the more negative potential) otherwise you might get an unwanted explosion.
 +
# Build the transimpedance amplifier circuit with the component values you selected. [[Image: LF411.jpg|thumb|right|LF411 op amp pin configuration]]
 +
# Use a SMA to BNC adapter; BNC cable; and BNC to wire adapter to connect the photodiode terminals to the electronic breadboard.
 +
# Before you enable the power supply, double check that your component values are correct and your connections match the design.
 +
# Test it out
 +
## Enable the power supply and verify that +15V appears on pin 7 and -15V on pin 4.
 +
## Temporarily disconnect the photodiode from the amplifier input. This will set the input current to zero.
 +
## Measure the voltage on the output pins of both amplifiers (pin 6).
 +
##* If the outputs are not close to zero (say, less than a hundred millivolts), there is probably something wrong. Time for some debugging.
 +
## Reconnect the photodiode. Hook a voltmeter to the amplifier output.
 +
## Point the photodiode at the lights. Now cover the photodiode with your thumb or another appendage.
 +
##* If the voltage doesn't change as expected, it's time for some debugging.
  
Using the information in the cellular arrays, it is easy to write a <code>for</code> loop that will process all of the data for a particular set of experiments. The function (called <code>DnaMelt</code> might look something like this:
+
==Connect your instrument to the computer data acquisition system==
  
<pre>
+
{{:20.309:DAQ System}}
% Function to process DNA melting data from LabVIEW VI
+
% sampleInfo is a cellular array of data structures
+
% output is a cellular array containing original data and computed values
+
function out = DnaMelt(sampleInfo)
+
  
% initialize variables
+
====Summary of DAQ inputs/outputs====
out = {};
+
  
for ii=1:length(sampleInfo)
+
A special connector has been prepared for you, connected as shown below. The connections and cable wire colors are also summarized [http://dl.dropbox.com/u/12957607/DAQ_Cable_Assembly_for_DNA_melting_lab.pdf in a memo].
  
    ... process the data ...
+
{| class="wikitable"
 +
|-
 +
! Signal Name
 +
! Signal Location
 +
! Ground Location
 +
! Pin wire color
 +
|-
 +
! DAQ Inputs
 +
|-
 +
! RTD
 +
| AI0+
 +
| AI0-
 +
| +Orange / -Black [lone pair, not with third (red) wire]
 +
|-
 +
! Photodiode
 +
| AI1+
 +
| AI1-
 +
| +Green / -White
 +
|}
  
end
+
<center>[[Image:DAQ_Wire_Colors.png|450 px|thumb|center|DAQ Connection Cable]]</center>
</pre>
+
  
... process/plot specific results about whole data set...
+
==DNAMelter software==
  
===Loading a data file===
+
[[Image:BasicDNAMelterIcon.png|75 px|left]]
Use the <code>load</code> command to read in a data file.
+
Use the <code>Basic DNA Melter GUI</code> program (located on the lab computer desktop) to collect data from the apparatus.
  
<pre>
+
Use the "Open file ..." button to write the data to a file. The data will be tab-delimited and can be read into Matlab with the <code>load</code> command.
    rawData = load(sampleInfo{ii}.filename);
+
</pre>
+
  
The first column contains RTD voltage samples and the second contains the corresponding fluorescence voltages.
+
Documentation for the DNAMelter software is available here: [[DNA Melting: Using the Basic DNAMelter GUI]]
  
===Converting voltages to temperature and relative fluorescence===
+
====If you need to debug the DAQ (skip otherwise!)====
These are straightforward mathematical manipluations on the dataset using the properties of the RTD and your normalized/corrected/adjusted fluorescence signal with the equation for dsDNA fraction.
+
* When debugging problems, it is frequently useful to ascertain whether the data acquisition system is working properly. National Instruments provides an application for this purpose called Measurement and Automation Explorer. Use Measurement and Automation Explorer to verify that the DAQ is properly connected to and communicating with the computer. The program also provides the ability to manually control all of the DAQ system's inputs and outputs.
 +
** Launch Measurement and Automation Explorer by selecting Start->All Applications->National Instruments->Measurement and Automation.
 +
** In the "Configuration" tab, select "Devices and Interfaces" and then "NI-DAQMx Devices." Select "Dev1."
 +
** If Dev 1 does not show up, the problem is that computer cannot communicate with the DAQ system. Ensure that the USB cable is connected to the DAQ system. If the cable is connected and the device still does not show up, unplug the USB cable, count to five, and plug it back in.
 +
** If the DAQ shows up under a different name, disconnect the USB cable. Delete all the "NI USB-6xxx" entries and then reconnect the USB cable. Verify that one entry reappears and that it is called "Dev1."
 +
** Select the "Test Panels" tab to manually control or read signals from the DAQ.
 +
* If you run DNAMelter and there is a data acquisition error, for example, "<code>Data acquisition cannot start!</code>", open Measurement and Automation Explorer and follow the steps above. Run DNAMelter again. If it still doesn't work, grab a beer or ask an instructor for help.
 +
* The DAQ has only one analog-to-digital converter (ADC). A multiplexer circuit sequentially samples voltages from the analog inputs configured in the control software. If any of the inputs is outside the allowable range of +/-10V, all of the inputs may behave erratically. The voltages reported may look reasonable so this can be very misleading. If none of the DAQ readings make sense, ensure that all of the analog voltages are in the allowable range and reset the DAQ by cycling the power of the DAQ (use the switch on the 6341 or disconnect the USB of the 6212).
 +
* If the DAQ gets short-circuited, it may crash. If this happens, Matlab will frequently give a deceptive error message, for example claiming that the limits on the band-pass filter do not satisfy some condition. In this case, correct the connection and cycle the DAQ power.
  
===Designing an FIR low pass filter===
+
==Part 1 measurements==
The matlab commands <code>fir1</code> and <code>freqz</code> are useful for designing a low pass filter. Use <code>fir1</code> to generate the filter kernel and <code>freqz</code> to plot its frequency response. Increasing the order of the filter will make the transition between pass and stop bands sharper.
+
  
Try plotting a few different filter designs:
+
===Test your instrument with fluorescein===
 +
use ~ 30&mu;M fluorescein to test your instrument before you get started with DNA samples. Fluorescein is good for testing; it's cheap, non-toxic, and it does not bleach as quickly like LC Green.
  
<pre>
+
# Pipette 500 &mu;l of fluorescein into a glass sample vial.
freqz(fir1(30, 0.15))
+
# Pipette 500 &mu;l of DI water into a another sample vial.
freqz(fir1(300, 0.15))
+
# Alternate between the two samples. You should see a difference in the transimpedance amplifier output.
</pre>
+
  
===Applying the FIR filter===
+
===Measure signal to noise ratio===
Use the <code>conv</code> command to apply the filter. But be careful how you treat the samples near the beginning and end of the signal. <code>conv</code> returns a vector of length m + n - 1, where m and n are the lenghts of the two operands. <code>conv</code> will assume that all values outside of the defined signal are zero. This will distort your signal near the beginning and end. You can handle this by pre-padding your data with made-up data (usually the initial and final values) or just chopping off the extra samples.
+
  
The following functions may be of use:
+
Measure the signal to noise ratio (SNR) of the instrument by comparing the difference between the average signal with a sample present and with water as a null reference. This process requires a vial containing 500 uL of 30 uM fluorescein and a vial containing the same amount of water.
  
<pre>
+
# Run the <code>Basic DNA Melter GUI</code>.
% usage: ConvolveAndClip(kernel, data)
+
# Place a vial of DI water in your instrument.
% convolves <kernel> with <data> and trims the ends of the result to length
+
# Clear the data and wait 10 seconds.
% length(data) - length(kernel)
+
# Replace the water vial with the DNA of fluorescein vial, record for another 10 seconds, then save the data.
function out=ConvolveAndClip(kernel, data)
+
#* Be sure that all other conditions, such as temperature, are stable throughout the test.
  
temp = conv(kernel, data);
+
Compute the signal to noise ratio, <math>\text{SNR}=\frac{\langle V_{fluorescein} \rangle - \langle V_{water} \rangle}{\sigma_{fluorescein} }</math>, where <math>V_{fluorescein}</math> is the portion of the data recorded with a fluorescein sample, <math>V_{water}</math> is the portion of the signal corresponding to the water sample, and <math>\sigma_{fluorescein}</math> is the standard deviation of <math>V_{fluorescein}</math>.
trim = length(kernel);
+
out = temp(trim:end-trim);
+
</pre>
+
  
<pre>
+
===Make a DNA melting curve===
% usage: PadAndConvolve(kernel, data)
+
% Pads <data> with initial and final values, convolves <data> with
+
% <kernel>, and trims the result to the same length as <data>
+
function out=PadAndConvolve(kernel, data)
+
  
frontPaddingLength = floor(length(kernel)/2);
+
Once the instrument is confirmed to be functioning properly, follow these instructions to generate melting curve data for a 20 bp DNA and green dye solution.
rearPaddingLength = ceil(length(kernel)/2);
+
frontPadding = data(1) * ones(frontPaddingLength, 1);
+
rearPadding = data(end) * ones(rearPaddingLength, 1);
+
  
s = size(data);
+
{{Template:Biohazard warning|message=LC Green in DMSO is readily absorbed through skin. Synthetic oligonucleotides may be harmful by inhalation, ingestion, or skin absorption. Wear gloves when handling samples. Wear safety goggles at all times when pipetting the LC Green/DNA samples. Do not create aerosols. The health effects of LC Green have not been thoroughly investigated. See the LC Green and synthetic oligonucleotide under <code>../EHS Guidelines/MSDS Repository</code> in the course locker for more information.}}
  
if(s(1) > s(2))
+
#Pipet 500 &mu;L of DNA plus dye solution into a glass vial.
    paddedData = [frontPadding;data;rearPadding];
+
#Pipet up to 20 &mu;L of mineral oil on top of the sample to help prevent evaporation.
else
+
#* The oil layer will reduce evaporation.
    paddedData = [frontPadding' data rearPadding'];
+
#* Be careful not to get oil on the cuvette sides far above the sample. It will run down during your experiment and cause shifts in the photodiode signal.
end
+
#*Keep the sample vertical to make sure the oil stays on top.
 +
# Make sure that the Diablotek power supply is off and the sample block is near room temperature.
 +
# Place the vial in the instrument
 +
#* To reduce bleaching, keep the LED off until you start the measurement.
 +
# Open and run the Basic DNA Melter GUI and follow the instructions there.
 +
# Confirm that sample block temperature displayed in Basic DNA Melter GUI is near room temperature.
 +
# Turn on the Diablotek power supply until the block temperature reaches 95&deg;C.
 +
# Attempt to hold the temperature at 95&deg;C for a minute or so by repeatedly switching the Diablotek power supply off and on.
 +
# Switch off the power supply and allow the block to cool down to room temperature.
 +
#* Be sure to save your data so you can plot it in your Part 1 report.
  
out = ConvolveAndClip(kernel, paddedData);</pre>
 
  
===Ensuring that F(Temperature) is a function===
+
* You can use the same sample for several heating/cooling cycles.
Because there is noise in the temperature readout, your raw data is not guaranteed to be a function. You will run into all sorts of trouble taking the finite difference later on if your data is not a function. This can be solved by either sorting the data by temperature (using Matlab's <code>sort</code> command) or binning the samples by temperature (by iterating through the data with a <code>for</code> loop.)
+
* Only discard a sample if you lose significant volume due to evaporation or if your signal gets too low.  
  
Each approach has merits and disadvantages. Sorting by temperature can result in some very small &Delta;T values, which tend to be very noisy. Binning has the advantage of resulting in a uniformly sampled dataset &mdash; provided that there is at least one sample in each bin.
+
To clean your glass vial between samples, flush with alcohol in the waste container and rinse with water at the drain. Suck out residual liquid with the vacuum and drawn Pasteur pipette to the left of the sink.
  
===Computing the finite difference===
+
====Sample disposal====
The <code>diff</code> command will compute the finite difference of a discrete-time signal, which is an approximation of a continuous derivative. Remember that you need to compute &Delta;Fluorescence/&Delta;Temperature, not &Delta;Fluorescence/&Delta;Time. Therefore, you must divide by &Delta;Temperature.
+
  
The differencing operation is particularly sensitive to noise. (What is the frequency response of a differencer?) If your derivative plots are noisy, you may be able to improve them by applying additional filtering.  
+
{{Template:Environmental Warning|message=Discard pipette tips with DNA sample residue in the pipette tips or the ''Biohazard Sharps'' container. Do not pour synthetic oligonucleotides with LC Green down the drain. Pour your used samples into the waste container provided in the middle of the wet bench.}}
  
One estimate of ''T<sub>m</sub>'' is the peak value of the numerical derivative.
 
  
===Fitting the model===
 
In the "Simulating DNA Melting" tutorial for [[Matlab:Simulating DNA melting|Matlab]] or [[Python:Simulating DNA Melting|Python]], there is a function for computing the theoretical value of dsDNA concentration as a function of DNA concentration, temperature, &Delta;H° and &Delta;S°.
 
  
To perform the fit, use the matlab function from the tutorial. You can use Matlab's curve fitter (<code>lsqcurvefit</code>) to estimate best-fit values for &Delta;H° and &Delta;S°.
+
{{:DNA Melting Report Requirements for Part 1}}
  
<code>lsqcurvefit</code> requires the fitting function to be implemented a particular way. You may find the following code excerpt, which declares a suitable function called <code>myFunction</code>, useful. It also computes the R squared value for the fit.
+
==Lab manual sections==
  
<pre>
+
*[[Lab Manual:Measuring DNA Melting Curves]]
  % Create user function for fitting
+
*[[DNA Melting: Simulating DNA Melting - Basics]]
    DnaConcentration = sampleInfo{ii}.DnaConcentration;
+
*[[DNA Melting Part 1: Measuring Temperature and Fluorescence]]
    myFunction = @ (x, xdata)  DnaFraction(DnaConcentration, xdata, x(1), x(2));
+
*[[DNA Melting Report Requirements for Part 1]]
 
+
*[[DNA Melting Part 2: Lock-in Amplifier and Temperature Control]]
    % Fit data to model
+
*[[DNA Melting Report Requirements for Part 2]]
    fitOptions = optimset('TolFun',1E-30,'TolX',1E-10,'MaxFunEvals',1E4,'MaxIter',1E4);
+
    [fitValues, resnorm] = lsqcurvefit(myFunction, [-150 -71E3], temperature, ...
+
                    fluorescence, [-inf -inf], [inf inf], fitOptions);
+
    rSquared = 1 - resnorm / norm(fluorescence - mean(fluorescence))^2;
+
 
+
</pre>
+
 
+
===Plot legends in Matlab===
+
Annoyingly, Matlab handles legends differently than other plot commands. The <code>hold</code> command does not apply to the <code>legend</code> command. (Direct complaints to http://www.mathworks.com/support.) The following code excerpt adds a plot legend. This code runs after the main loop. The cellular array <code>out</code> contains the results from processing. This code also places an "X" at the melting temperature.
+
 
+
<pre>
+
% Compute text cell array for plot legends and plot an
+
% "X" at the estimated melting temperature
+
 
+
for ii=1:length(out)
+
    legendText{2 * ii - 1} = sampleInfo{ii}.SampleName;
+
    legendText{2 * ii} = [sampleInfo{ii}.SampleName ' Best Fit'];
+
    figure(1)
+
    plot(out{ii}.maxDerivativeTemperature, out{ii}.fluorescence(out{ii}.maxDerivativeIndex),...
+
        'linewidth',2,'marker','x','markersize',18,'color',out{ii}.plotColor);
+
    plot(out{ii}.maxModelDerivativeTemperature, out{ii}.fitFluorescence(...
+
        out{ii}.maxModelDerivativeIndex), 'linewidth',2,'marker','x','markersize',18,'color',...
+
        out{ii}.modelPlotColor);
+
    figure(2)
+
    plot(out{ii}.maxDerivativeTemperature, out{ii}.dFdT(out{ii}.maxDerivativeIndex),...
+
        'linewidth',2,'marker','x','markersize',18,'color',out{ii}.plotColor);
+
    plot(out{ii}.maxModelDerivativeTemperature, out{ii}.dModelFdT(...
+
        out{ii}.maxModelDerivativeIndex), 'linewidth',2,'marker','x','markersize',18,'color',...
+
        out{ii}.modelPlotColor);
+
end
+
 
+
% Add the legends
+
figure(1)
+
legend(legendText, 'location', 'southwest');
+
hold off;
+
figure(2)
+
legend(legendText, 'location', 'southwest');
+
hold off;
+
 
+
</pre>
+
 
+
==Report Requirements==
+
Report requirements will be posted separately.
+
  
 
==References==
 
==References==
 +
<references/>
  
<references />
+
==Subset of datasheets==
 
+
(Many more can be found online or on the course share)
==Datasheets==
+
#[http://www.ni.com/pdf/manuals/371931f.pdf National Instruments USB-6212 user manual]
#[http://sine.ni.com/nips/cds/view/p/lang/en/nid/207096 National Instruments data acquisition card user manual]
+
#[http://www.ni.com/pdf/manuals/370784d.pdf National Instruments USB-6341 user manual]
#[http://www.sigmaaldrich.com/sigma-aldrich/datasheet/s9430dat.pdf SYBR Green I datasheet]
+
 
#[http://www.national.com/ds/LF/LF411.pdf Op-amp datasheet]
 
#[http://www.national.com/ds/LF/LF411.pdf Op-amp datasheet]
#[http://www.clare.com/home/pdfs.nsf/www/CPC1709.pdf/$file/CPC1709.pdf Relay datasheet]
 
#[http://www.learn-c.com/tip120.pdf Darlington transistor
 
  
 
{{Template:20.309 bottom}}
 
{{Template:20.309 bottom}}

Latest revision as of 17:49, 19 April 2017

20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


In theory, there is no difference between theory and practice. But, in practice, there is.

Jan L. A. van de Snepscheut/Yogi Berra/and or Chuck Reid



Overview of part 1

Normalized DNA melting curve. (Plot from gene-quantification.de )

In this part of the lab, you will construct a crude version of a temperature-cycling fluorometer and measure a DNA melting curve or two. Even though this first version of the instrument has some shortcomings, it will give you a good idea of how all of the parts work together to make melting curves. The instrument includes a resistance temperature detector (RTD) to measure the temperature of the sample holder, a blue LED to excite the sample, a Peltier device that will heat the sample, optical filters, a photodiode for detecting fluorescent emission, a high-gain transimpedance amplifier to convert photocurrent to voltage, and a computer data acquisition system to record the voltages that come out of the instrument.

When you get it all put together, the instrument will produce two voltages: one related to the sample temperature and another that depends on the amount of fluorescence coming out of the sample. The goal of part 1 is to produce at least one reasonable quality melting curve. This involves recording the temperature and fluorescence voltage as you heat a sample of DNA + dye from room temperature to about 95°C and then let it cool back down. Computer software for recording the voltages has already been written for you. After you have a melting curve, you will use nonlinear regression to fit thermodynamic parameters to your data and do a little planning for part 2 of this lab. You will probably notice some shortcomings your instrument as you work. Don't worry about that — in part 2, you will make many improvements to your machine that will make it sing like Elvis.

There are instructions below for assembling your DNA melter.

Before you get started in the lab …

Two parts of the DNA melter require you to do some design work. You will have to decide what lenses (if any) you would like to use in your system and you will also need to select component values for your transimpedance amplifier. Come up with at least a preliminary design both of these before you start building.

Excitation and emission optics

It's possible to build a DNA melter with no lenses at all. Most people find that they can get a better signal-to-noise ratio if they use lenses. The goal is to get as much of the light from the LED to fall on the sample as possible and to get as much of the fluorescent emission on to land on the photodiode as possible. The active area of the photodiode is 3.6 mm x 3.6 mm. Take a little time to think about what lenses you'd like to use between the LED and the sample and photodiode and the sample. It wouldn't hurt to draw a ray diagram.

Transimpedance amplifier

Two-stage transimpedance amplifier for converting photocurrent to voltage.

Fluorescent light from the sample falls on the photodiode and produces a photocurrent. The amount of current depends on the irradiance of the sample and the light collection efficiency of your optical system (and probably some other stuff). In most instruments, the photocurrent is around a microamp, but this number can vary up or down by a few orders of magnitude depending on the details of your optics. This small current must be amplified to a level where it can be easily measured. The voltage measurement range of the data acquisition system is ±10 V. It makes sense to shoot for an output voltage that fills most of the range of the data acquisition system. The circuit shown to the right is a two-stage amplifier which converts the photodiode current to a voltage, and amplifies this voltage.

Before you build the circuit, you will need to choose values for the resistors and capacitors to get the right amount of gain and an appropriate cutoff frequency. The following questions will guide you in selecting these components (note that these questions are very similar to PSet 3).

  1. For the amplifier circuit shown at the above right, in what case can we ignore the effect of the capacitor? At high or low frequencies?
  2. Stage 1 of the circuit (shown below) is a transimpedance amplifier, which converts the current coming from your photodiode into a voltage. Ignoring the effect of the capacitor for now (for the case you described in the above question), write an expression for the gain ($ V_1/i_{in} $) of Stage 1 of your amplifier circuit in terms of the resistor values.
    Stage 1.
  3. Let’s look at Stage 2 of the amplifier circuit. This stage is a voltage amplifier to further amplify the signal from Stage 1. We need this second stage because when the gain of a single stage is very high (~106 Ω), the circuit starts to misbehave. At very high gains, you can't ignore the nonidealities of the op amp as casually as you can at low gains. Thus, to achieve an adequate gain, we need the second stage of amplification. What is the gain ($ V_2/V_1 $) of Stage 2?
    Stage 2.
  4. Now that you know the gain of each stages of your amplifier circuit. Pick resistor values such that 1uA current from your photodiode will produce ~10V signal at the final output of the circuit ($ V_2 $). Remember that it is best to put as much gain in early stages of a multi-stage amplifier as possible. Since you won’t know the exact current values from your photodiode until you build your system, you will start with these values and adjust them as necessary after you build it.
  5. It is now time to reconsider the capacitor in Stage 1 of the amplifier circuit. What does this capacitor do at high frequencies? What kind of filter is this? Using impedance analysis, find the gain ($ V_1/i_{in} $) of Stage 1 in terms of the capacitor and resistor values.
  6. What value capacitor will you choose to filter out 60 Hz and 120 Hz noise from the lab?

Assembling the system

If you have forgotten your way around the lab, consult the Lab orientation page.

Start by mounting all of the main structural components on an optical breadboard. Onward!

Mount the DNA melting chassis on an optical breadboard

The chassis includes a support bracket, fan, heat sink, and sample holder. There are two Peltier devices sandwiched between the holder and the heat sink. When current is applied to the Peltier device, the sample block will either heat up or cool down, depending on the direction of the current. There is a temperature sensor embedded inside the sample holder.

  1. Mount the chassis on the optical breadboard using the ¼-20x5½" screws.
    • Leave room for your optical setup and an electronic breadboard.

Wire the Peltier device and test it

Diablotek switching power supply (inside east cabinet) provides power to the Peltier devices.

Heating and cooling the sample with a Peltier device requires a lot of current. In part 1 of the lab, you will hook the Peltier device (also called a thermoelectric cooler, or TEC) directly to its own power supply. When you turn the power supply on, the sample will heat up. After you turn the supply off, the sample will return to room temperature by radiation, conduction, and convection — all that heat stuff. This is a pretty crude way to control the sample temperature. We'll come up with something better in part 2.

Power supply connected to Peltier devices (TECs).
  1. Hook up the Peltier devices (TECs) in series.
    • There are two Peltier devices (TECs) sandwiched between the sample holder and the heat sink.
    • They must be connected in series.
    • The black lead of the top device should be connected to the red lead of the bottom device.
    • If these two wires are not already connected, twist them together and secure the connection with a wiring nut.
  2. Connect the TEC to the power supply
    • Use the TEC extension wire assembly (the correct one has black/white/black/yellow colored wires)
    • Join the white wire to the red lead of the top TEC and the black wire to the black lead on the bottom TEC using wire nuts.
  3. Warning: there are two connectors on the Diablotek power supply that the connector on the TEC extension wire can fit into. Make sure to use the black connector, not the white one.
    • Connect the TEC extension to the black connector on the Diablotek power supply.
  4. Test the TECs by touching the base of your heating block and turning the Diablotek on.
    • The base should start to feel warm within 10-15 seconds.
    • If the power supply immediately shuts off (the fan inside the power supply stops spinning) it is likely that you either used the wrong connector or there is a short circuit. Double check your wiring.

Measure temperature

A platinum RTD is embedded inside the heating block. The resistance of the RTD varies with temperature according to the equation RRTD=1000 Ω + 3.85 θ, where θ is the temperature of the RTD in degrees Celsius.

  1. While the output is off, set the power supply to 15 V and 0.1A (SERIES operation) and connect to the breadboard.
  2. Connect the 15kΩ resistor in series with the RTD on the breadboard as shown in the diagram.
    RTD circuit
    • The maximum current of the RTD is 1 mA. Since you will use a 15 V supply to the circuit, the resistor must be at least 14 kΩ.
    • Measure the actual resistance of the 15 kΩ resistor with a DMM and record the value in your lab report.
  3. Making sure your circuit is powered and grounded properly, turn on the output of the power supply.
    • Make note of the actual supply voltage measured by your DMM.
    • Measure the voltage across the RTD using the DMM.
  4. You may mount your electronic breadboard to your optical breadboard using the CL5 clamps, along with some screws and washers, as shown in right image.
    Clamp usage
  • Find an equation for the voltage across the RTD as a function of temperature. What voltage do you expect given an input voltage of 15 V with the RTD at room temperature?
  • What is the measured voltage of the RTD at room temperature and how does it compare to your predictions above?
  • What is the temperature, based on your measured voltage and how does it compare with the clock on the wall (or some better measure)?
  • How is the temperature calculation affected by a 1% change in the 15 V input voltage? In other words, if you assume the same measured voltage across the RTD, but have a 1% change in the input voltage, how much does your calculated temperature change? Note the importance of keeping track of your input voltage.

Excite the sample with blue light

Figure 1: Schematic diagram of LED circuit

The circuit for illuminating the sample is pretty simple — just a blue LED in series with a resistor, powered by the 15 V supply. The circuit is shown in Figure 1. In this connection, the LED will shine with a roughly constant intensity. This part of the circuit will more complicated in part 2. For part 1, a constant, blue light source will do the trick.

Light coming out of the LED diverges pretty quickly. You might be able to get more light to fall on the sample with a lens.

  1. Mount the LED in its mounting ring and secure it in a lens tube with a retaining ring.
  2. Assemble your excitation optical path.
    • LEDs have a broad emission spectrum, so it's necessary to put an optical filter between the LED and the sample.
    • The arrow on the side of the filter should point toward the sample.
  3. Use your electronic breadboard to wire the 62 Ω resistor in series with the LED, as shown in Figure 1.
  4. Use banana cables to route the 5V output of the lab power supply to the LED circuit.
    • Don't forget to connect the resistor — if there is no resistor in series the LED will blow out.
  5. Turn on the power supply and enable the output.
    • If the LED doesn't glow, it's time for some debugging.

Detect green fluorescence

You will use a photodiode, a transimpedance amplifier, an emission filter, and possibly some lenses to detect fluorescent light from the sample. It's time to put all of that together. Start by building and testing the amplifier. Then put the optical system together.

Construct the emission optical path

  1. Mount the photodiode in its adapter and place the whole thing inside a lens tube.
  2. Mount and secure the emission optical path. Don't forget the filter (the arrow should be pointing toward the sample).
  3. Consider using a lens to focus the light emitted from your sample onto your photodiode.

Build the transimpedance amplifier

It's time to build the transimpedance amplifier that will convert the tiny current produced by the photodiode into a measurable voltage. If you didn't already select component values, you are probably not very good at following directions. Pick component values before you start building.

  1. Disable the power supply before you start.
  2. Configure the lab power supply for series mode and set the voltage to ±15 V.
  3. Use banana plugs to wire +15 V, ground, and -15 V to the breadboard terminals.
  4. Mount the two op amps a short distance apart on the electronic breadboard. The amplifiers should straddle the notch on the breadboard that separates the two sets of bus strips.
    • Make sure to use the correct kind of amplifier — there are several types in the drawer that look very similar. The package should say "LF411" on it.
    • Orient the op-amps so that pin 1 (marked with a dot on the package) is at the upper left.
    • Use jump wires to connect the power supplies from the breadboard terminals to the bus bars on the left and right of the op amps.
      • Wire the +15 V power supply to the red bus bar on the right of the op amps.
      • Wire the -15 V power supply to the red bus bar to the left of the op amps.
      • Connect the blue bus bars on either side of the amplifiers to ground.
    • Use short wires to connect the power pins of the op amps to the correct power supplies. Double check your connections — there is no faster way to ruin an op amp than to wire the power backwards.
    • Add the bypass capacitors (the blue ones in the above image) to your circuit to reduce noise from the power supply. Do this by straddling a capacitor between the +15 V supply (pin 7) to ground, and another capacitor between the -15 V supply (pin 4) to ground. Be sure to note the polarity of your capacitor (the black stripe should go toward the more negative potential) otherwise you might get an unwanted explosion.
  5. Build the transimpedance amplifier circuit with the component values you selected.
    LF411 op amp pin configuration
  6. Use a SMA to BNC adapter; BNC cable; and BNC to wire adapter to connect the photodiode terminals to the electronic breadboard.
  7. Before you enable the power supply, double check that your component values are correct and your connections match the design.
  8. Test it out
    1. Enable the power supply and verify that +15V appears on pin 7 and -15V on pin 4.
    2. Temporarily disconnect the photodiode from the amplifier input. This will set the input current to zero.
    3. Measure the voltage on the output pins of both amplifiers (pin 6).
      • If the outputs are not close to zero (say, less than a hundred millivolts), there is probably something wrong. Time for some debugging.
    4. Reconnect the photodiode. Hook a voltmeter to the amplifier output.
    5. Point the photodiode at the lights. Now cover the photodiode with your thumb or another appendage.
      • If the voltage doesn't change as expected, it's time for some debugging.

Connect your instrument to the computer data acquisition system

Each lab PC is equipped with a National Instruments USB-6212 or USB-6341 data acquisition (DAQ) card.

The USB-6212[1] has 16, 16-bit analog input channels which can, in sum total, accomplish 400 thousand samples per second (400kS/s). That is, if there are two channels, each one will be alternately sampled, and EACH sampled at 200kS/s. A multiplexer sequentially selects from among the 16 single-ended and 8 differential input signals. The card also supports two 16 bit analog output channels with an update rate of 250 kS/s and an output range of +/-10 V and up to +/-2 mA.

The USB-6212 also has 32 digital input/output channels and a digital ground. A 50 kΩ pull-down resistor is typically used in series with connections to these channels.

The USB-6341[2] is s little more powerful. It has 16, 16-bit analog input channels which can, in sum total, accomplish 500 thousand samples per second (500kS/s). Again, a multiplexer sequentially selects from among the 16 single-ended and 8 differential input signals. The card also supports two 16 bit analog output channels but they have an update rate of 900 kS/s and an output range of +/-10 V and up to +/-2 mA.

Finally, the USB-6341 has 24 digital input/output channels and a digital ground, as well as 4, 100 MHz counter/timers.

Summary of DAQ inputs/outputs

A special connector has been prepared for you, connected as shown below. The connections and cable wire colors are also summarized in a memo.

Signal Name Signal Location Ground Location Pin wire color
DAQ Inputs
RTD AI0+ AI0- +Orange / -Black [lone pair, not with third (red) wire]
Photodiode AI1+ AI1- +Green / -White
DAQ Connection Cable

DNAMelter software

BasicDNAMelterIcon.png

Use the Basic DNA Melter GUI program (located on the lab computer desktop) to collect data from the apparatus.

Use the "Open file ..." button to write the data to a file. The data will be tab-delimited and can be read into Matlab with the load command.

Documentation for the DNAMelter software is available here: DNA Melting: Using the Basic DNAMelter GUI

If you need to debug the DAQ (skip otherwise!)

  • When debugging problems, it is frequently useful to ascertain whether the data acquisition system is working properly. National Instruments provides an application for this purpose called Measurement and Automation Explorer. Use Measurement and Automation Explorer to verify that the DAQ is properly connected to and communicating with the computer. The program also provides the ability to manually control all of the DAQ system's inputs and outputs.
    • Launch Measurement and Automation Explorer by selecting Start->All Applications->National Instruments->Measurement and Automation.
    • In the "Configuration" tab, select "Devices and Interfaces" and then "NI-DAQMx Devices." Select "Dev1."
    • If Dev 1 does not show up, the problem is that computer cannot communicate with the DAQ system. Ensure that the USB cable is connected to the DAQ system. If the cable is connected and the device still does not show up, unplug the USB cable, count to five, and plug it back in.
    • If the DAQ shows up under a different name, disconnect the USB cable. Delete all the "NI USB-6xxx" entries and then reconnect the USB cable. Verify that one entry reappears and that it is called "Dev1."
    • Select the "Test Panels" tab to manually control or read signals from the DAQ.
  • If you run DNAMelter and there is a data acquisition error, for example, "Data acquisition cannot start!", open Measurement and Automation Explorer and follow the steps above. Run DNAMelter again. If it still doesn't work, grab a beer or ask an instructor for help.
  • The DAQ has only one analog-to-digital converter (ADC). A multiplexer circuit sequentially samples voltages from the analog inputs configured in the control software. If any of the inputs is outside the allowable range of +/-10V, all of the inputs may behave erratically. The voltages reported may look reasonable so this can be very misleading. If none of the DAQ readings make sense, ensure that all of the analog voltages are in the allowable range and reset the DAQ by cycling the power of the DAQ (use the switch on the 6341 or disconnect the USB of the 6212).
  • If the DAQ gets short-circuited, it may crash. If this happens, Matlab will frequently give a deceptive error message, for example claiming that the limits on the band-pass filter do not satisfy some condition. In this case, correct the connection and cycle the DAQ power.

Part 1 measurements

Test your instrument with fluorescein

use ~ 30μM fluorescein to test your instrument before you get started with DNA samples. Fluorescein is good for testing; it's cheap, non-toxic, and it does not bleach as quickly like LC Green.

  1. Pipette 500 μl of fluorescein into a glass sample vial.
  2. Pipette 500 μl of DI water into a another sample vial.
  3. Alternate between the two samples. You should see a difference in the transimpedance amplifier output.

Measure signal to noise ratio

Measure the signal to noise ratio (SNR) of the instrument by comparing the difference between the average signal with a sample present and with water as a null reference. This process requires a vial containing 500 uL of 30 uM fluorescein and a vial containing the same amount of water.

  1. Run the Basic DNA Melter GUI.
  2. Place a vial of DI water in your instrument.
  3. Clear the data and wait 10 seconds.
  4. Replace the water vial with the DNA of fluorescein vial, record for another 10 seconds, then save the data.
    • Be sure that all other conditions, such as temperature, are stable throughout the test.

Compute the signal to noise ratio, $ \text{SNR}=\frac{\langle V_{fluorescein} \rangle - \langle V_{water} \rangle}{\sigma_{fluorescein} } $, where $ V_{fluorescein} $ is the portion of the data recorded with a fluorescein sample, $ V_{water} $ is the portion of the signal corresponding to the water sample, and $ \sigma_{fluorescein} $ is the standard deviation of $ V_{fluorescein} $.

Make a DNA melting curve

Once the instrument is confirmed to be functioning properly, follow these instructions to generate melting curve data for a 20 bp DNA and green dye solution.


Biohazard.jpg LC Green in DMSO is readily absorbed through skin. Synthetic oligonucleotides may be harmful by inhalation, ingestion, or skin absorption. Wear gloves when handling samples. Wear safety goggles at all times when pipetting the LC Green/DNA samples. Do not create aerosols. The health effects of LC Green have not been thoroughly investigated. See the LC Green and synthetic oligonucleotide under ../EHS Guidelines/MSDS Repository in the course locker for more information.


  1. Pipet 500 μL of DNA plus dye solution into a glass vial.
  2. Pipet up to 20 μL of mineral oil on top of the sample to help prevent evaporation.
    • The oil layer will reduce evaporation.
    • Be careful not to get oil on the cuvette sides far above the sample. It will run down during your experiment and cause shifts in the photodiode signal.
    • Keep the sample vertical to make sure the oil stays on top.
  3. Make sure that the Diablotek power supply is off and the sample block is near room temperature.
  4. Place the vial in the instrument
    • To reduce bleaching, keep the LED off until you start the measurement.
  5. Open and run the Basic DNA Melter GUI and follow the instructions there.
  6. Confirm that sample block temperature displayed in Basic DNA Melter GUI is near room temperature.
  7. Turn on the Diablotek power supply until the block temperature reaches 95°C.
  8. Attempt to hold the temperature at 95°C for a minute or so by repeatedly switching the Diablotek power supply off and on.
  9. Switch off the power supply and allow the block to cool down to room temperature.
    • Be sure to save your data so you can plot it in your Part 1 report.


  • You can use the same sample for several heating/cooling cycles.
  • Only discard a sample if you lose significant volume due to evaporation or if your signal gets too low.

To clean your glass vial between samples, flush with alcohol in the waste container and rinse with water at the drain. Suck out residual liquid with the vacuum and drawn Pasteur pipette to the left of the sink.

Sample disposal


Global Tree.gif Discard pipette tips with DNA sample residue in the pipette tips or the Biohazard Sharps container. Do not pour synthetic oligonucleotides with LC Green down the drain. Pour your used samples into the waste container provided in the middle of the wet bench.


Report requirements

  • One member of your group should submit a single PDF file to Stellar in advance of the deadline. The filename should consist of the last names of all group members, CamelCased, in alphabetical order, with a .pdf extension. Example: CrickFranklinWatson.pdf.
  • Include answers to questions embedded in the lab manual (e.g. the questions in the RTD section)
  • The file must be less than 20 MB.
  • Include code at the end of the document in an appendix, in the same pdf file, not as as separate upload.
  • Not counting the appendix, your report should be no longer than 10 pages.

Part 1 report outline

  1. Document your circuit design, optical design, and any ways that your instrument differs from the system described in the lab manual.
    • Include values for all of the resistors, capacitors in your circuit.
    • If you have not modified the circuits from their form in the report, you do not need to include the schematic in your report.
    • Draw a block digram of your optical system, including focal lengths of lenses and key distances.
    • Include a picture of your instrument.
  2. Report your signal to noise measurement.
  3. Plot at least one melting curve.
    • The plot should have temperature in °C on the horizontal axis and fraction of double stranded DNA on the vertical axis.
    • On the same set of axes, include a simulated curve generated by DINAMelt, OligoCalc, or another software simulator.
    • Also on the same set of axes, plot the output of the DnaFraction function evaluated with best-fit parameters. You may use nlinfit to choose the best-fit parameters or you may choose them manually. (See: DNA Melting: Simulating DNA Melting - Basics)
    • Include a legend.
  4. Report the estimated melting temperature and the best-fit values of ΔH°, ΔS°.
  5. Explain the statistical method you will use to identify your group's unknown sample in part 2 of this lab.

Lab manual sections

Lab manual sections

References

  1. Datasheet for the USB-6212
  2. Datasheet for the USB-6341

Subset of datasheets

(Many more can be found online or on the course share)

  1. National Instruments USB-6212 user manual
  2. National Instruments USB-6341 user manual
  3. Op-amp datasheet

</div>