# Lift PID Loop

With our lift we have a pretty heavy intake and 1:7 gear ratio, which is difficult to keep up at any height (except completely extended). We have a great amount of rubber bands to help with this, however, it is not enough. I currently have a PID loop in RobotC that constantly checks if the potentiometers on the lift are equal. Is there a way to program the lift to stay up better? (Right now we have braking on the motors at 20, which can burn them our quickly)

Also, whats the best way to program the lift’s speed to change depending on how far it is from reaching its target position?

Thank you! Any help would be greatly appreciated!!!

We have a very similar problem (https://vexforum.com/t/hold-lift-encoders-at-set-position/27656/1). Perhaps one of the answers there would help?

Whether you use PID or send a fixed value (of 20 or so) to the motors, you will have the same problem. The force needed to hold the lift is larger than the motors can provide without having them draw too much current. The best solution is to add more mechanical force, ie. rubber bands etc.

PID can help with this, but point 1 above still applies.

What sort of lift do you have?

Oh I see that you do have a very very similar problem…did what people say help in solving the problem for you? And if so how?

I do see what you are saying about there not being enough power to hold the weight, but do you think the speed changing would still be useful in protecting the motors and making the lift better?

We have a reverse 4 bar.

I can’t really say at the moment, since we had an encoder problem recently (which has since been fixed, though the code hasn’t been implemented)

Oh ok thats understandable. Im interested in whether or not adding the speed changing PID and PID to keep the lift up really help enough.

The mechanical assistance should be done first to help hold the weight (i.e bungee, rubber bands) but then on top of that with the PID loop, your integral cap will commonly end up being what the motors hold at. This is because when the loop executes to reach its target, the I term will be the only one that does not end up at 0 once you are at your setpoint because it is continually summing your error. So by capping this the loop should automatically hold the position as well (depending on your implementation).

Likely a PID won’t fix your issues with motor burning out. Especially if it takes 20 power to keep the lift steady. I would recommend changing things mechanically before trying to implement a PID. Either changing your gear ratio or adding more rubber bands or something that relieves the stress on the motors.