Difference between revisions of "Team:UMaryland/Design"

 
(42 intermediate revisions by 5 users not shown)
Line 9: Line 9:
 
<html>
 
<html>
  
<!--Attention! If you are not part of the website team, you are NOT allowed to touch anything above this line without the express permission of Best Kohai.-->
 
  
 
<style type="text/css">
 
<style type="text/css">
Line 40: Line 39:
 
margin:0px;
 
margin:0px;
 
padding:20px;
 
padding:20px;
background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #f9f8ea 50%, #FFFFFF 100%);
+
background-color: #89e1ff;
 
min-height:42px;
 
min-height:42px;
 
top:-220px;
 
top:-220px;
 +
border-top:2px solid black;
 
}
 
}
 
#layer2 {
 
#layer2 {
Line 50: Line 50:
 
margin:0px;
 
margin:0px;
 
padding:20px;
 
padding:20px;
background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #d02a2a 50%, #FFFFFF 100%);
+
background-color:#ffffff;
min-height:42px;
+
top:-220px;
+
}
+
#layer3 {
+
overflow:hidden;
+
position:relative;
+
width:100%;
+
margin:0px;
+
padding:20px;
+
background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #fbf000 50%, #FFFFFF 100%);
+
 
min-height:42px;
 
min-height:42px;
 
top:-220px;
 
top:-220px;
 +
border-top:2px solid black;
 
}
 
}
  
Line 69: Line 60:
 
max-width: 1900px;
 
max-width: 1900px;
 
min-width: 1000px;
 
min-width: 1000px;
text-align: center;
+
text-align: justify;
 
margin:auto;
 
margin:auto;
}
+
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
#contentbox1{
+
width: 80%;
+
max-width: 1900px;
+
min-width: 1000px;
+
text-align: left;
+
margin:auto;
+
}
+
#contentbox p{
+
 
font-size:18px;
 
font-size:18px;
 
}
 
}
Line 111: Line 94:
 
width:100%;
 
width:100%;
 
text-align:center;
 
text-align:center;
height:150px;
+
height:220px;
 
position:absolute;
 
position:absolute;
 
bottom:0px;
 
bottom:0px;
Line 142: Line 125:
 
background-color:red;
 
background-color:red;
 
danger:wow;
 
danger:wow;
height:100px;
+
height:150px;
 
top:-220px;
 
top:-220px;
 
text-align:center;
 
text-align:center;
Line 151: Line 134:
 
<div id='cover'>
 
<div id='cover'>
 
<div id='bar'>
 
<div id='bar'>
<p style="font-size:64px"><b>UMD's Homemade PCR</b></style>
+
<p style="font-size:64px"><b>UMD DIY PCR</b></style>
 +
<p style="text-align:center;font-size:24;"><i> How we created a dual purpose PCR machine and incubator out of a hair dryer.</i></p>
 
</div>
 
</div>
 
</div>
 
</div>
  
 
<div id='suchdangermuchhazard' style="margin:auto;">
 
<div id='suchdangermuchhazard' style="margin:auto;">
<div style="left:200px">
+
<div style="left:400px">
 
<img src = "https://static.igem.org/mediawiki/2015/c/cb/Warning.png" ; height="60" width="60">
 
<img src = "https://static.igem.org/mediawiki/2015/c/cb/Warning.png" ; height="60" width="60">
 
</div>
 
</div>
<p style = "font-size:18px;">Construction Hazard. Build at your own risk.</p>
+
<p style = "font-size:18px;">Construction Hazard. Jumping hairdryer safety measures will cause rapid heating of the machine, without proper control the machine may cause fires. Proceed with caution. </p>
 
</div>
 
</div>
 
</div>
 
</div>
  
<div id='layer1'>
+
<div id='layer2'>
 
<div id='contentbox'>
 
<div id='contentbox'>
  
<h1><b>UMD DIY PCR</b></h1>
 
<p> <i> How we created a dual purpose PCR machine and incubator out of a hair dryer.</i></p>
 
<h1><b>Background</b></h1>
 
  <p> The PCR machine is a common machine used in biological laboratories to amplify or extend fragments of DNA to be used in subsequent experiments. This tool is especially relevant to iGEM and SynBio labs who pave the way to vaster applications of  We began this project with the vision to create a machine that would be
 
<p>Our first design for a DIY PCR machine was modeled after a more conventional PCR machine. This first prototype relied on two Peltier units stacked on top of each other to heat a customized aluminum block that held the PCR tubes. In order for the system to have feedback, we embedded a temperature sensor in the aluminum block to measure the temperature of the PCR tube wells. The sensor then reported back to an Arduino UNO, which then regulated the energy flow to the Peltier units, thereby regulating the temperature of the block and tubes. However, after much testing, this design proved to be unoriginal, expensive, and inefficient. While the conventionality of the design itself did not pose an issue, we realized that the parts used to assemble it were not as well-known or easily accessible to the general public, which we felt would take away from the possible applications of this machine. In addition, although the price of this first prototype was relatively inexpensive in contrast to laboratory grade PCR machines, the price still ranged in the hundreds of dollars. Finally, the greatest issue with our design was the inefficiency of the hardware; we found that the Peltier units were not able to quickly cycle through the desired temperatures, causing the unit to take 5 to 10 minutes just to rise up to 95℃. After considering all of these factors, we began a redesign of our machine to better suit the needs of the DIY market.</p>
 
<br>
 
<p> The idea for our current thermocycler design first came into form when we found that our original prototype was not ramping up to the desired temperatures fast enough. We thus looked into other options such as the heating element in a hair dryer. We found that the hair dryer was able to reach very high temperatures—much higher than the desired maximum of 95℃ for PCR—in a matter of seconds. We then made a decision to suspend construction on the Peltier-centered thermocycler in order to see how successful we could be with making a rapid PCR machine out of a hair dryer. Before this decision, we took into consideration the danger of working with a hair dryer, failure due to uncertainty that the machine could be effectively controlled, and, on top of that, having less time to work on it. Nevertheless, we took the risk.</br><i>Please continue on to see the design of our machine.</i>
 
  
 +
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>Background</b>
 +
