Limited OI Range From Linear Slide Potentiometers

We are having a slight problem with our linear slide potentiometers.

They are 50K ohms and have about ~8 cm of linear motion. When connected to a multimeter monitoring resistance, we see the range of resistance go from approximately 0 to just over 50K ohms. However, when connected to the Port 2 of the OI, viewing the value on the dashboard gives us a range from 255 to 0 for only 6 cm of the sliding range; the remaining 2 cm show a value on the dashboard as 0.

The wiring is currently: Negative on pot to pin 4 on OI (ground). Positive on pot to pin 1 on OI (+5 V), & signal from pot to the appropriate analog signal pin (sorry, I forget which pin exactly)

Any ideas why we are loosing 25% (2cm/8cm) of our motion? The multimeter picks up the full range, so why cant the OI?

Any help will be much appreciated. Thanks! :cool:

NOTE: We have a spare pot which we will try this evening, but what confuses me is that nothing is wrong with this pot seeing as the multimeter detects a full range of resistance change, so I don’t think trying another one will work….but we’ll give it a shot anyway.

You say they’re 50k ohms; I think the OI wants 100k ohm pots. I’m not an electrical guru, but I think you can put a resistor in the circuit to make them move into the range you want.

Just wait a minute; I’m pretty sure someone who knows more than I do will post.

JBot

Yes, for them to work with the RC, they should be 100k

Well, we’re currently using a 20K ohm rotating pot and we can get values from 0 to 1024 without any other resistors. Don’t ask me how, but that’s what happens. Just to clarify, is your wiring something like this…

Potentiometer Diagram

(1)________________(3)

(2)________

Pin 1 on pot to red +5V pin on analog input.
Pin 2 on pot to white signal pin on analog input.
Pin 3 on pot to black ground pin on analog input.

It looks like the pot you’re talking about is connected to the Robot Controller (because the RC can measure 0 to 1023, the OI can only measure 0 to 254). The original poster is talking about a pot wired to the Operator Interface, which measures analog signals differently than the robot controller. It requires 100K ohm pots (or else some fancy trickery) to work correctly.

Thanks for the replies everyone! :slight_smile:

Yeah, I was under the impression that the OI needed 100 K ohm resistors as per the manual, however I have 2 reasons to believe otherwise:

  1. http://www.chiefdelphi.com/forums/showpost.php?p=567004&postcount=15

  2. We have a 10 K potentiometer wired as well, and it works just fine, we get the whole 255-0 range corresponding to the whole range of the pot.

If anyone has any other suggestions, please let me know. Thanks a ton! :cool:

First, there are posts in this thread that are confusing the RC inputs with the OI. This thread is about the operator interface, not the Robot Controller, they are different designs.

The wiring is currently: Negative on pot to pin 4 on OI (ground). Positive on pot to pin 1 on OI (+5 V), & signal from pot

The Operator interface is designed to work nominally with a 100 K ohm variable resistance (potentiometer or switched resistors) with only two connections as shown in IF documentation and the 2007_Guidlines_Tips_Good_practices document. It probably will generate values throughout the range of a 120K pot due to various tolerances.

Disconnecting your ground should give you a range of values of around 128 values (I forget if it is 0-128 or 128-255).

By connecting the ground you are drawing more current than intended by IFI and thus messing up their current measuring circuit and software. Connecting a pot in this manner can also cause the OI input to look like a disconnected joystick which will generate a 127 as an output value at one end of the range.

The OI doesn’t want to see a voltage. It wants to see a variable resistance. You’re “tricking” it by using a potentiometer, and you aren’t quite tricking it enough. I think you could get it to work better by adding a 22k resistor between the low end of the pot and ground, but that still won’t be using the OI input the way it is designed.

Try making the OI a little happier by connecting one end of the 50k pot to +5 through a 22k resistor, connecting the wiper to the joystick input pin, and leaving the other end of the pot open.

Mr. Pierce, we tried disconnecting the ground as well, and got the exact same range of data from the OI. (0-255, but from 80% motion of pot)

Mr. Anderson, what is the “low end” of the pot?, what is the “wiper”?, sorry about my lack of terminology. :stuck_out_tongue: Why a 22K resistor, why not say, a 50K?

Thanks for your help! :smiley:

When I said “low end”, I meant the end of the pot that you had connected to ground (as opposed to the “high end” which you had connected to +5).

The “wiper” is the traveling contact inside the pot that sees a different resistance to the ends of the pot based on its position. I think you called its pin the “signal”.

