I'm looking for a sanity check on my figures here because I'm concerned my resistor wattage is unrealistic.
I would like to run a red LED on a 240 VAC line. I have found that the forward voltage for a red LED is 2V and a max current of 20mA.
To calculate the resistance I used ohm's law and set a target of 18mA:
R = V / I
R = (240VAC – 2V) / 0.018A
R = 13222 ohms or about 13.2k ohms
What about the wattage? This is a high voltage after all…
W = V * V / R
W = (240VAC – 2V)^2 / 13222 ohms
W = 4.28
Does this seem right? Do I really need close to a 5W resistor to handle this?
Thanks everyone for the help. I think the big message here is that there is a much better way of doing this than dumping the extra power as heat from resistors and that the reverse voltage needs to be considered when dealing with the LED.
EM Fields thank you for posting such a detailed explanation of the options along with a diagram. Thanks to uint128_t who had a good comment about 240VAC being the RMS value and provided the equation to calculate the 340V peak.
Using a capacitive reactance method (shown in diagram c of EM Fields answer), which I had never heard of, is a better way to approach this type of circuit. I know that several of you have mentioned it which was very helpful. Thank you Dwayne Reid, Evan, and anyone else I missed.
For anyone else who is new to this like me then I found these additional resources to be helpful:
Best Answer
You'll need to keep the reverse voltage to the LED at less than about 5 volts, and an easy way to do that is to connect a diode in parallel opposition to the LED across the LED.
Using resistive dropping, there are a couple of ways to do that.
In (b), below, the flicker rate will be twice that of (a), which may be advantageous in some applications.
In (c), below, a full wave bridge is used instead of a parallel diode, the flicker rate will be twice the mains frequency, and (d) is an example of a reactive dropper where the capacitive reactance of C1 is used to drop the mains voltage more or less losslessly to a voltage which the LED can use.
V5 and S1 are used to generate a turn-on transient at the first peak of V4, for test purposes, and the LTspice circuit list is appended just in case you want to play with the circuit(s)