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 ?
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 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!
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.
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!
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.
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.