DNA Melting Part 2: Lock-in Amplifier and Temperature Control

From Course Wiki
Revision as of 15:52, 19 November 2016 by Steven Wasserman (Talk | contribs)

Jump to: navigation, search
20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


Overview

In part 2 of the DNA Melting Lab you will make improvements 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.

Block diagram of lock-in amplifier for DNA melting

Update LED driver and photodiode amplifier for lock-in detection

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.

Build an LED driver

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.

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 that you can use to drive the LED circuit.

A schematic diagram of the LED driver circuit is shown on the right. Note that it uses a different model of op amp: an LM741. Be careful not to wreck your LED. 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 tis 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 a cutoff frequency that will get rid of as much of the low-frequency noise as possible while still allowing the modulated DNA signal to pass.

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:

Add a heater/cooler/controller board to thermal subsystem

In your instrument, both the actual and apparent behavior of the melting DNA sample are dependent on the heating and cooling rate of the sample holder. The temperature of the DNA sample always lags behind that of the sample holder. If the rates are reasonable, then the lag is not severe and a correction can be applied to the measured sample holder temperature to predict the sample temperature. If, on the other hand, the rates are too high, then the correction becomes unreliable. In addition, the melting and annealing reactions have a time scale associated with them as well. You will control the rates to yield the best data possible with your instrument. To do this, a specially-designed printed circuit boards (PCB) is provided. The PCB controls the current supplied to the TECs in contact with the smaple holder. Since the sample holder is aluminum, the parts of it in contact with the TEC, the RTD and the sample vial are all identical for reasonable heating and cooling rates. The PCB will be controlled by a modified version of the software, which you will implement later on in Part 2.

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. Disconnect the yellow/white cable between the power supply and the TEC stack.
  2. 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.
    • The red/black cable has a white two-pin Molex connector that will plug into the PCB, but no need to connect it just yet.
  3. 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.
  4. Turn off the Diablotek power supply.
  5. Connect the Diablotek and check power
    • 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 will be 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).
    Connect the fan to the PCB

Three status LEDs are provided on the PCB. As noted above, a lighted green LED will confirm that the Diablotek is turned on. If the TEC is properly connected, a red LED will indicate that the sample block is being heated. A blue LED will indicate that the sample block is being cooled. These lights will function whether or not the control software is running. If you see a blue or red light when you are not running an experiment, immediately turn off the Diablotek. Such a runaway heating or cooling command will most likely destroy one of the TECs. That would necessitate a deconstruction and reconstruction of a messy part of your instrument.



Update your PC data acquisition system

Update the DAQ connections

In Part 1 of the lab, we used the DAQ to measure the fluorescence signal from your photodiode, and the temperature signal from the RTD. Now for Part 2 of the lab, we will also use the DAQ to modulate the LED current, and control the temperature of the heating block. The DAQ connections and cable wire colors are summarized in the table below, and in a memo.

To control the temperature, the "Fan" connection is a 0 or 5 V signal from the DAQ, controlled by the Lock-In GUI. The "Heat/Cool" connection is a 0 or 5 V signal, also sent by the DAQ and controlled by the GUI, 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 provided 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 that 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 Lock-In GUI 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 10 Hz so that its 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.

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

DAQ Connection Cable
Connect the DAQ to the PCB
  1. Connect the DAQ to the PCB
    • Connect the orange Fan signal pin to the Fan signal header socket at the top of the PCB.
    • 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).
  2. If you have not already done so, connect the appropriate DAQ cables to the RTD and LED circuits on your breadboard.

Update and test the Lock-In GUI

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.

Verify your connections

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

  1. Open the "Lockin DNA Melter GUI".
  2. Turn on your +/- 15V power supply.
  3. Toggle the LED button in the GUI to verify that your LED circuit works. If not, make a note of it to come back to it later.
  4. 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.
  5. 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.
Lock-In GUI screens
Early in melting cycle
Late in melting cycle

Measurement bandwidth

The lock-in amplifier software includes band-pass and low-pass filters that help to reduce noise but also limit the bandwidth of the final output signal. In the lock-in block diagram in the Understanding the lock-in amplifier page, the input to the band-pass filter is number 4 and the output is number 5. The input to the low-pass filter is number 7 and the output is number 8. Review the DNA Melting: Using the LockIn DNAMelter GUI wiki page to adjust these filters using what you know from the signals and systems discussions in lecture and with your instructors.

Experimental procedure

Fluorescein and DNA are available to use for debugging and bringup. Run several beater-DNA samples and process the data to ensure that your instrument is operating well. Continue improving and testing your instrument until you are satisfied with the results. That said, please consume DNA judiciously if not sparingly.

To preserve your fresh DNA sample, quickly remove from the instrument and protect from light when not gathering data.

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.

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>