Rotary Sensors and Swerve Drive

This year we have decided to go with swerve drive to operate our robot. Knowing that optical encoders read zero regardless of position on start up, Ive begun to consider using potentiometers to keep track of steering position. My only concern being that the limited number of turns could possibly prove problematic. So I guess my question is more along the lines of this, would potentiometers or optical encoders be more suitable for such a drive system? And for teams that have used swerve drive and potentiometers, have you ever found them to be restrictive in terms of how one must drive in order to make sure you dont max them out? Or do you use continuous potentiometers?

We found absolute encoders to work well with appropriate programming.

Continuous potentiometers seem to be what you’re looking for. If your swerve drive can turn fast enough, another option is to program it to unwind itself after a certain number of turns.

Okay then question, what absolute encoders, or continuous potentiometers do you use?

In our FTC swerve drive, we found that the deadband point at the rollover in continuous pots were too large for the sensors to be used effectively. I’m not sure if this becomes less of an issue at FRC scale, but it is something to be mindful of.

I know several teams have used absolute encoders, like USDigital’s MA3 (http://www.usdigital.com/products/encoders/absolute/rotary/shaft/MA3) successfully, but I have no experience with them.

usdigital MA3-A10-250-N

There’s a great magnetic encoder made by Austria Microsystems with a whole lot of operating modes. You can find the WPI reference right here: Encoder .
Extra tip: If you decide to go with this one, and wanted to use the PWM signal, just use a low-pass filter to convert to good ol’ analog signals for you cRIO module.

Good luck! :slight_smile:

You can obtain 5 turn or ten turn pots for this application. You also can use reduction drive (gear or belt) to connect to a standard pot or encoder that only has 270 degree rotation.

We use http://www.digikey.com/product-detail/en/6127V1A360L.5FS/987-1393-ND/2620662

Have used them for 2 years on the swerve and have worked well.

You can also use an incremental encoder with an index to detect a fixed zero position. However, the last I knew, these did not work well when using the built-in position control of the Jaguars, if you try to use the index pin on the Jaguar’s encoder input. You’ll have to have a procedure for making sure the index is picked up before you can rely on this reference. For instance, it might be possible to have the students who set the robot on the field manually twist each swerve unit so it passes the index, after the robot is powered up but before it is enabled (obviously). Another option is to have the swerve units rotate for a time right after things are enabled, in order to ensure the index has been ‘seen’.

Let us know if you find a absolute optical encoder that isn’t expensive, the magnetic ones seem to be more manageable in this way.

I use the US Digital MA3 for all of my swerve builds.

They are single turn, but limitless. Their behavior near the 0 point is reasonable.

We count turns as we go and it works well.

My first year on a team I had the same problem as the OP. Our solution was to use the Cherry AN8 sensor. This sensor is a Hall Effect rotational position sensor. It somes in a 360 degree variant, and is analog output. It will output a voltage between 0.5V and 4.5V, so it is easily connected to the analog breakout board. I never had any problems with a dead band on the sensor between the 0 and 360 area.

The reason we love this sensor is that it is absolute between power cycles of the robot, it will always output based upon the magnet’s orientation. It will also automatically wrap the voltage at the 0-360 transition, so there is only one voltage per angle (as opposed to the multi-turn potentiometers).

Mechanically it can be mounted similar to the potentiometers, there is a magnetic head which has to be tied in to the rotational system. Then the sensor body gets mounted a few millimeters above that sensor head (it is a non-contact sensing system).

Here is the datasheet for the sensor:
http://www.cherrycorp.com/english/sensors/pdf/AN8_Series.pdf

Here is a link to the Digikey product page for the sensor:
http://www.digikey.com/product-search/en?vendor=0&keywords=CH187-ND

I also had created a C++ class for this sensor, so if anybody is interested let me know and I can dig that out and post it.

We’re using a quadrature optical encoder with a homing tick from USD.
We used them in the recent past with great success. They were very accurate and reliable, in part because of the sealed body. They were a little on the expensive side but we got a special deal from USD. I’ll try to get back with model No.

We have used pots simply because we wanted to know if we had turned more than 360 degrees and in which direction.