Pwm on a DC motor

Add the diode parallel to the motor, cathode to 12V