I suggested 22k ohms because that way your total resistance will change between about 22k and 72k, with center being approximately 50k. The standard 100k joystick pot also has the center being approximately 50k. You will seea limited range of values being read by the OI, from about 60-190 instead of 0-254, but you should get usable values from the full range of travel on the slider.

Mr. Anderson, Thanks very much for the explanation, it makes things a lot clearer :). We will definitely try this out tonight.

Jay,

Read paragraph 3 of page 5 of this document to understand what is happening.

Regards,

Mike

FACT: the OI input is a 45uA current sink.

FACT: Any voltage below +5V Aux / (100K * 45uA) will be treated as a disconnected joystick channel. In other words anything below +5Aux - 4.5V is out of range. If +5Aux = 5.00V then that disconnect voltage is ideally 500mV. Note: IFI’s documentation incorrectly states this threshold is 50mV

FACT: It is permissible to provide a voltage input to the OI, but one must properly account for the 45uA current sink, and the fact that the current sink is multiplexed between the joystick inputs (at approximately 38Hz) so the voltage source must properly handle this dynamic load. The dynamic load would be of concern when driving it with something like an op-amp or other active circuit.

To give you the most usable range with a 50K pot, one end will tie to +5Aux, the wiper will go to the joystick input, and the other end of the pot will tie to ground through a resistor.

To calculate this resistor value, you want to target the end of travel voltage to be a little shy of the “cable off” threshold voltage… which is going to vary a little bit from OI to OI, but I’ll assume the ideal case of +5VAux = 5.00V and a current sink of 45.00uA, which gives a 500mV threshold. I’ll also assume that the pot itself is 50.00K. In the real world, all of these things have tolerances, and you can either account for them and select a conservative fixed resistor, or you can add a trimming pot inside your custom controls to tweek it on a resistor by resistor, and channel by channel basis.

Without a voltage dividing resistor, when the resistor is at the end of travel away from the +5VAux rail, its series resistance is 50K and 45uA is flowing through it. The resulting voltage seen by the OI is +5VAux - (50K * 45uA) or 2.75V. Since you want this voltage to be 500mV at the end of travel, additional current must be drawn through the potentiometer. This current is equal to ((+5VAux - 500mV)/50K) - 45uA = 45uA. To calculate the resistor take 500mV / 45uA = 11.11K.

If you have access to a good supply of parts with 1% resistors in it, then you could hand select a resistor that works well with your pot and OI, or you could use a fixed resistor plus multi-turn potentiometer to calibrate each channel. In this case, a 10K fixed resistor in series with a 2K pot would probably give you a comfortable adjustment range. If you are not concerned about getting the last couple percent of A/D range, then I’d probably start with a 12.1K series resistor and confirm that at the end of travel, your linear pot gives an A/D count of something around 5 counts. If you target exactly zero, you run some risk of temperature changes pushing you into a “cable disconnect” situation when the pot is at the end of travel.

The ideal series resistor values for various common potentiometer values would be as follows:

50K -> 11.11K
25K -> 3.70K
10K -> 1.23K

As you load the +5VAux power source with fixed loads, the voltage will drop and start to limit the maximum A/D value that can be reported by ANY of the potentiometer inputs. With 50K pots you’d be fine, with about eight 10K pots, you might loose one A/D count on the upper end.

You can find some additional information in my discussion of the OI here: http://www.chiefdelphi.com/forums/showthread.php?p=566827

I’m glad to see that they’ve finally posted an updated version of the OI document with some additional explanation, but my measurements here indicate that the “cable off” threshold is higher than the 50mV they state. On one unit here, where the +5V Aux voltage was running about 100mV high, the end of travel was reached at 632mV and the cable disconnect voltage was right around 500mV.

Alan,

Of course this will approximately center the pot’s range in the reported A/D value range, it does so at the expense of cutting the resolution in half.

I’m not certain that this was clear in your origional post.

I do agree that it is an entirely practical and workable solution, but if one is concerned with being able to generate a full range of values, then one end of the pot needs to be lifted with a series resistor to accomplish that goal.

Thanks,

Dave,

Thank you very much for your insight! We added a ~1.5K resistor to our 10K pots, and they work a lot better now. (full range of motion w/ full range of values).

We discovered yesterday that our slider was actually not linear, it was logarithmic. (WARING: If your buying from a “surplus” store, make sure you are buying a linear one (you can check with a multimeter)).

We found another one @ mouser, so that should be ok.

Thanks for all the help from everyone! :smiley: