Difference between revisions of "DNA Melter Improvements"

From Course Wiki
Jump to: navigation, search
(Translating MATLAB Into Python)
Line 3: Line 3:
 
== Summary of SNR Results ==
 
== Summary of SNR Results ==
  
TODO: make these results happen... make the SNR-measuring VI work.
+
The SNR measurement/calculation works now. Now I'm starting with an SNR of 12.6 / adjusted SNR of 11.7. This is crappy. I need to improve it.
 +
 
 +
TODO: make these results happen.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 86: Line 88:
 
* TODO: photos
 
* TODO: photos
 
* TODO: measure improvement in SNR with these
 
* TODO: measure improvement in SNR with these
 
== Effect of Non-Uniform Sample Temperature ==
 
 
TODO: run a really slow melting curve (probably heating only, because after a long time the sample will be photobleached to the point of uselessness). See if it gets rid of that sine-wave-looking component of the residuals.
 
  
 
== Translating MATLAB Into Python ==
 
== Translating MATLAB Into Python ==
Line 96: Line 94:
  
 
I'm working on translating the "Estimate DNA Melting Parameters" analysis code into Python. It is reallllllllllllllllllllllly slow. Also, on my laptop, you can't do that animation-y thing without bringing in the big guns (GTK et al). TODO: finish last bit of code. TODO: see if fitting can be sped up. TODO: see if animation will work on Athena or 309 lab computers.
 
I'm working on translating the "Estimate DNA Melting Parameters" analysis code into Python. It is reallllllllllllllllllllllly slow. Also, on my laptop, you can't do that animation-y thing without bringing in the big guns (GTK et al). TODO: finish last bit of code. TODO: see if fitting can be sped up. TODO: see if animation will work on Athena or 309 lab computers.
 +
 +
== Stuff it would be nice to do in the future ==
 +
 +
==== Effect of Non-Uniform Sample Temperature ====
 +
 +
Run a really slow melting curve to minimize the difference between sample temperature and block temperature. See if this gets rid of that annoying sine-wave-looking component of the residuals. In order to run for a long time without photobleaching the sample to hell and back, this will require modifying the VI to take "snapshots" rather than exciting continuously.
 +
 +
==== SYBR Green Thermal Quenching Model ====
 +
 +
It would be nice to have a better model for the thermal quenching of SYBR Green than "It's linear, maybe, ish".

Revision as of 19:51, 24 May 2011

This page catalogs improvements made to the apparatus for the 20.309 DNA Melting Lab Module.

Summary of SNR Results

The SNR measurement/calculation works now. Now I'm starting with an SNR of 12.6 / adjusted SNR of 11.7. This is crappy. I need to improve it.

TODO: make these results happen.

Old Photodiode + Amp OPT101
Unstabilized Optics w x
Stabilized Optics y z

Forced Cooling

Circuit Part

Refer to Wikipedia for a basic explanation of the H-bridge motor controller circuit, which can drive a motor forwards or backwards, or let it 'free-run'. The TEC works like a motor, in the sense that if you apply voltage in one direction, one side gets hot and one side gets cold; if you apply voltage in the other direction, the hot side and the cold side are reversed; if you apply no voltage, the TEC does nothing and eventually reaches room temperature.

We can use an H-bridge to allow both forced heating and forced cooling of the sample block, instead of being stuck with passive cooling. TODO: circuit diagram and how the DAQ wiring has to change.

H-bridge datasheet

ACCOMPLISHED: got H-bridge to act the same as the relay, with an unmodified LabView VI. Wooo! Now need to get rid of noise in RTD and photodiode inputs from rapid switching.

Driving with a Multiplexer

Multiplexer datasheet This multiplexer takes two digital signals from the DAQ and translates them into a different set of digital signals to drive the H-bridge. Specifically, the Enable signal turns the TEC on and off with a certain duty cycle, and the Heating/!Cooling signal tells it whether to turn on in the heating direction or the cooling direction. Enable is S1 and Heating/!Cooling is S0 on the datasheet.

The output Za connects to two signal inputs of the H-bridge such that Za=1 causes the sample block to heat. Likewise, Zb=1 causes the sample block to cool.

ACCOMPLISHED: Forced cooling using multiplexer, H-bridge, and modified VI. Had to use second regulated power supply instead of DiabloTek computer power supply -- large currents were causing the H-bridge to heat up to the point where its over-temperature protection kicked in. Putting 3A through it, from the regulated power supply, gave satisfactory results. However, could not increase switching speed because the regulated power supply has a relay inside it that cannot switch very fast.

ACCOMPLISHED: The DiabloTek boxes supply large currents ~6A. Put two TECs in series (both electronically and thermally). This cuts down the current to a more manageable level, and also reduces the temperature gradient across each individual TEC, which is good because it puts them in a more efficient regime. Doing this, I got the sample block up to 83.8C using the DiabloTek power supply, without heating up the H-bridge unduly. (Still using a square wave with a 1s period, max duty cycle = 0.499.) Under these conditions, it seems to max out at 83.8C.