<div id="showwithbox_id" onclick="document.getElementById('spoilerwithbox_id').style.display=''; document.getElementById('showwithbox_id').style.display='none';" style="margin:auto;padding:5px;width:100%;"><p style="text-align:center;">Click to show
 +
</div><div id="spoilerwithbox_id" onclick="document.getElementById('spoilerwithbox_id').style.display='none'; document.getElementById('showwithbox_id').style.display='';" style="margin:auto;padding:5px;display:none;width:100%;">
 +
<p> The PCR machine is a quintessential component of any biological laboratory that needs to amplify or extend fragments of DNA for subsequent experiments. This tool is especially relevant to iGEM and SynBio labs who pave the way to vaster applications of genetic engineering.
  
</div>  
+
<p>Our initial prototype for a DIY PCR machine was modeled in the fashion of most readily available commercial machines, relying on on two Peltier units stacked on top of each other to heat a customized aluminum block in which PCR tubes would sit. In order for the system to be informed by accurate feedback on temperature fluctuations, we embedded a temperature sensor in the aluminum block. The sensor reported the temperature to an Arduino UNO, which responded by regulating the energy flow to the Peltier units, thereby controlling the temperature of the block and tubes.
  
 +
<p>However, after substantial testing, this design proved to be unoriginal, expensive, and inefficient. We were troubled to realize that the parts used to assemble it were not as easily accessible as we had hoped, which we felt would take away from the possible applications of this machine as well as the philosophy of its construction. In addition, although the price of this first prototype was relatively inexpensive compared to laboratory-grade PCR machines, the price still exceeded our goal, ultimately costing several hundred dollars. Finally, the final straw that led to our eventual redesign was the inefficiency of the hardware: we found that the Peltier units were not able to quickly cycle through the desired temperatures, causing the unit to take 5 to 10 minutes just to rise up to 95℃, where denaturation must occur between each of the 25 or so cycles. After considering this combination of factors, we embarked on a redesign of our machine to better suit the needs of the DIY market.</p>
  
 +
<p> To combat the unacceptably slow temperature ramp rate, we made a decision to suspend construction on the Peltier-centered thermocycler in order to attempt making a rapid PCR machine out of a hair dryer. Before committing to this effort, we considered the danger of working with a hair dryer and the potential for failure: we were uncertain that the machine could be effectively controlled and had a narrow window of time within which to design and trouble shoot the machine. Nevertheless, we took the risk.</br><br><i>Please continue on to see the design of our machine.</i>
 +
<p style="text-align:center;">Click to hide
 
</div>
 
</div>
</div>
 
<div id='layer2'>
 
<div id='contentbox'>
 
<h1><b>What is PCR?</b></h1>
 
<p>
 
Polymerase Chain Reaction or PCR is a common tool used in the field of biology to amplify DNA or RNA. Invented by Dr. Kary Mullis, PCR is conducted trough cycling DNA, primers and polymerase through various temperatures. The reaction is started by heating the reaction mix to 95 degrees Celsius. The high heat overcomes base stacking interactions and hydrogen bonds which maintain the double helix, a process called denaturation. The machine then cools down to an annealing temperature in order for primers, short ssDNA oligos, to recognize selected DNA sequences, form duplex, and allow for polymerase to bind. Annealing is followed by extension, which is performed by the polymerase at its active temperature, typically around 72 degrees. The polymerase forms a daughter strand by adding nucleotides to the primer in the 5'-3' direction. <b>I don't think this is necessary, especially not here. If you want to write how PCR works, put it in description. PCR is also a very complicated process so we'll need to invest a lot of space into it if you want to do it justice</b></p>
 
<br>
 
  
<div align="center"><iframe width="560" height="315" src="https://www.youtube.com/embed/2KoLnIwoZKU" frameborder="0" allowfullscreen></iframe> </div>
+
 
 
<!--<h1><b>Purpose</b></h1>
 
<!--<h1><b>Purpose</b></h1>
  
 
<p>
 
<p>
Although the process <b>of PCR</b><strike>of amplifying genetic material is remarkable</strike>, the <b>necessary</b> hardware needed to do it is relatively simple. <b>While different templates, primers, and polymerases can be used, a thermocycler capable of maintaining temperatures between 4 and 95 degrees is absolutely required</b>.<strike>All that is required are three different temperatures which are maintained by the machine, enabling the enzymes and template to do the work of PCR.</strike> Current <strike>PCR machines</strike> <b>thermocyclers</b> cost thousands of dollars, <b>which is often prohibitively expensive for a DIY Bio effort.</b> <strike>and although there exists open source, DIY PCR machines, their costs still range in the hundreds of dollars. Here at the University of Maryland, we thought that that was an absurd notion. PCR, because of its simplicity and utility, is a robust tool for the diagnosis of many diseases both in the developed and developing world.</strike> Making the device cheaper would give more people accessibility to this <b>valuable lab tool, enabling breakthrough research in more places around the globe</b><strike>platform</strike>.<strike> Accessibility enables further innovation and development of novel methods for disease detection and this in turn enables better and faster diagnosis and treatment both in the developed and developing world.</strike>
+
Although the process of PCR, the necessary hardware needed to do it is relatively simple. While different templates, primers, and polymerases can be used, a thermocycler capable of maintaining temperatures between 4 and 95 degrees is absolutely required. Current thermocyclers cost thousands of dollars, which is often prohibitively expensive for a DIY Bio effort. Making the device cheaper would give more people accessibility to this valuable lab tool, enabling breakthrough research in more places around the globe.
 
<br>
 
