Measure the voltage of the power supply before you install the LED.
Make sure that the relay coil is in the circuit or the voltage will be very high.
What is the d.c. resistance and operating voltage of the relay coil? That will determine the resistance of R1 and R2.
I'm guessing that 20k is too much resistance for the LED.
I've simulated the circuit. Depending on the relay coil resistance, you may need to trim R1 and/or R2 to obtain something near 24 volts on the relay coil.
The resistor feeding the LED should be about 1.2k/1.5k.
A .25 or .5 watt resistor is good.
Thanks again. I'll change it to 1.5k 5w. What value is suitable for R1 and R2? The mains is at between 220-230v. I have connect a voltage regulator which will output at close to 240v to the soft start.
Don't need a 5 watt resistor. .5 (1/2) watt is big enough.
The value of R1 and R2 depends on the coil resistance of the relay.
Increasing the value of C1 will also increase the voltage to the relay coil.
Experiment with the values to obtain something near 24 volts on the relay coil.
I see, then we have to calculate the bypass resistors values before we use the circuit because resistors might end up flamed if wrong values used. For a transformer, the power rating is enough to be used for these calculations?
Also what happens if I use 1000uF/50V capacitor instead of two 470uF/40V capacitors?
be very careful with this circuit.
It is connected directly to the mains.
Don't touch any parts while it is plugged into the mains supply.
The 470k+470k do not supply much current.
If your mains is 230Vac and you use 24V for the relay drive, you have 215Vac to drive current through the 940k, I=V/R = ~0.23mA
The main current to drive the circuit comes through the capacitor, it must be X rated.
Find their AC impedance at your mains frequency and using the same formula find out how much AC current passes the capacitor.
Is that sufficient to drive the LED and to drive the relay?