What is PWM? Let's take a look at the basics of PWM
Try the circuit: https://goo.gl/ij6WmP