Go to Post If a suspicious distrustful atmosphere is created, then a suspicious distrustful reaction will occur. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-02-2007, 08:56
Chaychay Chaychay is offline
Registered User
AKA: Jay Shah
FRC #0610 (Crescent Robotics)
Team Role: College Student
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Toronto, Ontario
Posts: 48
Chaychay is on a distinguished road
Send a message via MSN to Chaychay
Question 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!

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.
  #2   Spotlight this post!  
Unread 05-02-2007, 09:08
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Limited OI Range From Linear Slide Potentiometers

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
__________________
Aren't signatures a bit outdated?
  #3   Spotlight this post!  
Unread 05-02-2007, 09:17
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: Limited OI Range From Linear Slide Potentiometers

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

Last edited by tdlrali : 05-02-2007 at 09:52.
  #4   Spotlight this post!  
Unread 05-02-2007, 09:43
Jake M Jake M is offline
void* Jake;
FRC #1178 (DURT)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Missouri
Posts: 118
Jake M has a spectacular aura aboutJake M has a spectacular aura about
Re: Limited OI Range From Linear Slide Potentiometers

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.
__________________
Code:
void function(void)
 {
  function();
 }
  #5   Spotlight this post!  
Unread 05-02-2007, 09:50
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Limited OI Range From Linear Slide Potentiometers

Quote:
Originally Posted by Jake M View Post
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....
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.
  #6   Spotlight this post!  
Unread 05-02-2007, 09:55
Chaychay Chaychay is offline
Registered User
AKA: Jay Shah
FRC #0610 (Crescent Robotics)
Team Role: College Student
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Toronto, Ontario
Posts: 48
Chaychay is on a distinguished road
Send a message via MSN to Chaychay
Re: Limited OI Range From Linear Slide Potentiometers

Thanks for the replies everyone!

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/sh...4&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!
  #7   Spotlight this post!  
Unread 05-02-2007, 10:26
Mark Pierce Mark Pierce is offline
Registered User
FRC #0085 (B. O. B.)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Zeeland, MI
Posts: 239
Mark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant futureMark Pierce has a brilliant future
Re: Limited OI Range From Linear Slide Potentiometers

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.
Quote:
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.
  #8   Spotlight this post!  
Unread 05-02-2007, 10:34
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Limited OI Range From Linear Slide Potentiometers

Quote:
Originally Posted by Chaychay View Post
The multimeter picks up the full range, so why cant the OI?
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.
  #9   Spotlight this post!  
Unread 05-02-2007, 11:23
Chaychay Chaychay is offline
Registered User
AKA: Jay Shah
FRC #0610 (Crescent Robotics)
Team Role: College Student
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Toronto, Ontario
Posts: 48
Chaychay is on a distinguished road
Send a message via MSN to Chaychay
Re: Limited OI Range From Linear Slide Potentiometers

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. Why a 22K resistor, why not say, a 50K?

Thanks for your help!
  #10   Spotlight this post!  
Unread 05-02-2007, 11:40
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Limited OI Range From Linear Slide Potentiometers

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.
  #11   Spotlight this post!  
Unread 05-02-2007, 11:52
Chaychay Chaychay is offline
Registered User
AKA: Jay Shah
FRC #0610 (Crescent Robotics)
Team Role: College Student
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Toronto, Ontario
Posts: 48
Chaychay is on a distinguished road
Send a message via MSN to Chaychay
Re: Limited OI Range From Linear Slide Potentiometers

Mr. Anderson, Thanks very much for the explanation, it makes things a lot clearer . We will definitely try this out tonight.
  #12   Spotlight this post!  
Unread 05-02-2007, 11:54
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Limited OI Range From Linear Slide Potentiometers

Quote:
Originally Posted by Chaychay View Post
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. Why a 22K resistor, why not say, a 50K?

Thanks for your help!
Jay,

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

Regards,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #13   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
  #14   Spotlight this post!  
Unread 05-02-2007, 12:07
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 Mike Betts View Post
Jay,

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

Regards,

Mike
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.
__________________
--Dave
  #15   Spotlight this post!  
Unread 05-02-2007, 12:17
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 Alan Anderson View Post
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.
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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
linear slide potentiometers Greg Needel Electrical 4 04-02-2007 15:49
Slide Show from UTC Scrimmage BobC General Forum 2 21-02-2006 18:16
pic: Slide 20 CD47-Bot Extra Discussion 4 14-03-2004 17:28
Limited Vs. Large funds? Mikeman602 General Forum 15 22-03-2002 08:15
poll: should nats be limited? mike o'leary Rumor Mill 10 26-06-2001 15:20


All times are GMT -5. The time now is 06:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi