Universal motor pid controll

To understand the nature of your problem it would be helpful to know how it is suppose to work. I don't know what you have tried before.
Secondly, I don't have a schematic of your circuit.

I am assuming that you are starting from scratch.
Have you started your design with a potentiometer connected to Arduino for a manual control of the motor speed? This method would eliminate the basic circuit problems. If you can get a low speed control this way then you have confirmed both hardware and the simple Arduino test software.

Slow speed control will need a closed loop circuit for good speed control.