Connect LED to 220 V

Good evening everyone, I would need to install a LED connected to a switch that I have at home to be able to see in the dark if the circuit is closed.

I know that there are already switches prepared but I wanted to try with a classic LED from the Arduino kit, if I leave out any diodes and capacitors and simply put a 20k resistor can it work or will I end up with a fire :sweat_smile:?

Thanks for the help

A small but energetic explosion. Shrapnel. A very bad smell. Possibly a fire.

  • And don’t forget about the flying bits of plastic going into your eye.

It's the reverse voltage that will destroy the LED. Connect an inverse parallel diode across the LED and it may survive
However you need to be aware that the resistor will dissipate nearly 2.5W.

You can buy 220V led indicator lights on Amazon, ten for $9.49 with free shipping. Hardly worth bothering.

You should not work with voltage above 12vdc. Do not follow linemen in your area who connect live, 220vac wires, with bare hands, broken sandals, on aluminum ladders.

Without proper experience, attempting this could lead to serious danger. Please proceed with caution, as working with high voltage can be life-threatening.

I recommend using your preferred search engine to look up "220V AC indicator" to find safer, ready-made solutions for your needs.

I have seen this suggestion before: adding a reverse polarity diode across the LED to eliminate the reverse voltage breakdown problem. I think it is better to add the diode in series (with proper polarity) to eliminate the reverse voltage. It cuts the resistor dissipation in half!

Even if you did it right, the LED would be OFF when the circuit is closed

Maybe I should not mention this, but the resistor can be replaced by 100nF capacitor... no dissipation at all...

A small neon light could be used...

Re: replacing the resistor with a capacitor, no power dissipation. If there is no power dissipation that means there is no current limiting either. The reactance of the cap is measured in Ohms like a resistor, but they cause a phase shift rather than resisting the flow of current. That is a bad idea because there will be no real resistance in the circuit.

That is the whole point of using a cap rather than a resistor.
Cap drop circuits are commonly used in cheap LED nightlights.

I see that there is some rebuttal to my assertion. So then Let's calculate the current through the LED: i = e/R where R = 0. So we have too much current!

You might want to explore the concept of impedance.
A 220nF cap will have an impedance of about 12K ohms at 60Hz line frequency.

True story!

At my first job, one day I heard a scream from the basement and then our shipping clerk/test person (It was a very small company!) came running up the stairs.

She had been testing some hardware that we got back from our assembler and when she plugged in the power supply, an LED exploded off the board and barely missed her face.

I went downstairs to investigate and found the remnants of a T 1-3/4 size red LED embedded in the drop ceiling! Our usually very conscientious assembler had soldered it in backwards and the LED did not appreciate having -12V applied.

She was terrified that it might happen again and from that point on did all of them at arm's length.

And you calculated that by 1/(2pifc). That is the formula for capacitive reactance not impedance. Remember ELI the ICE man. In a capacitive circuit, the current leads the voltage. In the pure capacitor the phase shift is 90 degrees. The reactance does not dissipate power, we all agree on that. If we use a 12K resistor in a circuit it will dissipate power because it limits the flow of current where a cap of Xc=12K will not dissipate power because it does not limit current.

OK so my capacitor has an ESR of 10m ohms. Add that to the reactance and now you still have impedance of about 12K

Oh. Good point. I forgot about the ESR. Then we can add the resistance of the wires and perhaps the intrinsic resistance if the LED, too. Now we are off the 90 degree phase shift for sure and the impedance formula will have an R term! I have to agree that Z = 12K. Then the power dissipation is distributed among all the resistive elements.

Thanks to everyone for the help.

Unfortunately I didn't have any capacitors that could hold 220 V at home so I bought the LED light that can be powered by the home network directly.