The PWM technique is used to generate an intermediate voltage between two fixed voltage limits.
It is achieved by varying the duty cycle of the digital signal.
Duty cycle is the fraction of ime period for which pulse is high.
75%, 50%, and 20% duty cycle PWM signals with average output voltage
The frequency (number of cycles/second) of a signal represents how many times the signal runs in a given time period. In other words, it represents how fast the PWM switches between the higher and lower states. The frequency of the signal should not be too high or too low for the load to respond. This technique avoids the wearing out of components that normally occurs when the rheostat (a mechanical switching) is used to control the voltage.