Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How does this work? Its black magic. LED working from 120v AC

Status
Not open for further replies.
Why a resistor in the first place? I use a 400 Volt AC capacitor with the LED's connected in 2 "anti parallel" chains to do the same. The Capacitance depends on the "resistance" [ 1/(2*pi*f*C)] required.

like this (with 6 LED's)
1547993308920.png
 
Last edited:
cool. thanks everybody.

The problem with using a diode and resistor to make a power supply for higher power LEDs is the resistor has to dissipate MUCH more POWER.

Like you asked - 6 x 1W LEDs - (2v and 500 mA), requires a 300 ohm resistor and that resistor will need to drop about 20 watts RMS. Make sure you have a good heat sink on your resistor and some ventilation to circulate that heat.

If you use a bridge rectifier instead of a single diode, you can still use a 300 ohm resistor to keep the max current through the LEDs below 500 mA, but the full wave rectification bumps the power on the resistor to about 40 watts RMS.

Good luck.

NOTE: the use of a diode and resistor is not a "well kept secret" as you suggest, but usually a stupid design if more than a few milliamperes are needed.
 
Another option for powering LEDs is called a capacitive dropper. The resistor is replaced with a capacitor and the reactance drops the voltage. The capacitor on this situation must be rated cor greater than the peak line voltage (i.e., 1.414×line voltage).

Use caution with either type circuit - they are live at line voltage. This type of power supply can be used to power a microcontroller circuit but if this is done, the entire circuit and anything connected to it is live at line voltage. The entire circuit must be isolated from any chance of contact to a person.
 
question 2)
why is this a big secret on the internet and nobody in a google search, or instructables.com mentions that I can do this?
it's not a big secret... the reason you probably don't see it often, is most people recognize the safety hazard and avoid doing this, as well as understanding that it's a bit wasteful to dissipate almost a watt in a resistor.

i'm guessing the device you bought at the dollar store bypassed UL cert? usually something like that wouldn't pass UL, but i suppose if it's fully enclosed and insulated, it might.
 
i'm guessing the device you bought at the dollar store bypassed UL cert? usually something like that wouldn't pass UL, but i suppose if it's fully enclosed and insulated, it might.

Maybe you can take a few minutes and explain to the rest of us how incandescent 4W 120v night lights pass UL testing?
 
Another option for powering LEDs is called a capacitive dropper. The resistor is replaced with a capacitor and the reactance drops the voltage. The capacitor on this situation must be rated cor greater than the peak line voltage (i.e., 1.414×line voltage).

Use caution with either type circuit - they are live at line voltage. This type of power supply can be used to power a microcontroller circuit but if this is done, the entire circuit and anything connected to it is live at line voltage. The entire circuit must be isolated from any chance of contact to a person.

Merely replacing the Resistor with a Capacitor will result in the capacitor charging to peak voltage and blocking. You will need to discharge the capacitor on the other half cycle. That's the setup shown if Post # 21
 
Sorry, my comment wasn't meant as a how-to on capacitive dropper circuits but instead to point out that there is an alternative to a toasty hot resistor in this secret society of alternative power supplies. The reactance of the capacitor is functionally equivalent to the resistance of the resistor.

Here's a decent reference to help you get started in understanding capacitive droppers. These are often used in higher-power LED light bulbs and to power line-power monitors. I will again stress the dangers of using this type of supply where a person can come into contact with any part of the circuit.

SmartSelect_20190121-232609_Firefox.jpg
 
Maybe you can take a few minutes and explain to the rest of us how incandescent 4W 120v night lights pass UL testing?
An incandescent light bulb is simply a resistor that gets white hot. The oxygen is removed from inside its glass globe to prevent it from burning out too soon. 4W at 120VAC is 600 ohms when it is white hot. A 100W incandescent bulb at 120VAC is 144 ohms when it is white hot. A 1500W toaster at 120VAC is 9.6 ohms when it is red hot.
 
An incandescent light bulb is simply a resistor that gets white hot. The oxygen is removed from inside its glass globe to prevent it from burning out too soon. 4W at 120VAC is 600 ohms when it is white hot. A 100W incandescent bulb at 120VAC is 144 ohms when it is white hot. A 1500W toaster at 120VAC is 9.6 ohms when it is red hot.
Agreed. For some reason, many people on this forum and allaboutcircuits.com think some special over-unity dark-matter special-relativity danger is invoked as soon as 120vac and LEDs are in the same circuit. Ha
 
Last edited:
Agreed. For some reason, many people on this forum and allaboutcircuits.com think some special over-unity dark-matter special-relativity danger is invoked as soon as 120vac and LEDs are in the same circuit. Ha

Apparently, Microchip believes in the same special over-unity dark-matter special-relativity bull-feces danger as I do. Transformerless Power Supplies - Resistive and Capacitive.

