Ok here is the issue, we have a arm that rotates, there is a potentiometer attached to one end and the arm is actuated via 2 fisher price motors and their 125 to 1 gear boxes (the white plastic ones)
i am attempting to get the arm to “servo” so that it stays upright most of the time, (a little bit of play is okay)
im running into a problem where the arm is shaking violently back and forth
i have placed a dead band in the code to try and stop this but the arms momentum Carry’s it right past the dead band.
the motors are running off victors and i have them set about as low as they go.
Are you using a printf to print out the outputs and variables every step of the way?
Most likely your code has some output value that’s going too high and getting maxed out. You might be able to divide some things by a number (in PID, you want to reduce the proportional and the integral components)
you might also try setting one limit in the up direction and another in the down position - that can keep the control from hunting for the perfect spot.