-
Notifications
You must be signed in to change notification settings - Fork 1
output hardware
When using pulse width modulation to control the power of an output, restrictions of the output system must be considered. While the ESP32 is capable of producing PWM signals in the range of several
Two parameters are typically used to characterize a such output components:
- The time
$t_\mathrm{ON}$ between activation of a control signal and full activation of the corresponding output. - The time
$t_\mathrm{OFF}$ between deactivation of a contral signal and full deactivation of the corresponding output.
For most optocouplers and solid state relays those are in the range of
However, when the output power is to be controled by PWM, the range of usable frequencies is even more restricted. Using an
Whenever the output is unable to follow this higher frequency, a reduced number of effective output states
On the other hand, whenever the the control value is higher than
In both cases the actual power output might be nonlinear and the control value does not accurately represent it. The following table shows the approximate control value ranges for an optocoupler with
| 0.5 | 255 | 0 | 255 |
| 10 | 250 | 3 | 252 |
| 20 | 245 | 5 | 250 |
| 30 | 240 | 8 | 247 |
| 40 | 235 | 10 | 245 |
| 50 | 230 | 13 | 242 |
| 100 | 204 | 26 | 230 |
| 150 | 179 | 38 | 217 |
| 200 | 153 | 51 | 204 |
| 250 | 128 | 64 | 191 |
| 300 | 102 | 77 | 179 |
| 350 | 77 | 89 | 166 |
| 400 | 51 | 102 | 153 |
| 450 | 26 | 115 | 140 |
| 500 | 0 | 128 | 128 |