SmartSelect_20190122-163327_Drive.jpg


Perhaps other readers of this forum, without gophert's supercalifragilisticexpialidocious, more-than-any-other-human-being's vast experience, may think a capacitive dropper will be a great way to run a microcontroller circuit circuit, completely unaware that touching one of pins may result in a low-voltage shock. These circuits have their place, but not where people may come into contact with them.
 
Last edited:
I was looking for the smallest simplest way to power an LED from USA household current which is 120 volts AC. At the dollar store I found an LED night light and opened it up expecting to see a tiny transformer or something to power the led but instead I found this: <see attached picture>.

I am dumb founded how to explain how this works, and when I checked online for led's powered by 120v ac nothing comes close to this circuit I found. Mean while, it works perfectly. What is going on here?

View attachment 116216

Hi,

The resistor limits the current, the diode provides half wave rectification so the LED mainly gets a DC current although it is still pulsing. If you shake it back and forth you may even be able to pick up the blinks because it only lights up for 1/2 cycle.

This design does not look like a true professional design although it may work anyway.
Problem 1 is that the resistor is rated for 1/2 watt yet the power dissipation is 0.48 watt so the resistor may get very hot. You could check that.
Problem 2 is that the reverse voltage across the LED is dependent on the capacitance of the LED vs the capacitance of the diode. They are banking on the LED having much higher reverse capacitance than the diode. That's almost definitely true, but i dont think it should govern the overall design and there should be a reverse connected diode across the LED too or the LED may one day blow out.
 
Apparently, Microchip believes in the same special over-unity dark-matter special-relativity bull-feces danger as I do. Transformerless Power Supplies - Resistive and Capacitive.

View attachment 116286

Perhaps other readers of this forum, without gophert's supercalifragilisticexpialidocious, more-than-any-other-human-being's vast experience, may think a capacitive dropper will be a great way to run a microcontroller circuit circuit, completely unaware that touching one of pins may result in a low-voltage shock. These circuits have their place, but not where people may come into contact with them.

You must be stunned that people manage not to stick their fingers in light sockets and probe around when they change lightbulbs. Who the hell looks at device plugged into a wall and is UNAWARE they shouldn't probe around or drop it into a bathtub?

Re-read the Microchip app note again, it doesn't say, "don't use transformerless power supplies", it says, paraphrasing, "if you are going to do it, do it right". I agree whole-heartedly with the right time, right place. I am just against the stupidity of "don't do it, don't talk about it, pretend-it-doesn't-exist" mentality of some members and some forums.

Also, Thanks for putting words in my mouth. "Great way to run a microcontroller"? I was talking about LEDs and I only think it is one way to power LEDs. A great way in some cases, not others.

Keep your chin up, my friend. You may write a reasonable post some day in the future.
 
You must be stunned that people manage not to stick their fingers in light sockets and probe around when they change lightbulbs. Who the hell looks at device plugged into a wall and is UNAWARE they shouldn't probe around or drop it into a bathtub?

Re-read the Microchip app note again, it doesn't say, "don't use transformerless power supplies", it says, paraphrasing, "if you are going to do it, do it right". I agree whole-heartedly with the right time, right place. I am just against the stupidity of "don't do it, don't talk about it, pretend-it-doesn't-exist" mentality of some members and some forums.

Also, Thanks for putting words in my mouth. "Great way to run a microcontroller"? I was talking about LEDs and I only think it is one way to power LEDs. A great way in some cases, not others.

Keep your chin up, my friend. You may write a reasonable post some day in the future.

Hi,

That's a good point about the light bulb socket. "Hey let's make sure this socket is live...zzzzziitttt".

You will find mixed opinions on this matter of transformerless power supplies.
After all is said and done however, they are in use in many devices. These devices always have their circuits enclosed and extra isolation regarding things like potentiometers.

It's probably only not that good for a beginner unless they are aware of the high voltage potentials that still exist. Once aware though, they should understand the risks because after all they must know that when they plug in a 'cheater cord' (a plug and wire with bare wire ends) they can not touch the ends :)

The moral of the story is there is a time and place for paranoia :)
 
Perhaps I need to connect the dots for you esteemed (that word may not mean what I think it does) gentlemen.

"Joe New Guy" has played with an Arduino a little bit. He knows that he's not going to get a shock from the 5 volt power supply no matter what he does.

Joe sees some info on transformerless power supplies and decides he can adapt a capacitive dropper from an LED bulb to power his next project. It's only about 5 volts, so what possible harm could there be? He can save a couple bucks and power his project.

All goes well until the circuit board starts to fall so he grabs it and suddenly receives a line-voltage shock.


Think this can't happen? There was a recent thread here where a guy did exactly this, ignoring numerous warnings. Finally, he decided to prove everybody wrong, and was shocked to see (no pun intended) 120v on his microcontroller pins.

