The principle of PWM is to reduce the average power delivered from a digital output (0 or 1) by modulating the signal pulses. The objective is to have a pseudo analog output that can take 256 values (0 to 255). PWM is used, for example, to control the brightness of an LED, change the color of an RGB LED or even control the speed of a motor.
The signal is modulated with a fixed frequency (490 Hz on digital pin 9 of the Arduino Uno for example). PWM is characterized by its duty cycle, which corresponds to the percentage of time during which the signal is at 1 compared to the time during which the signal is at 0.
Table of Contents
Meaning of PWM (Pulse Width Modulation)
A PWM (Pulse Width Modulation) signal is a signal whose duty cycle varies. This type of signal is often used in applications with variable average value (Ex: Motor control, adjustable power supply, etc.).
Uses of PWM
PWM is used in many different area from computers to cooling systems and motors.
- Motor speed variators
- Converters: AC/DC, DC/AC, DC/DC, AC/AC
- Signal generator
- Modulators
- Digital-to-analog conversion
- Class D amplifiers
- Power control
- Etc.
Function of PWM
The PWM signal (PWM, Pulse Width Modulation) is a signal of constant frequency and variable duty cycle. It is implemented in functions such as: Speech synthesis or associated with a low pass filter allows the synthesis of audio signals. The speed control of a direct current motor, or the latter naturally acts as a low pass filter. Position control of a servomotor Generation of random or periodic signals, for an inverter for example. PWM curve whose average value is a sinusoidal curve. The average value is simply recovered by a low pass filter.