Author | Eur van Andel, eur@fiwihex.nl © 2009 |
Adapted-by | |
Compiler | >=2.4g |
AC induction motors are low-priced, very reliable and widely available. This library provides a way to control the speed of these motors, if they have reasonably angular momentum. Explanation: this is *NOT* phase control: http://en.wikipedia.org/wiki/Phase_control Phase control makes a lot of noise, both audible and electrical. This is deliberate skipping of half-waves. There are only 100 half-waves per second @ 50 Hz and bit-fine control of motor speed would result in long duty cycles (2.55s) with varying motor speeds and audible pitch change. So we keep the period cycle at 32 half waves, with 8 duty cycles that only differ one half-wave to minimise audible noise. Electrical noise is minimized by zero-voltage switching.
Fairchild Application Note AN-3004, http://www.fairchildsemi.com/an/AN/AN-3004.pdf http://www.sullivan-county.com/ele/triacs2.htm for schematics and examples how to generate a zero-crossing signal.
No dependency found
var byte div8, mod8
var byte ps_on_1, ps_on_2, ps_on_3, ps_on_4, ps_on_5, ps_on_6, ps_on_7, ps_on_8
var byte ps_counter
var byte ps_on_period = 0
var byte ps_total_duty_cycle
var byte div8, mod8
No documentation found
var byte ps_on_1, ps_on_2, ps_on_3, ps_on_4, ps_on_5, ps_on_6, ps_on_7, ps_on_8
No documentation found
var byte ps_counter
1..32 ISR period counter
var byte ps_on_period = 0
No documentation found
var byte ps_total_duty_cycle
position in total duty cycle
RTC()
No documentation found
ps_check_period()
should be called every 320 ms @ 50 Hz!
ps_adjust_period()
No documentation found
16f877 | 16f877_period_skip.jal |