Difference between revisions of "DNA Melting Part 2: Lock-in Amplifier and Temperature Control"

From Course Wiki
Jump to: navigation, search
(Update the DAQ connections)
(Test the system)
 
(258 intermediate revisions by 8 users not shown)
Line 3: Line 3:
 
{{Template:20.309}}
 
{{Template:20.309}}
  
{|
+
==Overview==
|- valign="top"
+
In part 2 of the DNA Melting Lab you will make changes to your DNA melter that will improve the quality of the melting curves you generate. Two of the most important improvements are adding lock-in detection to reduce the effects of optical noise and a temperature controller to enable control of the sample heating and cooling rates. You will also use a computer model to compensate for the difference in temperature between the heating block and sample, photobleaching, and thermal quenching of the fluorescent dye.
| __TOC__
+
| [[Image:DNAMelting_Part2Instrument_Iso_Annotated.png|480 px|thumb|center|Part 2 DNA melting instrument with heater/controller board and LED modulation circuit]]
+
|}
+
  
==Overview of Part 2==
+
Use the fluorescein and "beater" DNA samples available in the lab to test and debug your system. Continue refining your instrument until you are satisfied with the results. Please use DNA samples judiciously (even the "beater" DNA). Keep DNA sample samples out of the light when you are not taking data to reduce photobleaching.
  
In part 1 you constructed the basic components of a precision instrument, learned the basics of its operation, and discovered its limits, of which there are many. Chief among these limits was the heating rate. This limitation showed itself primarily through an inability to deal with an extreme temperature lag between the sample temperature and the measured heating block temperature. Another troublesome limitation was exposed by your instruments' inability to reject various noise or general disturbance sources, such as ambient light in the laboratory, slow variations of that light, and even electrical coupling effects from the passage of another student near your instrument.
+
==Electronic circuit changes for lock-in detection==
 +
[[Image:DNA_Lock-in_Block_Diagram_20130725.png|right|thumb|Block diagram of lock-in amplifier for DNA melting]]
 +
There are two important changes needed to implement lock-in detection on your DNA melter — making the LED intensity vary sinusoidally, and modifying the photodiode amplifier to operate over a different range of frequencies. In part 1 of the lab, the optical signal consisted of very low frequencies. Multiplying the signal by a cosine moves the frequency range of interest much higher. You will have to change your amplifier circuit to handle the higher frequencies.
  
In part 2 of the DNA Melting Lab you will improve your instrument by implementing a number of hardware changes that will allow you to overcome many of the limitations that you had encountered.
+
You will use an op-amp circuit to enable modulation of the LED. Modulating the LED will allow you to place the optical signal generated by the fluorescent dye in a low-noise area of the frequency spectrum. Recovering the original signal requires multiplying by a cosine of the same frequency and low-pass filtering. The multiplication and filtering is done in software.  
  
===Hardware changes===
+
===Build an LED driver===
These are changes that you must make to your instrument. Further details are provided below.
+
[[Image:LED_Op-amp_Drive_Schematic.png|thumb|right|LED driver circuit]]
*Review and possibly adjust your optics based on results in Part 1
+
*Add a heater/cooler board to your heating system.
+
*Revise your LED driver circuit.
+
*Revise your high gain, dual-stage amplifier, with filters of your choice.
+
  
===Software changes===
+
In order to take advantage of the lock-in technique to reduce noise from other photonic sources, the illumination from the blue LED has to be modulated with a cosine waveform. You will use an op amp to implement a circuit that will vary the current through the LED in proportion to the applied voltage. Software controlling the DAQ system will generate a cosine voltage waveform (typically at 10kHz) that you can use to drive the LED circuit. Remember that the LED current must be positive, so the software will also allow you to add a DC offset to the cosine waveform and keep the total voltage greater than zero. (For example, choose a cosine amplitude of 1 V and an of offset 1.2 V.)
These are changes that have mostly been made for you. Details are included below.
+
*Implemented a temperature controller in the Labview VI
+
*Implemented a lock-in amplifier in the Labview VI
+
*Return to the DNA Melting folder
+
  
===Why use a lock-in amplifier?===
+
A schematic diagram of the LED driver circuit is shown on the right. Note that it uses a different model of op amp than the ones in your transimpedance amplifier: an LM741. Choose the resistor ''Rsense'' to limit the current through the LED (too much current will wreck it). The smoke will stay inside the LED as long as you keep the current below 30mA.  
Recall from lecture that we will implement the lock-in amplifier to make precision measurements in a noisy environment. The general lock-in amplifier technique can be used to recover a signal from a noisy environment as long as the frequency of that signal is known. We will use this technique to induce a signal of interest at a particular frequency chosen to lie in a low-noise area of the laboratory background noise spectrum. In that we way we might be able to dial in a desired signal to noise ratio, as long as we consider the effects of operating at that frequency on all of the components of our instrument and our specimens.
+
  
<center>[[Image:Lock-in Amplifier Schematic.png|400 px|thumb|center]]</center>
+
====Parts====
 +
* LM741 op-amp from the Electronics Drawer
 +
* Current feedback resistor
  
===Opportunities for further development===
+
===Part 2 photodiode amplifier===
For those so-inclined, there is much fertile ground for further improvement of both the instrument and our understanding of the physical processes involved. We welcome your interest in pursuing such improvements. Some possibilities are listed here.
+
[[Image:Part2_TransimpedanceAmplifier.jpg|thumb|center|450px|Part 2 photodiode amplifier.]]
*There is another method for controlling the heating profile of your DNA sample. It so happens that the heater/cooler board has been designed as a "shield" for an Arduino controller board. An initial version of software for that purpose has been tested and debugged. One next step that could be to integrate the Arduino controller into the over-all Labview Lock-in VI. See us if you are interested.
+
In part 1 of the lab, you used a capacitor in the first gain stage of the photodiode amplifier to implement a low-pass filter. Modulating the LED will move the signal to a much higher frequency. So rip that sucker off &mdash; now your amplifier needs to work on a signal that is changing much more quickly.
*You will fit a multi-parameter model to your data. One primary weakness in our implementation of such a model at this time involves the convective heat loss term in the transfer function of the heating lag model between the block and the sample. We have some ideas to address this. If you do also, or would like to hear more, please see us.
+
*Also, to do a DNA melting curve properly, one must heat (or cool) the sample extremely slowly. If we tried this with our current approach the sample would be far too bleached by the end. One method to address this would be to revise the Labview VI so that the LED turns only briefly, and only after temperatures have stabilized to eliminate the lab between block and sample. If you are interested in tackling this, please see one of us.
+
*Next, we do not believe that we have a fully-developed bleaching correction for this experiment. You may agree after trying your hand at this correction. If you would like to investigate further, please see one of us.  
+
*Any and all other ideas for improvement will also be given fair review!
+
  
