Taq is the Self-Organizing Systems Lab's general-purpose thermocycler. Check out the latest experiment running on Taq, or read on for more information about how to use Taq.
We built the Taq thermocycler as a capstone project in control theory in the Department of Electrical Engineering at the University of Washington (EE449 Spring 2007). For the most concise exposition of the motivation for building a thermocycler and our design process, see our final report from that class.
Here are the other milestone reports from that course:
Bugs & Problems
Sep 18, 2007: After 1 hour and 15 minutes of PCR-style cycling, i2c crashed, giving this error:
ERROR: I2cTransfer: ioctl failed: Remote I/O error (121)
It's convenient to execute scripts on and collect data from Taq remotely without needing to enter a password. To allow another computer to log in to Taq without entering a password, follow these instructions on the remote computer:
- If there is no .ssh/id_rsa.pub file, run ssh-keygen -t rsa.
- Copy the contents of the .ssh/id_rsa.pub file to a new line in Taq's .ssh/authorized_keys file.
Here's an example of what should be in the id_rsa.pub file:
ssh-rsa AAAAB3NzaC1yc2EAAAABIw...wcwQ7XiSSGx3qtYQs= taq@glycine
where the "..." indicates a lot of characters.
To allow Taq to log in to a remote computer (that has a static IP address) without entering a password:
- Copy the contents of the .ssh/id_rsa.pub file from Taq to a new line in the remote computer's .ssh/authorized_keys or .ssh/known_hosts file.
- Add "-i .ssh/id_rsa" to every ssh and scp command issued from Taq. This specifies which ID file Taq is supposed to use when logging in to the remote machine.
List of Materials
The complete list of materials purchased and utilized is available in this spreadsheet.
Design for H-bridge, some details about milling PCB's, links to/quirks about the power supply hack.
The H-Bridge design has 1 H-bridge per board. The transistors are in the SMT package TO-252. It runs on a 5V control circuitry and was designed to drive a 12V peltier load. There is are significant copper areas for cooling and it handles the 15+ Amps drawn by the Peltier coolers without any significant problems.
This H-bridge is able to be almost completely milled using the SOSLab mill and a 0.040" bit, we made 3 boards (2 with a bug, one of the updated version without the bug) for taq. The instructions on creating a PCB using the mill are linked to below.
Board Milling from Eagle
Milling PCB's describes how to mill a PCB using our Sherline tabletop mill and a circuit layout drawn in EagleCAD.
Power Supply Hack
Remember that any time you modify or play around with a computer power supply (even if you don't open it up) you are taking a risk, please be careful when attempting to make any modifications.
There are several tricks to turning an ATX power supply into a viable supply for another device. For our application a computer power supply was ideal. The 5V always-on supply could run the linux computer, networking and control circuitry while the main high current power supply was able to drive the H-bridges and Peltiers.
I drew most of my instructions from this page. I used a more modern power supply than the ones which are discussed on this page in order to get higher-current 12V rails. The following list shows the main points of the modification and other tips. All modifications which need to be done are are modifications of
- The green wire (pin 14 in the strange numbering system that you see everywhere) needs to be pulled to ground to turn on the power supply. Only do this after you have ensured that you have a sufficient load on the power supply, if you don't know exactly what this is, first read the rest of this list and then RTFM, sorry, but you really can't get away without doing it.
- There can be more voltage sense wires which are bundled with the mother-board connections. I identified these by finding wires which were smaller in diameter and attached to the same pin as another wire in the connector for the motherboard.
- The minimum loads for the power supply depend on the desired regulation accuracy. Read the documentation for other power supplies, but the some of the minimum current requirements are in order for the power supply to get ideal regulation, not to avoid avoid breakdown of the supply.
- Our power supply had 2-12V rails I identified the second rail's lines by finding the wires which normally connected to the video card (the other 12V power-hungry device) and noting the markings on those lines. In this case there was a black stripe down the side of the second rail's wires. I made sure to divide the load over the two wires as each line was rated at 18 A and we predicted taht we would be drawing 30 A when running at full power.
It'd be nice to have some measurements, etc. Mostly, though, we should have a schematic of the heat stack.
There are two pieces of software (both written in C) used to run Taq:
- runs on the Gumstix
- reads temperature profiles (i.e. provides the user interface)
- sends temperature setpoints to controller
- stores data
- runs on the Robostix
- takes measurements
- executes control loop
You can get the source code for both in the pcr project in our group's CVS repository, if you have access to it.
The thermocycler program loads a given *.tpf file and sends the controller a sequence of temperature setpoints. To run the program directly with the temperature profile test.tpf, you would simply log in to Taq and type
# ./run_pcr test.tpf test.out
This script sets up communication with the microcontroller,
# Set up communication with microcontroller wermit .kermrc
Executs the thermocycler program with the given profile,
./tpf $1 &
turns on data output from the microcontroller,
# Turn on data output from microcontroller i2c 0x12 wb 2 0
records the data to the given output file,
# Record data to output file cat /dev/ttyS2 > $2
and turns off data output from the microcontroller,
# Turn off data output from microcontroller i2c 0x12 wb 3 0
Thermocycle Profile Format (*.tpf)
This is the specification for the file that the PCR machine will take to develop a thermocycle profile. It will take time/temperature points and use this to guide the control system. Files of this type will be denoted with a .tpf suffix.
- All lines are terminated with a carriage-return/linefeed (\r\n)
- Header information is signaled by # in front a line, followed by a colon. The fields available here are:
- Three columns, space seperated (ASCII 0x20)
- First column is time from start of thermocycle profile in the format <hours>:<minutes>:<seconds>.
- Second column is the temperature of the high-side peltier that should be targeted at the specified time.
- Third column is the temperature of the low-side peltier that should be targeted at the specified time. This column is optional and if it is left off, both the low-side and high-side temps will have the same target temperature.
- The format for temperatures is <temp>.<temp decimal>. The units can are in C.
An example thermocycle profile might look like this:
#TITLE: Sample Profile #AUTHOR: Stephen Day #DATE: April 30, 2007 #NOTES: This is just a sample file to show the format 00:02:00 65.8 00:10:00 80.0 78.0 00:15:00 95.0 92.0 00:25:00 20.0C
Thermocycle data for the last experiment is saved in the file temps.out in the home directory of the root account.
See the section at the top of the page about passwordless ssh/scp to help streamline data collection.
The controller can run in one of two modes:
- slave mode, where it accepts setpoint commands from the thermocycler;
- debug mode, where it accepts commands from the user on a command line.
Since the slave mode is transparent to the user, we'll describe the debug mode here.
To access the debug mode:
- Connect the USB cord that runs out of the back of Taq to a computer.
- Configure your serial adapter for the Robostix:
- on Windows. Port is COM4.
- on Linux; I recommend using the minicom interface. Port is ttyUSB0.
- If you're using Minicom, type minicom -o to connect to the microcontroller.
- You should find yourself at a command prompt that looks like
- Type help to get a list of available commands.
- To control to 65/60 C, type start_ctl 650 600 at the command line. Numbers are entered at the command line as integers, but are interpreted as floating point numbers with one decimal place. Therefore 650 is interpreted as 65.0.
- If you have several serial connections open with the microcontroller simultaneously, you may see a subsample of the expected command-line display. Don't open more than one simultaneous connection.
- On Ubuntu, the USB serial adaptor wouldn't work unless brltty was uninstalled. If you connect the USB cord to your computer yet the ttyUSB0 port doesn't show up, try uninstalling brltty. If that doesn't work, try to use the dmesg command to troubleshoot.
We implemented a nonlinear model for the thermocycler using MATLAB's Simulink toolbox:
Here's a typical trace obtained from the simulation:
Here's an example cycle performed with Taq:
- Red is the hot side, Blue is the cold side, Green is the reservoir, and Pink is the lid
Here's the latest experimental data from Taq:
- Red is the hot side, Blue is the cold side, Green is the reservoir, and Pink is the lid