Introduction: Arduino PCR (thermal Cycler) for Under $85

Picture of Arduino PCR (thermal Cycler) for Under $85

This tutorial will show you how to make a thermal cycler from scratch for about $85. In short, PCR (polymerase chain reaction) amplifies bits of DNA, creating millions of copies of a target sequence. You can use it to test a DNA sample for a specific gene, for instance, to check for genetic modification in food and for hereditary gene testing.

During PCR, a mixture of DNA, primer and DNA polymerase is cycled between three different temperature settings, over and over again. This project uses an arduino to control two high-power resistors to heat up the sample, a computer fan to cool down, and a thermocouple to keep track of the temperature. The design supports two samples at a time, though it could probably be extended to support more.

The parts are all off-the shelf, and the assembly should take a few hours. You will need access to a shop (at the very least a ban saw and drill press).

This project is still a work in progress by Stacey Kuznetsov ( and Matt Mancuso ( Please email us if you have any questions or feedback! Also, huge thanks to Rich Pell, James Lata and the ATX Hackerspace for materials & feedback. 

Step 1: More on PCR

Picture of More on PCR

To run PCR, you need DNA, primers that match the sequence you're trying to replicate and polymerase.

PCR consists of 3 steps that are cycled over and over again:

Denaturation (~94C) At this step, DNA 'breaks apart', splitting from a double helix into single strands
Annealing (~60C) Primers bond to the single-stranded DNA
Extension (~72C) Polymerase compliments the DNA, synthesizing strands that are of the target sequence

Each of these phases can be 20-30 seconds long and repeated 30+ times, depending on the protocol. Most protocols also suggest having a longer initial denaturation step and a longer final extension step.

A simple tutorial:

There's also a bunch of related resources here:

The results of PCR can be visualized using gel electrophoresis. DNA samples are loaded into a gel, and a high voltage is applied across it. Because DNA is negatively charged, it will travel through the gel at different speeds depending on its size. This process will effectively separate out the pieces you want, and you can see them by staining the gel. Here's a good tutorial and if you're trying to DIY it, the Macgyver Project is a pretty good resource.

PCR can be performed using 3 water baths (each kept at one of the three temperature settings). A human could physically move the samples from one bath to the next 30+ times. PCR machines were developed to automate the process, but most lab-quality ones cost thousands of dollars. But they don't need to! Today there is a growing number of open source PCR projects, among them OpenPCR (600$), LavaAmp ($200), and the Coffee Cup PCR (350$).

Step 2: Materials

Picture of Materials

Here's what you need:

2 Wiremound resistors, 150 ohms/50 Watts each (10$ total)
Arctic Silver Thermal Epoxy (14$)
Solid state relay, such as 25A  AC/DC SSR ($8.50)
Aluminum block, final dimensions ~64mm x 64mm x 26mm. check ebay (free - $5)
Arduino board, we used the mini ($20)
MAX31855 breakout (I used this one for $11, but the Adafruit one might be more reliable for $17.50)
Thermocouple wire ($10)
60mm fan ($4)
12V transistor (TIP120 should be fine, $0.70)
12DC, 0.5A power supply ($1)
Regular power cable
Plywood (if you want to make a case)
A few different length bolts and nuts (if you're making the case) we used 6x1" and 2x2" #6 bolts w matching nuts

You'll also be using:
Some wires
Breadboard (small one)
Wire cutters/strippers
Electric tape
Soldering iron/solder
Screw driver
Bansaw & drill press
Laser cutter (if you want to make a case)
Wood glue (if you want to make a case)

Step 3: The Aluminum Block

Picture of The Aluminum Block

We chose aluminum to house our samples because it's a really good thermal conductor and also relatively easy to acquire and work with. We machined the center of the block so that the resistors can fit in to 'sandwich' the samples. The outside of the block is cut like a heatsink to allow for faster cool-down.

The images below have our rough dimensions (in mm). Matt was really precise cutting it, but I don't think it has to be super exact.

Step 4: The Circuit Overview

Picture of The Circuit Overview

The circuit consists of 1) a solid state relay that drives the heater resistors; 2) a fan, powered by the 12 DC supply and controlled by the arduino through an NPN transistor; and 3) a thermocouple with a MAX31855 breakout

When hooking up the electronics for the first time, I suggest breadboard, not solder. If you end up making a case, you'll have to disconnect and re-connect a few things to make them fit!

Step 5: The Circuit- Resistors

Picture of The Circuit- Resistors

