Everyone is trying to make the whole situation more complex than it is.
PWM is simply a way of controlling the speed of a motor or the brightness of a LED or globe by delivering energy to it as a percentage of the maximum.
This percentage is delivered as a short pulse in which the delivering element (the driver transistor is fully turned on) and then it is fully turned off for the remainder of the cycle.
In this way the transistor is in one of two states in which it is dissipating the least energy and this makes the concept very efficient.
In addition, it allows the motor to create considerable torque, even though the motor will be revolving at a very low RPM.
When it comes to driving a LED, it will be illuminated at a high brightness for the short period of time and our eyes will detect this high brightness, even though it is consuming considerably less energy than if it were illuminated by a steady voltage (current). This means a LED must be driven at a very low on-percentage to actually see a reduction in brightness. The following circuit can be used for a motor or LED and the FET can be replaced with any type of transistor as shown in the second and third circuit. You can create a variable mark-space circuit with one gate of a 74c14 and a few components.
**broken link removed**
**broken link removed**
**broken link removed**