Encoders

My teams want to start using encoders for our autonomous so any recommendations for an encoder we can get working in about a month and a half?

CTR encoders work really well if you are using Talon SRX’s for your drive motor controllers. There is lots of documentation available.

Currently, our drive train is controlled with Sparks

You might try this one

https://www.mouser.com/ProductDetail/706-63R256?r=706-63R256

Teams commonly connect those to shafts using a short length of surgical tubing, but you’ll see people suggest stiffer tubing.

This gives 2 channels of 256 pulses. Each pulse has two transitions, so you get 1024 transitions per revolution.

It’s about $55 at Mouser. I don’t know why lower-resolution encoders are more expensive.

CTRE magnetic encoders (also sold here and here) will give you the best bang for your buck. They’re relatively inexpensive, multi-purpose, easy to use, and relatively fault tolerant. If you aren’t using SRX’s on your robot you’ll need to use mag encoder breakout boards (sold by CTRE, AM, Vex, etc), but even that doesn’t break the bank compared to some other options. They would be my recommendation.

Other popular encoders include:
Greyhill encoders (models 61R, 63K, and 63R). They are sturdy and reliable, but usually very expensive.
USDigital E4T encoders. These can mount directly to the kit chassis, but they’re pretty delicate and finicky. I’ve personally broken a few just trying to install them.
CIMcoders. They are even more delicate and finicky than the E4Ts, but very easy to mount. My team has actually used them successfully, but most people recommend against them.
AMT103-V kits. These have been available from FIRST Choice for the past few years, and they work decently. They aren’t particularly easy to mount, but they’re definitely worth 20 credits if you have them to spare.
AM Mag encoders. These seem to be a copy of the SRX mag encoder, but I have never used them or heard any reviews so I can’t really comment.

In that case, you will have to connect the encoders to DIO ports.

**Which encoders to get is mostly a function of what gearbox you’re using; get something that fits the gearbox, and life will be simpler. ** If your gearboxes have magnetic shaft ends, you can still use the SRX encoders, using one of the COTS breakouts. AndyMark carries their own and the one from CTRE.

No matter what encoder you get, I would recommend mounting it to the output shaft instead of in the gearbox so that you can measure actual wheel rotation. Otherwise, your values may be affected by gear backlash.

These from us digital are very robust

However they are expensive. When you call to place an order inform them you are an FRC team and they will give you the next pricing bracket on your order.

+1 for CTRE Encoders.
We’ve used them in multiple cases between drivetrains, shooters other mechanisms (VexPro Versaplanetary encoder). Very nice all around encoders, and nice to have spares that all are interchangeable across the robot.

I can vouch for the AMT103’s. We used them this year on our drive train and they worked flawlessly. Once you figure out the mounting they are actually super easy to install.

Edit: We bought ours on digikey.

Do you folks have a strategy for how you want to control the robot using encoders yet?

Not exactly. Suggestions?

Here’d be my (long-term) pecking order of things to get working:

  1. Read distance traveled in ft from each side of the drivetrain. Verify with a measuring tape that the measured distance in software matches the actual distance traveled.

  2. Write an autonomous routine that runs the motors until a certain distance is reached, then turns them off.

  3. Write an autonomous mode that slowly ramps up and down the speed near the endpoints of travel. This should give you a super robust “drive forward” auto that stops exactly at the programmed distance.

The next steps would involve reading the speed off of the encoder, and starting some closed-loop algorithms to control the speed to a setpoint. From there you can move on to motion profiling or more complex auto movement.

Most AndyMark drive train gearboxes (in particular toughbox series and EVO series, among others) provide an encoder shaft stub which is physically part of the output shaft, just on the other side of the gearbox. Most single speed gearboxes, and shifters where the shifting shaft is **not *the output shaft could be similarly modified by boring a shallow hole on the back of the drive shaft and glueing in an SRX encoder magnet.

OBTW, if you don’t have a lathe or other device to find the center of your shaft, you can adapt this drill press technique to hit the center.

  • shallow enough so as not to weaken the shaft significantly, deep enough to hold the magnet square. I’m thinking about 1/8" to 3/16" deep.

How did you keep the shaft from spinning inside the plastic adapter cup? Ours worked great for until about 1/2 way through our 2nd competition. We believe the adapter cup was spinning on shaft, which led to inconsistent results. We tried a dab of superglue inside the adapter cap which helped on short-term, but superglue apparently caused the adapter cap to deteriorate and break. Any suggestions would be appreciated as they seemed to work quite well.

The AMT encoders are actually the easiest to mount encoder that there is by far. A little VHB tape and stick them on. The kit includes alignment tools and lots of different adapters to fit a wide range of shaft sizes.

This year our robot has an encoder on everything, even our intakes!

We made 3d printed housings and harvest the encoder and gear from the versaplanetary mag encoder slice.

Heres a link to the encoder housings on universe.

57 sport housing:


versa block housing:

This past year was our first year to put encoders on our driver train. We used the Toughbox Mini gearbox that it looks like you used this past year. Here is what we used to get it working

The output shaft on our Toughbox Minis did not have a magnet so we replace the output shafts with these:
Steel Output Shaft with Magnet

Then we attached this encoder using the mounting kit
SRX-MAG-Encoder
Mag Encoder Mounting Kit

We controlled one motor on each gear box with a Talon SRX and ran the data cable from the encoder to the Talon SRX
Talon SRX Motor Controller
Data Cable for Talon SRX

The other motor on the gearbox was controlled by the Victor SPX which we ran as a slave to the Talon SRX
Victor SPX Motor Controller

For autonomous movement we used the Magic Motion feature in the Talon SRX.