I want to test my 12v power coming from my cat5, to do this easily I planned to connect an LED to pins on a rj45 plug. I've seen numerous examples where a resistor is place inline on the circuit, but I don't understand the purpose. I can connect my LED to 12v and see it light without problem.
(1) Can someone provide a short explaination on what value the resistor serves?
(2) What is the impact of not placing the resistor in the circuit?
LEDs are diodes and only allow current to pass in one direction.
(3) If I am testing for swapped wires and occassionnally have + and ground swapped on the LED, will that damage the LED or the power source, or will the LED simply not light?
I've see some videos where LEDs have been forced to explode. But they did not explain what was done to force this.
(4) Are exploding LEDs caused by overloading them with too much voltage (well above the rating)? If not, then what does this?
Thanks!
1- Already answered, some comments below.
2- The LED will almost certainly be destroyed by too much current (unless some other device limits the current it can draw).
3- It might. Most LEDs can only stand a few volts the "wrong" way, so the safe thing would be to either put a diode across the LED to block reverse voltage, or else put another LED across it the opposite direction... maybe a different color to indicate polarity. Be sure to have a series resistor to limit the current for the highest voltage you intend to test.
4- Too much power (heat) caused by too much current.
An incandescent bulb's filament acts like a resistor (in fact, it increases resistance as the filament heats up) and limits the current that will be drawn by the bulb without any need for an extra resistor in most cases. An LED, on the other hand, is almost a constant voltage device.
If you took a 300-ohm resistor and put it across a 6 volt battery it would draw 20 mA. If you increased that voltage to 12 volts, it would draw 40 mA. So far, so good?
If you took a small incandescent bulb that drew 20 mA at 6 volts and hooked it up to 12 volts, it would draw somewhat LESS than 40 mA because of the filament resistance increase as it heated up.
If your green LED had a forward voltage drop of 2.1 volts and drew 20 mA at that voltage, and you decided to hook it to 4.2 volts instead -- it would pull MANY AMPS if your power supply could deliver it, likely exploding the LED or at least frying it (just like the videos). This is because the LED really doesn't want to allow more than the 2.1 volts across it, and the more current you supply trying to pull it higher, the more current it will draw. There is actually some small series resistance in the LED but not enough and not predictable enough (not to mention the voltage across it can vary with temperature as Chris said), so the most predictable thing is to assume that the LED will drop its forward voltage (2.1 in this case). Whatever difference in voltage there is between your supply and the 2.1 volts will have to be dropped across a resistor (see Matt's comment).
Cheers,
Jon