Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

1 January 2010
Author: Giorgos Lazaridis
Voltage Controlled AC Light Dimmer

 IMPORTANTDANGER OF ELECTRIC SHOCK!Read this before taking any further action!!!Precautions to avoid electric shock

The circuit on the testing bench, assembled on a breadboard

A friend of mine asked me for this circuit. He plans to make an automations with PLC in his house, and he wants to have a couple of dimmers for his lights. The challenge was to control those dimmers with an analog PLC output. He asked me for a simple - microcontroller free circuit to do the job.

The control signal

The circuit is designed to work from an analog output of a PLC. Here you can see the Mitsunishi ALPHA with an I/O emulator connected to the circuit

The first thing that comes to someone's mind when thinks of a dimmer, is a potentiometer that controls the light intensity. If a potentiometer is used, things can be very easy. Tons of different circuits can be found around the net. Others are very precise, others are not so stable. But the control of this dimmer is a DC voltage level.

The specific PLC that he will use has 4 analog outputs. Each output can be programmed to deliver any voltage between 0 and 10 VDC, with 0.01 voltage step. He plans to have a mimic program with 4 slide bars or buttons displayed on a touch screen connected to this PLC, and control the lights from there.

The first thing that came to my mind was a comparator circuit. I would have the mains power through a transformer transformed to 9VAC, and then full rectify this signal. Then, using a comparator, i would compare this signal with the control signal from the PLC. Whenever the 9V signal was higher than the control signal, the output of the comparator would go high and it would drive the gate of the TRIAC (through an optocoupler of-course). Although this sounds a good idea, it is actually completely false approach. Look what will happen:

 The control voltage is minimum The control voltage is maximum

When the control signal is minimum, the comparator's output will send the trigger pulse to the TRIAC's gate at the very beginning of the waveform. This will send full power to the light. As the control voltage is increased, the trigger will delay more and more and the light will gradually dim. Until here everything looks normal. But when the control voltage is at maximum, the trigger pulse can only be located at the middle of the waveform, as is shown on the right image above! The triggering pulse will never delay more than half a semi-period. This means that the light will never dim less than half of the power. The triggering circuit needs to be completely different!

The 555 will generate a pulse, with a delay. This delay will start count from the time a zero-cross detection pulse is occurred, and the delay time is set from the DC voltage level applied on pin 5 of the 555.

I have a really good zero-cross detection circuit posted in the dimmer theory page. This circuit will generate a clean rectangular positive pulse whenever the waveform crosses the zero-point. The only thing i had to find out, was how to make a delay-ON circuit that would start counting from this pulse. Moreover, this delay circuit had to be controlled from a DC voltage level.

To tell you the truth, the on-delay circuit was not very hard for me to find one. Actually, my mind went directly to the 555 timer connected as monostable circuit. The trigger input of the 555 (pin 2) would be connected to an inverted output of the zero cross detection circuit. A properly selected RC net would create a fixed delay.

And right here comes another challenge. The delay of the 555 must be variable and controlled with a DCV signal. The 555 timer is not the most common and most used chip ever just by luck. If you look at the 555 theory page, there is the internal diagram of the chip. You will notice that the upper comparator has it's reverse-input pin coupled with a chip-pin, and this pin is the pin number 5. Actually, the pin's name is pretty much self-explanatory. It is named "Control Voltage". If you apply voltage to this pin, then the voltage level of the reverse-input of the upper comparator, and the level of the non-reverse-input of the lower comparator is affected. When the 555 is connected as monostable multivibrator, the upper comparator will monitor the capacitor's voltage. By changing it's reverse-input voltage level, this affects on the delay of the timer!

In other simple words, the input voltage is coupled (through a limiting resistor) directly to the pin 5 of the 555 timer. The higher the voltage, the more the delay from the 555.

The Circuit

The circuit is as follows:

The mains AC voltages is transformed to 9VAC through the transformer. the signal is rectified with a full-wave bridge rectifier. Immediately after the rectifier, the signal is driven to the zero-cross detection circuit. A large capacitor (C1) is used to smooth a part of the rectifier's output power. This will be used as the power supply of the rest of the circuit. The diode D1 is very important. Without this diode, the signal that is drivern to the zero-cross detection would be smoothed as well, and the zero-cross detection would be impossible.

