please suggest some articles or tips for tunning PID
i have read a article on site but i need more info.
i have experienced that PID matters a lot, i have PID values of IceFlinger and the bot goes on 255 without any problem
But one question , does PID values are related to max speed,
for ex if i tunes for 200 then can i use it for 100, because the result are not always same, some times by reducing speed on one set of PID the bot goes fine at low speed but not for all set of PID values i have acquired.
PID tuning depends on the agility of your system. A big motor in a light bot will have swift reactions.
In general PID only changes the way you change speed, not the maximum output. So full throttle is full throttle. If your bot experiences changes in max output you probaly have an overflow somewhere in your software.
Change throttle from 25 to 100% and back and see how it reacts.
Most basic setup is to start with the Kp value, keep increasing this until you get a solid oscilation
Increase Kd untill the oscilation stops
Increase Ki until the full throttle output matches the open loop maximum throttle
If you are able to attach a logger to your system you can see what happens. For my experiment I logged these results.
I found out that the AVR221 software has a glitch somewhere in the I factor calculations. Even with a Ki value of 0 the outputValue is corrupted afer a certain number of calculations. I get a 20% lower output after 5 seconds. If I run my application faster time shortens, slower means longer. Once corrupted it does not recover untill the processor is reset.
I have not found it in the software and solved this issue by putting a small Ki = 0.10 factor in the parameters. Now it works ok.