Will this setup to dim an LED bulb with PWM work?

For a project I am doing, I need to be able to use an Arduino Uno to Dim an LED bulb (like one that would be used in a lamp).

The idea I have is to have the following circuit: Arduino --> N-Channel MOSFET Transistor --> Bulb.
I attached an image of my proposed circuit. And the bulb I would be using is 120 V so I am assuming I would need my N-Channel MOSFET Transistor would need to also be rated 120 V.

It's also been suggested that I use a Flyback diode to protect the transistor from voltage spikes. So, I may consider doing that. My question is, would this setup work and allow me to control the brightness of the LED bulb using PWM?

It will not work because the Arduino ground needs to be connected to the MOSFET source in order to complete the gate circuit. I doubt that you need a flyback diode for the light bulb: it is not much of an inductor. I assume you will be using 120V DC because the MOSFET will not work well with AC when the polarity is reversed.

incorrect. minimum AC120V * 1,4 =170V DC(+20-50% to be sure) so at the end 200-250V

1 Like

I'm not sure but from this scribble it looks like the transistor is in parallel with the lamp and will short out if it works. Also, if the bulb is not designed for dimming, it will not work. Apparently, the protective diode is also not connected correctly. You'd better draw a proper schematic because you're just confusing us.

2 Likes

No, it won't work.

"Light bulb" LEDs have a power supply inside. Some are dimmable and some are not.

Non-dimmable light bulbs are usually rated for between 80-250VAC so they are specifically designed NOT to change brightness when the voltage changes.

Dimmable LED lightbulbs normally use phase dimming. You need an isolated zero-crossing sensor, and an isolated TRAIC driver.

Anything greater than 50V should be considered dangerous and the high voltage should be isolated from you, the Arduino, and your computer when it's plugged into the Arduino.

If you aren't using a LED "lightbulb", high-power LEDs are normally powered and dimmed with a constant-current/controlled-current driver circuit. It's not an easy thing to build yourself.

I would recommend you purchase a commercial dimming unit for your project and be sure you understand what you are doing when connecting things. If you do not understand get somebody to help you that does.
A mistook in this could easily kill you.

1 Like

Hi,

I made a post a few days ago asking about whether my plan for dimming a lightbulb with an Arduino would work and your guys responses were very helpful.

I found a new and easier way to do it from this article that I attached? I just want to know if it would likely work.

The project uses Arduino Uno --> RobotDyn AC Light Dimmer Module --> Bulb
Then the Arduino IDE Code uses the RDBdimmer Library (which I've already downloaded from githubb).

I also attached an image of the proposed circuit. Should this work?

Shouldn't the Arduino be connected to the module in some way ?

2 Likes

RBDimmer:

1 Like

@sam_isthe_man , I've merged your two topics. You should not start multiple topics about the same subject; it wastes peoples time.

There was information in your original topic (LED bulb) that is missing in your follow up topic; that might be important for those that are trying to help.

Only if the used LED bulb can be dimmed. Some can, some can't. It's usually indicated on the box if they can be dimmed. If there's nothing about the bulb being dimmable on the box, assume it won't work.