Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Potentiometer 5 or 6 detents (http://www.chiefdelphi.com/forums/showthread.php?t=46489)

kiettyyyy 11-04-2006 19:37

Potentiometer 5 or 6 detents
 
Hey everyone!

I'm currently looking for a potentiometer(that you can wire onto the robot controller) that has at least 5 or 6 detents that can click into those positions.

Does any body have any recommendations to where we can purchase these potentiometers? Let us know :]

Thanks!

Adam Shapiro 11-04-2006 19:42

Re: Potentiometer 5 or 6 detents
 
What are you trying to use it for? You might want to be careful if you're using a pot for anything relatively large, it may be hard to calibrate and to prevent from breaking. We attempted to put a pot on a rotation table to limit it's rotation to 180 degrees at one point, but a faulty autonomous program would have none of that! You may want to consider using rotary encoders or some other means of measurement.

KenWittlief 11-04-2006 19:57

Re: Potentiometer 5 or 6 detents
 
I dont think Ive ever seen a stand-alone pot that had position detents. I have seen pots with knob designs that used detents - but I think they were custom designed for the application

ie, use an off the shelf pot, but make your own knob or level with click-stops where you want them to be.

Travis Covington 11-04-2006 19:58

Re: Potentiometer 5 or 6 detents
 
We want to use it to select autonomous modes. Anything under 12 detents will work. We are just having trouble actually finding any. I know some of you have used these... a part number would be great! Thanks!

Adam Shapiro 11-04-2006 20:03

Re: Potentiometer 5 or 6 detents
 
Quote:

Originally Posted by Travis Covington
We want to use it to select autonomous modes. Anything under 12 detents will work. We are just having trouble actually finding any. I know some of you have used these... a part number would be great! Thanks!

It seems like it may be rather hard to find such a pot. You may want to just use a standard pot, however, and program the robot to respond to ranges of analog input rather than a specific value. So that you could turn it approximately to the correct program, rather than the specific value.

If you don't have too many autonomous programs you could use a series of switches as a binary selector. You'd only need 5 bits (5 inputs out of the 4 ports) to cover the 12 modes you seem to need and more.

Travis Covington 11-04-2006 20:17

Re: Potentiometer 5 or 6 detents
 
We found one on digikey, but it doesnt have a shaft (to accept a knob) and is rather small at only 16mm wide.

Thanks for the help, we will keep looking. I am sure they are out there.

Kris Verdeyen 11-04-2006 20:33

Re: Potentiometer 5 or 6 detents
 
If you look around page 1433 of the digikey catalog (which I totally knew off the top of my head), you'll find a type of switch that might be better for your application. It's called a rotary switch, and they come in all kinds of configurations, including SP6T. You can solder a bunch of resistors around the terminals, and it will behave exactly how you described, and can look like a pot to the OI or RC.

ZZII 527 11-04-2006 20:37

Re: Potentiometer 5 or 6 detents
 
Edit: Kris beat me to it by a few minutes. And with impressive knowledge of the Digikey catalog! :)

One way to get approximately what you want is to wire up a SP6T switch as follows:

+5V connected to a resistor R, then to the common lead.
Signal wire should be joined to common lead.

Lead 1: straight to GND
Lead 2: thru resistor value R/4 to GND
Lead 3: thru resistor value 2R/3 to GND
Lead 4: thru resistor value 3R/2 to GND
Lead 5: thru resistor value 4R to GND
Lead 6: thru BIG resistor to GND

This sets up a 6-setting voltage divider which will give the following voltages across the common resistors:

Position 1: ~0V
Position 2: 1V
Position 3: 2V
Position 4: 3V
Position 5: 4V
Position 6: 5V

You can set up ranges in the program to check for this. These resistor ratios can all be approximate, but that gives you the widest separation possible for the analog input, reducing the risk of mistaking one mode from another.

Of course, binary inputs are simpler if you have enough pins.

Joe Ross 11-04-2006 20:44

Re: Potentiometer 5 or 6 detents
 
See Kris Verdeyen and eugenebrooks posts in this thread for a solution on the OI that doesn't require any additional hardware. http://www.chiefdelphi.com/forums/sh...ad.php?t=44662

Alan Anderson 11-04-2006 20:49

Re: Potentiometer 5 or 6 detents
 
Yeah, what Kris said. The TechnoKats used a many-position rotary switch with resistors between each contact as an automode selector on the KatsKlaw OI in 2004.

