A lossless circuit using the capacitive resistance of capacitors instead of resistors. It can be used at nearly any size of voltage as long as your diodes can handle that voltage. The simulation uses 230VAC. Close the switch to bridge the extra resistor of 470Ω.