I'm trying to build an AC dimmer using Arduino Uno microcontroller.
I tested a few options and came up with the circuit below which works perfectly fine:
AC PWM Dimmer with Arduino Uno
The only problem with this circuit is the placement of the light. The light bulb turns ON even when Arduino Uno is off and then, after connecting Arduino, the dimmer works fine and the light turns on and off as it should.
I'm trying to find a way to make sure that the light won't be turned on until the microcontroller is plugged in and ready to work, but I'm not quite sure how to do so.
I tried to put a switch between the light and the drain of IRF630 MOSFET, but it does not provide much control over the dimming process.
I will appreciate any help with this problem.
1 Answer 1
When it is activated, the optocoupler turns off the MOSFET, otherwise it is turned on via the 100k pullup resistor.
Therefore when the arduino is off, then the optocoupler is off, and the MOSFET will turn on, and the light will turn on.
If you want it the other way around, you have to design it so that when the arduino turns on the optocoupler, that turns on the MOSFET.
Something like that, maybe adjust R11 to get a proper 15V on the cap when the FET is fully on.
-
\$\begingroup\$ Thanks for your help. Appreciate it. \$\endgroup\$M Fa– M Fa2021年11月21日 16:01:26 +00:00Commented Nov 21, 2021 at 16:01