AC Light Dimmer Using Arduino and TRIAC
AC Light Dimmer Using Arduino and TRIAC
ARDUINO
In our household, most of the appliances are powered from the AC supply such as Lights, TVs, and
Fans, etc. We can turn ON/OFF them digitally if needed, using Arduino and Relays by building a
Home automation setup. But what if we need to control the power of those devices for example to
dim the AC Lamp or to Control the speed of the Fan. In that case, we have to use phase control
technique and static switches like TRIAC to control the phase of AC supply voltage.
So in this PROJECT, we will learn about an AC lamp dimmer using Arduino and TRIAC. Here a
TRIAC is used to switch the AC lamp, as this is a Power electronic fast switching device which is the
best suited for these applications. Let’s follow the complete article for the hardware details and
programming of this project. Also, check our previous tutorials on Light Dimming:
Arduino UNO-1
MCT2E optocoupler -1
MOC3021 optocoupler -1
BT136 TRIAC-1
(12-0)V, 500mA Step down transformer-1
1K,10K, 330ohm Resistors
10K Potentiometer
AC Holder with Lamp
AC wires
Jumpers
Diode
Reistor
Transformer
Capacitor
7805
Before going further we will learn about Zero crossing, TRIAC, and optocoupler.
To control the AC voltage, the first thing we have to do is, to detect the zero crossing of the AC
signal. In India, the frequency of AC signal is 50 HZ and as it is alternating in nature. Hence, every
time the signal comes to Zero point, we have to detect that point and after that trigger the TRIAC as
per the power requirement. The Zero crossing point of an AC signal is shown below:
TRIAC Working
TRIAC is a three-terminal AC switch which can be triggered by a low energy signal at its gate
terminal. In SCRs, it conducts in only one direction, but in the case of TRIAC the power can be
controlled at both directions. Here we are using a BT136 TRIAC for AC Lamp dimming purpose.
As shown in the figure above, the TRIAC is triggered at a firing angle of 90 degrees by applying a
small gate pulse signal to it. The time “t1” is the delay time which we have to give as per our
dimming requirement. For example, in this case as the firing angle is 90 percent, hence the power
output will also be halved and hence the lamp will also glow with half intensity.
We know that the frequency of AC signal is 50 Hz here. So the time period will be 1/f, which will be
20ms., so for a half cycle, this will be 10ms or 10,000 microseconds. Hence for controlling the power
of our AC lamp, the range of “t1” can be varied from 0-10000 microseconds. Learn more about Triac
and its working here.
Optocoupler
Optocoupler is also known as Optoisolator. It is used to maintain isolation between two electrical
circuits like DC and AC signals. Basically, it consists of an LED that emits infrared light and the
photosensor which detects it. Here we are used a MOC3021 optocoupler to control the AC lamp
from microcontroller signals which is a DC signal.