One method of controlling power to AC circuits utilizes a triac to switch the power on and off at precisely timed intervals synchronized with the AC signal. This technique is referred to as AC phase control and is commonly employed in various light dimmer and heater power control circuits. By integrating an Arduino microcontroller with a simple circuit, it is possible to monitor the AC wave and determine the appropriate timing for activating and deactivating the triac. The circuit includes an opto-isolated zero-crossing detector and an opto-isolated trigger circuit for the triac. The use of opto-isolators is essential for maintaining safety by isolating low-voltage signal circuits from high-voltage power circuits. The zero-crossing detection circuit generates a 5V pulse each time the AC signal crosses zero volts. This pulse is detected by the Arduino, which uses interrupts to time the trigger circuit in synchronization with these zero-crossing events. The power control method is illustrated in the accompanying diagram. Upon detecting a zero crossing, the triac remains off for a predetermined duration (t1). The longer this duration, the less power the AC circuit receives. Once the off-time (t1) elapses, the microcontroller activates the triac by applying a voltage to the gate (indicated in red). The triac remains on even after the gate voltage is removed and will only turn off when the gate voltage is zero during the next zero crossing of the AC wave. Therefore, it is unnecessary to manually turn off the triac when the AC signal crosses zero again; it suffices to ensure that the triac is turned off within the half-wave period (t3). The duration of the gate pulse (t2) must meet the minimum requirements of the triac; if this pulse is too brief, the triac will not trigger. After the second zero crossing, since there is no voltage on the gate, the triac remains off until it is triggered again in the subsequent half cycle. The result is that segments of the wave are removed, leading to lower average power. This process essentially implements PWM control of the AC wave. The Arduino utilizes interrupts and its timer to accurately control the timing of the triac gate. To understand the time intervals, it is crucial to examine the AC signal and the Arduino clock. In the United States, the AC signal operates at 60 Hz, meaning it crosses zero, reaches peak positive voltage, crosses zero again, reaches peak negative voltage, and returns to zero 60 times per second. The period of this cycle is 1/60 or 0.01667 seconds (16.67 milliseconds), with a half cycle (the interval between two zero crossings) occurring in 8.33 milliseconds, denoted as t3 in the figure above. The Arduino clock operates at 16 MHz, equating to 16,000,000 cycles per second, with each clock cycle lasting 0.0625 microseconds. A single half cycle of the 60 Hz AC signal comprises 133,333 clock cycles. This detail is significant because time intervals will be determined by clock counts in the Arduino code rather than by seconds. There is extensive information available regarding the use of interrupts with Arduino, which will not be elaborated on here. In essence, an interrupt allows the microprocessor to halt its current operation to address an event, whether internal or external, enabling it to manage time-sensitive tasks such as AC phase control effectively.
The AC phase control circuit is designed to provide efficient regulation of power in AC loads, utilizing a triac as the main switching component. The zero-crossing detector employs an opto-isolator to ensure that the low-voltage control circuit remains electrically isolated from the high-voltage AC line, enhancing safety during operation. When the AC voltage crosses zero, the detector outputs a clean 5V pulse, which is fed into the Arduino. The Arduino is programmed to respond to this pulse using interrupt-driven programming, allowing for precise timing of the triac gate pulse.
The triac is controlled through its gate terminal, which requires a brief voltage pulse (t2) to initiate conduction. The duration of this pulse is critical; it must be long enough to ensure reliable triggering of the triac but short enough to maintain control over the power delivered to the load. The timing sequence is managed by the Arduino's internal timer, which counts clock cycles to determine the appropriate moment to activate the triac after a zero crossing.
As the AC signal oscillates, the triac's conduction can be delayed by varying the duration of the off-time (t1), effectively controlling the average power delivered to the load. This method of phase control allows for smooth dimming of lights or modulation of heating elements without the noise and flicker associated with other control methods. The system's responsiveness is enhanced by the use of interrupts, ensuring that any changes in the AC waveform are quickly addressed, maintaining synchronization between the control circuit and the AC line.
Overall, this AC phase control circuit represents a practical application of microcontroller technology in power management, providing a reliable, efficient means of controlling AC loads while ensuring safety through isolation and precise timing.One method of controlling power to ac circuits uses a triac to turn the power on and off at precisely timed intervals that are synchronized with the ac signal. This method is called AC phase control. It is the method used in many light dimmer and heater power control circuits. Using an Arduino microcontroller with some simple circuitry, we can monitor the ac wave to determine the
proper time to turn the power on and off with the triac. The circuit I used to do this is shown below. The circuit consists of an opto-isolated zero-crossing detector and a opto-isolated trigger circuit for the triac. The opto-isolators are necessary to keep the low voltage signal circuits away from the power circuits and provide an appropriate level of safety.
As will all circuits involving mains voltage, make sure you know what you are doing. 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. The method for power control is shown in the diagram below. 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 turnd 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, sice 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. // AC Control V1. 1 // // This arduino sketch is for use with the heater // control circuit board which includes a zero // crossing detect fucntion and an opto-isolated triac.
// // AC Phase control is accomplished using the internal // hardware timer1 in the arduino // // Timing Sequence // * timer is set up but d 🔗 External reference
This motor speed controller utilizes a single IC, the LM1014, to regulate the speed of a DC motor. It detects the increase in motor current as the rotation of the motor increases.
The motor speed controller is designed around the...
A straightforward tutorial on utilizing the ADC (Analog to Digital Converter) unit of the AVR microcontroller, demonstrated with the Atmega8, including a circuit diagram and code examples.
The ADC unit in the Atmega8 microcontroller is a crucial component that allows...
The circuit in Figure 1 is an RS-232/485 converter that uses the transmitted signal itself to control the flow. The circuit uses MAX232 and MAX483 interface circuits, IC1 and IC2 from Maxim Integrated Products to convert between the ICs'...
The circuit illustrated in Figure 3-64 operates with switch SA1 in the work position and switch SA2 in the standby position, allowing motor Mi to run while motor Mz remains on standby. In the event of downtime for motor...
This project allows the use of Sega Saturn peripherals (controllers, mouse) on a PC via a USB port. By utilizing the schematic and firmware available on this page, an adapter can be created using the connector from a Saturn...
A basic schematic of the circuit is presented, marking the initial experience with Eagle software. It is important to note that only the W1 output of the thermostat is utilized, while C serves as the common connection.
The schematic outlines...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more