PID with atmega328p & MPU6050

Following unification in a common module (atmega328p + MPU6050), decided to apply its function to a Gimbal stabilizer. For this purpose I prepare a draft gimbal stabilizer platform (for begginig with two degree of freedom).

In my first test, analyzed the horizontal axis X and for that reason read and caclulate the values in each location based on the technical manual and real values from my prototype. After that calculate the average of all the measurements in order to cut the noise from the vibretion and add in my programm the relevant algorithm.


In the excel you can see with orange the real vaules from the real measurements and with gray the values after the smoothing process.

Αfter that I wrote PID code and performed multiple tests with different values for the proportional, integral, and derivative in order to find the best balance of the system and of course the better response. Below you can find same of the test with different
proportional, integral, and derivative values.