KenWittlief 11-04-2006 22:21

Re: Potentiometer 5 or 6 detents
 
forgive my ignorance of this years OI, is the red LED display still able to display user selected numbers?

set your code to read a joystick or pushbutton input - everytime you push the button increment a counter, and display it on the OI LED numeric output - that is your autom mode number

you could have up to 256 different auton modes that way.

Travis Covington 11-04-2006 22:43

Re: Potentiometer 5 or 6 detents
 
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.

Adam Shapiro 11-04-2006 22:53

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.

Travis Covington 11-04-2006 23:10

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. ;)

Adam Shapiro 11-04-2006 23:12

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.

Travis Covington 11-04-2006 23:49

Re: Potentiometer 5 or 6 detents
 
My plan was to mount it on the RC.

Adam Shapiro 11-04-2006 23:52

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.

Alan Anderson 11-04-2006 23:55

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.

Adam Shapiro 12-04-2006 00:01

Re: Potentiometer 5 or 6 detents
 
Quote:

Originally Posted by Alan Anderson
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.

I actually never knew that, though in retrospect I suppose it makes sense. Thanks for the clarification!

Tom Bottiglieri 12-04-2006 00:14

Re: Potentiometer 5 or 6 detents
 
I see a business opportunity for Andy Mark/IFI! Latching potentiometers/ prewired variable resistance rotary switches!

Travis,

I thoroughly googled for a pre-made product that would suit your needs but came up with nothing. The best solution in this thread is Alan Anderson's, which is exactly the method I was going to post before I saw his.

I'd check to see if any of the students on your team are taking/have taken electronics classes at school. If so, you can just buy a rotary switch and some 15 Ohm resistors (if you need more inputs, decrease the Ohm rating of the resistor. What you want = 100 / Number Of Switch Settings + 1. Get all of this stuff at RadioShack) and give it to the student to wire up. Anyone with basic knowledge in wiring should be able to tackle this circuit.

Joe Ross 12-04-2006 00:19

Re: Potentiometer 5 or 6 detents
 
Quote:

Originally Posted by Tom Bottiglieri
I thoroughly googled for a pre-made product that would suit your needs but came up with nothing. The best solution in this thread is Alan Anderson's, which is exactly the method I was going to post before I saw his.

I found the Bourns 3680 series. However, it is very expensive. http://www.mouser.com/catalog/625/505.pdf

sanddrag 12-04-2006 00:32

Re: Potentiometer 5 or 6 detents
 
In past years we had like three two position switches and we would have a setting like (up down up) or (off off on) for the switches before each match depending on what autonomous mode we were going to run. But such things could get confusing in the rush of competition, and I see your desire for the rotary type control.

Travis Covington 12-04-2006 00:32

Re: Potentiometer 5 or 6 detents
 
The potentiometer I found on digikey seems like it will work, but as Joe told me, is an SMD style and would require some delicate soldering. I think I can handle the soldering, but is there any reason not to use this pot?

http://dkc3.digikey.com/PDF/T061/SectF.pdf

Page 74, 16mm square rotary potentiometer with detents.

Also, I think I can handle the rotary switch and 15k resistor method as well. I think mounting the rotary switch and a knob will be easier than the pot with detents and no shaft with a make shift shaft and knob.

Edit: How would that diagram differ if I put the rotary switch/resistor setup on the RC?

Alan Anderson 12-04-2006 06:51

Re: Potentiometer 5 or 6 detents
 
Quote:

Originally Posted by Travis Covington
...How would that diagram differ if I put the rotary switch/resistor setup on the RC?

Just add another resistor to ground on the far right, just like the one to +5 on the left. (On the RC, you could actually make the +5 and ground connections directly without resistors, but I'm used to being able to detect short circuits as "impossible" input values.)

Al Skierkiewicz 12-04-2006 07:29

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.

Travis Covington 12-04-2006 21:59

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?

Tom Bottiglieri 12-04-2006 22:04

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.

Alan Anderson 12-04-2006 23:28

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.

Gary Bonner 13-04-2006 00:10

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


kaszeta 13-04-2006 10:46

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.

Adam Shapiro 13-04-2006 11:31

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!

ZZII 527 14-04-2006 22:03

Re: Potentiometer 5 or 6 detents
 
1 Attachment(s)
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


Joe Ross 15-04-2006 15:55

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


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

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