Mains Operated LED Light Circuit Working

Hello, below i will have a picture of a full bridge rectifier led mains circuit. I got the picture from
I get how most of it works, the only thing that i do not get is, it says that the capacitor(.22uF) and resistor(1M ohm) are used together so that the resistor discharges the capacitor and prevents lethal shock.
I do not know what is the reason for the capacitor( and i get the a capacitor allows ac current to flow through it).
So whats the capacitor for, and how does the resistor physically discharge the capacitor?
My only guess for the capacitor would be for transient voltage spikes, but i really do not know.

Am I missing something here? Does that actually put mains voltage into a breadboard? Are they rated for that?

Is this the Darwin awards? Please don't plug that thing in.

The capacitor drops voltage, like a resistor for alternating current, except it doesn't get hot. So in your circuit it reduces the voltage from mains level to something that won't pop your LEDs.

When a capacitor is disconnected it can retain some charge. Probably not enough for a lethal shock on a small capacitor like that, but enough to hurt a bit. The 1M resistor in parallel lets this discharge.

Capacitive power supplies like this don't isolate the low voltage side from the mains like a transformer does. This is potentially VERY DANGEROUS so you'd normally only find them inside sealed items like cheap LED light bulbs etc.

As suggested by @ardy_guy and @GypsumFantastic, do not apply mains voltage to that protoboard.
They are not rated for that sort of voltage.

The capacitor acts as the series voltage drop for the AC current.

Tom... :slight_smile:

This is potentially VERY DANGEROUS so you'd normally only find them inside sealed items like cheap LED light bulbs etc.

What other sort of LED light bulbs are there, I wonder?

I haven't cracked many open so far - because they do not fail too often. :roll_eyes:

While it may not be a great idea to experiment with mains circuits on solderless breadboard, most of the materials (except for the backing paper) would plausibly withstand mains, especially if you keep more that one column between connections - as seems to be the case in that illustration. Obviously the rule is - keep the bench otherwise clear, unplug the circuit before going anywhere near to it and use an RCD plug to connect to it.

The point is - how else would you [prototype such circuits? I have to attempt to fix some absurdly expensive mains PIR switches which have failed in a ridiculously short time (two years or less) - these have three terminals and (just checked) do have a miniature relay inside but no power transformers, only capacitors. So I have to power them up somehow in order to fault find. An old-fashioned test board with switches to select various incandescent bulbs as series current-limiting ballasts in series with the "live" and clip leads to test things can be quite useful.

As to the circuit above, we have a bridge rectifier feeding five red LEDs in series, about 8 or 9 Volts. Current is limited by the reactance of a capacitor so virtually no heat is dissipated (wasted). A 1M resistor contributes little to that current but will discharge the capacitor within seconds to avoid nasty shocks if the circuit is handled after it is disconnected. An extra 860 Ohm resistor in series is not to "assist" in the current limiting except that it limits the surge through the circuit at switch-on.

Hello, thanks for responses everyone. I dont know why i didn't think of capacitive reactence. I guess i didnt realize how much resistance it provided, but after reffering to the webpage that TomGeorge provided , i see that with low frequency's (60hz) that capacitors provide high resistance.

Just for a little extra cringe. The website that i got that picture from suggested using mains 230v. Lol

Yes, well when you talk "mains", for me that is - well actually - 250V because that is what we get here much of the time. :grinning:

254Vac at work when the sun is shining bright.. lol

I have an isolation transformer at work with output taps to help keep the volts down on some sensitive gear.

Tom... :slight_smile:

So we now have this mindless nonsense in the press whereby the energy suppliers are arguing that the number of people with solar installations are making it "difficult for them to regulate the voltage" and that this is causing excess voltage which also causes appliances to consume more energy and puts up people's power bills! :astonished:

How gullible do they think we are? I know exactly what puts up people's power bills!

Oh yes ... that much!

And anthropogenic climate change is not real either.