<br>
Another <b>consequence of expensive conventional thermocycling is the financial difficulty of bringing these machines into the classroom. PCR is an extremely important topic in biotechnology, but it is typically also one that requires one to "see it to believe it." However, schools often cannot afford to purchase thermocyclers due to their high cost. By manufacturing a cheap, DIY thermocycler that can be assembled at a low cost, we can help bring this technology into schools that would otherwise be unable to afford it.</b><strike>major advantage of "cheap" is education. Here at the University of Maryland, we acknowledge that iGEM is a competition, however we also understand that this competition is also a collaboration. It is an opportunity for all of us to learn from one another and serves as the foundation for future discovery, innovation, and new projects. We hope that our work with the PCR machine will inspire many more teams to tackle designing hardware. We hope that our current collaborations with Duke University foster better and more innovative projects from both of our teams. And most important, we hope that our efforts will be able to inspire the future generation of iGEMer's and the newest members of the iGEM community; high school students.</strike>
+
Another consequence of expensive conventional thermocycling is the financial difficulty of bringing these machines into the classroom. PCR is an extremely important topic in biotechnology, but it is typically also one that requires one to "see it to believe it." However, schools often cannot afford to purchase thermocyclers due to their high cost. By manufacturing a cheap, DIY thermocycler that can be assembled at a low cost, we can help bring this technology into schools that would otherwise be unable to afford it.
<br>
+
<strike>I remember, along with my fellow teammates, learning about PCR by cutting up little paper nucleotides and putting them into a brown bag and then having our hands act as the "polymerase" that would pluck the nucleotides out and match them with the template strand we were given. I remember taking away very little from this "lab" other than a few paper cuts. In subsequent years, I went through a few internship programs where I was able to learn in greater detail the steps of PCR, eventually learning how to design primers, program the machine, and setup my own reactions. However, I believe that if we truly want to bring synthetic biology to the public, we have to allow them the opportunity to actually do PCR, not through a paper bag which is conceptual understanding, but a real reaction where the end products are the real deal, actual amplified DNA. We still have a ways to go... the enzymes have to become cheaper pipettes need to become cheaper, but designing a below 50 dollar PCR machine is the first step in this endeavor.</p></strike>
+
 
+
 
<div style="text-align:center;">-->
 
<div style="text-align:center;">-->
  
 +
</div>
 +
</div>
 +
<div id='layer1'>
 +
<div id='contentbox'>
 +
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>Design</b>
 +
<div id="showwithbox_id1" onclick="document.getElementById('spoilerwithbox_id1').style.display=''; document.getElementById('showwithbox_id1').style.display='none';" style="margin:auto;padding:5px;width:100%;"><p style="text-align:center;">Click to show
 +
</div><div id="spoilerwithbox_id1" onclick="document.getElementById('spoilerwithbox_id1').style.display='none'; document.getElementById('showwithbox_id1').style.display='';" style="margin:auto;padding:5px;display:none;width:100%;">
 +
<p> We began by working out how to wire the hairdryer so that we could regulate the heating unit and the fan separately.
 +
<p>After significant soldering and reworking the internal safety measures inside the hairdryer, we were able to wire the system so that we could turn the heat on and off while running the fan continuously. Using tape, we secured a sheet of aluminium foil to the top of the heating unit of the hairdryer. The outer casing of the hairdryer had been removed. We placed a heat sensor inside the tin to measure the temperature of the air inside the machine.  By wiring the heat sensor to the Arduino, we were able to receive input/feedback from the sensor and adjust the heating of the device to maintain our desired setpoints and produce proper thermocycling.
 +
<p>At this point, we tried to perform our first PCR reaction. Unfortunately, we soon found that we had melted our tube. We learned that the machine had difficulty with evenly distributing the heat. To better distribute the heat, we removed our tinfoil lid and replaced it with with a cut soda can. This can was designed with evenly spaced holes enabling for better heat distribution. Although we did not and still have not modeled the heat transfer of between the can's surface and the convection heating generated by the hair dryer, we were able to experimentally conclude that the heat distribution was more even across the can than the tin foil.
  
 +
<img src="https://static.igem.org/mediawiki/2015/0/01/IMG_07741.jpg" style="width:450px;height:450px;float:left;">
 +
<img src="https://static.igem.org/mediawiki/2015/d/d5/2015-08-24_13.13.46.jpg" style="width:450px;height:600px;float:center;">
  
 +
</br>
 +
<p>After construction of the can-based cover, we attempted PCR once more and still found that amplification had not occurred. We assumed that the heat sensor might have been an issue; it was exposed to the moving air and as such was relaying information about the air temperature rather than the temperature of the reaction mixture within the PCR tubes. This meant that our feedback system was not accurately responding to or controlling the temperature inside of the PCR tubes. To compensate for this discrepancy, we put the heat sensor inside a PCR tube with mineral oil and placed this inside one of the holes. We ran another PCR reaction, visualized the products on an agarose gel, and witnessed a large band of the correct size, indicating that our machine had worked.
 +
<p style="text-align:center;">Click to hide
 +
</div>
 +
</div>
 +
</div>
 +
</div>
 +
<div id='layer2'>
 +
<div id='contentbox'>
 +
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>Hardware</b>
 +
<div id="showwithbox_id2" onclick="document.getElementById('spoilerwithbox_id2').style.display=''; document.getElementById('showwithbox_id2').style.display='none';" style="margin:auto;padding:5px;width:100%;"><p style="text-align:center;">Click to show
 +
</div><div id="spoilerwithbox_id2" onclick="document.getElementById('spoilerwithbox_id2').style.display='none'; document.getElementById('showwithbox_id2').style.display='';" style="margin:auto;padding:5px;display:none;width:100%;">
 +
<p>The working internals of our PCR machine are comprised of hairdryer elements. With the exception of the hairdryers outer housing, the thermal fuse and bimetallic circuit breaker, all other working components remain intact. The thermal fuse and bimetallic circuit breaker were shorted using copper wire in order to reach temperatures up to 95 within our machine. The outer plastic housing of the hairdryer was also removed to enable our machine to stand upright and fit PCR tubes. The hairdryers heating mechanism which utilizes a bank of nichrome wires and fan that distributes the heat remained untouched.
  
 +
