Hi there,
If you want an LED to run off of 120vac you will
find that the required dropping resistor will
burn up power just like a regular night light.
Instead, here's a circuit that uses something
like 1/2 watt and the LED is bright as it can
be without exceeding any specs:
http://hometown.aol.com/xaxo/index.html
Normally, an LED by itself and a single
dropping resistor can not be run off of ac
unless the ac voltage is very low (5vac or so)
because the reverse voltage of the LED will
be exceeded when the ac switches phase.
Tricks around this are to use a diode in
parallel to the LED so that when the ac reverses
the diode picks up the current. Drawback is
diode conducts 50% of the time so the efficiency
is lower than optimum.
Next trick is to use a full wave bridge, which
makes sure the LED always gets dc voltage
(although pulsing). Drawback is if a dropping
resistor is used the dropping resistor uses more
power than the dang LED
Another trick is to use a diode in series with
the LED, but the drawback here is that if there
is appreciable leakage in the diode the LED
still gets banged with a high reverse voltage when
the ac reverses.
The basic idea in the circuit link above is to
use a capacitor in series with the LED (and a
full wave bridge) to convert the voltage down
to a lower value more suitable for the LED.
The capacitor uses very little power because
it can store energy. Thus, the LED lights the
same as with a resistor only no power is wasted.
You'll note that there are a few resistor in
the circuit too, to limit other specs for the
LED like peak current especially when the unit
is plugged into the wall when the ac is at its
peak.
Take care,
Al