|
You can usually use the same resistor for both 9V and 18V, but the led will shine a little brighter at 18V, which may or may not be noticeable.
Here's the recipe:
A standard red led will drop around 2V from the anode to the cathode (this number is called Vf). That means there will be 7V left to provide current to run the led. If the resistor is R=2k2, then the current I through the led will be I=V/R=7/2200=3.2mA. The maximum current (Imax) through a standard red led is about 20mA.
Now switch to 18V: V=16V, so I=7.3mA. Well within allowable limits. To reach 20mA with this led and resistor you'd need a 46V DC supply.
The Vf and Imax of different leds depends on the specs (color matters, standard vs. ultra-bright matters, size usually doesn't matter). You can get a general idea from google even if you don't know the manufacturer or part number.
2k2 is a big enough current limiting resistor that you should be fine for any reasonable led. The only reason to adjust the resistor is if you want more or less brightness.
|