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!!!
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.
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.