User Tools

Site Tools


tutorials:learn:arduino:leds.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:learn:arduino:leds.html [2010/11/09 20:57]
chillintau Ohms law -> Ohm's law
tutorials:learn:arduino:leds.html [2016/01/28 18:05] (current)
Line 28: Line 28:
  
  
-LEDs are so common, they come in dozens of different shapes and sizes. The LEDs you are most likely to use are the **through hole** LEDs with two legs There are lots of LEDs that are small and hard to solder but these are easy to use with a breadboard because they have long wires we can stick in. The clear or clear-ish bulb is what protects the **light emitter** (thats where the magic happens). In fact, the first two letters of **LED** stand for **Light Emitting** ​so they really have their work cut out for them.+LEDs are so common, they come in dozens of different shapes and sizes. The LEDs you are most likely to use are the **through hole** LEDs with two legs There are lots of LEDs that are small and hard to solder but these are easy to use with a breadboard because they have long wires we can stick in. The clear or clear-ish bulb is what protects the **light emitter** (thats where the magic happens). In fact, the first two letters of **LED** stand for **Light Emitting**
  
  
Line 41: Line 41:
   *LEDs that are '​backwards'​ won't work - but they won't break either   *LEDs that are '​backwards'​ won't work - but they won't break either
  
-Its all a little confusing - we often have to think about which is which.So to make it easy, there'​s only one thing you need to remember and that's the LED wont light up if you put it in backwards. **If you're ever having LED problems where they are not lighting, ​ just flip it around.** Its very hard to damage an LED by putting it in backwards so don't be scared if you do+Its all a little confusing - we often have to think about which is which. So to make it easy, there'​s only one thing you need to remember and that's the LED wont light up if you put it in backwards. **If you're ever having LED problems where they are not lighting, ​ just flip it around.** Its very hard to damage an LED by putting it in backwards so don't be scared if you do
  
  
Line 70: Line 70:
  
  
-  ***5mm LEDs** can be so bright, they are often used as **illumniation** (lighting something up, like a flashlight, we'll talk about this next) +  ***5mm LEDs** can be so bright, they are often used as **illumination** (lighting something up, like a flashlight, we'll talk about this next) 
   ***3mm LEDs** are not as bright but are smaller, and are good for** indication **(like an LED that tells you something is on). They'​re not as good for illumination because they have a smaller area that is lit.   ***3mm LEDs** are not as bright but are smaller, and are good for** indication **(like an LED that tells you something is on). They'​re not as good for illumination because they have a smaller area that is lit.
   ***10mm LEDs** are a little more rare, they are huge and chunky but are usually just 5mm LEDs with a bigger case so they aren't any brighter. They can be good indicators but we rarely see them as illuminators. ​   ***10mm LEDs** are a little more rare, they are huge and chunky but are usually just 5mm LEDs with a bigger case so they aren't any brighter. They can be good indicators but we rarely see them as illuminators. ​
