Go to Post Engineering is NOT manufacturing. .... It is good to be able to fabricate things with your own hands, but thats not what engineers do. - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-04-2006, 22:53
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Travis Covington
The rotary switch seems like a good solution, if it does in fact have solid feeling stops, so we could easily differentiate between the 6 positions.

The only problem is, I would be the one wiring it up and have practically zero electronics knowledge and would need some help selecting resistors and wiring it up to specific pins on the switch and the RC. If you guys could help me out there, It would be HUGELY appreciated.
The idea here isn't as much the actual resistance as the concept. The current through the circuit I is defined as I=V/Rtotal where Rtotal is the sum of the two resistors: the initial one connecting from 5V to the common lead, and the secondary resistor from the switch to ground. Then the voltage measured at the common lead can be calculated as V=IRswitch (the resistance from the switch to ground). The actual R value will cancel out.

----- Rc ----- Rswitch <--the dashes are just spacers here...
5V--^v^v--|--^v^v--gnd
________Input
Rc=R, Rswitch=#R
I=(5V)/(Rc+Rswitch)
Vinput=I(Rswitch)=(5V)(#R)/(R+#R)=(5V)(#)/(1+#)

Hope this helps.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic

Last edited by Adam Shapiro : 11-04-2006 at 23:18.
  #2   Spotlight this post!  
Unread 11-04-2006, 23:10
Travis Covington's Avatar Unsung FIRST Hero
Travis Covington Travis Covington is offline
Engineering Mentor
FRC #0254
Team Role: Engineer
 
Join Date: Oct 2001
Rookie Year: 1998
Location: San Jose, CA
Posts: 574
Travis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond repute
Send a message via AIM to Travis Covington
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Adam Shapiro

Hope this helps.
Sort of... In reality, I still have no idea where to start. I am an ME/MFE with very little electronics experience... so please bear with me.
__________________
-Travis Covington

2008-2017 - Engineering Mentor of Team 254
2001-2008 - Engineering Mentor of Team 968
1998-2001 - Mechanical Director/Driver/Member of Team 115
  #3   Spotlight this post!  
Unread 11-04-2006, 23:12
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Travis Covington
Sort of... In reality, I still have no idea where to start. I am an ME/MFE with very little electronics experience... so please bear with me.
Heh, not a problem. You should probably choose some value of R in the 10000s to protect the input (I believe).

EDIT: It seems the OI manual suggests 100k ohms for a value. This seems resonable as it will only allow for a very small amount of current between 5V and gnd (I=V/R=5/(100000)=50uA). This is for safety as well as to prevent against large flows of current when using the OI. Don't forget the OI has its own built in fuses to protect itself, but you still want to be careful.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic

Last edited by Adam Shapiro : 11-04-2006 at 23:41.
  #4   Spotlight this post!  
Unread 11-04-2006, 23:49
Travis Covington's Avatar Unsung FIRST Hero
Travis Covington Travis Covington is offline
Engineering Mentor
FRC #0254
Team Role: Engineer
 
Join Date: Oct 2001
Rookie Year: 1998
Location: San Jose, CA
Posts: 574
Travis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond repute
Send a message via AIM to Travis Covington
Re: Potentiometer 5 or 6 detents

My plan was to mount it on the RC.
__________________
-Travis Covington

2008-2017 - Engineering Mentor of Team 254
2001-2008 - Engineering Mentor of Team 968
1998-2001 - Mechanical Director/Driver/Member of Team 115
  #5   Spotlight this post!  
Unread 11-04-2006, 23:52
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Travis Covington
My plan was to mount it on the RC.
The RC has the same thing going for it. The only thing I would be concerned with however is that using a rig like this might be a bit cumbersome. Personally I'd use a 100k ohm potentiometer, rather than a rotary switch, and just set specific ranges as certain programs. This could also be reprogrammed to allow for smaller ranges -> more programs. That's up to you though. The math/physics behind the voltage divider idea would stay the same though, you'd just hook it to an analog input on the RC rather than one on the OI.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #6   Spotlight this post!  
Unread 13-04-2006, 10:46
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Adam Shapiro
The RC has the same thing going for it. The only thing I would be concerned with however is that using a rig like this might be a bit cumbersome. Personally I'd use a 100k ohm potentiometer, rather than a rotary switch, and just set specific ranges as certain programs. This could also be reprogrammed to allow for smaller ranges -> more programs. That's up to you though. The math/physics behind the voltage divider idea would stay the same though, you'd just hook it to an analog input on the RC rather than one on the OI.
That's what Team 95 has done several times. We just had a pot on the robot, no detents, and ranges marked by the knob corresponding to each strategy. With the little knob we used, this allowed us to do up to 12 positions[1] without worrying about ambiguity, although after BAE we realized that we were only really using 4 of these positions, so we reprogrammed the switches.

I think next year I'll encourage the team to make something for the OI, however.


[1] Which meant that the switch went from 0 to 11. One team member asked "can't it just to to 10 instead." Of course, I had to answer "no, these go to 11." Only one person got the joke.
  #7   Spotlight this post!  
Unread 13-04-2006, 11:31
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by kaszeta
I think next year I'll encourage the team to make something for the OI, however.
Personally I like having the ability to switch the program at the last minute from the OI. We normally do a binary selector of some sort mounted on our controls.
Quote:
Originally Posted by kaszeta
One team member asked "can't it just to to 10 instead." Of course, I had to answer "no, these go to 11." Only one person got the joke.
How could they not get that?? More people need to see that movie!
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #8   Spotlight this post!  
Unread 14-04-2006, 22:03
ZZII 527's Avatar
ZZII 527 ZZII 527 is offline
"Scale Electric Vehicle"
AKA: Shane Colton
FRC #0097
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Cambridge, MA
Posts: 366
ZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond repute
Send a message via AIM to ZZII 527
Re: Potentiometer 5 or 6 detents

Here's a quick way to turn a DP6T switch into a 6-position binary encoder that only needs three pins:

Code:
POS   A   B   C
1     0   0   0
2     1   0   0
3     0   1   0
4     1   1   0
5     0   0   1
6     1   0   1
Attached Thumbnails
Click image for larger version

Name:	DP6T binary.jpg
Views:	22
Size:	9.5 KB
ID:	4292  
__________________
MIT Mechanical Engineering
>> College Mentor, Team 97: Cambridge Rindge and Latin School with The Edgerton Center, MIT Mechanical Engineering, Bluefin Robotics, and Draper Laboratory
>> Alumnus, Team 527: Plainedge HS
  #9   Spotlight this post!  
Unread 15-04-2006, 15:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,580
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Potentiometer 5 or 6 detents

I found the following 11 detent potentiometer that is cheap: http://jameco.com/webapp/wcs/stores/...uc tId=286512
  #10   Spotlight this post!  
Unread 12-04-2006, 07:29
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,792
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Potentiometer 5 or 6 detents

There are pots that exist that have detents built in but there are generally used for volume controls (are log taper, 10K) and have 10-12 detent positions. A better solution is to pick up a six position switch at Radio Shack.
http://www.radioshack.com/search/ind...ar y%20switch

This switch is easily modified to become a twelve position switch by bending one of the stopper tabs out of the way and cutting one of the contact springs. Wire 9.1K ohm resistors from each terminal to the one next to it to form a series string. When you are done, you have a stepped 100K pot. Wire as you would any pot to an analog input on the OI and then set your programmers to work. RS has some nice shiny knobs as well. If you would like to see one in action, stop by our pit in Atlanta.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #11   Spotlight this post!  
Unread 12-04-2006, 21:59
Travis Covington's Avatar Unsung FIRST Hero
Travis Covington Travis Covington is offline
Engineering Mentor
FRC #0254
Team Role: Engineer
 
Join Date: Oct 2001
Rookie Year: 1998
Location: San Jose, CA
Posts: 574
Travis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond reputeTravis Covington has a reputation beyond repute
Send a message via AIM to Travis Covington
Re: Potentiometer 5 or 6 detents

Are you saying to use the 9.1k resistors if I wanted to have 12 positions? Would I still use the 15k resistors if I were to only use the 6 positions?
__________________
-Travis Covington

2008-2017 - Engineering Mentor of Team 254
2001-2008 - Engineering Mentor of Team 968
1998-2001 - Mechanical Director/Driver/Member of Team 115
  #12   Spotlight this post!  
Unread 12-04-2006, 22:04
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Travis Covington
Are you saying to use the 9.1k resistors if I wanted to have 12 positions? Would I still use the 15k resistors if I were to only use the 6 positions?
You can use either. If you use the 6 position switch, 15k resistors will give your programmers a little more leeway to distinguish one "step" from another.
  #13   Spotlight this post!  
Unread 12-04-2006, 23:28
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: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Travis Covington
Are you saying to use the 9.1k resistors if I wanted to have 12 positions? Would I still use the 15k resistors if I were to only use the 6 positions?
For an OI-connected selector, you definitely want the maximum resistance to be just under 100k, and the minimum resistance should probably be at least 2k to keep from overloading the +5 source. That's why I suggested 15k for six positions. 9.1k will be fine for 11 steps, but I think it's a little too high for comfort if you want 12.

The total series value of an RC-connected "stepped potentiometer" is not that critical, but 100k is still a good target.
  #14   Spotlight this post!  
Unread 13-04-2006, 00:10
Gary Bonner Gary Bonner is offline
Registered User
FRC #3974
 
Join Date: Jan 2002
Rookie Year: 2000
Location: PA
Posts: 120
Gary Bonner has a spectacular aura aboutGary Bonner has a spectacular aura about
Re: Potentiometer 5 or 6 detents

Here is a photo of our switch from last year, which was connected to the RC. It’s a six position switch with five 22k resistors (100k / (# positions - 1) = 20k, 22k was the closest we could find at Radio Shack). The switch positions were then 0k, 22k, 44k, 66k, 88k, & 110k. This would give analog values of about 0, 205, 410, 615, 820, and 1024. In the autonomous code, we looked for a range of 205, centered on each of those values.

Code:
void User_Autonomous_Code(void)
{
		.
		.
		.

	switch (((Get_Analog_Value( rc_ana_in01 )+100)/205)+1)	//read autonomous switch
	{  
		case 1:	//switch position 1 
	
			while (autonomous_mode)   /* DO NOT CHANGE! */
			{
				if (statusflag.NEW_SPI_DATA)      /* 26.2ms loop area */
				{
					Getdata(&rxdata);   /* DO NOT DELETE, or you will be stuck here forever! */

					/* Add your own autonomous code here. */
					
					Putdata(&txdata);   /* DO NOT DELETE, or you will get no PWM outputs! */
				}
			}
			break; //end of case 1
	
		case 2:	//switch position 2
	
			.
			.
			.

		default:
		{
			// something's wrong - do nothing
		}
	}  //switch
}  //User_Autonomous_Code

Last edited by Gary Bonner : 13-04-2006 at 00:13.
  #15   Spotlight this post!  
Unread 11-04-2006, 23:55
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: Potentiometer 5 or 6 detents

Quote:
Originally Posted by Adam Shapiro
The idea here isn't as much the actual resistance as the concept...
If the switch is going on the OI, the actual resistance is rather important. The OI analog inputs want to see a variable resistance between ~2k and 100k to give the full range of values.

For a six-position rotary switch, I'd use six 15k resistors wired like this:
Code:
+5 <----/\/\/--*--/\/\/--*--/\/\/--*--/\/\/--*--/\/\/--*--/\/\/--*
                         ^
 OI                      |
analog input <-----------'
The * characters represent the six positions of the rotary switch, and the ^ is the common connection.

What you'll get from this is the equivalent of a joystick with six discrete resistance values: 15k, 30k, 45k, 60k, 75k, and 90k. You should use a dashboard program to determine what the actual numbers end up being, and choose appropriate ranges in the software to decide which of the six positions is chosen.
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
Best source for a potentiometer? railerobotics Electrical 20 28-11-2007 22:24
Confused about potentiometer values Kirk Technical Discussion 4 11-03-2006 16:29
Potentiometer help Unholy Programming 4 07-02-2006 17:48
Potentiometer Help! thoughtful Programming 4 18-02-2005 08:21
Potentiometer Joshua May Technical Discussion 8 22-05-2004 19:51


All times are GMT -5. The time now is 04:25.

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