Sunday, May 17, 2009

Working with LEDs

All engineers are different, some are clean-kept while others are unorganized and messy (I get bonus points there), some prefer picaxe microcontrollers over BASIC Stamps, and so on and so forth. However, we all have one thing in common: We all use LEDs, or Light Emitting Diodes. You see them everywhere: in your phone, your Xbox, computer, watch, and just about everywhere else.

Today I will show you a fun, simple, and cheap project that will teach you about working with LEDs.

A little while ago I went down to Radioshack and got a bag of 20 LEDs for $3.00. If this sounds amazing to you, wait. The 20 bag bundle is extremely poor quality, and only comes with green, red, orange, and yellow LEDs. I highly recommend you invest a couple extra dollars and get 5 higher quality LEDs rather than 20 cheap ones, or better yet, buy your LEDs online if you can. Remember to test them before you use them, I learned to do that the hard way.

Here are the parts for this fun and simple project:

-3 3volt LEDs of any color

-1 project box (optional but highly recommended)

-1 9v battery

-1 9v battery clip

-1 switch of any kind

-1 330 ohm resistor

-1 zip tie (optional)

-a soldering gun

-some solder

-and lots of hot glue!

Now that I look at at, this list looks long for a simple project, but its really a lot less daunting than it sounds, I promise.

These are the LEDs that came in the grab bag:



Unfortunately the bag did not say what voltage they used (typical Radioshack), and the guy there looked at me like I was asking him to name every neutrino in existence when I asked him about the voltage. I guessed about 2 or 3 volts, and went with 3 to be safe.

LEDs have what are called cathodes and anodes, or positive (+) and negative (-) sides. The anode is the long wire, while the cathode is the short one. I chose to color the negative red and the positive green so I would not confuse myself.

Drill three holes in the lid of the project container. I did this my my all-time favorite tool, the Dremel.



Sorry if the image is a bit difficult to view, I'm an engineer, not a photographer so you will have to bear with me as far as images go.

Glue in the LEDs and solder their anodes to their cathodes. This is really simpler than it sounds, hook together the greens with the reds and apply solder. Now solder your 330 ohm resistor to one of the two open leds (the little wires jutting out of the LEDs). Then solder the other end of the resistor to the correct battery side (guess and check to see which side works). Now wire the other open wire from the battery to one side of the switch (for easy access you should cut a hole in your box for the switch, depending on what kind you used), and finally the open LED's led to the switch. I used a zip tie to hold the wire to the battery to make it easier for me to close the box.



Attach the lid to the container with the parts resting inside and flip it on. If all is well, your three LEDs should illuminate the room (unless you used Radioshack LEDs, in which case you will illuminate much less).

3 comments:

Anonymous said...

Hey there,
common LED's have at a range of voltage drops, from 1.8v (Red) to 3.3v (Blue). The thing that's more important than the voltage, though, is the current flowing through the LED, and you need to limit that with a resistor, which you did. The thing is, though, it's not really the Radioshack guy's role to know everything about random parts, be they commonplace such as LED's or less well known (e.g. varistors). He's there to make sure you pay.



LEDs have what are called anodes and cathodes, or positive (+) and negative (-) sides. The anode is the short wire, while the cathode is the long one (or vice versa, just so long as you solder the short wire to the long). I chose to color the negative red and the positive green so I would not confuse myself.


You were right that anode is postive and cathode is negative. You are wrong that it can be switched; it has been, is, and always will be that way with no room for "vice versa". Wiring the anode to the cathode would not light up the LED. Especially if you tried to involve a battery.

I'd recommend http://en.wikipedia.org/wiki/LED and http://en.wikipedia.org/wiki/LED_circuit as good starting points.

.downs

Brennon said...

Thanks for the response. Let me clarify that the "vice versa" was meaning that I wasn't sure if it was long that was the anode or the cathode, so by "vice versa" I meant to say that I may have been wrong as to which the long and the short is.

Sorry if that was confusing.

Anonymous said...

For future reference the longer lead is the anode and the shorter lead is the cathode. You can always test this with a resistor, an LED, a battery and some alligator clips.

blogger templates 3 columns | Make Money Online