==Update your electrical system==
+
Photonic noise at low frequencies is very large &mdash; frequently much larger than the signal from the fluorescent dye. For this reason, the part 2 amplifier includes a high-pass filter that removes much of the low-frequency junk before it gets amplified by the second stage. Pick values for C2 and R7 so that the cutoff frequency gets rid of as much of the low-frequency noise as possible while still allowing the ~10kHz modulated DNA signal to pass.
===LED driver===
+
The LED used in this lab can consume 1.5 Amps of current when driven to its full range, but this is more than 10x the light you will need. In part 1 of the lab you had used roughly 90 mA, and for part 2 you will likely use an even lower current, nevertheless, the analog voltage output sources in the DAQ systems are only capable of driving very small currents<ref>[http://sine.ni.com/nips/cds/view/p/lang/en/nid/207096 Datasheet for the USB-6212]</ref><ref>[http://sine.ni.com/nips/cds/view/p/lang/en/nid/209069 Datasheet for the USB-6341]</ref>. And even if there were enough current available, the steepness of the diode's I-V curve would result in large swings in current for small changes in supply voltage. LED radiant flux &mdash; your excitation light &mdash; is proportional to current, so we will implement a controlled current source and direct it through the LED to provide a more stable sample excitation.
+
  
To implement the current source to drive your LED, you will be using a Darlington Transistor <ref>[http://en.wikipedia.org/wiki/Darlington_transistor Darlington Transistor]</ref>. This is a special device in which one transistor drives another to provide higher input-output current gain. At LED current levels around 100 mA the TIP120 will be providing a current gain of about 500<ref>[http://www.learn-c.com/tip120.pdf TIP120 Darlington transistor]</ref>. A transistor <ref>[http://en.wikipedia.org/wiki/Transistor#Usage Using a transistor]</ref> is a three terminal device in which the voltage or current at one terminal controls the voltage across, or current through, the other two terminals. In our case, the TIP120 acts like one BJT consisting of a Base, Emitter, and Collector, and should be wired into the circuit as shown in the schematic below. We will use the base contact of our TIP120 to accept a small amount of current from the LM741 op-amp<ref>[http://www.national.com/ds/LM/LM741.pdf LM741 Op-amp datasheet]</ref>, which will cause the TIP120 to conduct a much larger current between it's collector and emitter, in turn allowing nearly the same level of current to flow through the LED.
+
For a real op-amp the golden rules are only approximately true, and small amounts of current can flow into the input terminals. The effects of this current are minimized when the input impedance of the + and - terminals are balanced. Assuming R2 < R1 and R3, choosing R6 &asymp; R3 should give you the desired results.  
  
As described in lecture, the op-amp will be used to linearize the behavior of the TIP120 and the LED. Here the LED and transistor are inside a feedback loop extending from the output of the op-amp, through the base-emitter conduction path in the TIP120, through the LED, and back from the top of the 1 Ohm resistor, whose voltage drop is thus fed-back to the negative input node of the op-amp, completing the loop. Recall that this is simply a buffer implementation, with gain of 1. Thus the feedback voltage is directly proportional to the LED current. Notice that in this way the current through the LED is exactly equal to the voltage applied to the op-amp positive input by the DAQ. (Remember the golden rules.) Therefore we are directly controlling the current through the LED, and likewise the excitation light delivered to our dsDNA specimen.
+
After you make these changes, double check that everything is still working well. You may need to update the gains of one or both of your amplifier stages to work best with the lower signal level and increased frequency.
  
Note: if the LED is too bright then the sample will become photobleached very quickly. In the Labview VI for Part 2, you are able to set the voltage supplied to the op-amp.
+
===Minimizing electronic noise===
 +
You probably noticed a good amount of noise in the signals from your DNA melter in part 1. Fundamental noise sources such as shot noise and dark current noise certainly had an effect, but it is likely that technical sources of electronic and optical noise were a much larger problem. This section explains some of the steps you can take to reduce the susceptibility of your instrument to technical noise sources.
  
Note also that the voltage to the LED still comes from the fixed 5V supply on your lab station's INSTEK GPS-3303 power supply, while the op-amps still operate on +/– VCC (+/-15V in your setup).
+
<figure id="fig:SourcesOfElectronicNoise">[[File:Sources of electronic noise.png|thumb|right|<caption>Sources of electronic noise include common mode noise, electromagnetic coupling, noise conducted through power lines, and Johnson noise.</caption>]]</figure>
 +
====Electronic noise====
 +
<xr id="fig:SourcesOfElectronicNoise" /> shows four ways that electronic noise can enter circuits.  
  
{{Template:Safety Warning|message=As before, double check your wiring before powering the LED. The LED can be damaged by excessive current. Reduce the offset and amplitude of your driving current to protect the LED as well as to minimize photobleaching.}}
+
* Electromagnetic fields induce currents in the wires that make up your circuit. There are many sources of electromagnetic fields that can interfere with your circuit: power lines, other pieces of electronic equipment, electrostatic discharges, and radio signals.
 +
* Noise from other pieces of equipment can be conducted through power lines.  
 +
* Real wires and connectors have nonzero resistance. Current flowing through a common ground wire causes the ground potential to shift.
 +
* Random currents arise in conductors at maintained at nonzero temperatures due to the thermal energy of the electrons. This phenomenon is called Johnson noise. The magnitude of random voltages gets larger as the resistance of the conductor increases.
  
[[Image:LED_Driver_Schematic.png|700 px|thumb|center|Multi-stage photodiode amplification circuit]]
+
Here are some suggestions for things you can do to reduce electronic noise in your DNA circuit:
 +
<br /><br />
 +
<gallery widths=216px caption="Ways to minimize electronic noise:">
 +
File:Neat wiring.jpg|Keep the component layout compact. Make ground connections close together. Keep your wiring short and neat.
 +
File:Bypass caps.jpg|Use power supply bypass capacitors with C > 1 &mu;F. Capacitors connected across the power supply lines, placed close to powered components, will reduce noise in the power supply line.
 +
File:Multiple ground wires.jpg|Connect parallel wires to the power supplies. Multiple conductors in parallel will reduce parasitic resistance, which in turn will decrease voltage fluctuations due to common mode currents.
 +
File:Separate LED from amp.jpg|Separate high-current portions of the circuit like the LED driver from sensitive components like the transimpedance amplifier.
 +
File:RTD capacitor.JPG|Use a capacitor to eliminate high-frequency noise from the temperature signal.
 +
</gallery>
  
===Amplifier gain adjustments and high-pass===
+
==Temperature control==
For part 2 of the lab you will want to make some adjustments to your amplifier circuit. Principle among these are the adjustment of your low pass filter on the first stage and the addition of a high pass filter between stages. In part 1, you were amplifying an essentially constant signal, aside from it's slow variation as the dsDNA denatured. Thus your low-pass filter in stage one was most likely tuned to remove noise at 60 Hz and above. In part 2, the LED excitation light is modulated at a frequency much greater than 60 Hz and therefore the fluorescent emission from the SYBR Green is also modulated. You need to modify this low-pass filter to allow the modulated signal to get through the first stage.
+
A software control loop implements a Proportional-Integral-Derivative (PID) controller in order to maintain the sample block at a desired temperature. Digital signals control high-current switches (called an H-bridge) to make the TECs heat, cool, or remain inactive. Temperature control is effected by setting the duty cycle of these three functions. A fan carries away excess heat.
  
Next, since the 60 Hz, 1/f, fluorescent light switching and other noise sources are likely lower than your LED modulation carrier frequency, you will want to insert a high-pass filter as shown in the updated schematic below. Think about the frequencies of the noise sources and your carrier frequency and choose an appropriate filter cutoff frequency.
+
===Add a temperature controller board===
 +
The temperature controller includes of a printed circuit board (PCB) that can apply current to the TEC in either direction, which in turn causes heat flow in or out of the sample block. The board is controlled by digital signals from the DAQ that are generated in the part-2 version of the DNA melter software.
  
Also be sure to re-evaluate the way in which you have gain distributed between the two stages. Now that the op-amps are responding to higher frequency signals, additional non-ideal characteristics may come into play. Among these is the fact that the op-amps can only slew their outputs voltages at a certain rate. Because this limited slew-rate limits the peak-to-peak voltage that can be achieved over small time scales, the maximum gain that can be achieved will likewise be limited. Review the datasheet for you LF411 op-amps, dig around online or in the course reading materials, talk to an Instructor or TA, and research two particular specifications: the slew rate and the "unity gain bandwidth" or the "gain-bandwidth product." Slew rate is directly applicable to both your first-stage transimpedence amplifier topology and your second-stage non-inverting topology. The gain-bandwidth product is an easier to use summary specification provided by the manufacturers, but it is only applicable to the op-amp's use in the typical non-inverting topolgy.
+
Three status LEDs are provided on the PCB. A lighted green LED will confirms power applied. A red LED will indicates sample heating mode; blue means cooling.  
  
[[Image:DNA Amplifier Schematic.png|700 px|thumb|center|Part 2 DNA melting amplifier]]
+
Important: if you see a blue or red light when you are not running an experiment, immediately turn off the Diablotek power supply. Leaving the system stuck in heating or cooling mode for a long time will result in runaway temperatures that will likely destroy a TEC. Don't do that &mdash; fixing the problem requires a lengthy and mess removal and replacement process.
  
===Add heater controller board===
+
====Parts====
In order to control a slow ramp up and ramp down in block and sample temperature, a pulse width modulator (PWM) heater/cooler printed circuit board (PCB) has been provided for you. Once the correct connections have been made, you will be able to control your block temperature using the Labview VI with minimal input on your part. It is not required that you learn the details of the heater/cooler controller design and operation, but if you want to know more, please talk to an Instructor or TA.
+
Gather the following components:
 +
<gallery widths=216px>
 +
File:DNA_HeaterPCB_v5.PNG|1 PCB heater/cooler board from the Center Cabinets or the East Cabinets.
 +
File:RedBlack Molex Connector.jpg|1 red/black connector cable to hook up the Peltier device (TEC) to the heater/cooler board (from the East Cabinets).
  
[[Image:HeaterCoooler_PCB_Top.JPG|700 px|thumb|center|DNA Melting Heater Controller Board]]
+
</gallery>
{|
+
| [[Image:HeaterCoooler_PCB_FanConnect.JPG|350 px|thumb|center|Fan Connection - Do not connect 5V power here]]
+
| [[Image:HeaterCoooler_PCB_MainDAQ.JPG|350 px|thumb|center|DAQ Connections (see DAQ connector handout)]]
+
|-
+
| [[Image:HeaterCoooler_PCB_StatusLEDs.JPG|360 px|thumb|center|Heating, Cooling, and Logic power stats LEDs]]
+
| [[Image:HeaterCoooler_PCB_5V.JPG|350 px|thumb|center|5 V Logic power connection]]
+
|}
+
  
All points of connection are labeled on the PCB. Using the reference images above, make connections between your PCB and your DAQ cable (as described in the next section), your fan, and also your 5 V power. The most convenient spot from which to jump your 5 V power supply would be to tap into the location of the power connection for your blue LED. The connections to the fan itself is self-explanatory, they are labeled as "Fan+" for the red wire and "Fan-" for the black wire.
+
====Assembly====
 +
Points of connection are labeled on the PCB and described in the table and figure below. Refer to both in the instructions that follow.
  
Next, connect your TEC and the computer power supply for the TEC and fan. Do not yet switch on the Diablotek computer power supply. Connect your TEC to the 2-pin Molex male connector on the left of the board using a Part 2 (red/black wires) female connector provided on the counter top near the breadboards and previously-supplied Part 1 (Black/White wires) connector. Connect these Part 2 TEC wires to your TEC stack using wire nuts as before. Be sure to connect red-to-red and black-to-black. For the "Diablotek" connector labeled on the PCB, first verify that the Diablotek computer power supply is not switched on, then use the 4-pin connector from the Diablotek that IS NOT labeled for Part 1. This will be a white connector, in contrast to the black connector that you used for Part 1.
+
# Place the PCB in the pre-drilled holes on the sheet metal support bracket.
 +
#* If the nylon "feet" are missing, add them now. They are in the DNA Melting drawer at the right of the Wet Bench.
 +
# Disconnect the yellow/white cable between the power supply and the TEC stack.  
 +
# Connect the red/black connector cable to the TEC stack.  
 +
#* Join the red wire to the red lead of the top TEC and the black wire to the black lead on the bottom TEC using wire nuts.
 +
#* Plug the white Molex connector at the other end of the red/black cable to its mate on the PCB.
 +
# Turn off the Diablotek power supply.
 +
# Connect the Diablotek and check power [[Image:PCB connectors 2.JPG|thumb|right|Connect the fan to the PCB]]
 +
#* Connect the Diablotek 4-pin/3-color power supply connector to the PCB. (NOTE: this is different from the connector that you used in Part 1. The connector is white instead of black.)
 +
#* Quickly cycle the Diablotek power to confirm a green power status light in the upper right corner of the PCB.
 +
#* Confirm that the Diablotek is off.
 +
# Connect the fan itself to the Fan +/- connections at the bottom of the PCB (red to +, black to -, innermost row. See figure).
  
Do not yet switch on the Diablotek.
+
===Update your PC data acquisition system===
 +
You will need to route several additional signals from the DAQ to your DNA melter to control the LED modulation and temperature control board.
  
Finally, several status LEDs are provided on the PCB. A green LED will tell you whether the logic circuits are receiving 5 V power. A red LED will indicate that you are sending a heating signal. And a blue LED will indicate that you are sending a cooling signal. These LEDs do not indicate whether the TEC is actually receiving power from the Diablotek. They only indicate that status of the controller logic.
+
The DAQ connections and cable wire colors are summarized in the table below, and [http://dl.dropbox.com/u/12957607/DAQ_Cable_Assembly_for_DNA_melting_lab.pdf the document].
 
+
==Update your PC data acquisition system==
+
 
+
===Update the DAQ connections===
+
 
+
In the DAQ connections inset above, the "Fan" connection is a 0 or 5 V signal from the DAQ, controlled by the new Labview VI to be downloaded below. The "Heat/Cool" connection is a 0 or 5 V signal, also sent by the DAQ and controlled by the VI, that tells the heater/cooler logic circuits to either heat (high, 5 V) or cool (low, 0 V). The DGND slot next to both the Fan and Heat/Cool connections should be connected to the digital ground of the DAQ, which is provide using the bare wire from your DAQ connector, as described in the handout.
+
 
+
Next, the "On/Off" connection also accepts a 0 or 5 V signal from the DAQ. However this signal is provided a square wave of varying duty cycle. This approach forms the heart of PWM power control. When the signal is high, the power switches in the large BTN7930 half-bridge chips are configured to allow current to flow through the TEC. The Heat/Cool signal controls the direction of power flow as noted above. When the On/Off signal is low, no power flows through the switches in either direction, when it is high, power will flow. A control loop inside the Labview VI implements a Proportional-Integral-Derivative (PID) controller to set both the On/Off pulse widths and the Heat/Cool signal level in such a way as to maintain a desired temperature, or follow a desired temperature profile in time. The frequency of this duty cycle is pre-set at 750 Hz so that it's overtones do not interfere with the typical 10 kHz LED modulation frequency of your lock-in amplifier. If you choose a different LED modulation frequency, you may want to adjust the PWM frequency as well. The two half-bridge chips, connected and controlled as they are here, form what is called an H-bridge. If you want to know more, please ask an Instructor or TA.
+
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Signal
+
! Signal Name
! Location
+
! Signal Location
! Ground
+
! Ground Location
 
! Pin wire color
 
! Pin wire color
 
|-
 
|-
Line 106: Line 108:
 
| AI0+
 
| AI0+
 
| AI0-
 
| AI0-
| +Orange / -Black
+
| +Orange / -Black (lone pair)
 
|-
 
|-
 
! Photodiode  
 
! Photodiode  
Line 131: Line 133:
 
|-
 
|-
 
! Heater/Cooler On/Off  
 
! Heater/Cooler On/Off  
| +AO1
+
| CTR0
| AOGND
+
| DGND/AOGND
| +Green / -Blue or Black
+
| +Green / -Blue or -Black
 
|-
 
|-
 
! LED Modulation Carrier  
 
! LED Modulation Carrier  
| +AO0  
+
| AO0  
 
| AOGND
 
| AOGND
| +Yellow or White / -Blue
+
| +Yellow or +White / -Blue
 
|}
 
|}
  
Recall that the DAQ connections and cable wire colors are also summarized [http://dl.dropbox.com/u/12957607/DAQ_Cable_Assembly_for_DNA_melting_lab.pdf here]. NOTE: the polarity of the photodiode inputs has been reversed here in order to address the cross-talk issue that we recently discovered in the DAQ.
+
====Connect the DAQ cable to the control board====
 +
 +
[[Image:DAQ_Wire_Colors.png|thumb|right|DAQ Connection Cable]]
 +
[[Image:PCB connectors 1.JPG|thumb|right|Connect the DAQ to the PCB]]
 +
# Connect the orange Fan signal pin to the Fan signal header socket at the top of the PCB (innermost row).  
 +
# Connect the black digital GND signal pin to the marked DGND header socket at the top of the PCB (innermost row).
 +
# Connect the red Heat/cool signal pin to the marked Heat/cool header socket at the top of the PCB (innermost row).
 +
# Connect the green/blue or green/black Heater/cooler On/off signal pins to the marked header sockets at the top of the PCB (innermost row).
 +
# If you have not already done so, connect the appropriate DAQ cables to the RTD and LED circuits on your breadboard.
  
===Update the Labview VI===
 
  
Replace your current VI with <code>DNA_Melting_Lock-in.vi</code>, provided for you on the course share in the <code>Students/Labs/DNA Melting</code> folder. Be sure to make your own copy and adjust the parameters of the RTD temperature calculations as necessary. Follow the instructions in the VI to run an experiment.  
+
==Test the system==
 +
Data acquisition and control is done by the "Lockin DNA Melter GUI", provided for you on the lab computer desktop. Follow the instructions in the [[DNA Melting: Using the LockIn DNAMelter GUI|LockIn DNAMelter GUI wiki page]] to become familiar with the software. You may find it useful to review the block diagram again on the [[Understanding the lock-in amplifier]] wiki page.
  
However, before you run any experiments, verify that you have connected the PCB board to the DAQ and TEC power supply appropriately. First open the VI in Labview and start it by clicking the white "run" arrow. Next turn on your +/- 15 V and 5 V power supply (the green power status LED should light on the Heater/Cooler board) and toggle the LED button to verify that your LED circuit works. If not, make a not of it to come back to it later.
+
Before you run any experiments, verify that you have connected the PCB board to the DAQ and TEC power supply appropriately.  
 +
[[Image:GUILockInEarlyView.jpg|thumb|right|Early in melting cycle]]
 +
[[Image:GUILockInLaterView.jpg|thumb|right|Late in melting cycle]]
  
Now turn on the Diablotek TEC power supply. Your fan should start at the same time. Any time the TEC power supply is on, the fan will turn on automatically when you first start-up this VI, it will turn off when you start to heat, and it will turn back on when either the temperature profile enters the cool-down phase or when you click on the cool-down override button in the VI. The fan is necessary to help your heat sink dissipate the waste heat that is pumped from the top side of the TEC stack during cooling operations.
+
# Run the <tt>LockInGUI</tt> in MATLAB.
 +
# Turn on your +/- 15V power supply.
 +
# Toggle the LED button in the GUI to verify that your LED circuit works. If not, check your connections.
 +
# Use a fluorescent sample (DNA or fluorescein) to test your optical path
 +
#* With the fluorescent sample loaded, turn on the LED.
 +
#* Remove the sample (or replace it with a vial filled with water) and you should see a change in the fluorescence signal. If not, debug.
 +
# Turn on the Diablotek TEC power supply.  
 +
#* Your fan should start at the same time. Any time the TEC power supply is on, the fan will turn on automatically when you first start-up this GUI, it will turn off when you start to heat, and it will turn back on when either the temperature profile enters the cool-down phase or when you click on the cool-down override button in the GUI. The fan is necessary to help your heat sink dissipate the waste heat that is pumped from the top side of the TEC stack during cooling operations.
 +
# Finally, click "START" to start a heating cycle.
 +
#* The fan should turn off, the red heating status LED should light up, and the temperature of your heating block should start to respond. Be sure that your TEC power supply is on for this test. You may want to adjust the heating profile for debugging purposes.
 +
Test,debug and improve your instrument until you are satisfied with the results. Fluorescein and "beater" DNA samples are available for debugging and bringup, but please use judiciously. To preserve your fresh DNA sample, quickly remove from the instrument and protect from light when not gathering data. It is wise to run several beater-DNA samples and process the data to ensure that your instrument is operating properly and reliably before moving on to your real samples.
  
Finally, click "Go" to start a heating cycle. The fan should turn off and the red heating status LED should light up, and the temperature of your heating block should start to respond. Be sure that your TEC power supply is on for this test. You may want to adjust the heating profile for debugging purposes.
+
==Experimental procedure==
  
If any of the steps above do not give the expected outcome, investigate, hypothesize, make an adjustment, and start again at the first step.
+
===Measure SNR===
  
==Part 2 Experimental procedure==
+
Using a fresh DNA sample, and choosing the same operating conditions that you will use to collect your melting curve data, carry out a test of the signal to noise ratio (SNR).  Launch the <code> SNR Lockin DNA Melter GUI</code>, collect data until the strip chart at the top of the screen is full of good data, then click "Save Data" to record this data to disk. Next, open Matlab, load your SNR output file into an array and run its transpose through the [[SToNCalculator.m]] function provided, using no semicolon after the function name:
Most of the experimental procedure for part 2 is identical to that of part 1. All of the Safety and Environmental precautions listed there also apply here. In part 2 we will give you three known dsDNA samples, and one unknown sample. The three know samples will vary in either number of base pairs in the oligos, buffer ionic strength, or the degree of match between the two oligos in solution. The unknown sample will be one of your know samples.
+
  
Your task is two-fold: 1) Produce precision melting curves for each of the three known samples and calibrate your instrument by comparing them to known standards or simulated results, and 2) produce a precision melting curve for the unknown sample and determine its identity.
+
<code>snr = load ('snrFile.txt')';
  
