View Single Post
  #16   Spotlight this post!  
Unread 05-02-2007, 11:59
Dave K.'s Avatar
Dave K. Dave K. is offline
Engineer/Mentor
FRC #0930
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: WI
Posts: 91
Dave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to beholdDave K. is a splendid one to behold
Re: Limited OI Range From Linear Slide Potentiometers

Quote:
Originally Posted by Chaychay View Post
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!

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.

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/sh...d.php?p=566827
__________________
--Dave