Go to Post I dunno, with those Chucks, I'd be inclined to say he out-dresses the better part of DC... - Nuttyman54 [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 07-02-2008, 15:16
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
More Buttons

Our current OI includes 3 joysticks. We have a need to use Port 4 to wire in some toggles switches that are not on the current joysticks. I can obviously figure out how to wire up to 4 switches with the base port. Our design requires almost double that. What is the best way to wire a big switch panel to a joystick port.

The only thought I came up with was running each switch through a different value resistor and using an axis. My problem I run in to is sensing multiple switches at a time.

Any help would be greatly appreciated.



Kyle
  #2   Spotlight this post!  
Unread 07-02-2008, 15:59
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,112
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: More Buttons

If you don't need more than eight buttons, and you need to be able to detect each of them independently from the others, recall that you have four analog ("axis") inputs in addition to the four switch inputs. Your idea for using resistors is fine; you just need to connect each button/resistor to its own joystick connector pin.

There is also the option of using the redundant switch connections available on two of the joystick ports. You can "steal" switch inputs from one joystick and use them via a different port. See the OI documentation for details on which ports support this.


By the way, congratulations on a very good question! You've stated the problem well, and your comments show that you've thought about the solution and you understand the issues.
  #3   Spotlight this post!  
Unread 07-02-2008, 16:13
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: More Buttons

Eight digital inputs are available on port 4.
Four of them are also on port 1, but you can
disable them on port 1 with the disable switch.
If you need even more digital inputs, use port
2 and port 4, and then attach two joysticks to
port 1 or port 2 using a Y cable.

Eugene
  #4   Spotlight this post!  
Unread 07-02-2008, 22:18
martschr martschr is offline
Registered User
FRC #2461 (Metal Skins)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Oklahoma City
Posts: 17
martschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of light
Re: More Buttons

im working on the operator interface and i was wondering about how many LEDs can be ran off of each imput or if there are any rules about Leds that im not aware of
  #5   Spotlight this post!  
Unread 07-02-2008, 22:33
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: More Buttons

Quote:
Originally Posted by martschr View Post
im working on the operator interface and i was wondering about how many LEDs can be ran off of each imput or if there are any rules about Leds that im not aware of
just dont draw too much current
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
  #6   Spotlight this post!  
Unread 07-02-2008, 22:43
martschr martschr is offline
Registered User
FRC #2461 (Metal Skins)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Oklahoma City
Posts: 17
martschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of lightmartschr is a glorious beacon of light
Re: More Buttons

the only things ive been able to find is what you guys said so i guess i just have to see how many i can put on without pulling to much current
  #7   Spotlight this post!  
Unread 07-02-2008, 22:22
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: More Buttons

One button per axis should work. I was over thinking the problem.

Just out of curiosity, is there an easy way to assign four buttons in place of an analog axis and have them accessable via four digital values in the top four bits of the analog channel like the USB-CHICKLET does?



Kyle
  #8   Spotlight this post!  
Unread 07-02-2008, 22:26
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: More Buttons

I don't know if there is any rule from first but the OI user guide specifically says not to power LEDs off of the joystick ports because current and voltage draw will throw off joystick readings.


"Do not use +5V Aux for lamps or LEDs, excess current will affect joystick readings.
The current limit of the +5V Aux from all 4 ports is about 100mA. The Aux Fault Led will start
illumination when the current draw from the +5V Aux Outputs total about 120 mA and the +5V
Aux voltage will have dropped to about 4.5 volts. Worse case, short condition: after about 30
seconds, the voltage will be at about 300 mV with a current of about 250 mA."


It actually says that once for each joystick port.



kyle
  #9   Spotlight this post!  
Unread 08-02-2008, 00:04
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,112
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: More Buttons

Quote:
Originally Posted by kylelanman View Post
ust out of curiosity, is there an easy way to assign four buttons in place of an analog axis and have them accessable via four digital values in the top four bits of the analog channel like the USB-CHICKLET does?
Yes, there is. With the proper choice of five resistors in series between the +5 pin (1) and the analog input, and switches connected across four of them, you should be able to read the switch values directly from the analog value's bits.

In theory, the resistor values should be 1/2, 1/4, 1/8, 1/16, and 1/32 of 100k. In practice, some tweaking of values might be necessary. The switches go across the large four resistors. The small fifth one serves to offset the final value so small variations in resistance do not cause the high bits to change.
  #10   Spotlight this post!  
Unread 14-02-2008, 23:23
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: More Buttons

Quote:
Originally Posted by Alan Anderson View Post
In theory, the resistor values should be 1/2, 1/4, 1/8, 1/16, and 1/32 of 100k. In practice, some tweaking of values might be necessary. The switches go across the large four resistors. The small fifth one serves to offset the final value so small variations in resistance do not cause the high bits to change.
Call me a noob but what would those values be? Does a 1/2 (50k) resistor exist or is the closest 56k or something else. I was looking through our resistors and didn't find much. We may just have a limited assortment. I don't know.
  #11   Spotlight this post!  
Unread 08-02-2008, 01:35
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: More Buttons

Quote:
Originally Posted by kylelanman View Post
Just out of curiosity, is there an easy way to assign four buttons in place of an analog axis and have them accessable via four digital values in the top four bits of the analog channel like the USB-CHICKLET does?
My team uses 6 position rotary switches to set our autonomous modes using 2 analog axis. Basically, you solder resistors across the pins and turn the switches to connect the signal wire to different pins. I can get you a part number if you are interested.
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
  #12   Spotlight this post!  
Unread 08-02-2008, 01:47
Mr. Freeman Mr. Freeman is offline
Put better title here.
AKA: Kellan
no team (CSM Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Colorado
Posts: 198
Mr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to behold
Re: More Buttons

Don't they sell pots with detents in them? If they do, I think they would be perfect. Though I couldn't tell you who makes them as I've never used them.
__________________
"Time is an illusion, lunchtime doubly so."
-Douglas Adams
“Why is it that I can walk into Wal-Mart and buy boxes of bullets and black powder, but I can’t buy potassium perchlorate to do science because it can also be used to make explosives?”
-Theodore Gray
  #13   Spotlight this post!  
Unread 08-02-2008, 17:58
Pavan Dave's Avatar
Pavan Dave Pavan Dave is offline
Busy in College
AKA: I am John Gault.
FRC #1745 (P-51 Mustangs) FRC #118 (Robonauts)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Richardson, Texas
Posts: 1,387
Pavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond repute
Send a message via AIM to Pavan Dave
Re: More Buttons

Quote:
Originally Posted by eugenebrooks View Post
Eight digital inputs are available on port 4.
Four of them are also on port 1, but you can
disable them on port 1 with the disable switch.
If you need even more digital inputs, use port
2 and port 4, and then attach two joysticks to
port 1 or port 2 using a Y cable.

Eugene
To elaborate, on the OI you have 4 ports. Two of those ports (ports one and three) you have room for four analog signals, four digital signals, and four output signals (used for LEDs) as well as the power and ground. On the other two ports (ports two and four) you have room for four analog signals and eight digital signals as well as the power and ground.

That said you can create a Y cable so that on one joystick your x axis is p3_x and your y axis is p3_y and your trigger and top are p3_sw_trig and p3_sw_top respectively. At the same time, on the same port, the x axis for your second joystick would be p3_wheel and your y axis would be p3_aux and your trigger and top would be p3_sw_aux1 and p3_sw_aux2 respectively.




Pavan.
__________________
Times change. People change. Teams change.
---
2008-Present: FRC1745, P51-Mustangs - Mentor
2005-2008: FRC118, Robonauts - Alumni
National Director of Philanthropy - Delta Epsilon Psi Fraternity, Inc.
1745 - 118 - ΔΕΨ

Last edited by Pavan Dave : 08-02-2008 at 18:04.
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
Has Being In FIRST Made You More Brave - More Confident? JaneYoung General Forum 25 08-05-2007 10:11
more buttons joesmomh00haha Programming 9 17-02-2007 10:38
Buttons, Buttons and more Buttons (2006) Freddy Schurr Team Organization 11 14-12-2005 21:36
UI Buttons stephenthe1 Programming 4 21-03-2005 12:58
Buttons Rob Ribaudo Chit-Chat 11 06-04-2002 17:18


All times are GMT -5. The time now is 20:38.

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