Line 77: Line 77:
  
  
-LEDsare ​mostly used for two things: **illumination** and **indication**. These are technical words but are good to understand because if you want an LED for one thing and you buy the wrong thing you'll be pretty bummed.+LEDs are mostly used for two things: **illumination** and **indication**. These are technical words but are good to understand because if you want an LED for one thing and you buy the wrong thing you'll be pretty bummed.
  
 [[http://​en.wikipedia.org/​wiki/​File:​2005_winter_road_full_beam.jpg|{{ http://​www.ladyada.net/​images/​arduino/​LEDs/​headlight.jpg?​nolink&​400x266 | }}]] [[http://​en.wikipedia.org/​wiki/​File:​2005_winter_road_full_beam.jpg|{{ http://​www.ladyada.net/​images/​arduino/​LEDs/​headlight.jpg?​nolink&​400x266 | }}]]
Line 138: Line 138:
  
  
-OK so now that we know about clear and diffused LEDs and a little about brightness. Now is a good time to let you know that if you bought an Arduino Starter Pack or ARDX from us, the diffused green or red LEDs are about 500mcd and the bright clear LEDs are about 5000mcd. ​Thats a little approximate,​ since we sometimes get LEDs from different factories.+OK so now that we know about clear and diffused LEDs and a little about brightness. Now is a good time to let you know that if you bought an Arduino Starter Pack or ARDX from us, the diffused green or red LEDs are about 500mcd and the bright clear LEDs are about 5000mcd. ​That'​s ​a little approximate,​ since we sometimes get LEDs from different factories.
  
  
Line 153: Line 153:
 **Which LED is dimmest (what is the resistor)?​** \\ //Highlight the text below to see the answer //** **  ​ **Which LED is dimmest (what is the resistor)?​** \\ //Highlight the text below to see the answer //** **  ​
 <class white>​The one with the 10K resistor </​class>​ <class white>​The one with the 10K resistor </​class>​
- **If we had an LED with a resistor that was 5K ohms, whitch ​LED would it be brighter than? Which LED would it be dimmer than?** \\ //Highlight the text below to see the answer //** **  ​+ **If we had an LED with a resistor that was 5K ohms, which LED would it be brighter than? Which LED would it be dimmer than?** \\ //Highlight the text below to see the answer //** **  ​
 <class white>​With a 5K resistor, it would be brighter than the 10K resistor-LED,​ but dimmer than the 1K resistor-LED</​class>​ <class white>​With a 5K resistor, it would be brighter than the 10K resistor-LED,​ but dimmer than the 1K resistor-LED</​class>​
  
  
  
-As you have seen with this experiment, the resistor we use with the LED makes a difference in how bright it is. The **larger** the resistor (more reisistance) the **dimmer** the LED. A small resistor (less resistance) makes for a brighter LED.+As you have seen with this experiment, the resistor we use with the LED makes a difference in how bright it is. The **larger** the resistor (more resistance) the **dimmer** the LED. A small resistor (less resistance) makes for a brighter LED.
  
  
Line 176: Line 176:
 **Which LED is dimmest (what is the voltage)?** \\ //Highlight the text below to see the answer //** **  ​ **Which LED is dimmest (what is the voltage)?** \\ //Highlight the text below to see the answer //** **  ​
 <class white>​The one connected to 3.3v </​class>​ <class white>​The one connected to 3.3v </​class>​
-**If we had an LED with a 1.0K resistor connected to a 4.2v supply, ​whitch ​LED would it be brighter than? Which LED would it be dimmer than?** \\ //Highlight the text below to see the answer //** **  ​+**If we had an LED with a 1.0K resistor connected to a 4.2v supply, ​which LED would it be brighter than? Which LED would it be dimmer than?** \\ //Highlight the text below to see the answer //** **  ​
 <class white>​Connected to 4v, it would be brighter than the 3.3v LED and dimmer than 5v</​class>​ <class white>​Connected to 4v, it would be brighter than the 3.3v LED and dimmer than 5v</​class>​
  
Line 259: Line 259:
  
  
-The first two rows talk about the '​wavelength'​ - this is a specific way of indicating the color. After all, 'super bright red' is a very subjective description. [[http://eosweb.larc.nasa.gov/​EDDOCS/​Wavelengths_for_Colors.html|With the wavelength, we can know exactly what color is emitted.]] ​ \\ The third row is basically saying 'how much does the color vary from the wavelength'​ \\ The forth row isnt so important, we'll skip that+The first two rows talk about the '​wavelength'​ - this is a specific way of indicating the color. After all, 'super bright red' is a very subjective description. [[http://science-edu.larc.nasa.gov/​EDDOCS/​Wavelengths_for_Colors.html|With the wavelength, we can know exactly what color is emitted.]] ​ \\ The third row is basically saying 'how much does the color vary from the wavelength'​ \\ The forth row isnt so important, we'll skip that
  
  
Line 352: Line 352:
  
 <class warning> <class warning>
-**Whenever using an LED, make sure to __always__have ​a resistor! The resistor //limits// the current, which will keep the LED from burning out! \\ **+**Whenever using an LED, make sure to __always__ have a resistor! The resistor //limits// the current, which will keep the LED from burning out! \\ **
 </​class>​ </​class>​
  
Line 404: Line 404:
 <class white>​This is a KVL question. 9V = 2.2V + Vresistor so Vresistor = 6.8V </​class>​ <class white>​This is a KVL question. 9V = 2.2V + Vresistor so Vresistor = 6.8V </​class>​
 **Now that you know the voltage, how much current (I) is going through the 1,000 ohm resistor (R)?** \\ //Highlight the text below to see the answer //** **  ​ **Now that you know the voltage, how much current (I) is going through the 1,000 ohm resistor (R)?** \\ //Highlight the text below to see the answer //** **  ​
-<class white>We determined the voltage (V) is 2.8V, we use Ohm's Law I = V/R = 6.8/1000 = 0.0068 Amps = 6.8 milliAmps </​class>​+<class white>We determined the voltage (V) is 6.8V, we use Ohm's Law I = V/R = 6.8/1000 = 0.0068 Amps = 6.8 milliAmps </​class>​
 **Next, we will examine the 5V-powered LED. The forward voltage is 2.2V, what is the voltage across the resistor?** \\ //Highlight the text below to see the answer //** **  **Next, we will examine the 5V-powered LED. The forward voltage is 2.2V, what is the voltage across the resistor?** \\ //Highlight the text below to see the answer //** ** 
 <class white>​Another KVL! 5V = 2.2V + Vresistor. Vresistor = 2.8V  </​class>​ <class white>​Another KVL! 5V = 2.2V + Vresistor. Vresistor = 2.8V  </​class>​
Line 470: Line 470:
  
  
-Use a 10K potentiometer for this excersise, find one that has **104** printed on it (this is the same as 1.0 (first two digits) with zeros afterwards = 10,000)+Use a 10K potentiometer for this excersise, find one that has **103** printed on it (this is the same as 10 (first two digits) with zeros afterwards = 10,000)
  
 {{  http://​www.ladyada.net/​images/​arduino/​LEDs/​potadjust.gif?​nolink&​638x510 ​ |}} {{  http://​www.ladyada.net/​images/​arduino/​LEDs/​potadjust.gif?​nolink&​638x510 ​ |}}
Line 502: Line 502:
  
  
-<class style3>​Last Quick Quiz!</​class>​ \\ **How much current is flowing through the LED when the pot is turned down?** \\ //Highlight the text below to see the answer //** **   +<class style3>​Last Quick Quiz!</​class>​ \\ **How much current is flowing through the LED if when the pot is turned down? The forward voltage of the LEDs are 2.2V.** \\ //Highlight the text below to see the answer //** **   
-<class white>(5V - 2.2V/ 100 ohm = 28 milliamps ​ </​class>​+<class white>​2.2V / 100 ohm = 22 milliamps ​ </​class>​
 **What about when the  potentiometer is turn all the way '​up'?​** \\ //Highlight the text below to see the answer //** **  ​ **What about when the  potentiometer is turn all the way '​up'?​** \\ //Highlight the text below to see the answer //** **  ​
-<class white>(5V - 2.2V/ 10100 ohm = 0.27 milliamps </​class>​+<class white>​2.2V / 10100 ohm = 0.217 milliamps </​class>​
  
  
  
 Whew, that was a long and very math-intensive lesson. We'll get back to doing more with software and fun blinky in future tutorials, but we hope that this tutorial helped you understand some of the details of how to wisely use LEDs! Whew, that was a long and very math-intensive lesson. We'll get back to doing more with software and fun blinky in future tutorials, but we hope that this tutorial helped you understand some of the details of how to wisely use LEDs!
- 
/home/ladyada/public_html/wiki/data/attic/tutorials/learn/arduino/leds.html.1289336236.txt.gz · Last modified: 2016/01/28 18:05 (external edit)