Control speed of DC Motor with potentiometer

You seem to have a freewheel diode in the wrong place - needs to be across the motor.