To begin, open the <code>DNA_Melting_Lock-in.vi</code> LabView VI and follow the instructions there. Take some time to get to know your new instrument using the fluorescein and old dsDNA samples provided. Debug your instrument so that you can reliably produce a precision melting curve. Maximize SNR using the new procedure described below. Work with a TA or Instructor to verify that your instrument is in peak operating condition. Be sure that your analysis scripts are also in peak operating condition. Then and only then, work through the final experimental steps described below.
+
StoNCalculator( snr, 'sampleName')</code>
  
====Final experiment steps====
+
This function will output graphical representations of your data along with your calculated SNR numbers. Your instrument will be rated based on its "Adjusted SNR."
#Find your group listed on the white board in lab and retrieve your group's sample from the sample box for this semester, located in the refrigerator.
+
#Prepare a sample as described previously and place cuvette in your heating block.
+
#Use the VI as instructed there to record RTD and photodiode output during heating and cooling.
+
#Repeat the last steps two (2) more times for the same sample type, for a total of three (3) curves, and save the data for each run.
+
#Repeat the last three steps for each additional known sample type.
+
#Finally, prepare samples and record three (3) melting curves for your unknown sample type
+
  
{{Template:Note|DO NOT leave ANY samples outside of the refrigerator unless they are in your heating block.}}
+
===Identify unknown sample===
 +
