Figure 1. To make the logical low triggering easier to understand,
forget about AC and think logically. Think of the REF terminal
as a DC voltage (five volts) instead of an AC voltage. Triggering
the TRIAC is accomplished by taking the DC voltage level at
the gate of the TRIAC below the DC voltage level
of the REF terminal.
I selected the gate-limiting resistor values that are a
click below 50Ω to insure that enough current (about 63
mA with the 47.5Ω resistors) could sink through the triac
gate and PIC I/O pins.
You may be asking why the triac doesn’t trigger when
the PIC I/O pin attached to the gate is logically high.
Take another look at Figure 1. Notice that everything is
referenced to the MT1 terminal. Schematic 2 shows us that
terminal is referenced to the positive pole (zener diode D1’s
cathode) of the transformerless capacitive power supply. So,
to trigger the BTA16 with a logically low gate potential
means that the gate voltage must go negative with respect
to terminal MT1. With MT1 referenced to the positive pole
of the five-volt power supply, we can take the PIC I/O pin
driving the gate below the voltage applied to the PIC’s VDD
pin (+ 5 VDC), but we can never take the PIC I/O pin that is
driving the triac gate above the positive voltage level that is
being supplied to the PIC’s VDD pin by the capcitive power
supply (which is the same voltage level referenced at the
MT1 terminal). Thus, the voltage at the gate can never be
more positive than the voltage referenced at the MT1
terminal, and the triac cannot trigger.
To correctly position our trigger pulse within the 16. 66
ms period of a 60 Hz AC cycle, we need to know when the
zero crossing point of the cycle occurs. Thanks to the PIC’s
internal I/O pin protection diodes, we can simply place a
limiting resistor between the 120 VAC mains neutral and a
PIC I/O pin. Our zero crossing event (ZVC) detection is
enabled by the PIC18F2620 RB0 pin’s ability to trigger an
interrupt. Each time the AC cycle crosses zero, the PIC is
interrupted. The ZVC firmware has the ability to determine
if the event occurred on a rising or falling half cycle and
uses this event as a timing reference for issuing a TRIAC
Earlier, I warned against casually connecting stuff to
the controller electronics. However, it would be nice to be
able to pass control information to the universal motor
controller’s PIC. The easiest way to accomplish this is to
simply optoisolate the PIC I/O pins we wish to interface to
the outside world. Just in case any of us will have the need
to have the controller respond, I’ve also included an
optoisolated transmit portal. I placed the optoisolated
interface on the PIC’s EUSART transmit and receive pins.
Using the EUSART pins allows us to send and receive serial
data, as well as using the controller’s PIC I/O pins as simple
binary ON/OFF inputs and outputs.
The Universal Motor
The firmware behind the universal motor controller is
just as easy to understand as the hardware. I’ve supplied
code in the download package that simply turns the motor
on or off, depending upon the logical state of the OPTORX
input (RC7). You can change the motor speed by altering
the triac triggering angle, which ranges from zero degrees
(motor off) to 179 degrees. I found that my universal motor
would not spin with a firing angle beyond 145 degrees.
So, the theoretical useful triggering range is one to 140
degrees. I will caution you to tie down your motor if you
plan to trigger the device below 90 degrees with the
Ametek I used. At 90 degrees with no vacuum load, mine
howled and roared. (My wife commented that the motor
sounded like a small plane taking off of the shop bench).
Also, be aware that switching within a triac is not instantaneous. Switching delays will limit the lowest triggering
angle you will be able to dial in. The real fun in all of this is
punching in those trigger angles and turning the universal
Figure 2. A DIAC triggers on each AC half cycle. Note that the
polarity of the TRIAC’s MT2 terminal always matches the
polarity of the TRIAC gate’s trigger pulse. Also note the total
lack of DIAC activity in Quadrants II and IV.
SERVO 11.2008 45