<img src="https://static.igem.org/mediawiki/2015/9/95/UMD_PCR_full_machine.jpg" style="width:450px;height:600px;float:center;">
 +
</br>
 +
<img src="https://static.igem.org/mediawiki/2015/9/9f/UMD_PCR_hardware.jpg" style="width:1000px;height:557px;">
  
 +
<img src="https://static.igem.org/mediawiki/2015/1/17/UMD_PCR_hardware2.jpg" style="width:1000px;height:452px;">
  
 +
<img src="https://static.igem.org/mediawiki/2015/archive/d/dc/20151002012527%21UMD_PCR_hardware3.jpg" style="width:1000px;height:551px;">
 +
 +
<p style="text-align:center;">Click to hide
 
</div>
 
</div>
</div>
 
<div id='layer3'>
 
<div id='contentbox'>
 
<h1><b>UMD DIY PCR</b></h1>
 
 
 
<p>Our first design for a DIY PCR machine was modeled after a more conventional PCR machine design. This first prototype consisted of two Peltier units stacked on top of each other that would then heat a customized aluminum block that sat on top of the two units and held the PCR tubes. In order for the system to have feedback, we embedded a temperature sensor in the aluminum block to measure the temperature of the PCR tube wells. The sensor then reported back to an Arduino UNO, which then regulated the energy flow to the Peltier units, thereby regulating the temperature of the block and tubes. However, after much testing, this design proved to be unoriginal, expensive, and inefficient. While the conventionality of the design itself did not pose an issue, we realized that the parts used to assemble it were not as well-known or easily accessible to the general public, which we felt would take away from the possible applications of this machine. In addition, although the price of this first prototype was relatively inexpensive in contrast to laboratory grade PCR machines, the price still ranged in the hundreds of dollars. Finally, the greatest issue with our design was the inefficiency of the hardware; we found that the Peltier units were not able to quickly cycle through the desired temperatures, causing the unit to take 5 to 10 minutes just to rise up to 95℃. After considering all of these factors, we began a redesign of our machine to better suit the needs of the DIY market.</p>
 
<br>
 
<p> The idea for our current thermocycler design first came into form when we found that our original prototype was not ramping up to the desired temperatures fast enough. We thus looked into other options such as the heating element in a hair dryer. We found that the hair dryer was able to reach very high temperatures—much higher than the desired maximum of 95℃ for PCR—in a matter of seconds. We then made a decision to suspend construction on the Peltier-centered thermocycler in order to see how successful we could be with making a rapid PCR machine out of a hair dryer. Before this decision, we took into consideration the danger of working with a hair dryer, failure due to uncertainty that the machine could be effectively controlled, and, on top of that, having less time to work on it. Nevertheless, we took the risk.</br><i>Please continue on to see the design of our machine.</i>
 
  
 
</div>
 
</div>
Line 218: Line 216:
 
<div id='layer1'>
 
<div id='layer1'>
 
<div id='contentbox'>
 
<div id='contentbox'>
<h1><b>Design</b></h1>
+
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>Electronics</b>
 
+
<div id="showwithbox_id3" onclick="document.getElementById('spoilerwithbox_id3').style.display=''; document.getElementById('showwithbox_id3').style.display='none';" style="margin:auto;padding:5px;width:100%;"><p style="text-align:center;">Click to show
<p><b>This goes in notebook, not design. What is your final design?</b><strike>Our design started when we bought a hairdryer in the hopes of using the heating unit as part of our first PCR machine. However, as we were dismantling and testing the hairdryer, it became apparent to us that the heating system inside the hairdryer could reach the necessary temperatures independent of the peltier units already in use. With this in mind,</strike> <b>W</b>e began <b>by</b>working out how to wire the hairdryer so that we could regulate the heating unit and the fan separately.
+
</div><div id="spoilerwithbox_id3" onclick="document.getElementById('spoilerwithbox_id3').style.display='none'; document.getElementById('showwithbox_id3').style.display='';" style="margin:auto;padding:5px;display:none;width:100%;">
</br>
+
<strike>After a lot of soldering and reworking the internal safety measures inside the hairdryer, we were able to wire the system so that we could turn the heat on and off while running the fan continuously. Using autoclave tape, we secured a sheet of aluminium foil to the top of the heating unit of the hairdryer. The outer casing of the hairdryer had been removed. We placed a heat sensor inside the tin to measure the temperature of the air inside the machine.  By wiring the heat sensor to the arduino we were able to receive input/feedback from the sensor and adjust heating of the device to maintain our desired setpoints. We were able to regulate the heat of the machine in order to produce proper thermocycling. </strike>
+
</br>
+
At this point, we tried to perform our first PCR reaction<b>. U</b>nfortunately we soon found that we had melted our tube. We learned that the machine had difficulty with evenly distributing the heat<strike>, since the tin foil was a rudimentary cover with holes punched into it without a proper understanding of what these holes would do to the heat distribution(see picture below)</strike>. To better distribute the heat<b>,</b> we removed our tinfoil lid and replaced <b>it</b> with with a <b>cut</b> soda can. This can was designed with evenly spaced holes enabling for better heat distribution. Although we did not and still have not modeled the heat transfer of between the can's surface and the convection heating generated by the hair dryer, we were able to experimentally conclude that the heat distribution was more even across the can than the tin foil. <strike>For a better understanding we are currently in the process of modeling the heat transfer within the can to better design the apparatus.We are also in the process of milling aluminum with certain specifications in order to better regulate heat transfer.  </strike>
+
</br>
+
<div>
+
<img src="https://static.igem.org/mediawiki/2015/0/01/IMG_07741.jpg" style="width:450px;height:450px;float:left;">
+
<img src="https://static.igem.org/mediawiki/2015/d/d5/2015-08-24_13.13.46.jpg" style="width:450px;height:600px;float:center;">
+
</div>
+
</br>
+
<p>After construction of the can based cover we tried PCR once more and still found that the reaction did not occur. We assumed that the heat sensor might have been an issue,; the sensor was exposed to the <b>moving</b><strike>convected </strike>air and was relaying information about the air temperature instead of the temperature inside of the PCR tubes. This meant that our feedback system was not accurately responding and controlling the temperature inside of the PCR tubes. Assuming the temperatures inside the machine were not representative of the temperatures inside the PCR tubes, we put the heat sensor inside a PCR tube with mineral oil and placed this inside one of the holes. We ran another PCR reaction, ran the products on a gel and saw a large band of the correct size, indicating that our machine worked <b>ONCE</b>.
+
</br>
+
<h1><b>Hardware</b></h1>
+
The working internals of our PCR machine are comprised of hairdryer elements. With the exception of the hairdryers outer housing, the thermal fuse and bimetallic circuit breaker all other working components remain intact. The thermal fuse and bimetallic circuit breaker were shorted using copper wire in order to reach temperatures up to 95 within our machine. The outer plastic housing of the hairdryer was also removed to enable our machine to stand upright and fit PCR tubes. The hairdryers heating mechanism which utilizes a bank of nichrome wires and fan that distributes the heat remained untouched.
+
</br>
+
<img src="https://static.igem.org/mediawiki/2015/4/4b/UMD_PCR_temp_sensor.png" style="width:450px;height:600px;float:center;">
+
<img src="https://static.igem.org/mediawiki/2015/5/51/2015-09-04_14.01.54.jpg" style="width:440px;height:330px;float:right;”>
+
</br>
+
<img src="https://static.igem.org/mediawiki/2015/9/95/UMD_PCR_full_machine.jpg" style="width:450px;height:600px;float:center;">
+
</br>
+
<img src="https://static.igem.org/mediawiki/2015/1/11/UMD_PCR_soda_can.png" style="width:330px;height:440px;float:center;">
+
</br>
+
<img src="https://static.igem.org/mediawiki/2015/8/86/UMD_PCR_mica_sheet.png" style="width:450px;height:600px;float:center;">
+
</br>
+
<img src="https://static.igem.org/mediawiki/2015/d/d3/UMD_PCR_hair_dryer.png" style="width:450px;height:600px;float:center;">
+
<img src="https://static.igem.org/mediawiki/2015/6/62/2015-09-03_13.12.31.jpg" style="width:180px;height:240px;float:center;">
+
</br>
+
  
 +
