Basically you could probably send the direct PWM signal to a traic and it should work ok.
QuoteBasically you could probably send the direct PWM signal to a traic and it should work ok.That may not work directly controling a traic < --- proper rated , with a traic opto-coupler, yes, much better. the digital output control the led of the opto, and the triac reacting and controling the bigger triac. Now, that may work. And dealing with main voltage, safety is a must.
I will do an experiment this week-end using a opto and triac. I will use a 12 V AC source to control a light bulb and see what happen <--- that could be breadboard. And I will construct a test rig for the AC main test.
I did the experiment. I use a 12 V AC in with a 12 V light bulb. I included picture of my setup and a schematic. No 120 V AC test yet. I need to change the value of R2 to control the curent going into the Triac gate. My setup is about 6 mA to the gate using 1 K.The limiting resistor of 330 is the LED side of the optocoupler. First, I did the "blink" test. Pass and it is flashing. But I did the PWM test, and I did not see a difference at all. Because, when the light bulb is on and going off, a next pulse will turn on and so fourth. A led can switch on / off fast, but not a light bulb, it is just too slow to responce an PWM signal. So to my eyes, it seem ON. A slow pulse will blink it. So, the light bulb need to see a voltage reduction for a dimming effect to work. Therefore, a different circuit is needed for a dimming to work.
Let re-cap here.A dimmer work by reducing the voltage at the load. It "cut" the AC sine wave, to created a lower voltage effect.So you need a circuit at the AC side to convert the PWM pulse into a partial cut AC sine wave.I included a diagram what I am talking about.
The point on this tread is to control AC main going into a light bulb and doing it safely. Let work on this. I will try it at my end.