Team:Cornell/project/drylab/components/electronics

From 2013.igem.org

(Difference between revisions)
m
 
(12 intermediate revisions not shown)
Line 15: Line 15:
</div>
</div>
<br>
<br>
-
Due to the nature of our project, the most important feedback control loop to be implemented was the heating circuit, and so it was given priority.  The heating circuit consists of a transistor to switch the heating element (power resistors) on and off, along with a 12 volt power supply to provide enough voltage to heat the resistors to the required temperature (about 30°C).  Also, the feedback from the circuit is provided by an analog <a href="http://www.ti.com/lit/ds/symlink/lm34.pdf"> LM34 </a> Fahrenheit temperature sensor which connects directly to the Arduino.<br><br>
+
Due to the nature of our project, the most important feedback control loop to be implemented was the heating circuit, and so it was given priority.  The heating circuit consists of a transistor to switch the heating element (power resistors) on and off, along with a 12 volt power supply to provide enough voltage to heat the resistors to the required temperature (about 27°C).  Also, the feedback from the circuit is provided by an analog <a href="http://www.ti.com/lit/ds/symlink/lm34.pdf"> LM34 </a> Fahrenheit temperature sensor which connects directly to the Arduino.<br><br>
The second feedback loop which is currently being worked on is a humidity control circuit.  The <a href="http://www.sparkfun.com/datasheets/Sensors/Temperature/HH10D.pdf"> HH10D </a>  relative humidity sensor module is being used to collect data in order to adjust the environment.  
The second feedback loop which is currently being worked on is a humidity control circuit.  The <a href="http://www.sparkfun.com/datasheets/Sensors/Temperature/HH10D.pdf"> HH10D </a>  relative humidity sensor module is being used to collect data in order to adjust the environment.  
-
 
+
<br>
-
 
+
<h4>Temperature Sensor and Heating Element Circuit:</h4>
<h4>Temperature Sensor and Heating Element Circuit:</h4>
The Heating Circuit is illustrated below:  
The Heating Circuit is illustrated below:  
<img src="https://static.igem.org/mediawiki/2013/8/88/Tempschematic.jpg" class="center" style="max-height:400px"> <br>
<img src="https://static.igem.org/mediawiki/2013/8/88/Tempschematic.jpg" class="center" style="max-height:400px"> <br>
-
The components used are listed below:
+
The components used are:
<ul><li>LM34 temperature sensor </li>
<ul><li>LM34 temperature sensor </li>
<li>F12N10L transistor</li>
<li>F12N10L transistor</li>
<li>10W(8Ω2J) power resistors-XICON</li>
<li>10W(8Ω2J) power resistors-XICON</li>
<li>12V max variable power supply</li>
<li>12V max variable power supply</li>
-
<li>F12N10L transistor</li>
 