<img src="https://static.igem.org/mediawiki/2015/2/20/UMD_PCR_electronics.jpg" style=width:1000px;height:461px;">
 
The electronics of the machine are mainly comprised of two relays, an Arduino micro-controller and a lm35 temperature sensor.
 
The electronics of the machine are mainly comprised of two relays, an Arduino micro-controller and a lm35 temperature sensor.
 
<br></br>
 
<br></br>
Line 258: Line 230:
 
<br></br>
 
<br></br>
 
Software
 
Software
Closing the loop
+
<br>
  With both the temperature sensor and the relays we are able to provide the micro-controller with the ability to regulate and cycle the machine at various temperatures. To allow for tight temperature regulation within the machine a proportional integral derivative control scheme was adopted. This scheme enable the controller to take temperature reading and calculate rate at which the temperature is increasing, the constant error of the machine found through the integral term, and the proportional error which compares current temperature to a set point. The way our code is designed and implemented utilizes three setpoints, 95,70, and 50 degrees C, all of these are variable and able to be adjusted but for convince we will define the three with these set of temperature values. A any given time only one of these setpoints is active, and the PID control scheme regulates temperature at that specific value. Since the machine need to cycle an hit at least 3 different temperatures our code also logs time after each setpoint is hit, thus allowing us to define a time interval after which the setpoint is altered. What this means is that if we define the first setpoint to be 95 degrees C that our code will execute and tell the machine to heat to 95 and once that temperature is reached it will trigger a timing function which after a defined period will reset the setpoint to 50 degrees which will then force the machine to cool down to the new setpoint.                   
+
<b>Closing the loop.</b> With the combination of the temperature sensor and the relays, we imbued the micro-controller with the ability to regulate and cycle the machine at various temperatures. To better facilitate tight cycling control, a proportional integral derivative control scheme was adopted. This scheme enabled the controller calculate the rate at which the temperature is increasing while also determining the constant error of the machine (derived from the integral term) and the proportional error (which compares the current temperature to a set point). Our code utilizes three setpoints, 95,70, and 50 degrees C, all of which are variable and may be adjusted depending on the reaction set up. At any given time, only one of these setpoints is active, and the PID control scheme regulates temperature at that specific value. Since the machine needs to cycle and hit at least 3 different temperatures, our code also logs the time at which each setpoint is hit, thus allowing us to define a time interval after which the setpoint is altered. The net result is that if we define the first setpoint to be 95 degrees C, our code will execute and tell the machine to heat to 95; once that temperature is reached, it will trigger a timing function that after a defined period will reset the setpoint to 50 degrees, forcing the machine to cool down to the new setpoint.                   
 
<br></br>
 
<br></br>
  
 
<br></br>
 
<br></br>
 
<img src="https://static.igem.org/mediawiki/2015/5/5a/IGEM_2015_PCR_wire_schematic.png" style="width:800px;height:588px;">
 
<img src="https://static.igem.org/mediawiki/2015/5/5a/IGEM_2015_PCR_wire_schematic.png" style="width:800px;height:588px;">
<img src="https://static.igem.org/mediawiki/2015/e/e1/UMD_CHIP_Cycling_Data.png" style="width:800px;height:400px;">
+
<img src="https://static.igem.org/mediawiki/2015/d/d5/IGEMCYCDATAGRAPH.png" style="width:800px;height:400px;">
 
<br></br>
 
<br></br>
<img src="https://static.igem.org/mediawiki/2015/5/5e/PCR.png" style="width:800px;height:196px;">
+
<img src="https://static.igem.org/mediawiki/2015/e/e8/IGEMUMDPCR.png" style="width:450px;height:450px;float:left;">
  
 +
<p style="text-align:center;">Click to hide
 
</div>
 
