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

From Course Wiki
Revision as of 19:16, 1 November 2016 by Eliot Frank (Talk | contribs)

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

ImageBar 774.jpg


Overview of part 2

In part 2 of the DNA Melting Lab you will make revisions to allow greater control of your instrument and to reduce the effects of noise. You will add a pulse-width modulation (PWM) heater controller to enable careful control of the heating and cooling rates of the DNA sample. This will allow you to maintain a melting rate below the melting rate of the DNA and to work around the thermal lag of the instrument.

You will use an op-amp to enable modulation of the light flux emitted from the blue LED. The modulated illumination will then result in an oscillating amount of fluorescent light flux from the DNA sample. The oscillating flux signal will be detected by a photodiode and then amplified and demodulated using a lock-in amplifier. The modulation will allow you to place your signal in a low-noise area of the frequency spectrum, and the lock-in will allow you to recover the signal. Review your lecture notes, find an instructor, and review the Understanding the lock-in amplifier wiki page.


Reducing 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 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:

Minimize the effect of stray light

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:

  • 1 PCB heater-cooler board from the Center Cabinets or the East Cabinets.
  • 1 red/black connector cable from the East Cabinets.
DNA Melting Heater/cooler PCB

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 supply and the TEC stack. Then, connect it with wire nuts to the red/black cables, which have a two pin connector that can plug into the PCB (no need to plug in just yet though).
  2. 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.
  3. Turn off the Diablotek power supply.
  4. Connect the Diablotek and check power
    • Connect the Diablotek 4-pin/3-color power supply connector to the 4-pin connector on the PCB.
    • 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.
  5. Connect the orange Fan signal pin to the Fan signal header socket at the top of the PCB.
    • Refer to the table below.
    • The DAQ connections and cable wire colors are also summarized in a memo.
  6. Connect the fan itself to the Fan +/- connections at the bottom of the PCB (red to +, black to -, innermost row).
  7. Connect the black digital GND signal pin to the marked DGND header socket at the top of the PCB (innermost row).
  8. Connect the red Heat/cool signal pin to the marked Heat/cool header socket at the top of the PCB (innermost row).
  9. 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).
Signal name Signal location Ground location Pin wire color
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
DAQ Connection Cable

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 the LED driver to enable modulation

LED driver circuit

In order to take advantage of the lock-in technique, the excitation illumination from the LED must be modulated. To do this you will update the LED driver circuit and the DAQ control software.

LED radiant flux — your excitation light — is proportional to current, so we will implement a controlled current source and direct it through the LED to provide a stable sample excitation. The LED used in this lab can operate up to 30mA of current when driven to its full range. In Part 1 of the lab you had used roughly the full 30 mA. For Part 2 you will drive the LED (with a sine wave of amplitude 1 V and of offset 1.2 V) with an op-amp which will limit the current to about 10 mA.

To update the LED driver circuit, you will use an LM741 op-amp[1], with the output connected to the LED, and a current sensing feedback resistor. From op-amp the golden rules, the resistor current is identical to the LED current. Furthermore, since the negative terminal of the resistor is connected to ground, the feedback voltage is directly proportional to the LED current through the resistor constitutive relation V = IR. Using the golden rules again, the voltage at the positive terminal of the op-amp must be the same as the resistor voltage drop. Because we can output a variety of waveforms from the DAQ, we are able to precisely control the current through the LED, and likewise able to control the excitation light delivered to our dsDNA specimen. The current will simply be the voltage applied by the DAQ, divided by the value of the resistor that you place in the circuit, i.e., I = V/R. Software to control the DAQ output will be described below.


Warning.jpg 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.


Parts

  • LM741 op-amp from the Electronics Drawer

Assembly

  • Update your LED driver circuit as shown in the schematic above right.
  • Choose an appropriate value for the feedback resistor

Adjust photodiode amplifier gain and add high-pass filter

For Part 2 of the lab you will want to make some adjustments to your amplifier circuit. Principal among these are the adjustment of your low pass filter on the first stage and the addition of a high pass filter between the stages. In Part 1, you amplified an essentially constant signal, aside from its 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 (typically 10-15 kHz) and therefore the fluorescent emission from the LC Green is also modulated. You need to modify the low-pass filter to pass the modulated signal through both stages of your amplifier.

Next, since the 60 Hz, 120 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, or better yet measure, the frequencies of the noise sources in the lab, compare them to your chosen carrier frequency (on the order of 10 kHz) and choose an appropriate filter cutoff frequency. Modify carrier frequency and filter cutoff frequencies for highest instrument SNR.

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 are limited in their response time. You may recall from the Real Electronics lecture that the op-amps behave as if there is a low pass filter just before the output. Because of this the maximum gain that can be achieved will be limited. Review the datasheet for your LF411 op-amps, dig around online or in the course reading materials, talk to an Instructor or TA, and research "unity gain bandwidth" or the "gain-bandwidth product." The gain-bandwidth product is only directly applicable when the op-amp is used in a non-inverting or inverting "voltage to voltage" topology. However, to extend the concept to the transimpedance architecture, a white paper has been written that applies the unity gain-bandwidth spec to this architecture as well. The white paper is available on Stellar under Materials.

Multi-stage photodiode amplification circuit

Parts

  • 5 pF or smaller capacitor (if needed)
  • High pass capacitor and resistor
  • Alternate resistors for amplifiers (if desired)

Assembly

  • Remove the direct connection between the first and second stage op-amps and insert a high-pass filter as shown in the schematic.
  • Remove the original low pass capacitor in the first stage amplifier and replace with a much smaller capacitor if needed. This would implement an "anti-aliasing" filter. The purpose would be to filter out any noise of a frequency above the Nyquist frequency of DAQ input channels.
  • Adjust the amplifier gains if needed, the distribution of feedback resistors in the transimpedance amplifier if needed, and the compensation resistor R6 if needed.
  • Now would also be a great time to tidy up all of your wiring and put the LED modulation and 2-stage amplifier circuits in different blocks of the solderless breadboard.

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

The DAQ connections and cable wire colors are also summarized in a memo.

DAQ Connection Cable

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.

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 Lock-In GUI. Next turn on your +/- 15 V power supply and 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.

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

If any of the steps above do not give the expected outcome: Investigate, hypothesize, make an adjustment, and start again at the DAQ connections.

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.

When you have completed your modifications and have tested your instrument with beater DNA, ask an instructor for your Part 2 DNA samples. 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 oligo sequences). The fourth sample matches one of the three identified samples. You will not be told which one.

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

Collect data

Use your known samples to further characterize the behavior of your instrument and to calibrate the temperature offset between heating block and sample. One of the most important characteristics of your instrument to measure is the generally consistent offset between sample and block temperatures embodied in Kthermal. During data analysis you will compare the data from the known samples to simulated data, say, from DINAmelt. This will allow you to estimate the value of Kthermal for your instrument.

A second very important characteristic is the variability of data from your instrument. One way to characterize variability is to repeatedly measure the same sample, or a sample of the same type, and report the standard deviation of the results. At minimum, you should measure one of the known sample types three times. Running a single sample in triplicate is adequate for purposes of your lab report; however, a much more thorough procedure would be necessary to characterize the performance of your instrument over a wide range of conditions.

  • Which is best? The same sample in triplicate, or the three runs of the same sample type? If the latter, is it best to measure all in one sitting, or each on separate occasions?
  • What kind of experiments would you do if you were asked to develop a detailed specification for your instrument?
  • If you have the time and inclination, run additional experiments to better quantify your instrument's performance.

Finally, use your instrument to identify the unknown sample. You must report a quantitative measure of your confidence in the answer. Since the variability of your instrument is most likely not completely characterized, it is a very good idea to run the unknown sample at least three times. See Identifying the unknown DNA sample.

Opportunities for further development

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.

  • 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 Lock-In GUI. See us if you are interested.
  • You will fit a multi-parameter model to your data (see link for example). 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 Lock-In GUI so that the LED turns only briefly, and only after temperatures have stabilized to eliminate the lag 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!

Lab manual sections

References

  1. http://measurebiology.org/w/images/9/90/Lm741.pdfile:Lm741.pdf LM741 Op-amp datasheet]

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