Controll a DC motor speed using PWM pins

You can use any NPN transistor.