Using LEDs with Your Gadget Cache

For my first Arduino Gadget Cache, I wanted to use LEDs. I spent a lot of time searching for just the right lighted buttons and working through prototypes. It looked great in my shop. I took it outside for a weathering test, and I noticed that the LEDs just weren’t bright enough under the sun!

Learn from my mistake—try and replicate as many conditions as possible when prototyping.  Testing out lights in my (relatively) dim shop wasn’t bright 😉  I thought my whole effort was ruined until I went online and found out you can buy very bright LEDs for Arduino projects.   I found a pack of 30 of them for under $6 on Amazon.  You can probably get them cheaper on eBay.  Let’s look at the label (above), but first, a quick summary of electrical terms voltage (Volts, V); current (Amperes, A); and resistance (Ohms, Ω):

A neat analogy to help understand these terms is a system of plumbing pipes. The voltage  is equivalent to the water pressure, the current is equivalent to the flow rate, and the resistance is like the pipe size. – howstuffworks.com

Let’s break down what the label means:

5mm
The diameter of the bulb.  5mm is pretty common.  I’d recommend it for most projects.

Round Clear White
This is just the shape and color of the light.  If this were a specific color (eg, red or blue), it may also mention the wavelength of the actual light being emitted.

27000 mcd
mcd = millicandela.  A candela is a measurement of light intensity.  I have no tool in my shop for measuring light intensity, but 27000 mcd leaves spots in my eyes.  Do not look directly at it.

3.0~3.4v
This is the voltage drop over the LED.  In other words, this is how many volts of electricity are needed to power the LED.  I used an average of 3.2V in my calculations later.

20mA This is the flow rate of the electric current required to power the LED.  This number can be important in other projects, because a battery can only provide so much flow.

 

Fun fact: you never connect an LED directly to an Arduino Uno power source,  which runs on 5V.  You have to put a resistor inline, to make sure you don’t overpower the LED and burn it out.   “How do you figure out what resistor to use?” you ask.  “Ohm’s Law,” I reply.  I never said there wouldn’t be math.

Ohm’s Law states that Voltage = Current × Resistance, or V = I × R (I know, using “I” for current is odd.  I’m sure there’s a reason for it.) These LEDs actually shipped with thirty 200Ω resistors.  Are they what I should use?

Circuit DiagramFirst, a simple diagram of our circuit.  We want to use the best resistor to maximize LED brightness without burning it out.  We know that the voltage drop across these LEDs is about 3.2V.  Because we are suppling 5V to the circuit via the Arduino Uno, the voltage drop across the resistor will be 1.8V.  The sum of all voltage drops must add up to the voltage supplied (Kirchhoff’s Voltage Law). Since the LED requires 20mA of current going through it (and therefore, so does the resistor), and the resistor will have a voltage drop of 1.8V, we can figure out how many Ohms our resistor should have.

20mA is the same as 0.020A – you have to use the actual units in Ohm’s Law, no milli, centi, etc.   Just like there are 1000 millimeters in one meter, there are 1000 milliamps in one amp.

Voltage = Current × Resistance
1.8V = 0.020A × R
R = 1.8V ÷ 0.020A
R = 90Ω

Remember, this is a minimum.  As it turns out, I don’t have 90Ω resistors, but I do have many 100Ω.   This is what I ended up using in the final cache.  If I had used the 200Ω resistors sent with the LEDs, I wouldn’t have gotten their full brightness!  It turns out that 200Ω is about right for a 9V power supply.  Good thing I did the math!

I actual went on to perform a few experiments with different resistors and measuring the actual values with a multimeter.  Here are my results:

Resistor LED Voltage Drop Circuit Current
200Ω 2.96V 10.2mA
100Ω 3.05V 19.5mA
69Ω 3.18V 26.4mA
47Ω 3.30V 36.2mA

I took a picture of each set-up, keeping the shutter speed and f-stop the same for each.  Basically this means the camera didn’t adjust for ideal exposure.  You can see differences in light intensity as the resistance is decreased.  I only left the smaller resistors in long enough for a photo – the LED would likely burn out if it was left in for an extended period.  Even though a little more brightness would have been nice, I stayed with 100Ω to limit the cache maintenance I would have to perform replacing LEDs.

Comparing Resistors

Comparing Resistors

 

1 Comment on Using LEDs with Your Gadget Cache

  1. Tim Eggleston WVTim // August 19, 2015 at 12:25 am // Reply

    Call me crazy, but this could be the next BIG thing in creating unique geocaches. Thanks for your leadership in helping us beginners out. Keep them coming !

Leave a comment

Your email address will not be published.


*