AN-1124 AC Lightbulb Dimmer with a GreenPAK and TRIAC

This App Note will demonstrate how to control a 3-phase AC system by controlling each AC phase through a Silego GreenPAK SLG46140V. We will do this by turning on and off three TRIACs at precise time intervals that are synchronized with a corresponding AC phase.

A TRIAC (triode for alternating current) is a semiconductor device for controlling AC current. It is a bidirectional device and is used for AC switching applications because it can control the current flow over both halves of an alternating cycle. For more information about TRIACs, refer to this tutorial.

To demonstrate our design, we included a video of the GreenPAK controlling three different-colored lightbulbs. Each TRIAC is turned on for a certain part of the AC sine wave, a technique called leading edge cutting.

This technique allows us to dim the lightbulbs by creating an AC PWM signal to reduce their duty cycle. For inductive AC loads like fans or AC motors, the AC signal cutting must be done with care, as heavy motors behave unpredictably at low voltages.

In order to synchronize the TRIACs turn-on time, we implemented a zero-point crossing detection circuit to let us know each time one of the phases passes from positive to negative voltage and vice versa.

3-Phase Power

Figure 1. 3-Phase Power

Zero-Crossing Detection

Each AC phase passes through two 33kΩ resistors and is rectified by the Bridge Rectifier (KBJ608G). This rectification results in a pulsating DC voltage that is fed to a phototransistor output optocoupler (4N25). The optocoupler is necessary to separate the high-voltage AC signal from the GreenPAK, which operates between 1.7v-5.5v. The optocoupler is kept on, keeping the zero-crossing signal (at the collector of phototransistor) LOW until the voltage drops to 0v, at which point the optocoupler will not conduct anymore. Then the zero-crossing signal is pulled HIGH until the pulsating DC voltage rises enough to send the optocoupler into conduction again, resulting in the zero-crossing pin going LOW.

The quality of that zero-crossing pulse is dependent on a number of factors, but mainly on the speed of the optocoupler and the value of the collector resistor. If that collector resistor is too low, the optocoupler will burn out, but if it is too high, the voltage at which there still is enough current going through the optocoupler to keep it conducting becomes higher and higher. That means that if the resistor value is too high, the switching of the optocoupler will happen higher on the rising and descending flank of the sine wave, resulting in a wide zero-crossing signal.

AC Rectification and Zero-Crossing Illustration

Figure 2. AC Rectification and Zero-Crossing Illustration

TRIAC Driver Circuit

After a zero-crossing pulse for each AC phase is received by the GreenPAK, the chip will be ready to turn ON the respective TRIAC driver optocoupler (MOC3021 as shown in Figure 3).

Overall Circuit Diagram

Figure 3. Overall Circuit Diagram

Another important factor to determine when each MOC3021 operates is the frequency of the AC sine wave. For example, for a 50Hz frequency, each sine wave cycle takes 1s/50Hz = 0.02s.

Since the sine wave has two zero-crossing points per wavelength, the period after each zero-crossing point is 10ms long. So the MOC3021 shall turn on/off the TRIAC (BT136) within 10ms.

GreenPAK Circuit Diagram

Figure 4. GreenPAK Circuit Diagram

The signal from the MOC3021 optocoupler to the gate of the BT136 TRIAC will turn ON the TRIAC.

At this point the TRIAC shall remain in the conduction state (irrespective of the input signal at its gate) until the current through the TRIAC drops below the TRIAC’s holding current, which will be close to the next zero-crossing point of the AC phase’s cycle. Therefore, rather than holding the TRIAC’s gate HIGH, we want to send it a short pulse to start conduction so that it can be re-triggered once the next zero-crossing point is reached.

Chopped AC sine wave due to Zero-Crossing Delay

Figure 5. Chopped AC sine wave due to Zero-Crossing Delay

In order to implement signal cutting we included an external resistor/potentiometer voltage divider. As the user adjusts the voltage across potentiometer P1 from 0v-1v, the delay between the zero-crossing detection and the triggering of the TRIAC is changed.

If the TRIAC is turned ON in the beginning of the AC phase’s half-cycle due to a low voltage across P1, the phase will deliver full power during the following half-cycle. As the voltage across P1 increases, the delay between the zero-crossing point and the triggering of the TRIAC is increased, so it will deliver less power as the voltage across P1 approaches 1v.

GreenPAK Design

The zero-crossing signals enter the GreenPAK through Pins 3, 4, and 5. Since the signals are active HIGH, they will respectively clock DFF2, DFF4, and DFF5, which will pass POR (Power On Reset) through the DFFs. The OR gate 3-bit LUT3 is used to consolidate the three DFF outputs and pass the HIGH signal to CNT2/DLY2, which is set up as a rising edge delay.

CNT2/DLY2’s delay amount is controlled by the ADC, which converts the analog voltage from the external potentiometer into an 8-bit value. The Programmable Gain Amplifier (PGA) is used, but no gain is added to the analog voltage. Once the signal propagates through CNT2/DLY2, it is passed to AND gates 2-bit LUT0, 2-bit LUT1, and 2-bit LUT5. These AND gates are used to determine which of the three phases caused the delay to be generated.

Once the correct phase is known, an RS latch and a 200µs Rising Edge Delay are used to generate a one-shot pulse, which is sent to either Pin12, Pin11, or Pin10. This 200µs one-shot pulse is used to trigger the gate of the desired TRIAC, allowing it to begin conduction. Meanwhile, the inverters 2-bit LUT3, 2-bit LUT4, and 2-bit LUT5 are used to reset the respective DFF so that it is ready to latch at the next zero-crossing pulse.

GreenPAK Design

Figure 6. GreenPAK Design

Conclusion

3-phase AC power is often used to power heavy electrical loads like induction motors. However, in this app note we demonstrated how to use leading edge cutting with a GreenPAK SLG46140V to change the power delivered to light 3-phase loads in the form of colored lightbulbs. We used optocouplers to separate the high-voltage AC signals from our low-voltage DC components.

About the Author

Name: Bilal Ahmed

Background: Bilal Ahmed received an MS in Electronics Engineering from NED University, Karachi. He has more than 10 years of experience in PLC, SCADA, Data acquisition, Industrial automation, Robotics, and Embedded systems. Currently he works as Head of Embedded systems and Robotics in HF Electronics.

Contact: appnotes@silego.com

 

Files



See full list of Application Notes