Question about Circuit design to dim light bulb via PWM - Page 1
Forum section: electronics / beginners

author: nsummy
author_rank: Contributor
timestamp: April 06, 2023, 10:55:07 pm
content: Please bare with me as while I understand what all of these components are, I'm unsure about why a few of them are included or needed. Basically I want to dim a standard light bulb via an Arduino without using the standard zero crossing triac setup. I have found a design in a few places using a mosfet or IGBT. This makes sense. My question is about using a logic level mosfet and deleting the octocoupler.I've found 2 different people with similar schematics and in both cases they say they are using this design since (normally) a mosfet or IGBT cant be opened with 5v. My questions:1. Do I actually need an optocoupler if I am using a logic level mosfet. I.E. is there a big danger with connecting a pwm pin and ground pin to the mosfet?2. If I don't need the optocoupler do I still need the diode and capacitor after the bridge rectifier (these seem to be included due to the optocoupler)3. I am using a 12v dc source to power the arduino. If an optocoupler should be in the design, is it possible to also use that to power the mosfet instead of a 2 resistor voltage divider?Thank you!

author: Benta
author_rank: Super Contributor
timestamp: April 06, 2023, 11:01:20 pm
content: Certainly you need the optocoupler, otherwise your Arduino will carry live mains voltage.Odd IGBT symbol BTW.

author: langwadt
author_rank: Super Contributor
timestamp: April 06, 2023, 11:03:46 pm
content: Quote from: nsummy on April 06, 2023, 10:55:07 pmyes, your whole circuit will be connected to mains

author: james_s
author_rank: Super Contributor
timestamp: April 07, 2023, 12:46:34 am
content: IMHO if it's not immediately obvious why you need the optocoupler then you possess an insufficient level of knowledge and should not be messing with mains powered circuits until you do some more studying.

author: nsummy
author_rank: Contributor
timestamp: April 07, 2023, 02:23:09 pm
content: Quote from: james_s on April 07, 2023, 12:46:34 amThis is exactly why i asked before building the circuit

author: WattsThat
author_rank: Frequent Contributor
timestamp: April 08, 2023, 05:39:35 am
content: Beware of random circuits found on the internet, especially those that involve mains voltages.A “standard” light bulb is rated for 220 volts AC. The circuit shown rectifies the AC to DC which results in a DC voltage of 310 volts. That may be a problem, it depends on the type of lamp used.Make sure you’re solving the correct problem before looking for a solution. You’ve not stated why phase control isn’t acceptable so I’ve got to ask the obvious question: what’s wrong with a triac and a proper optocoupler/driver? Dimming by phase angle firing is how every mains based dimmer works and they’re sold by the millions almost every day on every continent around the world.To answer you actual questions:1. You need an optocoupler because of the mains voltage. Yes, there is a huge danger in attempting to eliminate the isolation provided by the optocoupler. Yes, you can drive a logic level mosfet directly from an Arduino output pin but that’s not an issue with the circuit shown.2. The diode isolates the 100uf capacitor from the actual load so the mosfet gate signal does not have 50Hz ripple on it. Without the diode and cap, the load would turn off very briefly every 10 milliseconds when the gate drive signal went to zero volts.3. Using the 12 volt supply of the Arduino to drive the mosfet would put you back in the same very dangerous situation as eliminating the optocoupler in question 1.

author: BradC
author_rank: Super Contributor
timestamp: April 08, 2023, 08:36:28 am
content: Quote from: WattsThat on April 08, 2023, 05:39:35 amA "standard" light bulb might be rated for 220VAC RMS. The circuit shown rectifies the AC to DC which results in a fluctuating DC voltage of 220VDC RMS (minus ~1.2v diode loss).In either case the peak voltage remains for all intents and purposes the same. An incandescent isn't going to care, but as you say other lamps may.

author: Alti
author_rank: Frequent Contributor
timestamp: April 08, 2023, 10:02:05 am
content: If you do not want a zero crossing then inevitably once in a while you'll grab against a peak of 230V which might get to about 360V. If the filament is cold, expect instantaneous current to reach above 20x rated current. So a 230W bulb is going to draw 20A+ initially. You need to size transistor for that.

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2023, 01:47:10 pm
content: It's possible to do this with a digital isolator and an IGBT or MOSFET, but for all that trouble, why not just use LEDs? They're cheaper to run, easier to dim and last for much longer than incandescent lamps. The higher upfront price is outweighed by the vastly lower energy bills, resulting in a much lower total cost of ownership.

author: WattsThat
author_rank: Frequent Contributor
timestamp: April 08, 2023, 01:48:59 pm
content: Quote from: BradC on April 08, 2023, 08:36:28 amGreat point, something I hadn’t considered. The original circuit as shown has no capacitance on the output (load) side. While this prevents the 310 volts peak dc I mentioned, it does present a 10Hz ripple in the dc output current which may well cause interfere with the PWM frequency.

author: james_s
author_rank: Super Contributor
timestamp: April 08, 2023, 06:43:35 pm
content: Quote from: Zero999 on April 08, 2023, 01:47:10 pmMaybe they want to use the bulb to generate heat, maybe they want an accurate vintage look, maybe it's some specialized type of lamp where the optical characteristics are critical, maybe there is some other reason. There are a few valid reasons to want to use an incandescent lamp.If the goal is simply to have a dimmable light source then yes, LED makes more sense in most cases.