Line 142: | Line 142: | ||
================================================== --> | ================================================== --> | ||
− | <section id=' | + | |
+ | <section id='Control' class="s-services"> | ||
<div class="row section-header has-bottom-sep" data-aos="fade-up"> | <div class="row section-header has-bottom-sep" data-aos="fade-up"> | ||
− | + | <div class="col-full"> | |
− | <h1 class="display-1 | + | <h3 class="subhead">Stage Two</h3> |
+ | <h1 class="display-1">Control</h1> | ||
</div> | </div> | ||
</div> <!-- end section-header --> | </div> <!-- end section-header --> | ||
− | + | <div class="row about-desc" data-aos="fade-up"> | |
− | + | <div class="col-full"> | |
− | + | ||
− | + | ||
− | + | <p style="font-size:100%">There was a number of ideas on how to control the day and night cycle (16-8 hours), one method would break the circuit from the ‘Vdd’ line (power line). We decided to pursue this method as we were under the impression this would reduce the power consumption when the night cycle was in effect. </p> | |
+ | <p style="font-size:100%">In order to break the power line needs to be two pin outs, pin 11 for the data line and 12 for the switching circuit. 11 determines the light intensity and function of the lights. After a 16 hour cycle pin 12 is written to ‘LOW’ (logic zero), which turns the N channel power MOSFET off for 6 hours. This sequence repeats every day. The code can be seen in <body link="vlue"><a href="https://2018.igem.org/Team:Newcastle/Code">here.</a></p></body> | ||
+ | <p style="font-size:100%">There was some issues when implementing this design. Which appeared to be caused by the Arduinos pin out voltage, 3.3V. Going of the MOSFET’s data sheet the threshold is between 1-2V [1]. Therefor for our purpose it should be adequate however the voltage at the source (MOSFET) was measured to be 3V, the LED’s need at least 4.2V.</p> | ||
+ | <p style="font-size:100%">Meaning we had to go back to the drawing board secondly, we looked at using a NAND gate. There is a truth table included to describe the function.</p> | ||
+ | |||
+ | <p style="font-size:100%">Highlighted in red is the two functions we are interested in. Since ‘Vdd’ will always be read as ‘high’, 5V. We can eliminate the first two states and ‘Vdd’ making the logic straightforward. The basic operation is inverting P12 logic. This method worked in theory however in practice the LED’s demanded too much current up to 2A, leading the gate to heat up to an unsustainable level. Thirdly we attempted to implement a relay switch however this was also limited on current. | ||
+ | Finally, we discovered we can achieve the desired result through the code. Changing the brightness from a defined integer, to an 8 bit integer allowing a range between 0-255. Setting the brightness to ‘0’ would turn the LED’s off.</p> | ||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <div class="row services-list block-1-2 block-tab-full"> | ||
+ | |||
+ | <div class="col-block service-item" data-aos="fade-up"> | ||
+ | <div class="service-icon"> | ||
+ | <i class="icon-paint-brush"></i> | ||
+ | </div> | ||
+ | <div class="service-text"> | ||
+ | <img src="https://static.igem.org/mediawiki/2018/b/ba/T--Newcastle--WC230718.png"> | ||
+ | <p style="text-align:center"><br>The engineers, hard at work trying to troubleshoot issues with the system.</p> | ||
+ | |||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <div class="col-block service-item" data-aos="fade-up"> | ||
+ | <div class="service-icon"> | ||
+ | <i class="icon-paint-brush"></i> | ||
+ | </div> | ||
+ | <div class="service-text"> | ||
+ | <img src="https://static.igem.org/mediawiki/2018/thumb/e/e5/T--Newcastle--Hydroponicssystem.jpeg/800px-T--Newcastle--Hydroponicssystem.jpeg"> | ||
+ | <p style="text-align:center"><br>The finished product, set to a rainbow function that cycles through various wavelengths of light</p> | ||
+ | |||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | </div> <!-- end services-list --> | ||
+ | </section> <!-- end s-services --> | ||
<!-- Java Script | <!-- Java Script | ||
================================================== --> | ================================================== --> |
Revision as of 14:19, 14 September 2018
Sensors
There is two options for powering this device via the mains or from a battery source. I have designed it so both can be used if the other isn’t available. However I would recommend using the mains as batteries need to be replaced regularly. Since the Arduino and LED lights need a constant 5V supply once the batteries have drained to roughly 3.5V the lights start to fade and do not operate as designed. Also we used 4 cheap AA 1.5V which totals to 6V, meaning a voltage regulator is needed to protect the circuit. This regulator can get hot after sustained use, I believe this is due to the lights drawing 1.5 Amps. However for a small demonstration this is sufficient.
Therefor a more permanent and reliable source would be the mains. Taking a regular phone charger which safely steps the voltage down to 5V we have a power source for the Arduino to use. I would not recommend building your own. Usually there is live (Vdd), ground (GND), and two data lines (-D, +D) the latter two are not necessary for our application. Due to there voltage rating shown in Figure 1.0 (2.76V, 2.06V). Therefor these wires can be either trimmed shorter than Vdd and GND or taped up, to avoid a short circuit. For the example shown; red is power, black is ground, and the white and green wires are the data lines, however I would recommend confirming this is correct by checking the voltage from Vdd, D+ or D- to ground.
Figure 1.0; Schematic of a standard USB cable.
Figure 1.1: Above is 4 exposed wires. Red is power, black is ground, and the white and green wires are the data lines.
Figure 1.2: Schematic demonstrating how to power the Arduino and the LED's
ROUGHLY
AMPS ARE PULLED
FOR THE WHOLE SYSTEM
APPROXIMATELY
KWH OF POWER ANNUALLY
USED TO POWER SYSTEM
PROVIDES UP TO
LUX OF LIGHT
TO GROW SEEDS
CONTAINS
INDIVIDUALLY ADDRESSABLE
LOW-POWER LED'S
Stage Two
Control
There was a number of ideas on how to control the day and night cycle (16-8 hours), one method would break the circuit from the ‘Vdd’ line (power line). We decided to pursue this method as we were under the impression this would reduce the power consumption when the night cycle was in effect.
In order to break the power line needs to be two pin outs, pin 11 for the data line and 12 for the switching circuit. 11 determines the light intensity and function of the lights. After a 16 hour cycle pin 12 is written to ‘LOW’ (logic zero), which turns the N channel power MOSFET off for 6 hours. This sequence repeats every day. The code can be seen in
here.There was some issues when implementing this design. Which appeared to be caused by the Arduinos pin out voltage, 3.3V. Going of the MOSFET’s data sheet the threshold is between 1-2V [1]. Therefor for our purpose it should be adequate however the voltage at the source (MOSFET) was measured to be 3V, the LED’s need at least 4.2V.
Meaning we had to go back to the drawing board secondly, we looked at using a NAND gate. There is a truth table included to describe the function.
Highlighted in red is the two functions we are interested in. Since ‘Vdd’ will always be read as ‘high’, 5V. We can eliminate the first two states and ‘Vdd’ making the logic straightforward. The basic operation is inverting P12 logic. This method worked in theory however in practice the LED’s demanded too much current up to 2A, leading the gate to heat up to an unsustainable level. Thirdly we attempted to implement a relay switch however this was also limited on current. Finally, we discovered we can achieve the desired result through the code. Changing the brightness from a defined integer, to an 8 bit integer allowing a range between 0-255. Setting the brightness to ‘0’ would turn the LED’s off.
The engineers, hard at work trying to troubleshoot issues with the system.
The finished product, set to a rainbow function that cycles through various wavelengths of light