</div>
 +
 
</div>
 
</div>
 
</div>
 
</div>
 +
 
<div id='layer2'>
 
<div id='layer2'>
 
<div id='contentbox'>
 
<div id='contentbox'>
<h1><b>Problems and Current issues </b></h1>
+
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>Problems and Current issues </b>
 
+
<div id="showwithbox_id4" onclick="document.getElementById('spoilerwithbox_id4').style.display=''; document.getElementById('showwithbox_id4').style.display='none';" style="margin:auto;padding:5px;width:100%;"><p style="text-align:center;">Click to show
<p> We have had one successful amplification with our machine however we understand that repeatability is a vital component of all lab work and currently we are attempting to make our device repeatable. From our early days of testing we found that peltier units were not powerful enough to enable PCR tube to reach 95 degrees. <strike>Although conventional PCR machines use these units frequently they are often specialized and tailored made to perform PCR. With this tailoring comes a high price tag that does not suit the DIY market, and so we found a solution in the form of a hairdryer. </strike><b>On the other hand, t</b>he fan and heating element of a <b>cheap </b>hairdryer provide a control scheme that enables for <b>rapid</b> cycling of temperature<strike> rapidly and accurately and they are relatively inexpensive</strike>. We have found that developing a housing for the PCR tubes and enabling even heat distribution is challenging. We often have found that our temperature sensor and the pcr reaction tube are not at the same temperature and degree of difference is a delta of over 10 degrees celsius<b>It is therefore NOT accurate, as described in previous sentences</b>. We are currently working of milling a block of aluminum with better and more consistent heat transfer properties, and modeling the heat transfer within the can. Our ambition is that this will enable better control of temperature within the device.        
+
</div><div id="spoilerwithbox_id4" onclick="document.getElementById('spoilerwithbox_id4').style.display='none'; document.getElementById('showwithbox_id4').style.display='';" style="margin:auto;padding:5px;display:none;width:100%;">
 +
<p> We have had one successful amplification with our machine; however, we still struggle to replicate these results with an updated housing design (essentially, a new soda can with appropriately sized holes). Our trials still suggest that our temperature sensor and the liquid reaction housed within the tube are not at the same temperature, with a discrepancy of over 10 degrees Celsius. We are currently working of milling a block of aluminum with better and more consistent heat transfer properties, and modeling the heat transfer within the can. Our hope is that modeling the heat transfer will facilitate better control of temperature within the device.    
 
<br></br>
 
<br></br>
 +
<p style="text-align:center;">Click to hide
 +
</div>
  
 
</div>
 
</div>
 
</div>
 
</div>
  
<div id='layer2'>
+
<div id='layer1'>
 
<div id='contentbox1'>
 
<div id='contentbox1'>
<p style="text-align:center;font-size:32px;"><b>CODE</b></p>
+
<p style="text-align:center;font-size:32px;font-family: Tahoma, Geneva, sans-serif;"><b>CODE</b></p>
  
<div id="showwithbox_id" onclick="document.getElementById('spoilerwithbox_id').style.display=''; document.getElementById('showwithbox_id').style.display='none';" style="margin:auto;padding:5px;border:dotted 1px; width:1000px; height:100px;background-color:#F2F5A9;">Click to see code<!--Ironic that I had to code this in order to display this other code!--></div><div id="spoilerwithbox_id" onclick="document.getElementById('spoilerwithbox_id').style.display='none'; document.getElementById('showwithbox_id').style.display='';" style="margin:auto;padding:5px;display:none;border:dotted 1px; width:1000px;background-color:#F2F5A9;">
+
<div id="showwithbox_id5" onclick="document.getElementById('spoilerwithbox_id5').style.display=''; document.getElementById('showwithbox_id5').style.display='none';" style="margin:auto;padding:5px;border:dotted 1px; width:1000px; height:100px;background-color:#F2F5A9;">Click to see code<!--Ironic that I had to code this in order to display this other code!--></div><div id="spoilerwithbox_id5" onclick="document.getElementById('spoilerwithbox_id5').style.display='none'; document.getElementById('showwithbox_id5').style.display='';" style="margin:auto;padding:5px;display:none;border:dotted 1px; width:1000px;background-color:#F2F5A9;">
  
 
<pre>
 
<pre>
Line 292: Line 270:
 
<font color="#000000">#include</font> <font color="#434f54">&lt;</font><b><font color="#d35400">LiquidCrystal</font></b><font color="#434f54">.</font><font color="#000000">h</font><font color="#434f54">&gt;</font>
 
<font color="#000000">#include</font> <font color="#434f54">&lt;</font><b><font color="#d35400">LiquidCrystal</font></b><font color="#434f54">.</font><font color="#000000">h</font><font color="#434f54">&gt;</font>
 
   
 
   
<font color="#7e7e7e">/*The PID functions by adjusting a certain output in order to &nbsp;</font><font color="#7e7e7e"> * minimize the error between two values, which are the setpoint </font><font color="#7e7e7e"> * and the input.</font><font color="#7e7e7e"> * The PID function itself creates a PID controller and takes </font><font color="#7e7e7e"> * five parameters:</font><font color="#7e7e7e"> * Input: The value that needs to be controlled</font><font color="#7e7e7e"> * Output: The value that the PID will adjust</font><font color="#7e7e7e"> * Setpoint: The value that the input will be maintained at</font><font color="#7e7e7e"> * Kp,Ki,KD: Parameters that will affect how the output is adjusted</font><font color="#7e7e7e"> * Direct: Defines which direction the output will proceed given an error</font><font color="#7e7e7e"> */</font>
+
<font color="#434f54">//The PID functions by adjusting a certain output in order to &nbsp;</font>
 +
<font color="#434f54">// minimize the error between two values, which are the setpoint </font>
 +
<font color="#434f54">// and the input.</font>
 +
<font color="#434f54">// The PID function itself creates a PID controller and takes </font>
 +
<font color="#434f54">// five parameters:</font>
 +