Perhaps gophert and others need to remember that not everyone here is of the Geritol generation, and indeed, that it would be a good step to encourage new members and to reduce the average age here by 20 or 30 years.

SmartSelect_20181015-030500_Gallery.jpg
 
1) the conversation started when someone suggested transformerless power supplies might not get through UL approval. However, with the right packaging, cord restraints, and labels, an LED can be powered from mains. If you open some commercially makes LED lightbulbs, especially those encapsulated in polycarbonate,, you may be horrified to see a transformerless power supply.

2)
There was a recent thread here where a guy did exactly this, ignoring numerous warnings. Finally, he decided to prove everybody wrong, and was shocked to see (no pun intended) 120v on his microcontroller pins.
I'm sorry, I don't remember this post. Even the search tool couldn't help me find it. Please post a link.
Even if your story is true, the experimenter you referred to is an idiot, there has never been a thread that describes transformerless power supplies as safe to noobies or safe for experimenters. I am not responsible for stupid. He was likely told that wall outlets were dangerous since he was 2-years-old. As shown above, and quoted by MrAl , right time, right place for everything. An experimentalist bench is stupid - especially a noobie that doesn't know enough to keep cables on the back of his bench so his microcontroller doesn't fall off the bench (again, please post a link to support your story).

3)
Perhaps gophert and others need to remember that not everyone here is of the Geritol generation, and indeed, that it would be a good step to encourage new members and to reduce the average age here by 20 or 30 years.
Do you really want to get into name calling based on age in this forum? Remember, it's been us old guys that paid for all of the child locks, car seats and participation trophies that kept you safe - physically and emotionally.
.
.
 
Last edited:
Gophert,

Here is a link to my alleged post. Nigel and a number of others made repeated posts about the safety of transformwrless power supplies, especially in the hands of somebody who doesn't know what they are doing...which is pretty common here.

Explaining the risks, especially when somebody does not understand them (as is the case with the original poster here) is a reasonable and prudent thing to do.

SmartSelect_20190123-065047_Firefox.jpg

You have no clue about my age, so anything you say is baseless.
 
Last edited:
Gophert,

Here is a link to my alleged post. Nigel and a number of others made repeated posts about the safety of transformwrless power supplies, especially in the hands of somebody who doesn't know what they are doing...which is pretty common here.

As I said, people that think there is Never a time, place or design to use transformerless power supplies - they are wrong. A noobie on a benchtop is clearly wrong time, place and design. I'm surprised I have to keep repeating that to you.

Think this can't happen? There was a recent thread here where a guy did exactly this, ignoring numerous warnings. Finally, he decided to prove everybody wrong, and was shocked to see (no pun intended) 120v on his microcontroller pins.

I don't see the highlighted safety issue you mentioned above in the link you posted - the part where a microcontroller pin has 120V in that thread. Not even a mention of a microcontroller. Still an "alleged" post.

You have no clue about my age, so anything you say is baseless.

I don't give a rat's ass what your birth certificate says, I deal only with people's emotional age and, from what I see, you are doing a good job trying to lower the average age of the membership.
 
Last edited:
Perhaps I need to connect the dots for you esteemed (that word may not mean what I think it does) gentlemen.

"Joe New Guy" has played with an Arduino a little bit. He knows that he's not going to get a shock from the 5 volt power supply no matter what he does.

Joe sees some info on transformerless power supplies and decides he can adapt a capacitive dropper from an LED bulb to power his next project. It's only about 5 volts, so what possible harm could there be? He can save a couple bucks and power his project.

All goes well until the circuit board starts to fall so he grabs it and suddenly receives a line-voltage shock.


Think this can't happen? There was a recent thread here where a guy did exactly this, ignoring numerous warnings. Finally, he decided to prove everybody wrong, and was shocked to see (no pun intended) 120v on his microcontroller pins.

Perhaps gophert and others need to remember that not everyone here is of the Geritol generation, and indeed, that it would be a good step to encourage new members and to reduce the average age here by 20 or 30 years.

View attachment 116288


Hello there,

That's a terrible way to get your point across. That's what some people do when they run out of real argument content, they start to mock and sometimes try to place them in a group that is somehow perceived to be less in some way than other people. I can tell you that i have argued and discussed and debated with many people over the years, and the one thing i have learned you dont want to do is mock the other person because that just leads to irritation and agitates the argument rather than solves anything. That picture will just make some people mad and that wont solve anything.
From what i have read from you so far i think you are capable of much more than that.

Just to note i did mention 'beginners' in my post.
Also, you seem to be trying to limit ALL PEOPLE the use of one type of circuit when really only one group needs to be limited and that is the beginners group. Anyone who is a beginner should be either avoiding the use or given full warning with points about why it could be a hazard.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top