Page 1 of 1

PID Control

Posted: Tue Apr 20, 2010 6:55 am
by mimiyum
I have seen the PID example and I'm sorry it's too complicated for me. Is there a simple way of doing PID control?
I would like to set the PWM speed to slow down when approaching the target and slowly go back if it overshoots. Does it have to be THAT complicated? :cry:

Re: PID Control

Posted: Tue Apr 20, 2010 8:52 am
by Benj
Hello Mimiyum,

PID is a fairly simple equasion. However implementing PID on an 8-bit device can be a little tricky. Especially as you have to balance the equasion so it gives you usable numbers in the range of 0-255.

I will dig through my old work and try and find the equasions for PI and PID control. Hopefully this will help to get you started.

Re: PID Control

Posted: Sun May 09, 2010 6:22 am
by mimiyum
I understand it's better to use PID on a 10-bit device due to the difficulty in computing without going below or above 255.
Maybe if you could send the same PID program in your example with a few more "NOTES" and information so that we can edit it to suit our application. It would be easier to learn when there are notes embedded into your example programs.
Like for example, if we want the whole "PID" to go at a faster rate, which variable should we edit?
Thanks!