You will receive 1.5 mL each of four samples. Three of the samples will be identified by their sequence, salt ion concentration, and degree of complementarity (see these [[DNA_Melting:_DNA_Sequences]]). The fourth sample matches one of the three identified samples. You will not be told which one.
  
===Measuring signal to noise===
+
* Acquire melting curves for the known and unknown samples.
 +
** You may want to run some or all of the samples more than once to provide more confidence in your result.
 +
* Identify the unknown sample and report your confidence in the result.
 +
** See [[Identifying the unknown DNA sample]] for some ideas on identifying the sample.
 +
** You may use a different  statistical procedure, if you like. Be sure to document the procedure you used.
 +
* Report a quantitative measure of your confidence in the identification.
  
Carry out a test of the signal to noise ratio (SNR) of your instrument by inserting a fresh sample of dsDNA and then running the VI, <code>DNA SignalToNoise 041310.vi</code>, provided on the course share. Run this VI with your desired operating conditions until the strip chart at the top of the screen is full of good data, and the click "Save Data" to record this data to disk. Next, open Matlab, load your file as a two column array and run it through the <code>SToNCalculator.m</code> function provided, using no semicolon after the function name. This function will output graphical representations of your data along with your calculated SNR numbers. Your instrument will be rated based on it's "Adjusted SNR."
+
==Analysis==
 +
