Driving Leds with ac

ronsimpson

Joined Oct 7, 2019
4,749
I think, in any conditions, for example, contact bounce, amplitude of pulse LED current must be not more than 20 mA.
There needs to be a 100 resistor to limit the current if the switch opens at the peak of the line waveform. (27 to 220 ohms)
1783191608129.png
Often there is a 1meg to 4.7meg resistor across C1 to blead down the voltage.

It is typical for a 20mA LED to handle 30mA under some conditions and 100mA for a short time. You could add a 1k resistor to limit the worst-case current.
 
Last edited:

Jerry-Hat-Trick

Joined Aug 31, 2022
833
For many years Arcolectric (now part of Bulgin) have manufactured mains driven LED indicators (as a substitute for neons) by having a resistor in series with a silicon diode in series with the LED. Calculate the resistor value according to the desired average current recognizing that current only lights the LED half the time. Resistor to be 1/2 watt, not for power reasons but to withstand the voltage drop. The three components housed in a transparent plastic injection moulding for safety. The components are in series because the silicon diode offers a high resistance in reverse polarity so the reverse current is low enough for the LED to withstand its much lower reverse voltage
 

ronsimpson

Joined Oct 7, 2019
4,749
Changes:
V2 timing changed. I did not understand your test. I turned S1 at about the peak of the line voltage and kept it on until 95mS point.
Red= LED current; about 160mA at the start of the switch closed at the worse time.
1783192883778.png
Because the peak current is 20mA and the average is very low, you could make C1 larger and get the peak current to 30mA if you need more brightness.
The startup current lasts for 0.5mS and could be reduced by changing R1.
1783193350002.png
 

Attachments

Danko

Joined Nov 22, 2017
2,200
The components are in series because the silicon diode offers a high resistance in reverse polarity so the reverse current is low enough for the LED to withstand its much lower reverse voltage
For longer life time of LED, leakage and capacitive current of diode should be shorted by additional diode:
1783210665917.png 1783211614597.png
 
Last edited:

ronsimpson

Joined Oct 7, 2019
4,749
For longer life time of LED, leakage and capacitive current of diode should be shorted by additional diode:
The LED model might be made wrong. Many LEDs conduct at -5V. I don't think you will ever see -170V across the LED. I think placing a 0.1uF cap across the LED will eat up the reverse recovery current in the 1N4007 and leakage current in the 1N4007.
 

Danko

Joined Nov 22, 2017
2,200
The LED model might be made wrong. Many LEDs conduct at -5V. I don't think you will ever see -170V across the LED. I think placing a 0.1uF cap across the LED will eat up the reverse recovery current in the 1N4007 and leakage current in the 1N4007.
It is not about wrong model. It is about reverse LED current.
Capacitor instead parallel diode helps, but diode is much cheaper.
 

crutschow

Joined Mar 14, 2008
38,607
Below is the LTspice sim of my suggested circuit to use a bridge to provide a full-wave signal to the LED and prevent 60Hz flicker from a LED powered by a half-wave signal:
Instead of the LED being off for about 8.5ms once each cycle ( likely causing visible flicker), it's off for <1ms twice each cycle.

It uses a series capacitor to limit the LED current to near 8mA average (bottom trace waveform window) with minimum power loss, which should give sufficient light from a high-brightness red LED.

R1 limits the maximum transient turn-on spike (if turned on at the peak of the sinewave) to 100mA (middle trace).
It dissipates ≈125mW average so a 1/4W resistor should be adequate.

Of course, a small rectifier bridge module could replace the four 1N4148's.

1783353315754.png

EDIT: Added full-wave circuit for 24Vac and a blue LED:
Since the dissipation is much lower for just a resistor to limit the LED current, a capacitor was not used.
A 2kΩ resistor gives an average LED current of slightly over 8mA (waveform window).
The resistor average dissipation is <200mW, so a 1/2W resistor should be adequate for R1.

1783358665190.png
 
Last edited:

Externet

Joined Nov 29, 2005
2,648
In the circuit above, D1, D2, D3, D4 could also be LEDs, providing efficiently much more light instead of only D5. Or replacing D5 with a wire.
 

MisterBill2

Joined Jan 23, 2018
27,870
The diode could be a 1N4148 since the reverse voltage is just the LED forward drop.

Alternately you could use four 1N4148s in a bridge circuit, or other small bridge module, to allow the LED to conduct on both half-cycles, reducing the chance of noticeable flicker.
Understad that using such a directly connected scheme leaves mains voltage on all of that circuit, as far as the shock hazard goes.
 

Danko

Joined Nov 22, 2017
2,200
I think, in any conditions, for example, contact bounce, amplitude of pulse LED current must be not more than 20 mA.
R1 limits the maximum transient turn-on spike (if turned on at the peak of the sinewave) to 100mA
Maximum transient turn-on spike decreased to 20 mA
1783597931673.png
--------------------------------------------------------------------------------------
TL431 on AliExpress:
1783600271074.png
 
Last edited:

Danko

Joined Nov 22, 2017
2,200
Another approach. Not real accurate but works. TL431 change to 2N2222a. Set R2 to see 0.65V at current limit. You could limit the current at 40mA.
Why 40 mA instead 20 mA (absolute max. DC fwd. current)?
Because with 2N2222 border between current limit and working current is too blurred,
and level of current limit affects working current?
 

Attachments

Rod___

Joined Feb 19, 2014
5
Looking for a way to have a general purpose red led to run on 120vac, and another to drive 24vac for a blue led
Try RS Components, I have used green and yellow (part no. 209-765) 230V ac versions, no extra components needed they're all built in. I'm sure they also do 24V & 120V.
 

Attachments

Top