<li>10kΩ resistor</li></ul><br>
<li>10kΩ resistor</li></ul><br>
-
The temperature sensor is hooked onto the A1 port of the micro-controller to allow the micro-controller to read data from the sensor. The micro-controller was programmed in C through the Arduino IDE to read the temperature every second. The program is designed as a feedback loop which decides whether to raise or lower the temperature based on the temperature input. Temperature is controlled by switching on or off the power loop. The micro-controller outputs a certain voltage based on the program, and that voltage (0 or 3.3V) will signal the transistor to switch on or off, either opening or closing the 6 V loop, which heats up the whole tank. <br><br>
+
The temperature sensor is hooked onto the A0 port of the micro-controller to allow the micro-controller to read data from the sensor. The micro-controller was programmed in C through the Arduino IDE to read the temperature every second. The program is designed as a feedback loop which decides whether to raise or lower the temperature based on the temperature input. Temperature is controlled by switching on or off the power loop. The micro-controller outputs a certain voltage based on the program, and that voltage will signal the transistor to switch on or off, either opening or closing the 12 V loop, which heats up the whole tank. <br><br>
-
The LM34 temperature sensor was chosen because it can read a wide range of temperatures to a 1.0°F accuracy, which is perfect for tuning the temperature of the incubator.  Once the entire circuit was hooked up with the right components according to the schematic, measurements were taken to compare the temperature sensor with an actual thermometer’s readings. The temperature sensor was accurate to within 1°C, which was one of the requirements for the incubator. During the calibration, the temperature sensor reacted a lot quicker to temperature change than the actual thermometer. While the sensor and the thermometer were not placed in the same location by the resistor, they were close enough for this difference to be negligible. While doing this calibration, the change in voltage was recorded on the oscilloscope.  Refer to the two waveforms below to see the different options for heating by adjusting the duty cycle of the high to low voltage ratio.<br><br>
+
The LM34 temperature sensor was chosen because it can read a wide range of temperatures to a 1.0°F accuracy, which is perfect for tuning the temperature of the incubator.  Once the entire circuit was hooked up with the right components according to the schematic, measurements were taken to compare the temperature sensor with an actual thermometer’s readings. The temperature sensor was accurate to within 1°C, which was one of the requirements for the incubator. During the calibration, the temperature sensor reacted a lot quicker to temperature change than the actual thermometer. While doing this calibration, the change in voltage was recorded on the oscilloscope.  Refer to the two waveforms below to see the different heating options which were accomplished by adjusting the duty cycle of the high to low voltage ratio.<br><br>
Note: Voltages measured are between the end of the resistor(closest to transistor) and ground.
Note: Voltages measured are between the end of the resistor(closest to transistor) and ground.
Line 37: Line 35:
<img src="https://static.igem.org/mediawiki/2013/d/d5/Waveform_pwm50.jpg">  
<img src="https://static.igem.org/mediawiki/2013/d/d5/Waveform_pwm50.jpg">  
<i>Figure 2. PWM from Arduino is at 50%</i><br>
<i>Figure 2. PWM from Arduino is at 50%</i><br>
-
Overall, the micro-controller controls the transistor, which acts as a switch (refer to above diagram for overall schematic) to either close or open the 12V heating loop (which contains the two power resistors in parallel).  To specifically control how fast the resistors heat up, the Arduino uses a concept called PWM -Pulse Width Modulation.  Basically, with pulse width modulation, the voltage is switched from a low voltage (usually 0 V) to a certain higher voltage (12 V in our case).  This voltage is switched to 12V for a certain amount of time and then switched off for a certain period.  This period repeats over and over, and this will control the rate at which the resistors heat. <br><br>  
+
Overall, the micro-controller controls the transistor, which acts as a switch (refer to the overall schematic at the top of the page) to either close or open the 12V heating loop (which contains the two power resistors in parallel).  To specifically control how fast the resistors heat up, the Arduino uses a concept called PWM -Pulse Width Modulation.  Basically, with pulse width modulation, the voltage is switched from a low voltage (usually 0 V) to a certain higher voltage (12 V in our case).  This voltage is switched to 12V for a certain amount of time and then switched off for a certain period.  This will then repeat and control the rate at which the resistors heat. <br><br>  
-
Referring to the 2 diagrams above, it can be seen that for the 50% PWM, the voltage drop across the power resistors was 0 V for half the time and at 12 V for the other half in one period of the cycle.  In the other diagram for 10% PWM, the resistors draw current for 10% of the entire period, meaning that the Arduino makes the transistor break the power heating loop for 90% of the time in a period. It was decided that the 10% PWM would be used, since if the PWM was set at 50% or higher, the resistors would heat up too fast. It’s better to heat it up slowly and avoid roasting the mushrooms!  In addition, heating up the resistors too fast would overshoot the target temperature of 27°C, and it takes a much longer time to cool down in an insulated box.
+
Referring to the 2 diagrams above, it can be seen that for the 50% PWM, the voltage drop across the power resistors was 0 V for half the time and at 12 V for the other half in one period of the cycle.  In the other diagram for 10% PWM, the resistors draw current for 10% of the entire period, meaning that the Arduino makes the transistor break the power heating loop for 90% of the time in a period. Near the optimal temperature (10°C or less cooler than the optimal), a PWM value proportional to the difference in temperature measured from the optimal was used. It’s better to heat it up slowly and avoid roasting the fungus!  In addition, heating up the resistors too fast would overshoot the target temperature of 27°C, and it takes a much longer time to cool down in an insulated box.<br><br>
 +
 
 +
By interfacing the output readings from the Arduino with Matlab, we automated the process of saving the readings into a text file and the plotting of the temperature graphs.
 +
 
<h4>Humidity Sensor:</h4>
<h4>Humidity Sensor:</h4>
<img src="https://static.igem.org/mediawiki/2013/9/9f/Humidityschem.jpg" style="max-height:none"/> <br>
<img src="https://static.igem.org/mediawiki/2013/9/9f/Humidityschem.jpg" style="max-height:none"/> <br>

