PWM (Pulse Width Modulation) #
Think of PWM as a way to send a number between 0% and 100% over a single wire.
Many of the acronyms in FRC and engineering in general hide a name that is actually very self-descriptive. PWM - Pulse Width Modulation works by turning a signal on an off again many times per second.
The amount of time between the signal being turned on, turned off, and turned on again is called the ‘period’. A value is transmitted via PWM by changing the amount of time that the signal is turned on per ‘period’, called the ‘duty’ time.
The amount of time that the signal is left on per period is called the ‘duty cycle’.
In case this still isn’t clear - we’ll see one example: Let’s say you repeatedly turned a light on for 3 seconds, then off for 2 seconds.
Here’ the period of the signal you’re making with the light would be \(3 + 2 = 5\) seconds, and the duty cycle of the signal would be \( \frac{3}{5} = 60\% \)
PWM is basically what a Digital device can take as a input. PWM modules are are converted to machines’ sensory detail.