Encoder for Crab Steering

Hello!

We have built a crab-drive robot for this year (2009) and we need a sensor to find where the wheels are facing to use in the program.

We are pretty sure we are going to use a 270 degree potentiometer, but we want to look at an encoder because it will be easier to mount.

We would use the kit-of-parts encoder, so it is not absolute like a potentiometer would be. The program would need to remember that “we are 10 ticks to the right of center” and stuff like that, and we would need to start the robot with the wheels strait forward every competition. We also are worried that it would “forget” its position after autonomous. For example, if we steered 10 clicks past center to the right in autonomous and then we changed to teleoperated, could the code remember where the wheels were? Or is the memory cleared at the end of autonomous?

Any help would be great! If anyone has used encoders for crab steering before or something like that, we’d love to hear from you. Thanks!

On our crab drive we use the MA3 absolute analog encoder-> http://usdigital.com/products/encoders/absolute/rotary/shaft/ma3/

used it for two years and have had no failures!
they are solid and robust also they have a nice resolution!

also not to expensive:)

If you don’t want to reset the crab modules to 0* each match, you would need to add an index to the encoder (limit switch, reflective tape, etc) to know your absolute angle. Or you could check out one of these US Digital Absolute Kit Encoders. These mount the same way as the KOP encoder, but let you read absolute rotation (0-360*) on an analog input pin.

To remember variables across methods in your code, just declare the object globally in the class.


class YourRobot : public SimpleRobot{

    Encoder *crab;

    YourRobot(void){
        crab = new Encoder(1,2);
    }
}

Our team went though the same set of questions (pot Vs encoder), and ended up with the standard encoder, and two limit switches. The limit switches are at the end of travel, one for each direction of turn. The software can calibrate itself by turning the wheels to either limit switch, and then going back 155 counts (for our bot it is 310 from stop to stop). So far it works great.

We are using a cheap absoulte encoder, it worked on the bench, tonight it should work on the robot. Here is the link to it and some places to buy it, we bought ours from allied but they are sold out I beileve.

http://octopart.com/info/Bourns/EAW0J-B24-AE0128L