Latest revision as of 02:53, 29 October 2013

Cornell University Genetically Engineered Machines

Electronics


Due to the nature of our project, the most important feedback control loop to be implemented was the heating circuit, and so it was given priority. The heating circuit consists of a transistor to switch the heating element (power resistors) on and off, along with a 12 volt power supply to provide enough voltage to heat the resistors to the required temperature (about 27°C). Also, the feedback from the circuit is provided by an analog LM34 Fahrenheit temperature sensor which connects directly to the Arduino.

The second feedback loop which is currently being worked on is a humidity control circuit. The HH10D relative humidity sensor module is being used to collect data in order to adjust the environment.

Temperature Sensor and Heating Element Circuit:

The Heating Circuit is illustrated below:
The components used are:
  • LM34 temperature sensor
  • F12N10L transistor
  • 10W(8Ω2J) power resistors-XICON
  • 12V max variable power supply
  • 10kΩ resistor

The temperature sensor is hooked onto the A0 port of the micro-controller to allow the micro-controller to read data from the sensor. The micro-controller was programmed in C through the Arduino IDE to read the temperature every second. The program is designed as a feedback loop which decides whether to raise or lower the temperature based on the temperature input. Temperature is controlled by switching on or off the power loop. The micro-controller outputs a certain voltage based on the program, and that voltage will signal the transistor to switch on or off, either opening or closing the 12 V loop, which heats up the whole tank.

The LM34 temperature sensor was chosen because it can read a wide range of temperatures to a 1.0°F accuracy, which is perfect for tuning the temperature of the incubator. Once the entire circuit was hooked up with the right components according to the schematic, measurements were taken to compare the temperature sensor with an actual thermometer’s readings. The temperature sensor was accurate to within 1°C, which was one of the requirements for the incubator. During the calibration, the temperature sensor reacted a lot quicker to temperature change than the actual thermometer. While doing this calibration, the change in voltage was recorded on the oscilloscope. Refer to the two waveforms below to see the different heating options which were accomplished by adjusting the duty cycle of the high to low voltage ratio.

Note: Voltages measured are between the end of the resistor(closest to transistor) and ground. Figure 1. PWM from Arduino is at 10%
Figure 2. PWM from Arduino is at 50%
Overall, the micro-controller controls the transistor, which acts as a switch (refer to the overall schematic at the top of the page) to either close or open the 12V heating loop (which contains the two power resistors in parallel). To specifically control how fast the resistors heat up, the Arduino uses a concept called PWM -Pulse Width Modulation. Basically, with pulse width modulation, the voltage is switched from a low voltage (usually 0 V) to a certain higher voltage (12 V in our case). This voltage is switched to 12V for a certain amount of time and then switched off for a certain period. This will then repeat and control the rate at which the resistors heat.

Referring to the 2 diagrams above, it can be seen that for the 50% PWM, the voltage drop across the power resistors was 0 V for half the time and at 12 V for the other half in one period of the cycle. In the other diagram for 10% PWM, the resistors draw current for 10% of the entire period, meaning that the Arduino makes the transistor break the power heating loop for 90% of the time in a period. Near the optimal temperature (10°C or less cooler than the optimal), a PWM value proportional to the difference in temperature measured from the optimal was used. It’s better to heat it up slowly and avoid roasting the fungus! In addition, heating up the resistors too fast would overshoot the target temperature of 27°C, and it takes a much longer time to cool down in an insulated box.

By interfacing the output readings from the Arduino with Matlab, we automated the process of saving the readings into a text file and the plotting of the temperature graphs.

Humidity Sensor:


The components used are listed below:
  • HH10D Humidity Sensor
  • Ocean Mist Mist Maker, DK-24
  • 5.1kΩ Resistors (x2)
A HH10D humidity sensor module was used to measure the relative humidity of the environment. This sensor was connected according to manufacturer instructions such as connecting power, ground, frequency output, SCL, and SDA to the corresponding pins on the sensor board.

To collect data about the humidity, a mistmaker was used to increase the relative humidity of the surrounding area, and the humidity sensor was placed in the vicinity of this mistmaker from the start. This experiment was done by putting the mistmaker in a box, making sure to not allow the mist to escape, and as the mistmaker distributed the water more evenly throughout the box, the relative humidity increased. As the amount of humidity began to increase, the sensor could measure the increase in relative humidity.