Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

RoboClaw - Setting correct PID constants



I own your old version of RoboClaw (https://www.pololu.com/product/1495) and I have just bought two of your motors (https://www.pololu.com/product/1443/) with encoders (64 CPR Encoder). So my question is, which are the correct PID constantes for this motors ? Is the max QPPS of 11733 correct ? To what value should I set the P = Proportional, I= Integral and D= Derivative constantes ?
I am abit confused to what actual these constantes mean ?
My curent values are:

#define Kp 0x00010000 #define Ki 0x00008000 #define Kd 0x00004000 #define qpps 11733 roboclaw.SetM1Constants(address,Kd,Kp,Ki,qpps); roboclaw.SetM2Constants(address,Kd,Kp,Ki,qpps);

But this returns really strange encoder data (speed is jumping all over the place).

Thanks for your help!

Best regards, xarch


Hello, xarch.

The PID constants will be unique to your setup. You might try contacting Orion Robotics for tips on tuning the PID on the RoboClaw. You might find this Wikipedia article on PID control helpful. There are also several good tips and suggestions for PID tuning on our forum.

- Jeremy



i have the same problem , but with Position PID controller, I am using Roboclaw 2x15A and one metal gearmotor(pololu.com/product/1447), and I don´t know how tuning the PID coefficient, Can you explain me how do it?.

On the other hand, What is the function of parameters QPPS, DEADZON y KIMAX.
I am using a cuadrature encoder instead of absoulute enconder.




You might find the links in my previous post helpful for tuning the PID coefficients. The RoboClaw supports quadrature encoders. You can find more information about those parameters in the RoboClaw user manual. If you have additional questions that are not covered in the user manual, you might try contacting Orion Robotics.

- Jeremy