Circuit used with AC Triac dimmers, This is a circuit that tells the Arduino when the sinus wave goes through zero.
Designed by JUNIOR700 in BrazilThis product is no longer available for sale.
The seller may be offering an improved version or it may be hanging out on the beach, enjoying the retired life.
What is it? The zero-crossing detection circuit provides a 5V pulse every time the AC signal crosses zero volts. We detect this with the Arduino and leverage interrupts to time the trigger circuit pr…
Read More…The zero-crossing detection circuit provides a 5V pulse every time the AC signal crosses zero volts. We detect this with the Arduino and leverage interrupts to time the trigger circuit precisely in synchronization with these zero-crossing events. Once a zero crossing is detected, the TRIAC remains off for a controlled amount of time (t1) . The longer this time is, the less power the AC circuit receives. Once the “off-time”, t1 has elapsed, the microcontroller turns on the TRIAC by applying a voltage to the gate (shown in red). Once turned on, the TRIAC will remain on even after the gate voltage has been removed. It will turn off if the gate voltage is zero the next time the AC wave crosses zero. Because of this, we do not need to take care to turn the TRIAC off when the AC signal crosses zero again. All we need to do is to ensure that the TRIAC gets turned off inside of the period of ½ wave (t3). The duration of the gate pulse (t2) is determined by a minimum requirement of the traic. If this pulse is too short, the traic will not fire Once the second zero crossing occurs, since there is no voltage on the gate, the TRIAC remains off until triggered again in the next ½ cycle. The net result here is that we “chop” parts of the wave out resulting in lower average power. This is essentially how one accomplishes “PWM” control of an AC wave. We will be using interrupts and the Arduino timer to precisely control the timing of the TRIAC gate. To get a feel for the time intervals, we need to look at the AC signal and the Arduino clock. The AC signal (in the US anyway) is 60 Hz. What this means is that the AC signal crosses zero, reaches peak positive voltage, crosses zero, reaches peak negative voltage and returns to zero 60 times each second. The period (length of time this takes) is 1/60 or 0.01667 seconds (16.67 milliseconds). A half cycle (the time between two zero-crossings) occurs in 8.33 milliseconds. This is t3 in the figure above.
The Arduino clock runs at 16 MHz, which is 16,000,000 cycles per second: one clock cycle takes 0.0625 microseconds. A single half cycle of the 60 Hz AC signal contains 133,333 clock cycles. This is important because we will be determining the time intervals by clock counts in the Arduino code, not by seconds.
There is quite a bit of good information on use of interrupts with the Arduino out on the web so I won’t cover that in much detail here. Basically the way an interrupt works is that when some event happens (either internal or external to the microprocessor), the microprocessor immediately stops what it is doing to “service” the interrupt. This allows the microprocessor to handle very time sensitive events such as the AC Phase control task here.
http://playground.arduino.cc/Code/ACPhaseControl
I make it to control a AC dimmer using Arduino. As this sensor may be usefull for somebody else. I am used a circuit like this:
http://www.edn.com/design/analog/4368740/Mains-driven-zero-crossing-detector-uses-only-a-few-high-voltage-parts
Thanks for Luca Matteini, this is a great idea!
It has a good efficiency, better than only resistor and rectifier bridge circuit stile. This circuit has better AC disturb immunitty. And it is compact.
PS.: You can use this zerocross sensor with our Dimmer. Try it!
By clicking Register, you confirm that you accept our Terms & Conditions
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!