Team:Brown/Modeling/Light device
From 2010.igem.org
(→Illumination device design) |
|||
(13 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
{{:Team:Brown/templates/header}} | {{:Team:Brown/templates/header}} | ||
- | + | =Illumination device design= | |
+ | {{:Team:Brown/templates/toc}} | ||
+ | [[Image:Prototype_light_device.jpg|450 px]] | ||
- | + | This prototype device uses two super-bright blue LEDs (470nm, 2400mcd) to illuminate cells. It will be used to drive the LOVtap promoter, which is responsive to blue light. The device is controlled by an open-source Arduino Duemilanove microcontroller and can be custom-programmed to cycle through various light states for various amounts of time. The prototype was created using a coffee-cup chassis but the final form factor will be much smaller. | |
- | + | ===The Arduino Duemilanove=== | |
+ | The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega328 (datasheet)The Duemilanove has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. | ||
+ | *Operating Voltage - 5V | ||
+ | *DC Current per I/O Pin - 40 mA | ||
+ | |||
+ | ===Calculating the proper resistor=== | ||
+ | The LED we used has a forward voltage of typically 3.5V with a max of 4V. The Arduino Duemilanove outputs at 5V. Thus, we used the resistor calculator located [http://metku.net/index.html?sect=view&n=1&path=mods/ledcalc/index_eng here] to calculate the proper resistors to use: | ||
+ | |||
+ | [[Image:Ledcalculation.jpg]] | ||
+ | |||
+ | We only had a limited number of resistor types in stock, so we used a 56 Ohm resistor. The light output was not as bright as we wanted, so we switched to a 37 Ohm resistor. This may stress the LED more than usual, but should be enough resistance that it will not easily burn out. | ||
+ | |||
+ | ===Source code=== | ||
+ | <html> | ||
+ | /*<br> | ||
+ | Light Induction Device<br> | ||
+ | Turns on an LED on for a specific amount of time, then off, and repeats<br> | ||
+ | The circuit:<br> | ||
+ | * LED connected from digital pin 13 to ground.<br> | ||
+ | */<br> | ||
+ | <br> | ||
+ | int ledPin = 13; // LED connected to digital pin 13<br> | ||
+ | int ledPin2 = 12; // LED connected to digital pin 12<br> | ||
+ | // The setup() method runs once, when the sketch starts<br> | ||
+ | void setup() { <br> | ||
+ | // initialize the digital pin as an output:<br> | ||
+ | pinMode(ledPin, OUTPUT); <br> | ||
+ | pinMode(ledPin2, OUTPUT); <br> | ||
+ | }<br> | ||
+ | // the loop() method runs over and over again<br> | ||
+ | void loop() <br> | ||
+ | {<br> | ||
+ | digitalWrite(ledPin, HIGH); // set the LED1 on<br> | ||
+ | digitalWrite(ledPin2, HIGH); // set the LED2 on<br> | ||
+ | delay(14400000); // wait for 4 hours<br> | ||
+ | digitalWrite(ledPin, LOW); // set the LED1 off<br> | ||
+ | digitalWrite(ledPin2, LOW); // set the LED2 off<br> | ||
+ | delay(14400000); // wait for 4 hours<br> | ||
+ | }<br> | ||
+ | </html> |
Latest revision as of 16:22, 27 October 2010
Illumination device design
|
This prototype device uses two super-bright blue LEDs (470nm, 2400mcd) to illuminate cells. It will be used to drive the LOVtap promoter, which is responsive to blue light. The device is controlled by an open-source Arduino Duemilanove microcontroller and can be custom-programmed to cycle through various light states for various amounts of time. The prototype was created using a coffee-cup chassis but the final form factor will be much smaller.
The Arduino Duemilanove
The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega328 (datasheet)The Duemilanove has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
- Operating Voltage - 5V
- DC Current per I/O Pin - 40 mA
Calculating the proper resistor
The LED we used has a forward voltage of typically 3.5V with a max of 4V. The Arduino Duemilanove outputs at 5V. Thus, we used the resistor calculator located [http://metku.net/index.html?sect=view&n=1&path=mods/ledcalc/index_eng here] to calculate the proper resistors to use:
We only had a limited number of resistor types in stock, so we used a 56 Ohm resistor. The light output was not as bright as we wanted, so we switched to a 37 Ohm resistor. This may stress the LED more than usual, but should be enough resistance that it will not easily burn out.
Source code
/*
Light Induction Device
Turns on an LED on for a specific amount of time, then off, and repeats
The circuit:
* LED connected from digital pin 13 to ground.
*/
int ledPin = 13; // LED connected to digital pin 13
int ledPin2 = 12; // LED connected to digital pin 12
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
// the loop() method runs over and over again
void loop()
{
digitalWrite(ledPin, HIGH); // set the LED1 on
digitalWrite(ledPin2, HIGH); // set the LED2 on
delay(14400000); // wait for 4 hours
digitalWrite(ledPin, LOW); // set the LED1 off
digitalWrite(ledPin2, LOW); // set the LED2 off
delay(14400000); // wait for 4 hours
}