We set out to measure the fraction of dsDNA versus temperature. As discussed in lecture, factors like photobleaching, thermal quenching, and the difference between the block and sample temperature distorted the measurement in various ways. For the final report, you will carefully analyze your data using a mechanistic model to factor out the melting dynamics from the shortcomings of the measurement technique.
  
==Lab manual sections==
+
In an ideal world, you would have your analysis code written before the data is collected. In the real world, data collection involves a lot of waiting around, and it might be a good use of your time to work on the analysis code and collect data in parallel. In that case, it is still important to ensure that your data makes sense as it comes in. For example, is the trend in the melting temperature what you expected? &hellip; e.g. did longer oligos have a higher melting temperature than shorter ones? The following section provides a quick way to estimate melting temperatures from the raw data.
  
 +
===Estimating melting temperatures from raw data===
 +
[[Image:Delta Vf Delta theta versus theta.png|thumb|right| &part;''V<sub>f</sub>'' / &part; ''T'' versus ''T'']]
 +
A frequently-used, quick-and-dirty proxy for melting temperature is the peak value of the fluorescence voltage's derivative as a function of temperature. The peak of the derivative is the temperature at which the equilibrium is changing most rapidly. It's not exactly the same as the melting temperature, but it allows for quick comparison of results.
 +
 +
You can't just take the derivative of the raw signal. The raw data is not guaranteed to be a function at all. One way to take a good derivative is to combine the fluorescence voltage values that fall into a particular range of temperatures and then take the average of all those values &mdash; a process sometimes called ''binning'' or ''discretization''. Temperature bins of about a quarter of a degree work well. The code below demonstrates how to accomplish this in MATLAB. Because of the difference between the block and sample temperatures, it is best to do this for just the heating or melting portion of the curve.
 +
 +
Assuming the variables <code>temperature</code> and <code>fluorescence</code> are defined, the following Matlab code fragment below computes &Delta;F/&Delta;T for the heating portion of the curve. If your melting curves are very noisy, you may have to adjust the code.
 +
 +
<pre>
 +
discretizationInterval = 0.25;
 +
discreteTemperatureAxis = 20: discretizationInterval:100; % center value for each bin
 +
discreteTemperaturBinEdges = [ discreteTemperatureAxis - discretizationInterval / 2, discreteTemperatureAxis(end) + discretizationInterval / 2 ];
 +
temperatureBinIndex = discretize( temperature, discreteTemperaturBinEdges );
 +
