This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:embeddedcommunicationprotocols2:pwm [2023/09/06 08:44] – ekontoturbo | en:iot-open:embeddedcommunicationprotocols2:pwm [2023/11/23 16:10] (current) – pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== PWM ===== | + | ====== PWM ====== |
+ | {{: | ||
The PWM signal controls the energy delivered to the device, usually a DC motor, LED light, bulb, etc. | The PWM signal controls the energy delivered to the device, usually a DC motor, LED light, bulb, etc. | ||
To control voltage, instead of using inefficient resistance-based voltage dividers (where the remaining part of the voltage is distracted as heat), PWM is based on approximating the energy delivered to the device with periodical switching on and off (HIGH and LOW). Only two voltages are delivered to the device: low (0V) and HIGH (Vcc, e.g. +5V). One can easily observe how PWM works, e.g. when dimming the LED, if recorded with a high fps camera: the LED light flashes with the PWM signal frequency.\\ | To control voltage, instead of using inefficient resistance-based voltage dividers (where the remaining part of the voltage is distracted as heat), PWM is based on approximating the energy delivered to the device with periodical switching on and off (HIGH and LOW). Only two voltages are delivered to the device: low (0V) and HIGH (Vcc, e.g. +5V). One can easily observe how PWM works, e.g. when dimming the LED, if recorded with a high fps camera: the LED light flashes with the PWM signal frequency.\\ | ||
Line 13: | Line 14: | ||
* duty cycle. | * duty cycle. | ||
- | ==== Generating PWM ==== | + | === Generating PWM === |
In microcontrollers, | In microcontrollers, | ||
Line 23: | Line 24: | ||
* 150/ | * 150/ | ||
* 200/ | * 200/ | ||
- | * 250/ | + | * 250/ |
<figure pwm1> | <figure pwm1> |