DC Motor Position control with Arduino (PID)/Encoder

Hello.

I am not entirely sure what motor you are talking about. You linked to a gearmotor that does not have an encoder, but also mention that you are using a motor “without using encoder which is already attached”.

I am also not sure whether your goal is position or speed control. However, you would be able to get more accurate control of either if you use encoder feedback. There are many useful articles about PID control on the Internet. (You can start with this Wikipedia article). You might consider reviewing our Wheel Encoder library, which is described inside our AVR C/C++ Library. This forum post by Ben explains how to tune PID constants.

-Jon