Maintain Lift Position

So currently, when we try to maintain a position, we have a proportional motor power until the potentiometers reach within a certain range of the target hold position. But once we are within that range, the arm will bounce up and down occasionally depending on the position of the lift due to either gravity at the bottom or the tension of the rubber bands at the top. Are there any suggestions to maintain the position stably without the “bouncing”?

I would try making the P value lower. That should reduce the bouncing. However, are you sure it is because of the factors you mentioned and not because of the program. Last year, we had this problem, but it was because of the program.

From what we are observing, the sensor value will reach the target value, stay still for a moment, then bounce once, stay for a bit more, then bounce again, and it’ll just keep going in that cycle. I thought it might be because of what I mentioned because from the situation I just described, it doesn’t seem like the lift is “overshooting.”

People tend to tension so that the arm stays still in any position without any motor power.

In my opinion, it seems like gravity is slowly lowering your arm until an aggressive kP kicks in and raises it quickly (this can happen even if it’s not overshooting).

You could try stalling the lift with low power once it reaches the target range.

From experience, what’s happening is your lift will get within range then will imperceptibly lower enough to change the sensorValue out of range, and, as @Vex 9185 said, an overly aggressive kP value is essentially causing the motors to jolt. Lower the kP to around 0.4 or lower