# Crab drive without a pot

I was wondering if it would be possible to do a crab drive without using a pot to figure out what angle the wheel is it and if it is how difficult the programming would be. Thanks in advanced

Trust me, you really want to put in a pot, it will only make your life easier during programming and then you can put wheels inexact positions and the robot will do exactly what u want it to do

How expensive would a pot be and where could we get them?

it would be about 2 dollars and 50 cents from radio shack

but if you want it in large quantities u can get it cheaper at

www.digikey.com

get the linear-taper-potentiometer

Thanks.

anytime

I have a question about using pots on crab drives.

It seems to me like you could have a 359 degree rotation using a pot, but then to go from, say, rightish forward to leftish forward wouldnt you need to rotate the wheel all the way around the long way? Assuming 0 on the pot is straight ahead.

Are there pots that give you a range of values up to one turn and if you turn past that they would reset?

We were considering using encoders on these shafts… but I’m not the best programmer in the world

Thank you,
Dave

You can buy pots that are set to a different amount of rotations, or you could use (like you suggested) shaft encoders.

You could also use endless pots, it would be slightly harder to program than normal (you have to anticipate the “wrap around”, still not to hard though) and you still get endless rotation as you desire.

I would highly recommend not using encoders to determine crab position. Yes they can work, but they require you to precisely position the wheel at startup. Since the encoder doesn’t tell you where you are, you could have the wheel turned 90 degrees and the RC has no way of knowing that it’s not centered. Pots are far superior in this aspect because they give you an absolute position at startup and the necessary corrections can be made.

True, but normal potentiometers have the nasty disadvantage of having a hard stop. When we did swerve drive in 2004, we broke a lot of potentiometers (especially in testing) by turning them too far. In hindsight, it might have been a better idea to use encoders, set the wheel to a known position at the start of the match, and probably have a limit switch as a backup that would be triggered (e.g.) when the wheel was straight ahead - so if anything happened, you could have a reset button that would spin the wheel until it triggered the limit switch and then would reset the encoder count. (You could also do this on the fly - every time that switch happens to be triggered, have an interrupt that corrects the encoder count.)

A couple of years ago our crazy electrical guy made a full rotation potentiometer by cracking it open and cutting off the stop. (Not recommended, you can screw things up by putting voltage across a shorted potentiometer)

There are ways to use optical sensors to encode position rather than motion.
http://http://en.wikipedia.org/wiki/Gray_code

Did you try using a 10-turn pot?

We had 5-turn pots, so 2.5 turns in either direction. 10 turns might have been better, but I still think we would have broken a few (and, of course, we would have had lower resolution - but I’m not sure that would have been significant).

There are a couple of things that teams can do to use a standard 270 degree pot without breaking it. You can easily use a couple of nylon gears (from Small Parts) to couple the pot to your steering mechanism. You can mechanically limit the travel of your crab so that you stop turning before the pot is broken or you can spend some money and buy a continuous pot.
But dpick, as you can see, no one is telling you to do crab without a pot. There is no way for the robot or the driver to know that the crab system has actually gone where the driver has told it to go or for the software to get it back to driving forward.

Why not an absolute encoder? (Like this.)

Is there any functional difference between a pot and an absolute encoder? (I realize that they are different internally.) Why would someone use one over the other (for low speed applications, eg arms, steering)? Is there a reason teams use encoders that give counts instead of absolute encoders on higher speed applications (wheels)?

Yes, the most significant advantage of this encoder is its free rotating shaft.

Plus it costs about the same as a 10 turn precision pot without the potential for value shifting due to vibration or temperature.

One possible reason to use raw quadrature input is to “count” beyond 1 revolution.

The source of this encoder USDigital has several other devices which can emulate pots by actively providing an analog voltage “incremented or decremented” by a quadrature pulse train (edac2) or an analog voltage feedback of the rate of pulses per second(etach2).

Additionally these devices incorporate the ability to self calibrate via a precise index marker pulse.

By selecting your counts per revolution carefully you can tailor the precision of the output to the neccessary resolution.

Don’t be afraid of potentiometers. Do use the correct value (I think 2.5k is the best match for the RC - or is it 5k??). Linear taper, as eshteyn noted, is what you need.

Connect a pot to the RC - one end to red, the other end to black, and the center to white, hooked up to an analog input - and get a feel for what kind of information you can get from it. You will see values in the range of 0 to 1023, varying linearly (linear taper, remember?) with rotational position.

Pots are available with 360 degree rotation, but these often have a small dead zone, where no signal is available.

Absolute encoders are great, can get costly (Mouser 594-601-1045 is one example, \$60, get the connector wire too), but feature true 360 rotation, no dead zone, reliability and precision.

Multi-turn post can be a good solution, but you can eventually run out of turns if you don’t enforce some kind of discipline on which way the wheels turn.

Running without pots (or similar) will lead to astoundingly poor performance.

Don