The output of the zero-cross detection is directly sent to the trigger input of the 555 timer. The control voltage is driven to teh input 5 of the 555 timer. The rheostat R9 is used to control the maximum delay of the 555 timer, so that with maximum control voltage, it will NOT exceed the length of a semi-period, otherwise the light will be turned into a crazy-disco-light. A reader [PUNiSH3R] posted a comment (bellow) regarding this component. When i designed this circuit, i had it on a breadboard for test, and i had a bit potentiometer and an oscilloscope, so i could adjust the circuit easier. But as PUNiSH3R suggested, better use a multi-turn potentiometer with higher precision.

The output is then inverted with the transistor T3 and the signal is driven to the P gate of the optocoupler. the optocoupler is used to have complete galvanic isolation between the control circuit and the power circuit. The power circuit uses a BT136 TRIAC to control the load. This TRIAC is capable of driving a 4 amperes load at 600 volts. Feel free to use a more powerful TRIAC.

A Test-Run

As always, the circuit is tested in the PCB Heaven techlabs. We present you a series of images from the circuit in operation. Notice the intensity of the 600 Watt lamp, and the oscilloscope's screen. The green waveform is the output of the bridge rectifier. The blue pulses comes directly from the output of the zero-cross detection circuit. These pulses are driven to the trigger pin of the 555. Finally, the yellow line is the triggering pulse generated from the 555 timer:

For this demonstration, the control voltage was generated from a 5K potentiometer. Actually, any kind of DC voltage level generator can be used to control this circuit. It could come from an LDR voltage divider, from a potentiometer, from a PLC etc etc etc.

This video demonstrates the circuit in operation. The control DC voltage is generated with a 5K potentiometer. The whole operation looks like a normal dimmer:

The following video demonstrates this circuit, interfaced to the Mitsubishi ALPHA PLC. The up/down control is currently made with toggle switches:

Bill Of Materials
 Resistors R1 Resistor 10 KOhm 1/4 Watt 5% Carbon Film R2 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R3 Resistor 4.7 KOhm 1/4 Watt 5% Carbon Film R4 Resistor 100 KOhm 1/4 Watt 5% Carbon Film R5 Resistor 10 KOhm 1/4 Watt 5% Carbon Film R6 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R7 Resistor 4.7 KOhm 1/4 Watt 5% Carbon Film R8 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R9 100 KOhm Linear multiturn precision potentiometer R10 Resistor 1.5 KOhm 1/4 Watt 5% Carbon Film R11 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R12 Resistor 1 KOhm 1/4 Watt 5% Carbon Film R13 Resistor 1 KOhm 1/4 Watt 5% Carbon Film Capacitors C1 1000 uF 16V Electrolytic Capacitor C2 0.1 nF Ceramic Capacitor C3 1 uF 16V Electrolytic Capacitor Diodes D1 1N4001 General Purpose Diode Rectifier B1 2W10M Single Phase 2 Amps Silicon Bridge Rectifier Transistors - TRIACs T1-3 BC548 Switching and Applications NPN Epitaxial Transistor T4 BT136D Sensitive gate TRIAC ICs IC1 555 Timer OK1 MOC3021 Random Phase Optoisolator TRIAC Driver Output

Using this circuit for professional use

No, i would not recommend this, but it seems that a forum user named vertebro from Buenos Aires,Argentina, was willing to break all the rules! He managed to utilize this circuit to control a professional Automatic Textile Press with 3 channels of 3x1500 Watts load each. Here are two videos from this mod:

And here are some pictures (click on each one to enlarge):

You can find his original forum thread here: http://www.pcbheaven.com/forum/index.php?topic=1746.0

Very well done vertebro

Relative pages
• 555 timer basic circuits
• 555 theory of operation
• The TRIAC theory
• Learn how dimmers work
• The SCR (Silicon Control Rectifiers) theory
• How to make an Ambient Light Level Equalizer
• How to make a light / dark activated switch - 3 different circuits under the microscope
• Dr.Calculus: 555 Monostable calculator
• Opto-isolator IC Pinouts
• The voltage divider theory
• Dome light off-delay circuit
• A PIC DCV controlled AC Light dimmer
• Learning PICs @ PCB Heaven On-Line Book