Potentiometer vs. Encoder

I’m not exactly sure where this is coming from, but I read somewhere that encoders are more precise that potentiometers. Is this true? If so, why would you use a potentiometer over an encoder except for the fact that potentiometers are absolute.

It depends on what you want the sensor to tell you.

As you noted a potentiometer will give you an absolute position within a limited range of motion. So for example connected to an “arm” it can tell you exactly where it is within its range of motion regardless of its starting location.

An encoder can tell you the rpm of a shaft or be used on a device with unlimited rotation to move a certain number of steps relative to where you start counting. It can be useful in autonomous to have your robot move a specific distance from its starting position or to maintain a set rpm with a varying load.

Which option will give you a more accurate angle measure?

For example, an encoder gives you 360 pulses for every rotation. Is there a similar measurement for a potentiometer?

It depends on your potentiometer’s number of turns.

Remember that the ADC on the cRIO is 10 bit. 1024 unique values.

If you have a 270 degree pot, that’s .2636 degrees per 1 value.
Now look at your 360 pulses / rotation encoder. That’s 1 degree per 1 value.
Conclusion: the 270 degree pot would be more accurate, at the expense of limited rotation.

Now consider a 10 turn pot. That’s 3.515625 degrees per 1 value.
Conclusion: the Encoder would be more precise in this case, at the cost of being relative and not absolute.

So to answer your question about accurate angle measures, you must consider the pot in question.

Encoders
Pros: Infinite rotation.
Cons: Relative, a little more complex to wire up(3-4 lines depending on the encoder), very delicate.

Potentiometers
Pros: Absolute, simple to wire up(3 lines), a little more robust, more widely available
cons: (depending on the pot)Limited rotation.

Each has it’s own applications. Encoders are traditionally used in drivetrains and other things requiring velocity and distance readings. Pots are used where absolute angle values are required.

No, it would be more precise.


Potentiometers are often less costly than encoders, but they can be more affected by the environment (vibration, water, etc).

While the ADC on the cRIO analog module is actually 12 bits, it’s in range of -10v to 10v. Only 10 bits are in the range of 0-5v, so it’s better to use 10 bits in your calculations.

It’s also possible to get continuous turn potentiometers and use them for everything you can use a encoder for. The following whitepaper goes through how to do this. http://www.chiefdelphi.com/media/papers/1743

I will use a potentiometer every time, unless there is a compelling reason to use an encoder. Potentiometers are cheaper, and in my experience is more robust. Rarely have I found the accuracy of a potentiometer to be a problem in FIRST applications.

The web site claims the 9201 is a 12 bit ADC. I’m not sure if NI sells a product that has a 10 bit ADC. The comment about range is spot on though.

Greg McKaskle

No doubt Potentiometers are cheaper but trying to use one on our kicker for Breakaway we found they can not handle a high rate of acceleration. One release of the surgi-tube powered kicker from fully retracted was all it took to break them. We had to switch to an encoder and then add a limit switch to sense a point to start watching the encoder counts from.

There are absolute rotary position sensors that are sensing over the full 360 range with no mechanical or electrical limits. Vishay 981HE is one model. They are analog voltage from .5 to 4.5 volts so they do not give 10 bit AD resolution. About .5 degrees is the best you can get. Note this is a NI module limitation. Not the limitation of the sensors. There are SSI output sensors that can give 12 bit resolution thru a SPI like interface. We use them to control the steering angle of our pivot module and last year they feed the PID for our arm.

There are encoders and then there are encoders. FIRST Choice had one of them, the AS5030, available as a demo board. It featured 256-step encoding of a full rotation using a rotating magnet as input. Electronic resetting of the zero point is one of the features, along with magnetic field strength was available.

You can also convert a standard pot into full rotation as long as it’s not one of the miniature variety. You just have to support the wiper with an insulator bridge and do a little strategic filing and careful re-assembly. It won’t increase the measurement range but it might simplify the construction some. I suppose you could overlap two of them, but I haven’t tried it.

The pot route may be easier to understand, i.e. (dare I say it?) more instructional. An added plus is the ability to brag that your 'bot is on pot. :cool:

I did not see anyone mentioning other issues in actually implementing and wiring these sensors such as noise on encoder digital signals. Or, the issues with poor quality data if the reflective encoder wheel on a KOP encoder is not properly aligned. I was not on the team last year, but I do know the team had a lot of trouble trying to get encoders to work reliably and gave up and used a potentiometer. They did not need high speed position sensing and some analog filtering gave good results with a potentiometer. Noise on the encoder by comparison was producing position drift over time.

From what I can see from last years robot I understand the problems. The team was short handed mentor wise for a while and the team lost some key skills. We are still trying to re-build the level of electrical knowledge and construction skills to use more components properly. But it is no surprise without enough time for training that they had reliability issues last year with encoders. We are trying to learn and address the skills needed to be successful this year. Even if we do, there are some students who still think encoders are unreliable. At least the ones we can get from FIRST Choice.

Bottom line. If you really let the students do the construction and most of the debugging, than you may have to let them select parts based on their current abilities and comfort level, and not just the technical merits. I think our team has the skills this year in SW, HW, and assembly, to have a wider choice in sensor use. But in the short build season, you may need to make other tradeoffs if enough experience with these components is not already present.

what is calculation to find speed with help of encoder…