2 Introduction

Pulse Width Modulation (PWM) is an encoding technique, where a logic signal on (typically) a single wire is cycled to provide a sequence of pulses. A single PWM cycle consists of an active time span (Pulse ON time) followed by an inactive time span (OFF time), the sum of which comprises the full cycle period. The active (pulse) time span of the cycle may be indicated by a low (0) signal, known as Inverted PWM, or by a high (1) level, known as non-Inverted PWM. The information is encoded using the time width of the pulse as a proper fraction of the cycle period, normally referred to in the form of a percentage and termed the duty cycle. The PWM cycle is presumed to repeat constantly a pulse train (constant period) with the duty cycle varying only as the underlying information varies.

The cycle period is typically fixed for a given application device, though this is not strictly a requirement, since the encoding, being a ratio of pulse width to cycle period, does not depend on the raw timing itself. Indeed, the cyclic nature of the signal, along with the notion of the duty cycle, makes the PWM encoding self-clocking. This means that the PWM period need not be known entity, it need not (with certain restrictions) be constant, and can be made largely immune from clock skew and variations due to temperature and voltage.
Figure 2-1. Demodulation of PWM Signal from Analog Sensor