Maslow Home Maslow Community Garden Newsletter

Change of Sprocket Size and PID Settings


Am I correct in assuming that with how the firmware works, if you change the size of the sprocket, you will need to adjust the PID settings? I assume the PID settings are based upon the 10-tooth sprocket and if you change to something like a 25-tooth sprocket, then its possible with the stock PID settings that you will overshoot significantly because more chain will be let out per movement of the larger sprocket… then, when it tries to correct, it will reel in too much chain… and on and on… If so, would adjusting the Kp proportionally make sense? For example, a 25-tooth sprocket has a circumference that’s 2.5 larger than that of the stock 10-tooth sprocket… Would it make sense to at least initially reduce Kp by a factor of 2.5?

1 Like

Excellent catch. I believe you would be correct about the size of the sprocket affecting the PID settings… I wouldn’t necessarily say that the settings have a linear relationship, though.… Would take some testing.


I agree… just thinking it would be a good starting point.


My only input is: the output of the PID controller is a PWM signal, which is a little like a voltage. So, the sensitivity of the system has to include the electrical characteristics of the motor and the control-board. So, the question is, does the electrical system directly translate this 2.5:1 ratio, or does it change this ratio? I am having a hard time thinking through this.

My intuitive answer is: the PID gains should be quite robust, unless they are already overtuned. I would start by assuming the initial values will work, and only change them if some problem is encountered. If you have problems using a 25 tooth sprocket, I would question the base calibration.

1 Like

I agree, the default pid settings probably need a little tweaking with a
different load, but nothing drastic, nowhere near a 2.5:1 change.

remember, the pid parameters are trying to get the best performance out of the
motors without going into oscillation from trying to correct too aggressivly.
This is based on the motor turning and the feedback from the encoder. Adding
weight or changing the gearing will affect the load on the motor, so it will
reduce how fast the motor can accelerate, so there may be a need to tweak it a
little, but try it as-is first.

David Lang


I’m not using a 25 tooth sprocket and used that just as an example to something people can relate to. I’m experimenting with something that maybe like an effective 48-tooth sprocket…

Thanks for the feedback (get it?). It’s been 28+ years since I did anything with PID controllers and it was all textbook at that time.