Hello Arduino Community!
I would like to control an AC motor speed with an Arduino. Currently, I am using a Variac with a dial to manually change the speed but I see that Pulse Width Modulation is a way to cut the AC pulse in order to change the voltage delivered to the motor and thus change the speed. I have found this tutorial linked below on how to use a zero crossing detector, traic driver and triac in order to modulate the pulse. I have looked over the circuit diagram and annotated what I believe each thing does and I would like some confirmation and help to identify some outputs.
Questions:
Can you look over my diagram annotations and see if I am understanding the circuit correctly?
Can this method handle 240V AC with 3Amps of current?
What exactly does this code do? Does it just decrease the brightness every 15ms with 283 steps?
Link: Arduino Playground - ACPhaseControl
PWM is for DC. In case of AC you use phase cutting - similar idea but very different implementation.
Annotation looks OK to me, but the value for R1 and R2 is way too low - that's a recipe for smoke. Add another zero to those numbers and it'll work a lot better.
3A is no problem; a common BT136-600 will do great. Do add an RC snubber as you're controlling a motor, otherwise the TRIAC most likely won't switch off at zero crossing.
This code and circuit works fine for a 640W pump. Almost 3A. Note that it uses peak detection rather than zero crossing detection. Use at least X2 rated safety caps on the high voltage side (or X1 if you happen to have them, even better).
Ok, the tutorial I was looking at uses a Q6015L5 Traic which I believe is for 10Amps so that should work?
Also, Would I connect the snubber between the AC input and AC output like in the GitHub page you shared with me? Is there an advantage of using peak detection over zero crossing detection? See attached updated schematic
Would this snubber work: https://www.mouser.com/ProductDetail/Cornell-Dubilier-CDE/104M06QC22?qs=sGAEpiMZZMvcAs5GUBtMdTT6%2Fet2iXYs
Thanks for your help!
Margaret
The difference is that I'm using the reactance of a capacitor for peak detection, vs the resistance of a resistor for zero detection. A capacitor acts very much like a resistor for AC with the difference of no electric losses and no heat.
Disadvantage: a bit more complex code, as the triac may have to be fired after the next peak. But the code is written so no real concern there any more. My code should be quite easy to expand to multiple controllers, the code as posted on the Arduino playground can't do this. This is a code issue rather than zero crossing vs. peak detection.
The TRIAC you mention can handle 15A, a generous over specification for a 3A motor. The snubber is also overspecified (again as it's a capacitor it will leak current - the larger the cap the lower the reactance and the higher this current); the values I used are fine for 3A.
If you're interested in keeping it simple, I still have a few of these boards on hand (schematic as you see on github), fully assembled on PCB, with snubber, heat sink and 4A fuse. Can sell them to you.
Oh really! I did read that there was a 50Hz limitation. I am in the US so I would be using 60Hz. Could I change the code to adjust for this?
I was also wondering. In your circuit, why is the neutral output connected to the positive input?
Also, I see the PC814 is mostly obsolete. Is there another optocoupler you use instead?
What voltage is the VCC connected to R1? Is it 5V from the Arduino?
Thank you so much for your help and explanation!
Maggie
msbarbe2:
Oh really! I did read that there was a 50Hz limitation. I am in the US so I would be using 60Hz. Could I change the code to adjust for this?
Yes - that's a matter of changing the timing parameters.
I was also wondering. In your circuit, why is the neutral output connected to the positive input?
Neutral and live are interchangeable. It doesn't matter for the working of this circuit.
Also, I see the PC814 is mostly obsolete. Is there another optocoupler you use instead?
Oh! That's a mistake in the schematic (symbol is correct) - this should the common H11AA1 AC optocoupler (the PC814 is a DC optocoupler).
What voltage is the VCC connected to R1? Is it 5V from the Arduino?
Yes - the Vcc of the Arduino (3.3V or 5V).
I really should update that image... not using that any more, found out it works better to use the internal pull-up resistor, and it saves a wire. No need to connect Vcc, really.