Governance by those who do the work.

Saturday, May 7, 2016

How to Phase-Lock a Fan

Using an auto-transformer to reduce the voltage to the wind-tunnel fan
in order to reduce its speed didn't work below 45 r/min (it ran for a
while and stopped).  So I modified The Convection Machine to toggle
the fan power with a solid-state relay controlled by micro-processor.

Consider the shaft of the wind-tunnel fan.  Every full rotation of the
fan results in 3 micro-processor interrupts.  A phase-accumulator
register is incremented by the desired rotation rate (in r/min) 1200
times a second and decreased by 24000 every time a fan blade crosses a
light beam.  If the fan rotates at the desired rotation rate, then the
average phase-accumulator value is constant.  If the fan is too slow,
then the phase-accumulator value increases with time; if it is too
fast, then the phase-accumulator value decreases with time.

Phase-locking is the process of controlling the fan-speed so that the
average phase-accumulator value is 0.  Such feedback systems are
tricky to stabilize.  My fan controller operates in one mode when the
desired speed is less than 400 r/min and a different one otherwise.

At high speeds, the fan speed is roughly proportional to the average
voltage applied, which is proportional to the duty cycle of applied
voltage.  The phase accumulator operates as described above.  Its
instantaneous value is compared with a variable which decrements from
the upper phase range bound to 0 ten times a second.  If greater, the
fan is turned on, otherwise it is turned off.  Some of the
instabilities of the fan speed may be due to a centripetal switch
disconnecting the starter capacitor and hooking in the running
capacitor, which increases the loop gain of the system.  The change in
gain causes the system to overshoot and undershoot the desired r/min
with long settling times.

At low speeds each pulse of power incrementally increases the fan
speed while friction continually slows it.  The solid-state relay has
"zero-crossing" control, so only complete half-cycles of 60 Hz power
are applied to the fan motor.  The combination of the motor windings
and phase capacitor stores energy, so the acceleration of the rotor is
delayed from the application of power.  At low speeds the rotational
inertia of the rotor introduces 90 degrees of phase shift.  The
microprocessor clock is not synchronized to the line voltage, so the
minimum pulse width varies with the relative phase, another source of
loop gain variation.



This photo shows the new fan-speed control.  The number on the
7-segment displays is the rotation rate in r/min measured every
second.  The right 3 dial switches set the desired rotation rate.



This video which shows the phased-locked fan in
operation at a variety of speeds.  The low light level was necessary
so that the stroboscopic interaction of camera shutter with the
scanned 7-segment display didn't render the numbers unreadable.  If
you turn up the audio volume you can hear the fan chugging as its
power is switched on and off.