(Fortunately I have a ton of LEDs but I only have 1 IR LED, but I JUST KEEP FRYING MY LEDs!)
So, one time, I connected the long leg of an LED to 5 volts of a power supply and the short leg to ground, but I heard a loud flickering sound and it smelled like a short circuit or something. DId I fry my LED? Same thing happened with my ONE AND ONLY IR LED. Did my LED get overloaded or something? Can anyone help?
Sure you fried your LED.
All LEDs regardless of beeing red, green, blue, orange, Yellow or infrared have a certain operation-voltage. This voltage is called the forward-voltage.
And in the datasheet there is also a specific maximum-current.
Most standard LEDs have 20 mA as the maximum-current.
For IR-LEDs the maxumum-current can be 20 mA, 30 mA, 50 mA, 60 mA
You really have to look into the datasheet.
If you don't have a datasheet driving the LED with 15 - 18 mA you will on the safe side.
The forward-voltages are in the range of 1,2V for IR-LEDs most yellow, green, red LEDs are in the range of 1,7V to 2V depending on the color.
Blue and white LED can go up to 2,5V or even 4V.
Once again you have to look up the datasheet.
You can determine an approximate value of the forward-voltage by measuring.
If you have a 5V power-supply use a 1000 Ohm current-limiting resistor in series with the LED.
Best thing would be to have two digital multimeters.
One to measure current and one to measure the voltage-drop across the LED.
Then lower the current-limiting resistor in small steps
800 Ohm, 600 Ohm, 500 Ohm, 400 Ohm
measuring and note the current and the voltage-drop
if you come close to the maximum-current the voltage-drop rises only a little bit in the 5 to 15 millivolt-range.
For most LEDs as they have a maximum-current of 20 mA. Lower the current-limiting resistor until you get 18 to 20 mA. Then measure the voltage-drop
You can then calulate the current-limiting resistor this way
(Voltage of power-supply - forward-voltage ) / current
example
measured forward-voltage 1,25V
(5V - 1,25V) / 0.020 A = 187.5 Ohm. Chosen resitsor 220 Ohms to be on the safe side
If you use 180 Ohm the current will be
(5V - 1,25V) / 180 Ohm = 20,83 mA
Power-supply 24V LED Forward-voltage 1,8V
(24V - 1,8V) / 0,020 A = 1110 Ohm
Power-supply 3.3V LED forward-voltage 2V
and if you want to drive the LED at a current of only 5 mA
(3.3V - 2V) / 0.005 A = 260 Ohm
for 20 mA
(3.3V - 2V) / 0.020 A = 65 Ohm
If you don't have a digital multimeter I highly recommend buying one
I recommend this one
not the most cheapest but the best price / feature ratio
beneath the standard measurings voltage, current, ohm
it offers measuring
temperature, capacity, frequency, dutycycle, forward-voltages of diodes and LEDs,
relative measurings, hold data, non-conductive voltage detection, integrated light, light in the display bluetooth-connection to an android app, with recording measurings, app can say measurings
Well, it needs something to limit the current.
A resistor is certainly the commonest way to do it for small indicator LEDs (and IR LEDs) - but it is certainly not the only way.
(a resistor is an inefficient way to do it, so high-power LEDs would tend to use an active constant-current driver)
If the power supply has a constant-current mode, and can be reliably set to ~ 10mA, then that would be OK.
LEDs REQUIRE series limiter resistors.
Diodes in general, are current mode devices. Once they conduct, they'll pass ALL of the available current - to the point of self destruction. So a nice series limiter resistor is needed to limit the current to a safe level - typically 10 or 20mA for common led's.
With a 5v supply, 220 to 360 ohms will usually work.
Return shipping is more than 500 R's are worth! With a bunch you can make up different values and wattages by various series and parallel combo's. 470 × 2 in series gives ~1k, in parallel about the 220 ohms many LEDs use, etc, etc, etc.