# period_skip

motor speed control by skipping periods of AC mains

Author | Eur van Andel, eur@fiwihex.nl © 2009
Adapted-by |
Compiler | >=2.4g

Description

    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.

Sources

    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.

Dependencies

No dependency found

## Summary

### Global variables/contants

- `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`

### Procedures

- `RTC()`
- `ps_check_period()`
- `ps_adjust_period()`

### Functions

## API details

### Global variables/contants

- `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

### Procedures

- `RTC()`

  No documentation found

- `ps_check_period()`

      should be called every 320 ms @ 50 Hz!

- `ps_adjust_period()`

  No documentation found

### Functions

## Related samples

Here are the list of samples which use this library:

16f877 | 16f877_period_skip.jal