Photo 3. I hung my
IDEAL 400 AC clamp
meter around the
universal motor’s
AC line lead (black
lead) with a 90
degree TRIAC
triggering angle
dialed in. The
universal motor’s
no-load AC
amperage draw
varied from 6.92
to 7.00 amperes.
that converts the triac trigger angle to a trigger delay time:
//**********************************************
//* CONVERT TRIGGER ANGLE TO TIME
//**********************************************
unsigned int angle_to_time(char trigger_angle)
{
unsigned int angle2time_val;
if(trigger_angle == 0)
{
angle2time_val = 0;
}
else
{
motor loose. Photo 3 is a real time shot of my motor’s
no-load AC current draw with a triggering angle of
90 degrees.
If you’re having problems getting your arms around
the triac triggering angle concept, visualize them as
beginning with the rising half cycle of an AC signal. Half
way through the first positive half cycle is 90 degrees,
which is also the peak positive-going voltage of the AC
cycle. As you move past 90 degrees, you will move towards
the next zero crossing point at 180 degrees. The firmware
will reset the triggering angle to relative zero at each zero
crossing event and trigger the device at the same relative
time in the negative cycle as it did in the positive cycle of
the AC signal.
For instance, let’s assume we trigger the triac at 90
degrees into the positive half cycle. It will conduct until the
AC signal crosses zero at 180 degrees into the cycle. The
next trigger pulse will be issued 90 degrees after zero
crossing, which is actually 270 degrees into the AC cycle.
At the next zero crossing, the firmware will reset the trigger
timing reference to zero and the triac will again
commutate. The result is that we have energized the
universal motor for 50% of the full AC cycle with a 90
degree trigger angle. Since the motor will run very slowly at
a 140 degree trigger angle and run faster as the trigger
angle is decreased, we can conclude that the angle is
inversely proportional to the motor speed. Here’s the code
angle2time_val =
0xFFFF - (trigger_angle 0x2E);
//each degree 46us at 60 Hz
}
return angle2time_val;
}
Understanding how the triac trigger timing is determined is the key to understanding the rest of the universal
motor controller firmware. Each degree of trigger angle
delay time is equivalent to approximately 46 µs assuming a
60 Hz AC signal. If you’re reading this in a 50 Hz mains
country, each degree of delay time is approximately 56 µs.
Thus, the controller hardware and firmware will work with
50 Hz AC systems. All you have to change is the time delay
associated with each degree of triggering angle.
A PIC18F2620 timer uses the angle2time_val to kick off
a 400 µs TRIAC trigger pulse at the same relative time in
every AC half cycle. At every zero crossing event, the current trigger angle is converted to a value that is fed into the
PIC18F2620’s triggering delay timer. To prevent the motor
from lurching at every speed change, the firmware includes
a routine that ramps up or down to the new trigger angle.
The firmware also contains a soft-start routine that smoothly
ramps the motor up to speed upon initial power-up.
Hands On ... Carefully, Please ...
Photo 4. It ain’t as pretty, but it works just as well as
the production universal motor controller you see in
Photo 2. The smaller 470 nF X2 filter capacitor is directly
above the varistor and fuse. The much larger 1.0 µF X2
transformerless capacitive power supply blocking
capacitor is just left of the PIC18F2620.
SOURCES
The best way to get your hands around driving the
universal motor is to do it yourself. Photo 4 is a shot of the
breadboard version of the controller I assembled before
committing to a printed circuit board (PCB). However, you
don’t have to build this from scratch as the controller download package contains an ExpressPCB file that you can use
as-is to fabricate your own PCB. The firmware
included in the download package was created
using the HI-TECH PICC- 18 C compiler and is
ready to run out of the box. I’ve included a set of
interrupt-driven RS-232 routines in the code for
those of you that want to experiment with
controlling the controller serially. All that’s left for
you to do is to collect the necessary electronic
components, solder them down, and fire up your
universal motor. All it takes is an email to solicit
my help with this project. I had bunches of fun
with this and I’m sure you will too. SV
Microchip — www.microchip.com
PIC18F2620
www.ametek.com
Ametek Lamb Electric 116207-00
Universal Motor
www.htsoft.com
HI-TECH PICC- 18 C Compiler
STMicroelectronics — www.st.com
BTA16-600CW
Fred Eady can be reached via email at fred@edtp.com.
46 SERVO 11.2008