IME/Shaft Encoders


I was just wondering what ou guys think is better for precise movement.
We were thinking of using 4 imes for our drive or 2 shaft encoders.
Would using both of them be necessary?

Unless you are using a holonomic drive, you only need 2 encoders. If the wheels are direct-drive, geared 1:1, or holonomic (x-drive/mecanum) you should go with IMEs. If your drive is geared up externally, shaft encoders might be better, depending on what you plan to use them for. If you are using them for positioning, the precision might be useful, but for autonomous programming, especially for MS/HS 15 second autonomous periods, the IMEs are better because they don’t occupy digital sensor ports.

I have an external 1.7 gear ratio for my drive. Its not holonomic. Would having imes on all 4 motors be better than just 2?

We use shaft encoders when we are aiming to move to a position. Our reasoning for this is the inaccuracy of IME’s (although I know some teams have made them work, but for us they refused to cooperate) and because of their static sensitivity. We lost the third finals match in a Skyrise tournament because our lift control used an IME. It was shocked and our robot lost its mind… We have never used IME’s for position since ;). However, if you do decide to use IME’s, only two are necessary, but I would put them on the middle wheels if u have a 6 wheel base, if not, whichever wheel is a traction wheel. If you have no traction wheels… Then just pick one :slight_smile:

Would having 4 make a difference?

4 IME’s? No, not really, there’s really no reason to, but I guess if you’re programming it differently than I do it could be beneficial… Although I strongly suggest the use of shaft encoders, they have served us well :slight_smile:

Im thinking if doing btoh shaft encoders and ime. That could work right?

Why would you do this? Just curious.

If one drive motor goes slightly faster than the other, it kind of pulls it along. For our base, we have 2 60 teeth and 1 36 teeth external gearing. I was thinking of using 4 imes for all the motors, and maybe even 2 shaft encoders on the 36 teeth gears so that it makes sure that the robot drives straight. In the past, i had robots that would curve to one side. I was hoping that this would eliminate that.

Well, I mean that could work, but I honestly think you would have the same results just with two encoders (whichever you would use). You could always chain the entire side together so all wheels spin at the same speed and then put the encoder on that axel, that way individual motor speeds won’t interfere quite as much?

Heres a picture. This is going to attach to the back wheel which is chained to the front wheel.

We use a single IME in the flywheel, because getMotorVelocity() function, introduced in RobotC v4.52, is extremely convenient to get almost instantaneous result.

Just as was said above, IME multiple IMEs chained together are notorious for their unreliability and random resets. However, accumulated flywheel travel distance doesn’t matter, and we have special fail-safe code to coast through it.

For any other application, especially low speed where friction losses in QE are negligible and accumulated distance is important, like drive-train in the OP case, you should definitely use quad encoders.

Yeah, that would work. We’ve used two shaft encoders (one on each side) and autonomous has been pretty accurate. I don’t think you will benefit much from adding more encoders but if you want to try it out! If it works better let me know though so I can steal the idea :wink:

Lol. Thanks for the help.

If all you want to do is make sure that your drive goes straight just use a master-slave PID to correct your drive. There’s really no reason to use both shaft encoders and IMEs at the same time. One or the other along with some decent correctional drive code should be fine.

I guess theoretically you could average all of the encoder values to get slightly more accurate readings. But to me, 4 IMEs plus two optical shaft encoders seems overkill.

If at all possible I would use Quad encoders. I have used 7 IMEs over the past 3 years and only one has ever been reliable, and that is the one on my flywheel, isolated from all static and with the 4-wire cables extended and wrapped around a c-channel. And most of the time I don’t even use it because it is too noisy even when filtered heavily. Quads are good if you can spare the friction and their size.
If you do use IMEs however, make sure to not check distance until the slop in the gear train is gone. This slop causes the IME to jump forward in reading and causes early stops.