Cappels' project pages
Lamp Dimmer and Motor Speed Control Using A Simulated Diac
Return to HOME
The diac is a common
component used to trigger triacs. The construction of a diac is similar
to that with a transistor, but with both junctions doped to similar
levels so that the two junctions' revers break down characteristics are
similar. This is a fun project to
demonstrate the use of a pair of bipolar transistors operating in
resistance region to simulate a diac triggering a triac in an
dimmer. The circuit is not optimized for performance -it is only
intended to demonstrate the principle.
Find updates at www.projects.cappels.org
When working on high voltages,
project uses lethal voltages. If
you are not experienced in working with lethal voltages, read this
project, but don't build it. You only have one life, and AC power can
take it from you very quickly. Or leave you with terrible injuries.
• Keep one hand in
you back pocket. Don't provide a path through your heart.
• Use and insulated mat or proper insulated footwear (bare feet on a
tile or concrete floor doesn't make it.)
• Make sure your equipment is in good repair and is properly grounded.
• Never assume a
conductor is safe to touch.
• Don't work when alone.
• When working with AC line voltages, use a ground fault interrupter.
• Never work on high voltages while under the influence of alcohol or
Do not build this project if you are not experienced in working with
The waveforms above should look
like the last 90 degrees of the
positive and negative half cycles of the AC line, but this is what the
hot AC line actually looks like in my neighborhood. No wonder some
jurisdictions require appliances to meet power factor
the way, be careful to consider your scope probe's voltage rating when
probing the AC mains, even through an isolation transformer, since the
peak voltage may be higher than the probe or scope's rated voltage. I
used a X100 probe rated at 1kV.
I'm not going to spend much space on this because this is not a
beginners' project and the operation of this kind of lamp dimmer is
covered elsewhere on the web.
The photograph above shows the voltage across an
incandescent light bulb that is being driven by the triac dimmer
circuit. Notice that the lamp is only being driven 1/2 the time of each
half of the power line cycle. That means that the lamp only gets half
the average power. The fraction of each power line half cycle applied
to the lamp is determined by the time within the half cycle that the
triac, which switches the voltage across the lamp, turns on. When the
voltage goes to zero, the triac turns off and waits for the next
trigger pulse. That's how this kind of dimmer works. But varying the
phase within each half cycle at which the triac turns on.
the classic lamp dimmer circuit, a diac would be
used in place of the two parallel
Everything that happens within this circuit happens within one half of
a power line cycle. Generally every half cycle looks about the same, at
least they will if everything is working correctly.
Within each half cycle, the power line voltage charges the .068 uf
capacitor through the 250K pot. The voltage across the .068 uf
capacitor further charges the .047 uf capacitor through the 68k
resistor, until the voltage across the .047 uf capacitor reaches about
10 volts. When the voltage across the .047 uf capacitor reaches about
10 volts, one of the two 2N2222 transistors abruptly switches from a
non conducting state to a very low resistance. Being a low resistance,
it places the .047 uf capacitor across the trigger terminal and main
terminal 1 of the triac, turning the triac on for the rest of the half
power line cycle. The lower the resistance of the 250k pot (used as a
rheostat), the earlier in the cycle the voltage across the .047 uf
capacitor reaches the triggering voltage. Varying the resistance of the
250k pot varies the phase of the trigger pulse with respect to the
phase of the power line, thus achieving a variation in the average on
time of the triac, which results in a varying duty cycle across the
Often, the function of the trigger, that provided by the 2N2222
transistors, is provided by a diac, a specially designed semiconductor
with a structure similar to that of a transistor,
that abruptly changes from not conducting to conducting when the
voltage across it exceeds some specific value. I wanted to do this with
transistors to show that, in a pinch at least, transistors can be used
for this function.
Two transistors were used in place of the one diac so that one
transistor would break down on one half cycle and the other transistor
would break down on the other half cycle. The break-downs occurs in the
reverse biased emitter-base junction, which is a much lower voltage
than the reverse biased collector to base junction.
In this circuit, the 2N2222's provided pulses of about 1 microsecond
with amplitudes of 100 to 200 milliamps to the gate of the triac.
Since the behavior of transistors in their negative resistance region
is not specified by transistor manufacturers, at least as far as I
know, it is not wise to design a product around this concept.
This circuit does not have a large dynamic range. Most likely this
range can be extended by increasing the value of the .068 capacitor.
This circuit can also stand some refinements, such as the addition of a
resistor between the gate and main terminal 1 to reduce the chances of
spurious turnoff, and possibly some transient protection.
The circuit was assembled on a piece of pre-punched vector board -yes,
real Vector board made by Vector corporation back in the 1980's. You
can use other kinds of board as long as they can stand off the high
The circuit side of the dimmer
circuit - not many connections.
The plastic knob is a very good
idea from a safety standpoint. I would not risk
my life on the bet that a cheap pot made for use as a tone control has
enough insulation at 340 peak volts to prevent me from getting a shock.
This is the component side of the dimmer circuitversion . The
potentiometer is a dual
only because that was the only
250K Ohm pot that I had on hand. The 68k 1 watt resistors was
made up of a series-parallel arrangement of four 68k 1/4 watt
The .o47 uf capacitor is a polyester
film capacitor, but that's only because I have a lot of them. Its not
really critical. The .068 uf capacitor is critical. Since it has
hundreds of volts across it with some settings of the 250k pot, it is
rated at 275 volts AC. It is also an "X" capacitor - one this was
designed for use as a filter capacitors across the power line. These
capacitors are designed to survive high voltages and even transients
that cause temporary shorts, without catching fire. I suggest only
using capacitors marked for use as "X" capacitors or "Y" capacitors
-even better because they are designed to go from line to ground - in
this sort of application.
Speed Contrl Circuit
As with some of my other projects, this
one started out as an experiment to prove something to myself or just
for fun. As it turnede out, bought a new weed trimmer - the kind that
spins a length of plastic fishing line at high speed, and this cuts
right through most weeds and grasses. The motor turns at such a high
rate of speed, it makes a whole lot of noise. I had leared many years
ago, to rapidly pulse the motor on and off so it spun at a lower rate
of speed. This had a lot of advatages. For one, it was not so noisey,
and it was much less likely to disturb my neighbors. Another advantage
was that the plastic fishing line didn't break nearly as often, making
the job go a whole lot faster. When cutting heavy growth, I needed to
hold the switch closed so the motor could run at its maximum power and
The motor speed control version
includes a resistor and capacitor
that are absent in the lamp
Sometime after finishing the lamp dinner experiment, I realized that if
I could also use this as a motor speed control, I might be able to run
the motor on my weed trimmer a little slower and get the benefits of
less noise and longer finsihg line life at the same time, just as when
I pulsed the power switched on and off. After this idea floating into
and out of my conciousness over a period of months, I finally got
around to trying it. It worked fine.
The only difference between the lamp dimmer circuit and the motor speed
control version is thte .01 uf capacitor and the 1.2k resistor I added
as a snubber circuit. The snubber limits how quickly the voltage
changes across the triac's main termainals when the triac switches off.
If the voltage were to rise too quickly, it could result in destruction
of the triac.
One hitcht that I started with a single 820 Ohm 1/2 watt resistor in
the snubber circuit. After a short test run, I opened the plastic
enclsoure and smelled what we called "ode to Allen Bradley," the smell
of burned resistor. The snubber resistor had become noticeably more
brown. I changed it to the six resitor comibation shown in the
schematic, and the resistor seems to be fine. The value of the damping
components depend on the needs of the triac and the motor
charactaristics. In this case, I just picked some good sounding numbers
and gave it a try. After all, I have several spare triacs.
The remaining hitch was that after a short test run, the triac had
become quite warm. I know that semiconductors can run with pretty high
junction tempeartures, but I always liked it when it wasn't painful to
touch a running semiconductor. In truth, I don't know how hot it got
because I unplugged the circuit before opening the case and feeliing
I used some scap alminum to make a quick heatsink. After edging 20
meters of lawn, the triac seemd to be just fine.
If you decide to try to use this as a motor speed control, be prepared
to make adjustments to the snubber circuit, and maybe add a heatsink to
the triac itself. By the way, the triac that I used is one of those
with a completely insulated tab, making an insulated washer
unnecessary. I like those.
The Test Setup
I really dislike projects that involve
AC line voltage. They are dangerous, difficult to troubleshoot, and
sometimes painful. Here is the setup
I used on this project (image above). The ground fault interrupter is
there in case of accidental contact with the power line or in case of a
failure of the insulation in the isolation transformer.
The isolation transformer allows
me to ground one side of the circuit safely and observe the circuit
with an oscilloscope. For the motor speed control, the circuit was
first tested with an incandescant lamp and this isolation
circuit. After the circuit worked, I plugged in the weed trimmer
without the isolation transformer,and I did not probe the circuit
without the isolation transformer.
In my test setup, I am first and
foremost, careful to not get shocked. Decades of being shocked, ever
since I was a young child, have conditioned me to
dislike the sensation immensely. I use an
ground fault interrupter (Also called a "GFIC"), to shut off the
current within a few tens of milliseconds, just in case I come in
contact with the mains voltage. Since the house I live in does not have
Ground Fault Interrupter on all outlets, I bought a Ground Fault
Interrupter circuit breaker at the hardware store and but it in a
plastic box, along with male and female AC power connectors. Ground
Fault Interrupters are sold in this configuration in some places. I
could not find one already assembled in Thailand, so I had to build my
The Ground Fault Interrupter is also a circuit breaker, so it offers
some protection against gross overloads.
By the way, I have a second ground fault interrupter like the own shown
above. I use it outdoors with the electric lawnmower, the weed trimmer,
and my electric drill.
I made my own isolation transformer by
connecting two rectifier transformers back-to-back, as shown in the
schematic above. These were 24 volt center tapped transformers that I
picked up a Amorn, a surplus dealer that has outlets around
Thailand. Since I don't have a lot of faith in the integrity of the
insulation of surplus store transformers bought in Thailand, the
addition of the ground fault interrupter gives me some peace of mind.
The transformers are pretty small, only about 1 VA, and this is a good
thing, because it limits power to the circuit under test.
Contents ©2007 Richard Cappels All Rights Reserved. Find updates
First posted in September, 2007. Revised
You can send email to me at
"(at)" with "@" before mailing.
presented on this page is for personal, nonprofit educational and
use only. This material (including object files) is copyrighted by
Cappels and may not be republished or used directly for commercial
For commercial license, click
and intellectual property notice
(Summary: No warranties, use these pages at your
own risk. You may use the information provided here for personal and
educational purposes but you may not republish or use this information
for any commercial purpose without explicit permission.) I neither
express nor imply any warranty for the quality, fitness for any
particular purpose or user, or freedom from patents or other
restrictions on the rights of use of any
software, firmware, hardware, design, service,information, or advice
mentioned,or made reference to in these pages. By utilizing or relying
on software, firmware, hardware, design, service,information, or advice
provided, mentioned, or made reference to in these pages, the user
takes responsibility to assume all risk and associated with said
activity and hold Richard Cappels harmless in the event of any loss or
expense associated with said activity. The contents of this web site,
unless otherwise noted, is copyrighted by Richard
Cappels. Use of information presented on this site for personal,
educational and noncommercial use is encouraged, but unless explicitly
with respect to particular material, the material itself may not be
or used directly for commercial purposes. For the purposes of this
copying binary data resulting from program files, including assembly
code and object (hex) files into semiconductor memories for personal,
educational or other noncommercial use is not considered republishing.
desiring to use any material published in this pages for commercial
should contact the respective copyright holder(s).