I want to power a single 3 mm LED by a 220V AC source. For this I think I need one LED, one resistor and one capacitor. I don't know the needed resistor value and circuit diagram. The circuit also should tolerate changing voltages.
This circuit involves dangerous mains voltage. Don't play with it or always keep one hand in your pocket while debugging.
This application note from Microchip has all the formulas you need.
This is a basic schematics:
And these are formulas:
To flash the LED, you don't need everything that is on this schematic. You don't need a regulated voltage, so you can drop D1. Since a LED is a diode, you can replace D2 with a LED. The LED will flash depending on frequency of your mains - 50 or 60 hz. You have to put two LEDs in antiparallel, so each LED flashed on positive and negative half-cycle.
The most minimal circuit that can light up a couple of LEDs is this:
But remember this is high voltage that can kill you.
|show 3 more comments|