How PWM works | Controlling a DC motor with a homemade circuit