Split and strip the the power adapter as shown in the first image. Hook up the resistors as follows:

Black wire -> pin 1 (AC pin) on the relay
White wire-> one of the resistors. Connect the second resistor in series. Connect the second resistors to pin 2 (AC pin) on the relay.

Connect arduino to the relay
Arduino pin 7 -> pin 3 (+DC pin) on the relay
Arduino GND -> pin 4 (-DC pin) on the relay

Cover all connections w electrical tape!!!

---- some math ---
With 2 150ohm resistors in series, the total resistance should be 300 ohms. So with the U.S. outlet voltage being 120V, the current should be 0.4Amps, which makes the wattage 48Watts. The resistors are rated for 50 Watts, so this should be OK, but please double check the math, especially if your outlet runs on 230V (you'll need different resistors with higher Wattage).

Step 6: The Circuit- Fan

Picture of The Circuit- Fan

This is a basic setup where the fan is powered by the DC power supply, which is controlled by the arduino through an NPN resistor. ITP has a great tutorial on that. Here's the project set-up

Arduino pin 9 -> transistor base
Fan black wire -> transistor collector
Arduino GND-> transistor emitter
Arduino GND -> ground on the DC adapter (black wire)
Fan red wire -> red wire (power) on the DC adapter

Step 7: The Circuit- Thermocouple and MAX31855 Breakout

Picture of The Circuit- Thermocouple and MAX31855 Breakout

There's an awesome tutorial on how to set up the thermocouple and the breakout. Our project pretty much just followed it exactly, so the connections are:

Arduino pin 4 -> DO pin on the MAX31855 breakout
Arduino pin 5 -> CS pin on the MAX31855 breakout
Arduino pin 6 -> CLK pin on the MAX31855 breakout
Arduino GND & VCC -> to GND and VCC on the MAX31855 breakout

The thermocouple screws into the breakout board (yellow wire to the +).

Step 8: Assembly

Picture of Assembly

Use the thermal adhesive to attach the resistors to the notches in the aluminum block. The adhesive takes about 5 min to set, make sure the surfaces are flush (this will determine how fast you can transfer heat to the sample).

You can also use the thermal adhesive to glue the end of the thermocouple wire to the block (that's where the temperature is sensed). You'll get better accuracy if you embed the wire in the block. You can drill a small hole at the top, between the PCR tube holes and attach the thermocouple to that.

Step 9: Test It With Code

Picture of Test It With Code

You can take a look at the project code here. You will probably also need the max6675 library. The basic idea is that you pulse current across the resistors to heat up (by setting Arduino pin 7 to high); and turn on the fan to cool down (by setting Arduino pin 9 to high). You can check the temperature by polling the thermocouple.

The main thing is to not overheat (or even blow up) the resistors and sample. ***You never want to leave current running through the resistors for long periods of time!!!*** The thermocouple will not instantly respond to changes in temperature. Our 'heat up' code runs current through the resistors for about half a second and then checks the thermocouple. Every 15 seconds, the system times out and waits for a constant temperature to be reached. This ensures that we catch thermocouple delays, and also let the aluminum block heat evenly. Our heat-up code also has a few checks to make sure the thermocouple is properly connected, not heating up too fast, not overheating, etc.

Also, safety first, ***you don't want to leave this on running without watching it!!***

When cooling down, remember that the fan will continue moving for a few seconds after it's shut off, so it's best to shut off the fan 1 or 2 degrees before ideal temperature is reached.

The temperature is held constant by pulsing the resistors on for a tiny fraction of a second and constantly checking the temperature values. Given the limitations of the thermocouple and Arduino, you can get accuracy to +/-0.5C. However, since the Adafruit website reports a precision or +-2°C, you may also need to calibrate your thermocouple with an actual thermometer first.

The full 32 cycles take about 3 hours (depending on how the case is set up).

Step 10: Case

Picture of Case

This is sort of optional, but casing does make the heat-up times way faster. We used BoxMaker to make a simple box, and modified it a bit. We added a bunch of holes for ventilation on the front and sides. We also added holes for mounting screws for the fan in the back. The bottom piece has 2 screw holes to attach the relay, and 2 more holes for taller screws for the aluminum block to sit on. The top consists of 2 separate pieces for easier access. You can grab the VSD file.

For the case material, wood or plywood should be fine because it's a pretty good insulator.

Once you have the pieces laser cut, you attach the relay to the bottom. User shorter screws for the relay. Attach the fan to the back piece, making sure the fan sits inside the case.

Then you can use wood glue to attach the bottom, sides and back together.

The aluminum block sits on top of the two taller screws. We drilled 2 extra holes at the top and bottom of the aluminum block to make it fit more snugly (about 48mm apart).

You may need to re-assemble some of the circuitry to make feed the wires through the case. The front and top go on last.

Step 11: Run It!

Picture of Run It!

You can test it out using mineral oil, or you can spend $$ and get a real PCR kit such as this one. You can speed up the cool-down times by putting some ice behind the fan. Currently, 32 cycles take about 3 hours.


Kjetil Egeland made it! (author)2017-10-03

Great project..! Almost finished. Just need to get the Arduino code right.. Sorry that I am not an expert here, but I usually manage. I get this error code: pcrFinal:210: error: 'cycles' was not declared in this scope . Is it any other librarys needed to get this to work? Do you know also how to add another thermocouple then the MAX 6675 ? Can I use the PT100 element directly, or do I need a breakout board? I dont have the max and probe, so I wanted to use something else.



kadamb (author)Kjetil Egeland2018-01-21

great to know that you manage to fix it. does it work? I need help ti built one

arpruss (author)2018-01-09

How fast do the temperature changes have to be? Could one just use a 3D printer's heated bed, and control the temperature changes with gcode? The heating up and cooling down would be quite a bit slower.

MohammadY31 (author)2017-11-28

guys can someone help me out in finding the right capillaries , there r so many and am really confused and also the specific drill bit size

JeffM287 (author)2017-04-03

What fraction or percentage of DNA is this machine capable of analyzing?

BradenT (author)JeffM2872017-10-19


DNA is made up of Four Nucleotides, Adenine, Guanine, Thymine, and Cytosine, Or A, G, T, C for short. The nucleotides form long strands. Two long strands will bond, A to T, and G to C. The first step, Denaturing, Breaks these bonds.

DanaR4 (author)2015-03-27

has anyone successfully sequenced their own genome with this ? as in the whole thing?

TrentonA1 (author)DanaR42016-11-14

It'd be possible, but would take so long no one would do it. The original human genome project took more than a decade to complete and they started out with tech similar to this. They also had teams working on it.

So, it's just not practical to try to sequence entire genomes using simple PCR.

GerardoQ (author)DanaR42016-10-21

Simple miniaturized gel system for DNA sequence analysis Nucl. Acids Res. (1998) 26 (2): 452-455 doi:10.1093/nar/26.2.452

OscarG37 (author)DanaR42015-12-15

Well.. to do that, you will need a DNA sequencer.. like Next-Generation technology or something similar.. PCRs are systems that could copy parts of the DNA that match a "template".. So they are useful to find known mutations (like known cancer mutations in biopsies, or know mutations that increase your chances of develpping a desease). But I think it is virtually impossible that you will be able to sequence your own genome with a PCR.

njones32 (author)DanaR42015-09-08

it would be really really hard. you'd also need a spectrophotometer, as well as other imaging machinery. you'd need the proper reagents, water bath. microcentrifuge, etc. and you'd need to do dozens of restriction digests, then be able to utilize software to analyze the results and then have the acuity to make sense of that in any meaningful way. i imagine it would be more difficult with inadequate hardware

Mercury201010 (author)2016-09-05

so, looking over your pictures, I began you plan,
anytime in the near future to perhaps maybe instead of depending on such
fairly small and restrictive materials and despite the common misconception,and the actual lack of convenience offered regarding cans, and instead.....upgrading and keeping some of that PBR on TAP !? (please say yes. fingers crossed)

ckyuen (author)2016-05-16

I try to compile your arduino file with Max6675 library. it show out error at void runPCR() and "cycles" was not declared in the scope. How to correct it?

ortegacomputacion (author)2014-07-27

nice project, I arrived here after my wife's pcr broke and I was told I need to build one asap, in a week, mine is supposed to have a heater on top to avoid evaporation, but I will definitely use the know how and experience from you guys, the drill bit IS an issue here in Argentina, will try to get it made (8 holes) by a shop. if anyone is interested in the outcome let me know and I'll report back.

Ortega, My name is Leonardo, I am from Argentina too. Can we talk by email or skype? I have a project right now and I think you would like to be part of it. Anyway, contact me if you are interested on keep talking. good luck!

MostafaA4 (author)2015-06-07

Can i replace the heat source (relay and risitors with cermic heater )

njones32 (author)MostafaA42015-09-08

yes, and you probably want to

JeannieS1 (author)2015-04-07


Does anyone who works in a lab know how well the rates of heating and cooling match a commercial/lab machine?

And has anyone tried it out to replicate DNA? Any success?


NikorP (author)2015-01-28

Is it at all possible that you can make a video showing you using the machine with a kit like the one you suggested? I've never used a PCR machine before, commercial or non-commercial.

mahdii (author)2014-12-12


mahdii (author)2014-12-12


joaocandre (author)2014-04-14

Could there be any advantage in using a thermoelectric cooler instead of fans and resistors?

ttsdttt (author)2014-02-15

Great work! I have got one question: How did you manage to drill the holes so that the reaction vessels fit into them correctly? They are formed conically but the holes do not seem to be so.

sunone (author)2013-07-27

Cool project, but I have a question. There is no mention of any Vcc for the arduino in this project, only the power of the relay and the fan. how is supposed to work the arduino? Using the current flowing from the fan?

fourpenguins (author)2012-07-22

You ought to have a base resistor on your transistor. About 2.2kOhm should be good (assuming beta=100 for your transistor, which is derating by a factor of 10 from the spec'd 1000).

Without a base resistor, your base voltage wants to sit at ~1 volt and your Arduino pin wants to be at 5v. This makes your Arduino unhappy.

nrocy (author)fourpenguins2012-07-22

This :) Also should probably also have a flyback diode to protector the transistor from back EMF from the fan. The tutorial linked to in the article mentions this.

Great project nonetheless!

fourpenguins (author)nrocy2013-03-26

Actually, the diode is really only necessary with a FET. NPN transistors can typically withstand high voltages.

staceyk (author)fourpenguins2012-07-24

Yup, I just checked, and I actually do have that in my setup, but not in the writeup. Adding it in now, thanks for the catch!

danbemp (author)2013-03-25

I was blown away by this article. Incredible work... affordable, homemade laboratory equipment is long overdue. Biology should be accessible to hobbyists and tinkerers!

Also, have you heard of the dremelfuge? It's an attachment for a standard rotatory tool or power drill which can generate pretty significant centrifugal acceleration. Figured you might appreciate hearing about it, if you hadn't already.

Keep up the good work.

makerbuilderbaker (author)2012-08-03

Although those wattage calculations are correct for 120 volts DC, they might not work so well with 120 volts AC, which is what you are giving them. As you probably know, Ac voltage in the states oscillates from negative to positive at about 60 hertz. While we think of our AC power as 120 volts, it is actually higher and lower. 120 is the RMS voltage (the root mean square This means that the "average voltage" of the entire sine wave is 120 volts. This is calculated by taking the peak voltage of the sine wave and dividing by sqrt(2). See this for details:

If the RMs is 120, the peak voltage is 120*sqrt(2)=169.706

so for a large fraction of the operating time, the resistors will be getting above 120 volts, all the way up to 170 volts.
I=V/R I=170/300 I=.56
P=VI P=170*.56 P=68 watts

Although you are not operating at 170 volts all of the time, you are exceeding the wattage rating for a significant amount of time every second. I sincerely suggest you use 100 watt resistors. These will protect you from peak voltage as well as any power surge/ripple.

Besides that, I love the product! I am currently working in a bio lab with fancy thermo cyclers and they are essential to our work.

I am sure you can large wattage wirewound resistors on the internet. Good luck.

Hey, thank you so much for this, really appreciate it!! If I stick with the size that fits the block, I might use 2 of these in series, 300ohms @ 50 watts. 

I = 170/600 = 0.28A
P=170*.28 = 48Watts (at peaks)

Does that seem right?

Your math is correct, and those new resistors will be much better suited to the task.
However, to guarantee proper operation and long life, you might want to go even higher. Resistor wattage ratings are usually absolute maximum ratings which can be tolerated for only a short amount of time. With 300 ohm resistors, you go to 96% of the absolute maximum it would likely receive. In the name of caution, I only use resistors at up to 1/2 to 2/3 their rated wattage capacity. Depending on price and availability, I would recommend a total resistance of more than 750 ohms, this will place you below 40 watts at peak.
A few reasons for this caution are outlined below.

The tolerance on your wattage may be several percent, so your capacity could be from 47.5 to 52.5 watts with a 5% tolerance. Unfortunately tolerance on wattage is less prevalent than tolerance on resistance.
Also, grid surges and ripples do occur and you want to build your device to handle the worst case scenario.

It is good practice to err on the side of caution and never trust your components.

XTL (author)makerbuilderbaker2012-09-09

For 230V countries: Peak voltage = 325 V

For power of 40W - implies 120mA current
Resistors would be 2.6 kOhm.

Using preferred values:
- two 1500 Ohms resistors (choose devices with 25W or greater rating. Preferably 40W)
- gives us 110mA and 35 Watts.

or: - two 1200 Ohm resistors (choose devices with 30W minimum ratings. Preferably 40-50W)
- gives us 135mA at 44 Watts.

Use an osPID to control the SSR driving the load.
Use a cheap (low temp 400C) k-type thermocouple to connect to the osPID controller.

steveastrouk (author)XTL2012-10-24

FORGET IT. RMS values are all you need to consider.

This is wrong.

The RMS value is THE SAME HEATING value as the equivalent DC. FORGET the peak.

Your numbers are completely wrong. We cannot talk about "peak power", there is no such thing.


dustinandrews (author)2012-07-22

This sounds like a perfect candidate for a PID control loop.

staceyk (author)dustinandrews2012-07-23

Hey, great about about PID, there's actually an arduino library already written for it I'll try it out!

macowell (author)staceyk2012-07-24

Also check out the OpenPCR PID library (they just released some new code July 1 2012):

Cool project, I'll make one.


XTL (author)macowell2012-09-09

osPID is a really nice kiln controller with thermocouple input (k-type by default).
The project uses the arduino PID library. You might want to check it out.
Works perfectly for me. Ramp controls and everything.

SolarSunrise (author)2012-07-28

Using resistors as a heater? That's a nice idea but how about using peltier?

macowell (author)2012-07-24

Very cool!

How tightly does the conical section of the PCR tube fit into the heating block? Do you add a liquid or gel to transfer heat between the heater block and the PCR tube when the tube is in the block?

Do you add mineral oil on top of the PCR reaction mix to prevent condensation in the cap of the PCR tube?

I've seen a couple of other DIY PCR projects. We should get some funds (Kickstarter? a grant?) to manufacture drill bits for milling out the precise profile of a PCR tube. I'd use one. I bet you'd use one... wonder how much a batch of 20 would be.

staceyk (author)macowell2012-07-25

Hey Mac!!

The PCR tube sits really tightly circumference-wise, but the conical section is not tight at all :( We just used a regular drill bit, so our holes are a little longer than the height of the tube. Adding a gel/liquid to speed up heat transfer is a great idea, is there a material you recommend?

Yes, def using mineral oil since there's no heated lid.

A custom-drill bit might be nice. I found this: I could send in a quote, but if you're trying to build something for under $100, or preferably even under $50, it has to cost like  $5-10 or it's probably not worth it...

macowell (author)staceyk2012-07-25

I think adding mineral oil to fill the bottom of the tube in the heater block would work.

It would be neat to find a $10 milling tool set that could be used to drill out the block. Maybe a standard tapered ball-point end mill & a cylindrical drill bit? Not sure.

Alternatively someone could have a bunch of 8-tube strip, 16-well, and 48-well blocks manufactured and sold near cost.

techxpert (author)2012-07-20

you don't need 150 Ohm resistors do you because i found 560 Ohm resistors for $438.

staceyk (author)techxpert2012-07-24


clazman (author)2012-07-22

Just some thoughts...

Why not use an "off the shelf" heat sink?

Wouldn't the SCR last longer if it was mounted on a heat sink?

Why not use "off the shelf" heater cartridges instead of those resistors?

nplant (author)2012-07-22

This is neat! I've worked on two fully integrated PCR instruments (GeneXpert and a new one not yet on the market) and it looks like you have covered all the bases for a basic amplification machine.

When you figure out how to add optics, you'll really have a platform to outcompete the big boys!

ShaperG (author)2012-07-19

This is fantastic! I've been working on one using peltier heat pumps but it was too confusing for a poor molecular biologist like me. I can't wait to build my own and try it out in the lab.

marc.cryan (author)2012-07-19

Amazing project -- you made the build and theory easy to understand. Also - I suggest the project name 'PBR PCR'

staceyk (author)marc.cryan2012-07-19

LOL, thanks for the name suggestion, if i ever print a PCB for this, that's what i'll call it. PBR pretty much comes out of the tap in Pittsburgh

About This Instructable




More by staceyk:Arduino PCR (thermal cycler) for under $85DIY Projects, Communities and CulturesAir quality balloons
Add instructable to: