Go to Post We are just here to give back to a program that gave us so much as students. - Alex Cormier [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 15-01-2005, 14:09
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
Knobs/Switches for the OI

Hi,

In the past years our OI was very simple with only joysticks, however, this year we are thinking of using knobs and simple switches for some components.

I know that in the past some teams have succesfully used knobs on the OI, i would like to know how to hook up a knob to the OI, also what will be its resolution and how to read its reading into the FRC controller. If anyone has done this in the past please let us know the model No. of the knob.
__________________
.: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
  #2   Spotlight this post!  
Unread 15-01-2005, 16:48
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: Knobs/Switches for the OI

Inside a joystick, there are 2 potentionmeters that measure x and y axis movement. You can refer to this as x/y pitch/yaw.. whatever...

This is the way the pins on a gameport are arranged (male)


Look at the chart on this site to see which pins relate to which digital/analog input.

Ok so this is what you do.

1. Find an old gameport joystick, or random db-15 cable with male connector.
2. Splice open the cable, and see which wire leads to which pin.

If you want to wire a knob that measures how far it is spun, you want to use whats called a potentiometer. These work like this...


If you connect the wire from the +V wire from the gameport cable to the center pole/lead, the other 2 leads will give you a variable signal depending on where the shaft is.

So if you want to use a pot...

3. Connect pot to cable. Refer to this pot as pN_x in code, where N equals the port number.

4. Wire up switches. You can put up to 4 for each port.

I hope this helped. Reply if you need more help.
  #3   Spotlight this post!  
Unread 15-01-2005, 17:57
Damian Manda's Avatar
Damian Manda Damian Manda is offline
The Damian
no team
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Fort Collins, CO
Posts: 154
Damian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud of
Send a message via AIM to Damian Manda
Re: Knobs/Switches for the OI

The pinouts for all the ports on the OI are listed in this document: http://www.ifirobotics.com/docs/oi-r...c0-1-12-05.pdf

Use this to find an open port that will not be used by your joysticks and then wire in some potentiometes as outlined in the above post. We have done this successfully in the past with many standard potentiometers that can be found at radio shack.
__________________
FRC Volunteer, FLL regional planning committee member for Colorado
Former Programmer, Web Designer, Communications Director of Alpine Robotics Team 159.
Add your team to the FIRST Teams Google Map
  #4   Spotlight this post!  
Unread 16-01-2005, 18:20
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
Re: Knobs/Switches for the OI

Thankyou for the informaiton, Does anyone has a sample code to read the potentiometer in the RC.
__________________
.: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
  #5   Spotlight this post!  
Unread 16-02-2005, 16:41
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
Re: Knobs/Switches for the OI

Hey,
I wired a 100K audio Potentiometer to OI. With the Middle and Outside terminals of the POT connected to the OI. I am getting the values from 231(min) - 254(max). Can any tell my what i am doing wrong or how i can increase this range. Thanks in advance.
__________________
.: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
  #6   Spotlight this post!  
Unread 19-04-2005, 16:57
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,369
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Knobs/Switches for the OI

Quote:
Originally Posted by thoughtful
Hey,
I wired a 100K audio Potentiometer to OI. With the Middle and Outside terminals of the POT connected to the OI. I am getting the values from 231(min) - 254(max). Can any tell my what i am doing wrong or how i can increase this range. Thanks in advance.

Yo Thoughtful,
My guess is that you connected one end of the Pot. to +5vdc and the wiper to the sig. input, but didn't connect the remaining lead on the pot to gnd.
If that is the case, then your pot is just acting as a pull up resister, an adjustable one at that. That is why you are only seeing numbers in the very high end of the max range. Once you connect the other end of the pot to gnd, you will , in essence, be spreading the +5v across the entire length of the pot. Now as you move the slider/wiper along the length of the pot, you will see values from ~255 to ~ 0. Actual numbers will slightly different.

The other cause of what you are seeing is that you have an "open" in the wiring from gnd to the pot.
  #7   Spotlight this post!  
Unread 09-03-2005, 14:22
chilidawg87 chilidawg87 is offline
Registered User
#1541 (Midlo CAN ics)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Midlothian VA
Posts: 2
chilidawg87 is an unknown quantity at this point
Re: Knobs/Switches for the OI

hey tom thanks for the pictures they were a big help but i still dont completely understand...so say i wanted to wire up a pot to p3_x i tried it but i didnt know what to connect each lead on the pot to. i felt somewhat confused when i found there was 3 leads on the pot. this is what i did:



(the underscore line signifies a connection)




(pin 4 ground)_______________ Outside Lead on POT
(Pin 3 x)____________________ Middle Lead on POT


when i did this ran it through our dashboard and it wasn changing values

lemme know what to do, thanks
-Ben
__________________
  #8   Spotlight this post!  
Unread 09-03-2005, 14:38
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Re: Knobs/Switches for the OI

Look on page 5 of the OI Reference Guide (which Damian previously posted). Pots need to be wired to the +5V pin (which is pin 1) rather than ground. The other end goes to the analog input. It doesn't really matter which way you connect it as long as you have the "wiper" pin (typically the middle) and one of the edge pins. Also, you can use an ohmmeter to test the pot before you wire it.

Audio pots are generally bad for OI use, because they are made to be used as a volume control and therefore are not linear. Each degree of rotation of the pot does not result in the same change in resistance.
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


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

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