Build a 5V AC to LED Circuit with Safety

Description

The circuit below demonstrates powering an LED (or LEDs) from the 120 volt AC supply utilizing a capacitor to diminish the voltage and a small resistor to restrict the initial surge current. Due to the requirement for the capacitor to pass current in both directions, a small diode is connected in parallel with the LED to establish a pathway for the negative half-cycle and also to minimize the reverse voltage across the LED. A second LED with the polarity inverted can be substituted for the diode, or a tri-color LED could be used which would appear orange with alternating current. The circuit is reasonably efficient, consuming approximately a half watt from the line. The resistor value (1K / half watt) was selected to limit the maximum inrush current to roughly 150 mA, which will decrease to less than 30 mA within a millisecond as the capacitor charges. This appears to be a secure value; the circuit has been switched on and off numerous times without damaging the LED. The 0.47 uF capacitor presents a reactance of 5600 ohms at 60 cycles, resulting in an LED current of approximately 20 mA half-wave, or 10 mA average. A larger capacitor will increase the current, while a smaller one will diminish it. The capacitor must be a non-polarized type with a voltage rating of 200 volts or more.

The lower circuit exemplifies achieving a low, regulated voltage from the AC line. The zener diode functions as a regulator and also offers a pathway for the negative half-cycle current when it conducts in the forward direction. In this instance, the output voltage is approximately 5 volts, providing over 30 milliamps with approximately 300 millivolts of ripple. Exercise caution when operating any circuits connected directly to the AC line.

Circuit diagram

AC Line powered LEDs-Circuit diagram