If you use a capacitor to limit the current, be sure and add a small resistor in series to limit the surge current when you turn on the LEDs. That current can blow the diodes if you happen to turn it on at the peak of the sine wave.
I prefer to use a capacitor, maybe .22µF but your circuit must include a bridge rectifier! I find that you have to play with different capacitors to drop the voltage a certain amount for your led(s).
Sorted, designed and going into production in 2 Weeks time once the PCB's arrive.
And this circuit drives multiple LED's. Bits and pieces of some the ideas above were used. Figured the end Product out myself and the circuit is happy driving 16 High Bright LED's directly from 230VAC. Been running non-stop for around 100 Hours.
**broken link removed** LEDs on 240v I do not like any circuit connected directly to 240v mains. However Christmas tress lights have been connected directly to the mains for 30 years without any major problems.
Insulation must be provided and the lights (LEDs) must be away from prying fingers.
The capacitor must be X2 and add an equal number of LEDs in each string so the reverse voltage is equal across each LED.
It does not matter how many LEDs you add to each string as the brightness will be the same. As you add each pair, the current will drop a very small amount until eventually, when you have 100 LEDs in each string, the current will be zero.
For the circuit shown, each LED will get 15mA for 50% of the time. The 1k resistor will drop 15v (15mA x 1,000 ohms = 15v). No rectifier diodes are needed. The LEDs are the "rectifiers." Very clever. You must have LEDs in both directions to charge and discharge the capacitor. The resistor is provided to take a heavy surge current through one of the strings of LEDs if the circuit is switched on when the mains is at a peak. A 100n cap will deliver 7mA in full wave or 3.5mA in half-wave.