Setting PiD values via potentiometer - what is the range?

Hi, I'd like to adjust the three K values for a self-balance robot using onboard, potentiometers. The pots would be the clicker-type, probably with ten click-steps.
Do the K values need more than a 10-step range of adjustment?

I think most PiD code uses doubles not integers, do they run from 1.1 to 1.9 or are they a wider range of values such as from 1.1 to 20.9?

If Pid K-values are a very wide range, then a potentiometer probably isn't the most accurate way of manually adjusting. If that's the case I'll try sending typed-in values on the fly.

Impossible to say. The K values need to be determined experimentally and are unique for every new PID application.

To find tutorials, start with the search phrase "PID tuning".

I am not familiar with that type of pot. Do you mean rotary encoders?

image

It depends on the size of each step. Use conventional screw pots. They are reliable.

You will need some experimenting...
The value of K may be any value... but if you do an analog read, your reading will be in range 0-1023.
If you send out a pwm, your output will in between 0-255. If both are true, a first guess for K would be in the range 0.1 till 1...

Yes, I wasn't sure if a linear analogue pot would be difficult to keep track of how far I'd turned it so I'd have an idea of what the ideal setting value would be.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.