binnedFluorescence = accumarray( temperatureBinIndex', fluorescence', size( discreteTemperatureAxis' ), @mean )';
 +
badOnes = binnedFluorescence == 0;
 +
discreteTemperatureAxis( badOnes ) = [];
 +
binnedFluorescence( badOnes ) = [];
 +
 +
figure
 +
subplot(211)
 +
plot( discreteTemperatureAxis, binnedFluorescence )
 +
title( 'Average Fluorescence Voltage versus Temperature')
 +
xlabel( 'T (^{\circ}C)' )
 +
ylabel( 'F (AU)' )
 +
 +
dFluorescenceDTemperature =  diff( binnedFluorescence ) ./ diff( discreteTemperatureAxis );
 +
derivativeAxis = mean( [ discreteTemperatureAxis(1:(end-1)); discreteTemperatureAxis(2:end) ] );
 +
 +
subplot(212)
 +
plot( derivativeAxis, dFluorescenceDTemperature);
 +
title( 'Derivative of Fluorescence versus Temperature' )
 +
xlabel( 'T (^{\circ}C)' )
 +
ylabel( 'dF/dT' )
 +
</pre>
 +
 +
===Using nonlinear regression to estimate parameters===
 +
 +
The [[DNA Melting: Model function and parameter estimation by nonlinear regression]] wiki page will guide you in writing the model function used to estimate the relevant DNA melting parameters.
 +
 +
==DNA Melting Report Requirements==
 +
{{:DNA Melting Report Requirements for Part 2}}
 +
 +
==Lab manual sections==
 +
 +
*[[Lab Manual:Measuring DNA Melting Curves]]
 
*[[DNA Melting: Simulating DNA Melting - Basics]]
 
*[[DNA Melting: Simulating DNA Melting - Basics]]
 
*[[DNA Melting Part 1: Measuring Temperature and Fluorescence]]
 
*[[DNA Melting Part 1: Measuring Temperature and Fluorescence]]
 
*[[DNA Melting Report Requirements for Part 1]]
 
*[[DNA Melting Report Requirements for Part 1]]
*[[DNA Melting: Simulating DNA Melting - Intermediate Topics]]
 
 
*[[DNA Melting Part 2: Lock-in Amplifier and Temperature Control]]
 
*[[DNA Melting Part 2: Lock-in Amplifier and Temperature Control]]
 
*[[DNA Melting Report Requirements for Part 2]]
 
*[[DNA Melting Report Requirements for Part 2]]
  
 
==References==
 
==References==
<references />
+
<references/>
 +
 
 +
==Subset of datasheets==
 +
(Many more can be found online or on the course share)
 +
#[http://www.ni.com/pdf/manuals/371931f.pdf National Instruments USB-6212 user manual]
 +
#[http://www.ni.com/pdf/manuals/370784d.pdf National Instruments USB-6341 user manual]
 +
#[http://measurebiology.org/w/images/5/5b/Lf411-n.pdf LF411 Op-amp datasheet]
 +
#[http://measurebiology.org/w/images/9/90/Lm741.pdf LM741 Op-amp datasheet]
  
==Datasheets==
+
{{Template:20.309 bottom}}
#[http://www.sigmaaldrich.com/etc/medialib/docs/Sigma/Datasheet/8/s9430dat.Par.0001.File.tmp/s9430dat.pdf SYBR Green I datasheet]
+
#[http://www.national.com/ds/LF/LF411.pdf LF411 Op-amp datasheet]
+
#[http://www.national.com/ds/LM/LM741.pdf LM741 Op-amp datasheet]
+
#[http://www.learn-c.com/tip120.pdf TIP120 Darlington transistor datasheet]
+

Latest revision as of 20:05, 7 November 2017

20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


Overview

In part 2 of the DNA Melting Lab you will make changes to your DNA melter that will improve the quality of the melting curves you generate. Two of the most important improvements are adding lock-in detection to reduce the effects of optical noise and a temperature controller to enable control of the sample heating and cooling rates. You will also use a computer model to compensate for the difference in temperature between the heating block and sample, photobleaching, and thermal quenching of the fluorescent dye.

Use the fluorescein and "beater" DNA samples available in the lab to test and debug your system. Continue refining your instrument until you are satisfied with the results. Please use DNA samples judiciously (even the "beater" DNA). Keep DNA sample samples out of the light when you are not taking data to reduce photobleaching.

Electronic circuit changes for lock-in detection

Block diagram of lock-in amplifier for DNA melting

There are two important changes needed to implement lock-in detection on your DNA melter — making the LED intensity vary sinusoidally, and modifying the photodiode amplifier to operate over a different range of frequencies. In part 1 of the lab, the optical signal consisted of very low frequencies. Multiplying the signal by a cosine moves the frequency range of interest much higher. You will have to change your amplifier circuit to handle the higher frequencies.

You will use an op-amp circuit to enable modulation of the LED. Modulating the LED will allow you to place the optical signal generated by the fluorescent dye in a low-noise area of the frequency spectrum. Recovering the original signal requires multiplying by a cosine of the same frequency and low-pass filtering. The multiplication and filtering is done in software.

Build an LED driver

LED driver circuit

In order to take advantage of the lock-in technique to reduce noise from other photonic sources, the illumination from the blue LED has to be modulated with a cosine waveform. You will use an op amp to implement a circuit that will vary the current through the LED in proportion to the applied voltage. Software controlling the DAQ system will generate a cosine voltage waveform (typically at 10kHz) that you can use to drive the LED circuit. Remember that the LED current must be positive, so the software will also allow you to add a DC offset to the cosine waveform and keep the total voltage greater than zero. (For example, choose a cosine amplitude of 1 V and an of offset 1.2 V.)

A schematic diagram of the LED driver circuit is shown on the right. Note that it uses a different model of op amp than the ones in your transimpedance amplifier: an LM741. Choose the resistor Rsense to limit the current through the LED (too much current will wreck it). The smoke will stay inside the LED as long as you keep the current below 30mA.

Parts

  • LM741 op-amp from the Electronics Drawer
  • Current feedback resistor

Part 2 photodiode amplifier

Part 2 photodiode amplifier.

In part 1 of the lab, you used a capacitor in the first gain stage of the photodiode amplifier to implement a low-pass filter. Modulating the LED will move the signal to a much higher frequency. So rip that sucker off — now your amplifier needs to work on a signal that is changing much more quickly.

Photonic noise at low frequencies is very large — frequently much larger than the signal from the fluorescent dye. For this reason, the part 2 amplifier includes a high-pass filter that removes much of the low-frequency junk before it gets amplified by the second stage. Pick values for C2 and R7 so that the cutoff frequency gets rid of as much of the low-frequency noise as possible while still allowing the ~10kHz modulated DNA signal to pass.

For a real op-amp the golden rules are only approximately true, and small amounts of current can flow into the input terminals. The effects of this current are minimized when the input impedance of the + and - terminals are balanced. Assuming R2 < R1 and R3, choosing R6 ≈ R3 should give you the desired results.

After you make these changes, double check that everything is still working well. You may need to update the gains of one or both of your amplifier stages to work best with the lower signal level and increased frequency.

Minimizing electronic noise

You probably noticed a good amount of noise in the signals from your DNA melter in part 1. Fundamental noise sources such as shot noise and dark current noise certainly had an effect, but it is likely that technical sources of electronic and optical noise were a much larger problem. This section explains some of the steps you can take to reduce the susceptibility of your instrument to technical noise sources.

Figure 1: Sources of electronic noise include common mode noise, electromagnetic coupling, noise conducted through power lines, and Johnson noise.

Electronic noise

Figure 1 shows four ways that electronic noise can enter circuits.

  • Electromagnetic fields induce currents in the wires that make up your circuit. There are many sources of electromagnetic fields that can interfere with your circuit: power lines, other pieces of electronic equipment, electrostatic discharges, and radio signals.
  • Noise from other pieces of equipment can be conducted through power lines.
  • Real wires and connectors have nonzero resistance. Current flowing through a common ground wire causes the ground potential to shift.
  • Random currents arise in conductors at maintained at nonzero temperatures due to the thermal energy of the electrons. This phenomenon is called Johnson noise. The magnitude of random voltages gets larger as the resistance of the conductor increases.

Here are some suggestions for things you can do to reduce electronic noise in your DNA circuit:

Temperature control

A software control loop implements a Proportional-Integral-Derivative (PID) controller in order to maintain the sample block at a desired temperature. Digital signals control high-current switches (called an H-bridge) to make the TECs heat, cool, or remain inactive. Temperature control is effected by setting the duty cycle of these three functions. A fan carries away excess heat.

Add a temperature controller board

The temperature controller includes of a printed circuit board (PCB) that can apply current to the TEC in either direction, which in turn causes heat flow in or out of the sample block. The board is controlled by digital signals from the DAQ that are generated in the part-2 version of the DNA melter software.

Three status LEDs are provided on the PCB. A lighted green LED will confirms power applied. A red LED will indicates sample heating mode; blue means cooling.

Important: if you see a blue or red light when you are not running an experiment, immediately turn off the Diablotek power supply. Leaving the system stuck in heating or cooling mode for a long time will result in runaway temperatures that will likely destroy a TEC. Don't do that — fixing the problem requires a lengthy and mess removal and replacement process.

Parts

Gather the following components:

Assembly

Points of connection are labeled on the PCB and described in the table and figure below. Refer to both in the instructions that follow.

  1. Place the PCB in the pre-drilled holes on the sheet metal support bracket.
    • If the nylon "feet" are missing, add them now. They are in the DNA Melting drawer at the right of the Wet Bench.
  2. Disconnect the yellow/white cable between the power supply and the TEC stack.
  3. Connect the red/black connector cable to the TEC stack.
    • Join the red wire to the red lead of the top TEC and the black wire to the black lead on the bottom TEC using wire nuts.
    • Plug the white Molex connector at the other end of the red/black cable to its mate on the PCB.
  4. Turn off the Diablotek power supply.
  5. Connect the Diablotek and check power
    Connect the fan to the PCB
    • Connect the Diablotek 4-pin/3-color power supply connector to the PCB. (NOTE: this is different from the connector that you used in Part 1. The connector is white instead of black.)
    • Quickly cycle the Diablotek power to confirm a green power status light in the upper right corner of the PCB.
    • Confirm that the Diablotek is off.
  6. Connect the fan itself to the Fan +/- connections at the bottom of the PCB (red to +, black to -, innermost row. See figure).

Update your PC data acquisition system

You will need to route several additional signals from the DAQ to your DNA melter to control the LED modulation and temperature control board.

The DAQ connections and cable wire colors are summarized in the table below, and the document.

Signal Name Signal Location Ground Location Pin wire color
DAQ Inputs
RTD AI0+ AI0- +Orange / -Black (lone pair)
Photodiode AI1+ AI1- +Green / -White
DAQ Outputs
Fan P1.1 N/A Orange
Heat/Cool P1.0 N/A Red
Digital GND DGND N/A Black (bundled with Red/Orange)
Heater/Cooler On/Off CTR0 DGND/AOGND +Green / -Blue or -Black
LED Modulation Carrier AO0 AOGND +Yellow or +White / -Blue

Connect the DAQ cable to the control board

DAQ Connection Cable
Connect the DAQ to the PCB
  1. Connect the orange Fan signal pin to the Fan signal header socket at the top of the PCB (innermost row).
  2. Connect the black digital GND signal pin to the marked DGND header socket at the top of the PCB (innermost row).
  3. Connect the red Heat/cool signal pin to the marked Heat/cool header socket at the top of the PCB (innermost row).
  4. Connect the green/blue or green/black Heater/cooler On/off signal pins to the marked header sockets at the top of the PCB (innermost row).
  5. If you have not already done so, connect the appropriate DAQ cables to the RTD and LED circuits on your breadboard.


Test the system

Data acquisition and control is done by the "Lockin DNA Melter GUI", provided for you on the lab computer desktop. Follow the instructions in the LockIn DNAMelter GUI wiki page to become familiar with the software. You may find it useful to review the block diagram again on the Understanding the lock-in amplifier wiki page.

Before you run any experiments, verify that you have connected the PCB board to the DAQ and TEC power supply appropriately.

Early in melting cycle
Late in melting cycle
  1. Run the LockInGUI in MATLAB.
  2. Turn on your +/- 15V power supply.
  3. Toggle the LED button in the GUI to verify that your LED circuit works. If not, check your connections.
  4. Use a fluorescent sample (DNA or fluorescein) to test your optical path
    • With the fluorescent sample loaded, turn on the LED.
    • Remove the sample (or replace it with a vial filled with water) and you should see a change in the fluorescence signal. If not, debug.
  5. Turn on the Diablotek TEC power supply.
    • Your fan should start at the same time. Any time the TEC power supply is on, the fan will turn on automatically when you first start-up this GUI, it will turn off when you start to heat, and it will turn back on when either the temperature profile enters the cool-down phase or when you click on the cool-down override button in the GUI. The fan is necessary to help your heat sink dissipate the waste heat that is pumped from the top side of the TEC stack during cooling operations.
  6. Finally, click "START" to start a heating cycle.
    • The fan should turn off, the red heating status LED should light up, and the temperature of your heating block should start to respond. Be sure that your TEC power supply is on for this test. You may want to adjust the heating profile for debugging purposes.

Test,debug and improve your instrument until you are satisfied with the results. Fluorescein and "beater" DNA samples are available for debugging and bringup, but please use judiciously. To preserve your fresh DNA sample, quickly remove from the instrument and protect from light when not gathering data. It is wise to run several beater-DNA samples and process the data to ensure that your instrument is operating properly and reliably before moving on to your real samples.

Experimental procedure

Measure SNR

Using a fresh DNA sample, and choosing the same operating conditions that you will use to collect your melting curve data, carry out a test of the signal to noise ratio (SNR). Launch the SNR Lockin DNA Melter GUI, collect data until the strip chart at the top of the screen is full of good data, then click "Save Data" to record this data to disk. Next, open Matlab, load your SNR output file into an array and run its transpose through the SToNCalculator.m function provided, using no semicolon after the function name:

snr = load ('snrFile.txt')';

StoNCalculator( snr, 'sampleName')

This function will output graphical representations of your data along with your calculated SNR numbers. Your instrument will be rated based on its "Adjusted SNR."

Identify unknown sample

You will receive 1.5 mL each of four samples. Three of the samples will be identified by their sequence, salt ion concentration, and degree of complementarity (see these DNA_Melting:_DNA_Sequences). The fourth sample matches one of the three identified samples. You will not be told which one.

  • Acquire melting curves for the known and unknown samples.
    • You may want to run some or all of the samples more than once to provide more confidence in your result.
  • Identify the unknown sample and report your confidence in the result.
    • See Identifying the unknown DNA sample for some ideas on identifying the sample.
    • You may use a different statistical procedure, if you like. Be sure to document the procedure you used.
  • Report a quantitative measure of your confidence in the identification.

Analysis

We set out to measure the fraction of dsDNA versus temperature. As discussed in lecture, factors like photobleaching, thermal quenching, and the difference between the block and sample temperature distorted the measurement in various ways. For the final report, you will carefully analyze your data using a mechanistic model to factor out the melting dynamics from the shortcomings of the measurement technique.

In an ideal world, you would have your analysis code written before the data is collected. In the real world, data collection involves a lot of waiting around, and it might be a good use of your time to work on the analysis code and collect data in parallel. In that case, it is still important to ensure that your data makes sense as it comes in. For example, is the trend in the melting temperature what you expected? … e.g. did longer oligos have a higher melting temperature than shorter ones? The following section provides a quick way to estimate melting temperatures from the raw data.

Estimating melting temperatures from raw data

Vf / ∂ T versus T

A frequently-used, quick-and-dirty proxy for melting temperature is the peak value of the fluorescence voltage's derivative as a function of temperature. The peak of the derivative is the temperature at which the equilibrium is changing most rapidly. It's not exactly the same as the melting temperature, but it allows for quick comparison of results.

You can't just take the derivative of the raw signal. The raw data is not guaranteed to be a function at all. One way to take a good derivative is to combine the fluorescence voltage values that fall into a particular range of temperatures and then take the average of all those values — a process sometimes called binning or discretization. Temperature bins of about a quarter of a degree work well. The code below demonstrates how to accomplish this in MATLAB. Because of the difference between the block and sample temperatures, it is best to do this for just the heating or melting portion of the curve.

Assuming the variables temperature and fluorescence are defined, the following Matlab code fragment below computes ΔF/ΔT for the heating portion of the curve. If your melting curves are very noisy, you may have to adjust the code.

discretizationInterval = 0.25;
discreteTemperatureAxis = 20: discretizationInterval:100; % center value for each bin
discreteTemperaturBinEdges = [ discreteTemperatureAxis - discretizationInterval / 2, discreteTemperatureAxis(end) + discretizationInterval / 2 ];
temperatureBinIndex = discretize( temperature, discreteTemperaturBinEdges );
binnedFluorescence = accumarray( temperatureBinIndex', fluorescence', size( discreteTemperatureAxis' ), @mean )';
badOnes = binnedFluorescence == 0;
discreteTemperatureAxis( badOnes ) = [];
binnedFluorescence( badOnes ) = [];

figure
subplot(211)
plot( discreteTemperatureAxis, binnedFluorescence )
title( 'Average Fluorescence Voltage versus Temperature')
xlabel( 'T (^{\circ}C)' )
ylabel( 'F (AU)' )

dFluorescenceDTemperature =  diff( binnedFluorescence ) ./ diff( discreteTemperatureAxis );
derivativeAxis = mean( [ discreteTemperatureAxis(1:(end-1)); discreteTemperatureAxis(2:end) ] );

subplot(212)
plot( derivativeAxis, dFluorescenceDTemperature);
title( 'Derivative of Fluorescence versus Temperature' )
xlabel( 'T (^{\circ}C)' )
ylabel( 'dF/dT' )

Using nonlinear regression to estimate parameters

The DNA Melting: Model function and parameter estimation by nonlinear regression wiki page will guide you in writing the model function used to estimate the relevant DNA melting parameters.

DNA Melting Report Requirements

  • Follow the lab report general guidelines.
  • Please do not include your Part 1 report in this final report.
  • Provide a thorough and accurate discussion of error sources, measurement uncertainty, and confidence in your results. An outstanding error discussion is an essential element of a top-notch report.
  • 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.
  • Remember to append your Matlab code at the end of the pdf file.
  • Not including the appendix, the report should not exceed 10 pages.

Part 2 report outline

  1. Haiku:
    • Compose an entertaining, exhilarating, thought-provoking, or melancholy Haiku on the subject of DNA melting.
  2. Abstract:
    • In one paragraph containing six or fewer sentences, summarize the investigation you undertook and key results.
  3. Introduction and Purpose:
    • Provide a succinct introduction to the project, including the purpose of the experiment, relevant background material and/or links to such information.
    • Summarize the ways in which this part of the lab differs from Part 1.
    • Keep the length to one or two short paragraphs, no more than 1/3 of a page.
  4. Apparatus:
    • Document your instrument design.
      • Describe your apparatus with sufficient detail for another person to replicate your work. Assume the reader is familiar with the concepts of 20.309 and has access to course materials.
      • Detail your electronic and optical subsystems. Include component values, gain values, cutoff frequencies, lens focal lengths, and relevant distances.
      • It is not necessary to document construction details, unless you built an instrument that was significantly different than the lab manual suggested.
      • Refer to schematics and diagrams in the lab manual instead of copying them into your report. Use reference designators (such as R7, C2) to refer to call out particular components in schematic diagrams.
    • Why not include a nice snapshot or two of the instrument? So lovely.
  5. Procedure:
    • Document the procedure used to gather your data.
      • Refer to procedures in the lab manual. Describe any changes you made.
      • Report instrument settings for each trial, including control software parameters.
  6. Data:
    • Plot all of your raw data, fluorescence vs. block temperature, on the smallest number of axes that clearly conveys the dataset. Include only data generated by your own group.
      • Data from the many sample runs overlaps, which makes presenting so much data on a small number of axes a real challenge.
      • Devise a combination of line colors, line thicknesses, and marker symbols that produces clear plot. If two sample types have a great deal of overlap, there may be no choice but to plot them on separate axes.
      • One approach that works well for some datasets is to plot a subsampled version of each trial using discrete markers. Vary the color and form to differentiate between sample types and individual trials.
    • Report your signal to noise results.
  7. Analysis:
    • Use bullet points to explain your data analysis methodology.
    • Document the regression model you used to analyze your data
    • Plot $ V_{f,measured} $ and $ V_{f,model} $ versus $ T_{block} $ for a typical run of each samples type. Use the smallest number of axes that clearly conveys the data.
    • For a typical curve, plot residuals versus time, temperature, and fluorescence, (example plot).
    • Provide a table of the best-fit model parameters and confidence intervals for each experimental run. Also include the estimated melting temperature for each run.
    • For at least one experimental trial, plot $ \text{DnaFraction}_{inverse-model} $ versus $ T_{sample} $ (example plot). On the same set of axes plot DnaFraction versus $ T_{sample} $ using the best-fit values of ΔH and ΔS. Finally, plot simulated dsDNA fraction vs. temperature using data from DINAmelt or another melting curve simulator.
  8. Results:
    • Identify your unknown sample (or state that your investigation did not provide a conclusive answer).
    • Quantify the confidence you have in your result.
  9. Discussion:
    • Discuss the validity of assumptions in the regression model.
    • Discuss any atypical results or data you rejected.
    • Compare your data to results from other groups and/or instructor data.
    • Give a bullet point summary of problems you encountered in the lab during part 2 and changes that you made to your instrument and methodology to address those issues.
    • Discuss significant error sources.
      • Consider the entire system: the oligos, dye, the experimental method, and analysis methodology, and any other relevant factors.
      • Indicate whether each source likely caused a systematic or random distortion in the data.
      • Present error sources, error type and their resultant uncertainty on your data and results in a table, if you like.
    • Discuss additional unimplemented changes that might improve your instrument or analysis.

Lab manual sections

Lab manual sections

References


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. LF411 Op-amp datasheet
  4. LM741 Op-amp datasheet

</div>