Go to Post PS. Listen to the wise Brandon Martus. Think before you (re)act. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 18-02-2005, 00:06
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
Potentiometer Help!

Hi,
We have a potentiometer wired to p3_x (port 3, x value) on the OI. It is a 100K Ohms, 3/4 turn POt; Used mostly in audio systems. We have wires connected to the middle and one of the outside terminals on the POT. We were getting a range of 231-254 at first, however after our programmers did some bitshifting on the values we had a range of 112-228, however we noticed that the numbers are jumping by 4. Meaning the values go 112,116,120 e.t.c. Is there a way to obtain more resolution from these POTS.

My second question is how do i wire the POT to the RC and if it will be able to work with the GYRO and Navigation Code ( I heard that the Nav code only allows analog input from the gyro). Any help will be much appreciated.
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo

Last edited by thoughtful : 18-02-2005 at 00:08.
  #2   Spotlight this post!  
Unread 18-02-2005, 00:20
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: Potentiometer Help!

Audio systems selom use a linear taper pot...
__________________
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...
  #3   Spotlight this post!  
Unread 18-02-2005, 00:24
ace123's Avatar
ace123 ace123 is offline
Registered User
AKA: Patrick Horn
FRC #0008 (Paly Robotics - http://robotics.paly.net/)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 50
ace123 has a spectacular aura aboutace123 has a spectacular aura about
Send a message via AIM to ace123
Re: Potentiometer Help!

One thing that you should be aware of is that the Operator Interface analog inputs give you 8 bits while the Robot Controllers give you 10 bits of data.

This difference is extremely important when you deal with things like potentiometers. If you were using a joystick to make an arm go to a specific pot angle, then you should multiply the OI's value by 4 to get 10 bits.

This made our arm go haywire last year at regionals and set us back a lot as my team members debugged the problem, and eventually it was just completely disabled.

I'm not sure why they would have such a small range. Perhaps they are not rotating their full range. I have no clue what could be wrong.

To wire the pot to the RC, I would assume that you take input power from the 5V center pin, ground from the black pin closest to the edge, and the output data to the pin closest to the middle labeled white/yellow. You could probably just use a PWM cable and soldier the pots to the leads at the end to get a nice connector.
__________________
-Patrick Horn, Paly Robotics

Check out the space simulator called Vega Strike, modelled after the space simulator games Elite and Wing Commander. It's Open Source too!
If you have ever played Wing Commander, or especially Privateer, and had a feeling of nostalga derived from the you will enjoy these two Vega Strike mods: Privateer Gemini Gold and Privateer Remake!
I'm working on adding multiplayer support this year...
  #4   Spotlight this post!  
Unread 18-02-2005, 00:33
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: Potentiometer Help!

[quote=thoughtful]Hi,
We have a potentiometer wired to p3_x (port 3, x value) on the OI. It is a 100K Ohms, 3/4 turn POt; Used mostly in audio systems. We have wires connected to the middle and one of the outside terminals on the POT. We were getting a range of 231-254 at first, however after our programmers did some bitshifting on the values we had a range of 112-228, however we noticed that the numbers are jumping by 4. Meaning the values go 112,116,120 e.t.c. Is there a way to obtain more resolution from these POTS.

QUOTE]
Bit shifting is causing your pot to jump by fours. A single Bit shift results in either a multiply or divide by 2 of the original value. In your case the programmers bit shifted twice to give you a factor of four. The 112 was originally 112/4 or 112*4. The 116 was originally 116/4 or 116*4, etc.

It is my understanding that audio systems potentiometers are typically
non-linear (tapered) and you will have much more success by purchasing
a single-turn, linear pot from Digikey or mouser.com.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #5   Spotlight this post!  
Unread 18-02-2005, 08:21
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Potentiometer Help!

Quote:
Originally Posted by ace123
One thing that you should be aware of is that the Operator Interface analog inputs give you 8 bits while the Robot Controllers give you 10 bits of data.
It is easy enough. In programming you enter
pot= (unsigned char) (Get_Analog_Value(rc_ana_01) >> 2);

Something like that. The >>2 reduces it to a 8-bit. It is even there in last years programming manual.

-Bharat
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
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
coding a potentiometer incognito_NICK Programming 5 14-02-2005 15:56
Potentiometer Trouble ?? VideoMan053 Programming 18 28-01-2005 14:10
Potentiometer Joshua May Technical Discussion 8 22-05-2004 19:51
Potentiometer with BS2 sanddrag Programming 7 13-05-2004 19:21
Potentiometer Problem Greg General Forum 1 15-02-2003 18:10


All times are GMT -5. The time now is 19:16.

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