DNA Melting: Using the LockIn DNAMelter GUI

From Course Wiki
Revision as of 00:11, 8 November 2017 by Eliot Frank (Talk | contribs)

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

ImageBar 774.jpg


Description:

The MATLAB function LockInGUI runs the LockIn DNA Melting GUI. The LockIn version is similar to the Basic version; however the LockIn version provides for driving the LED, temperature control, and digital filtering.

On the left side of the window, the LockIn GUI has panels for setting the LED carrier frequency and amplitude, for temperature control (min and max temperature as well as ramp times), for temperature control PID parameters, temperature sensor parameters, setting the lock-in phase, and choosing filter frequencies and bandwidth.

GUILockInCarrierDetail.png

Carrier: Set the frequency, amplitude, and offset of the carrier waveform. Offset should always be greater than amplitude to keep the LED drive linear. Rsense is the scaling resistor for setting the LED current. Use the LED button to turn the LED drive on and off.


GUILockInTemperatureDetail.png

Temperature: The temperature control algorithm implements a temperature ramp from minT to maxT (Heat time), a hold at maxT (Hold time), then a ramp from maxT down to minT (Cool time), and finally a hold at minT until temperature control is disabled.

The Start button initiates a temperature control cycle. ("Start" will change to "Stop" when temperature control is active; if you stop a cycle, you have the option to resume at the last temperature.) The "Start" button is actually multi-function: click on the down-arrow to select other functions: Go to min T will force the temperature to minT; Heat will force the temperature to maxT; Cool will force the temperature to 0 C (it won't get there, but it will try); Hold suspends the control cycle and maintains the current temperature; Resume will resume a previously interrupted control cycle; Stop will turn off power to the TEC.

Use the Fan button to turn on the fan manually (usually the fan is only on after the Hold time when ramping down the temperature).


GUILockInPIDDetail.png

PID Gains: The program controls the temperature by turning the TEC on and off several times a second. The duty cycle (fraction of time the TEC is on) is determined by a PID algorithm:

$ {\rm DutyCycle} = P T_{\rm err} + I \int T_{\rm err} dt + D \frac{d}{dt} T_{\rm err} $

where $ T_{\rm err} $ is the difference between the desired and measured temperature. The P, I, and D parameters are the proportional, integral, and derivative gains, respectively. If the PID gains are changed, the default values can be restored by right-clicking on the PID Gains box.


GUISensorDetail.png

Temperature sensor: It is important to set the Vref and Rpullup parameters each time DNALockIn is run, so that the temperature is computed accurately. (Remember you are attempting to determine the melting temperature of a DNA sample.) Vref is the actual voltage supplied either by the reference or +15V supply, and Rpullup is the "pull-up" resistor in the temperature circuit. Rt0 is the sensor resistance at 0 C (1000 ohms) and alphaT is the sensor temperature coefficient (3.85 ohm/degree). Rt0 and alphaT should not be changed unless a different type of temperature sensor is used.


GUILockInPhaseDetail.png

Phase: Before starting a run, with a fluorescent sample in place and LED on, use the Phase dial to adjust the lock-in phase to maximize the fluorescence signal (upper-right graph).


GUILockInFilterDetail.png

Filters: The LockIn program uses FIR filters to process the data. First the raw data is passed through a bandpass filter centered on the carrier frequency. This filtered data is then multiplied by the phase-adjusted carrier and finally passed through a low-pass filter. BPF width is the width (in Hz) of the bandpass filter (centered on the carrier frequency). Low pass is the low-pass cutoff frequency. Order is the order of the filters (same order for all filters).


The LockIn GUI graphs the fluorescence voltage signal as well as temperature data in multiple plots. DNALockIn acquires the temperature and fluorescence signals at 200 kHz every 0.1 seconds (20000 data points). Select signals and their associated spectra are displayed in the two left-hand graphs. Fluorescence voltage and temperature (averaged over the 20000 points every 0.1 seconds) versus time are plotted in the upper right-hand graph. Fluorescence voltage versus temperature is plotted in the lower right-hand graph.


Before starting a run, use the Clear button to clear out data accumulated from setting up or from a previous run.

Use the Open file ... button to save to a file. Data will be continuously saved to the file, including all data after the "Clear" button was pressed. (If you press the Clear button while a file is open, only the plot is cleared, but all data is still saved.) At the end of the run, Close the file, so that no more data is saved.

The data will be tab-delimited and can be read into Matlab with the load command. The data will be in 3 columns of time, temperature, and fluorescence signal.


Troubleshooting: If there is a data acquisition error, for example, "Data acquisition cannot start!", it may be the DAQ device is not working. Try physically disconnecting the USB cable from the DAQ box and then reconnecting it. The X-series devices (blue and silver boxes) have on/off switches: make sure it is on or toggle the power off and on. If that fails, open the Measurement and Automation Explorer ("MAX"), open the Devices and Interfaces drop-down on the left side, and make sure there is only one "NI USB-6xxx" entry and that it is called "Dev1." Try to run the DNAMelter program again, and/or close it, re-open it, and run it again. If this does not work, consult an Instructor.

Options:

Clicking on the icon in the upper-left corner or pressing Alt-space will bring up the system menu. The system menu contains options for showing the about box, and for saving/loading the current configuration.