TODO: switch faster, try allowing a duty cycle above 1/2 the period, to see if I can make it to 100C at a decent speed.

LabView VI Part

ENABLE signal: switches on and off rapidly. When on, the TEC has voltage applied to it. When off, the TEC does nothing and discharges heat/cold to the air.

HEAT/!COOL signal: remains on the entire time it's heating, then remains off the entire time it's cooling. Controls whether the Enable signal causes the TEC to turn on in the heating direction or in the cooling direction.

Proportional control: The duty cycle of the TEC is proportional to the error between the desired and the actual heating rates (but also constrained to be between 0 and 0.5). This is how it was in the forced-heating-only VI as of Fall 2010, and I didn't change this aspect of it. To add forced cooling, I did the following:

  • Changed around the logic of the state-changes between Heating, Waiting, and Cooling.
    • IF Begin Thermal Cycle AND current temp < target temp AND (NEITHER Waiting NOR Cooling), then Heating = True.
    • IF NOT Done Waiting AND (Already Waiting OR (Heating AND current temp >= target temp)), then Waiting = True.
    • IF Begin Thermal Cycle AND (Already Cooling OR Waiting AND Done Waiting), then Cooling = True.
      • TODO: right now it stays on Cooling forever. Make it so that it un-presses the Begin Thermal Cycle button when it finishes cooling.
  • Made the controller able to deal with negative desired heating rates. Also, note that our heating control is different from a regular proportional controller in that, if the temperature is changing too slowly, you always increase the duty cycle, whether the error is positive or negative (heating or cooling). This is because of the way the information is split between the Enable and Heat/!Cool signals. Thus, when cooling, you have to negate the error. (I know, it's confusing.)

Monolithic Photodiode-Amplifier

Rather than rolling our own trans-impedance amplifiers, we can use the OPT101 integrated circuit, which contains both a photodiode and a million-gain amplifier. The OPT101 is mounted on a piece of perforated board, which fits inside an optical tube.

Route the output of the photodiode-amplifier through a high-pass filter and then through an additional amplifier of gain 10, for an overall gain of 10^7.

TODO: circuit diagram

Why is the high-pass filter necessary? Remember why the LED is driven at 5kHz, and how the lock-in amplifier reduces 1/f noise? That's wonderful, but the lock-in amplifier is implemented in software. It helps to have an additional filter in hardware, before the signal reaches the DAQ. The DAQ only has one analog-to-digital converter, which is shared by all the analog input channels. It has input limits of +/- 10V. If it receives inputs outside these limits on any one channel, it will get confused and give nonsensical readings on all channels. (If you get nonsensical temperature readings, but your RTD circuit is correct, check the output of your photodiode amplifier!) A simple high-pass filter helps avoid maxing out the DAQ with amplified low-frequency noise.

(Note: the roll-your-own TI amplifier already had a high pass filter in it, but its f_c was about 100Hz. I don't see a compelling reason not to make it higher, like 4kHz, which is what I did with the OPT101.)

Disadvantages

  • You lose the experience of rolling your own high-gain amplifier. The pset made a big deal out of the TI amplifier for a reason.
  • It's much easier to fry the OPT101s by connecting their power inputs wrong. "...Oh hey, I bet that brown stuff isn't supposed to be there!"

Physically Restrained Optical System

Because people have to carry their DNA melters from place to place, the optical system tends to get misaligned very easily, leading to noisy data. Here are some ways to make the system more stable:

  • Use CL5 clamps to hold the heat sink in place on the breadboard.
  • Bend down the leads of the TEC and tie them to the 'legs' of the heat sink with short pieces of wire. (By itself this doesn't help very much, but in combination with thermal grease, it makes a big difference.)
  • Use cage rods to hold together the sample block, the photodiode, the filter, and the lenses of the fluorescence detector. To avoid conducting heat out of the sample block, add nylon standoffs to your cage rods.
  • TODO: photos
  • TODO: measure improvement in SNR with these

Translating MATLAB Into Python

I translated the Simulating DNA Melting walk-through into Python: here. TODO: test on Athena and on 309 lab computers.

I'm working on translating the "Estimate DNA Melting Parameters" analysis code into Python. It is reallllllllllllllllllllllly slow. Also, on my laptop, you can't do that animation-y thing without bringing in the big guns (GTK et al). TODO: finish last bit of code. TODO: see if fitting can be sped up. TODO: see if animation will work on Athena or 309 lab computers.

Stuff it would be nice to do in the future

Effect of Non-Uniform Sample Temperature

Run a really slow melting curve to minimize the difference between sample temperature and block temperature. See if this gets rid of that annoying sine-wave-looking component of the residuals. In order to run for a long time without photobleaching the sample to hell and back, this will require modifying the VI to take "snapshots" rather than exciting continuously.

SYBR Green Thermal Quenching Model

It would be nice to have a better model for the thermal quenching of SYBR Green than "It's linear, maybe, ish".