<font color="#434f54">// Input: The value that needs to be controlled</font>
 +
<font color="#434f54">// Output: The value that the PID will adjust</font>
 +
<font color="#434f54">// Setpoint: The value that the input will be maintained at</font>
 +
<font color="#434f54">// Kp,Ki,KD: Parameters that will affect how the output is adjusted</font>
 +
<font color="#434f54">// Direct: Defines which direction the output will proceed given an error</font>
 +
 
   
 
   
 
<font color="#434f54">// Define PID varaibles</font>
 
<font color="#434f54">// Define PID varaibles</font>
Line 382: Line 370:
 
<font color="#000000">{</font>
 
<font color="#000000">{</font>
 
  &nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">&lt;</font> <font color="#000000">cyclenum</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">&lt;</font> <font color="#000000">cyclenum</font><font color="#000000">)</font> <font color="#000000">{</font>
  &nbsp;&nbsp;&nbsp;<font color="#7e7e7e">/**The following code is only implemented once as the first cycle of the PCR</font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* This allows for the user to set conditions which may be different from the subsequent </font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* cycles. The code, however, works in much the same way as the other cycles</font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* at the most basic level. It divides each cycle into subcycles: activation, pcr and extension</font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* and enters each step based on stepnow(which denotes how many subcyles the program has entered) divisiblity by 3. </font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* The remainder for activation will always be 1, </font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;* the remainder for pcr will be 2 and the remainder for extension will be 3</font><font color="#7e7e7e"> &nbsp;&nbsp;&nbsp;&nbsp;*/</font>
+
  &nbsp;&nbsp;&nbsp;<font color="#434f54">//The following code is only implemented once as the first cycle of the PCR</font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// This allows for the user to set conditions which may be different from the subsequent </font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// cycles. The code, however, works in much the same way as the other cycles</font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// at the most basic level. It divides each cycle into subcycles: activation, pcr and extension</font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// and enters each step based on stepnow(which denotes how many subcyles the program has entered) divisiblity by 3. </font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// The remainder for activation will always be 1, </font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">// the remainder for pcr will be 2 and the remainder for extension will be 3</font>
 +
&nbsp;&nbsp;&nbsp;&nbsp;
 
  &nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//Begins activation of the PCR by checking that this is the first cycle and that the current subcycle is activation </font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//Begins activation of the PCR by checking that this is the first cycle and that the current subcycle is activation </font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">==</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">==</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
Line 396: Line 391:
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//If the pcr has maintained the setpoint for the desired amount of time, it will enter this loop and begin cooling</font>
+
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//If the pcr has maintained the setpoint for the desired amount </font>
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//of time, it will enter this loop and begin cooling</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">t1Melt</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">t1Melt</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">stepnow</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">stepnow</font><font color="#434f54">++</font><font color="#000000">;</font>
Line 415: Line 411:
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//checks if the machine has maintained the temperature for the desired amount of time, and begins the next step</font>
+
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//checks if the machine has maintained the temperature for </font>
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//the desired amount of time, and begins the next step</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">t1PCR</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">==</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">t1PCR</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">==</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">stepnow</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">stepnow</font><font color="#434f54">++</font><font color="#000000">;</font>
Line 433: Line 430:
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">laststep</font><font color="#434f54">++</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//checks if the machine has maintained the temperature for the desired amount of time, and begins the next step</font>
+
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">//checks if the machine has maintained the temperature </font>
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#434f54">// for the desired amount of time, and begins the next step</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">textension1</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#d35400">millis</font><font color="#000000">(</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">(</font><font color="#000000">textension1</font> <font color="#434f54">+</font> <font color="#000000">cycleStart</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">laststep</font> <font color="#434f54">==</font> <font color="#000000">stepnow</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">pcr</font> <font color="#434f54">=</font> <font color="#00979c">"heating to melt "</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">pcr</font> <font color="#434f54">=</font> <font color="#00979c">"heating to melt "</font><font color="#000000">;</font>
Line 442: Line 440:
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  
<font color="#7e7e7e">/**</font><font color="#7e7e7e"> * Begins the intermediate steps which work in an identical manner to the startup cycle </font><font color="#7e7e7e"> * and may differ only in the alloted temperatures and times for each subcycle</font><font color="#7e7e7e"> */</font>
+
 
 +
<font color="#434f54">//Begins the intermediate steps which work in an identical manner to the startup cycle </font>
 +
<font color="#434f54">//and may differ only in the alloted temperatures and times for each subcycle</font>
 +
 
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">!</font><font color="#434f54">=</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&&</font> <font color="#000000">(</font><font color="#000000">cycle</font> <font color="#434f54">!</font><font color="#434f54">=</font> <font color="#000000">2</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">Setpoint</font> <font color="#434f54">=</font> <font color="#000000">meltT</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">Setpoint</font> <font color="#434f54">=</font> <font color="#000000">meltT</font><font color="#000000">;</font>
Line 487: Line 488:
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;<font color="#7e7e7e">/*</font><font color="#7e7e7e"> &nbsp;&nbsp;* Begins the last step, which again works in a similar fashion to the other steps, but may differ in the </font><font color="#7e7e7e"> &nbsp;&nbsp;* final extension temperature</font><font color="#7e7e7e"> &nbsp;&nbsp;*/</font>
+
&nbsp;
 +
  &nbsp;<font color="#434f54">// Begins the last step, which again works in a similar fashion </font>
 +
&nbsp;<font color="#434f54">// to the other steps, but may differ in the final extension temperature</font>
 +
&nbsp;&nbsp;
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">&gt;</font><font color="#434f54">=</font> <font color="#000000">cyclenum</font> <font color="#434f54">&&</font> <font color="#000000">stepnow</font> <font color="#434f54">&lt;</font><font color="#434f54">=</font> <font color="#000000">cyclenum</font> <font color="#434f54">+</font> <font color="#000000">2</font> <font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">&gt;</font><font color="#434f54">=</font> <font color="#000000">cyclenum</font> <font color="#434f54">&&</font> <font color="#000000">stepnow</font> <font color="#434f54">&lt;</font><font color="#434f54">=</font> <font color="#000000">cyclenum</font> <font color="#434f54">+</font> <font color="#000000">2</font> <font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">(</font><font color="#000000">stepnow</font> <font color="#434f54">%</font> <font color="#000000">3</font><font color="#000000">)</font> <font color="#434f54">==</font> <font color="#000000">1</font><font color="#000000">)</font><font color="#000000">)</font> <font color="#000000">{</font>
Line 534: Line 538:
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;<font color="#7e7e7e">/**</font><font color="#7e7e7e"> &nbsp;&nbsp;* Once the last step has been completed, determined by stepnow being greater than cyclenum+2,</font><font color="#7e7e7e"> &nbsp;&nbsp;* the code will tell the pcr to hold at 4 C. It will continue looping at this step indefinitely</font><font color="#7e7e7e"> &nbsp;&nbsp;* because the conditions will no longer satisfy any of the other if statement</font><font color="#7e7e7e"> &nbsp;&nbsp;*/</font>
+
  &nbsp;
 +
&nbsp;&nbsp;<font color="#434f54">// Once the last step has been completed, determined by </font>
 +
&nbsp;&nbsp;<font color="#434f54">// stepnow being greater than cyclenum+2,the code will tell the </font>
 +
&nbsp;&nbsp;<font color="#434f54">// pcr to hold at 4 C. It will continue looping at this step indefinitely</font>
 +
&nbsp;&nbsp;<font color="#434f54">// because the conditions will no longer satisfy any of the other if statement</font>
 +
&nbsp;&nbsp;
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#000000">{</font>
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#00979c">int</font> <font color="#000000">strt</font> <font color="#434f54">=</font> <font color="#000000">1</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#00979c">int</font> <font color="#000000">strt</font> <font color="#434f54">=</font> <font color="#000000">1</font><font color="#000000">;</font>
Line 549: Line 558:
  
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#000000">}</font>
  &nbsp;&nbsp;&nbsp;<font color="#434f54">//Once the pcr has reached 37 C, the pcr will print out that the pcr has shutt off</font>
+
  &nbsp;&nbsp;&nbsp;<font color="#434f54">//Once the pcr has reached 37 C, the pcr will </font>
 +
&nbsp;&nbsp;&nbsp;<font color="#434f54">//print out that the pcr has shutt off</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">Input</font> <font color="#434f54">-</font> <font color="#000000">38</font> <font color="#434f54">+</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&lt;</font> <font color="#000000">0</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">Input</font> <font color="#434f54">-</font> <font color="#000000">38</font> <font color="#434f54">+</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&lt;</font> <font color="#000000">0</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>
Line 572: Line 582:
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr2</font><font color="#434f54">,</font> <font color="#00979c">LOW</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr2</font><font color="#434f54">,</font> <font color="#00979c">LOW</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<b><font color="#d35400">Serial</font></b><font color="#434f54">.</font><font color="#d35400">println</font><font color="#000000">(</font><font color="#00979c">"COOLING"</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<b><font color="#d35400">Serial</font></b><font color="#434f54">.</font><font color="#d35400">println</font><font color="#000000">(</font><font color="#00979c">"COOLING"</font><font color="#000000">)</font><font color="#000000">;</font>
  <font color="#434f54">// if the pcr machine's temperature reaches 97, cooling will automatically be initiated and a death message will be displayed</font>
+
  <font color="#434f54">// if the pcr machine's temperature reaches 97, cooling will </font>
 +
<font color="#434f54">// &nbsp;&nbsp;automatically be initiated and a death message will be displayed</font>
 
  &nbsp;<font color="#000000">}</font><font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">Input</font> <font color="#434f54">-</font> <font color="#000000">deathT</font> <font color="#434f54">+</font><font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">0</font><font color="#000000">)</font><font color="#000000">{</font>
 
  &nbsp;<font color="#000000">}</font><font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">(</font><font color="#000000">Input</font> <font color="#434f54">-</font> <font color="#000000">deathT</font> <font color="#434f54">+</font><font color="#000000">1</font><font color="#000000">)</font> <font color="#434f54">&gt;</font> <font color="#000000">0</font><font color="#000000">)</font><font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>
Line 578: Line 589:
 
  &nbsp;&nbsp;&nbsp;<b><font color="#d35400">Serial</font></b><font color="#434f54">.</font><font color="#d35400">println</font><font color="#000000">(</font><font color="#00979c">"DEATH"</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<b><font color="#d35400">Serial</font></b><font color="#434f54">.</font><font color="#d35400">println</font><font color="#000000">(</font><font color="#00979c">"DEATH"</font><font color="#000000">)</font><font color="#000000">;</font>
  
<font color="#7e7e7e">/* these two statements work on the maintaining the temperature, by controlling heating and cooling when there is overshoot or undershoot </font><font color="#7e7e7e"> &nbsp;&nbsp;in the temperature*/</font>
+
<font color="#434f54">// these two statements work on the maintaining the temperature, by </font>
 +
<font color="#434f54">// controlling heating and cooling when there is overshoot or undershoot </font>
 +
<font color="#434f54">// in the temperature</font>
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">Output</font> <font color="#434f54">&gt;</font> <font color="#000000">now</font> <font color="#434f54">-</font> <font color="#000000">windowStartTime</font> <font color="#434f54">-</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;<font color="#000000">}</font> <font color="#5e6d03">else</font> <font color="#5e6d03">if</font> <font color="#000000">(</font><font color="#000000">Output</font> <font color="#434f54">&gt;</font> <font color="#000000">now</font> <font color="#434f54">-</font> <font color="#000000">windowStartTime</font> <font color="#434f54">-</font> <font color="#000000">1</font><font color="#000000">)</font> <font color="#000000">{</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>
 
  &nbsp;&nbsp;&nbsp;<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">signalr1</font><font color="#434f54">,</font> <font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font>

Latest revision as of 01:28, 2 October 2015