I’d like to apologize right off because I imagine the forum is quite tired or hearing about PID and those asking for programming help. I realize there have numerous threads discussing this same issue but I have yet to grasp the idea of what a PID loop actually does.
My issue-
I currently have a scissor lift that is geared 1:35 and has 4 stages. It reaches as high as I need and great except for a few nuances. One, the lift sometimes comes up a bit crooked, which hopefully can be fixed through programming. I currently have two encoders one on each side of the lift. The second issue with the lift is that it has quite a bit of play in it. I’ve spoken to others and it seems this comes natural with a scissor lift, but when I’m lifting with weight, about halfway up I encounter quite a bit of struggle, (this is the point where all the slack is being forced out) and it seems to break teeth, etc. I’ve seen many teams with smaller gear ratios lift bigger loads and I can’t determine what I’m doing wrong.
However many problems my robot currently has, this thread is about PID so I ask all of you. First off, what is a PID loop is its simplest form? Can it be used to combat the issues I currently face? And is programming a PID loop within EasyC even possible for someone like me(I consider myself a medium level programmer)?
Once again, I’m sorry for creating another thread about this and yes I have researched and read many other posts but can’t seem to fully grasp the issue. All help is appreciated and questions welcome. Thanks so much!
If you have not already you should read this. Although it sounds like you probably already have. I don’t think I can explain it any better than he does, but I’ll try. The simple version of a PID controller is just a P controller which essentially is used to set the motors to a power that is proportional to the difference between a current sensor value and a desired sensor value. So when we are far away from where we want to be, the motors get a large a large value. When we get closer the motors are commanded smaller and smaller values, eventually 0. A P controller is likely all you need for what you described. D and I get more complicated.
Yes, it can help with your first issue for sure; although structure is where you want to start w/ a problem like this. Structurally connect the two sides as much as possible and then turn to programming.
As for your second issue, it sounds like you need better build quality, and PID probably will not help much if at all.
I presume you mean the teeth of your gears and not those of your team mates.
Sometimes teeth can snap if you are trying to drive one small gear (a pinion, for example) against another small gear (a 36 tooth green gear, for example). The failure is a simple fact of gear curvature. In such cases, you might have only one tooth of one gear actually engaged on the other gear, so all the force is on that single gear tooth, therefore it breaks. If that is the case, then you want to have the small gear drive a somewhat larger gear, so that more teeth are engaged. Or, you might double up the gears (for example, instead of one pinion driving one small green gear, you could have two pinions driving two small green gears, etc.)
I am powering gears in the middle of the lift around a bigger green gear. The motors are driving a 12 tooth gear. I’m using two motors per side. The twelve tooth then drives a 60 which on the same axle a 12 drives a 84. I will try to post a picture soon. I’m not exactly sure how my build quality could be improved but I’m very open to suggestions, there are always things to learn!
The program can be copied from several examples, the tuning is the bear.
Start with proportional control like the previous post said. However, you may need a hold strength which the I in PID gets you.
To tune the PID using Ziegler - Nichols method, you need to get your lift to oscillate until it never settles to find the period of oscillation. This can be very hard to do on a scissor. So I’d start with a P controller. Get it good enough and manually tune. (which will probably seem very frustrating)
I’m not going to try offer any real programming advice since I coded for the first time three days ago, but I’ll offer what mechanical advice I can (as well as +1 George’s guide).
I can see you’re using some elastics, but it may be that you could use more/better tuned elastics. Try sliding the axles out of your motors and trying different combinations of elastics, with and without cubes. you can also test for friction like this.
As far as your build quality goes, it does look solid, but the devil is in the details. Firstly, you could try (assuming you can spare the metal of course) using 3 channels per X so that your joints aren’t cantilevered. Another alternative is to pass your joint bolts through one piece of metal and bearing block, then use a keps nut done up tight to eliminate wobble in that bolt, then lock nut the other piece as normal. Lastly, be aware how tight your lock nuts are. I find they should be done up tight enough to eliminate practically all wobble, without adding ridiculous friction to the joint (it’s a fine balance).