Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Using Switches on the Operator Interface (http://www.chiefdelphi.com/forums/showthread.php?t=42430)

CronosPrime1 23-01-2006 06:52

Re: Using Switches on the Operator Interface
 
Well, I plan on having a driver and a switch-pushing person. But the system is very intuitive I think

Switch 1 - Conveyor belt on/off
Switch 2 - Conveyor belt forward/backward. If Switch 1 is open, Switch 2 does nothing and conveyor belt does not move.
Switch 3 and 4 - create a 0-3 number for setting autonomous mode. Set before match.

artdutra04 23-01-2006 11:23

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by CronosPrime1
Well, I plan on having a driver and a switch-pushing person. But the system is very intuitive I think

Switch 1 - Conveyor belt on/off
Switch 2 - Conveyor belt forward/backward. If Switch 1 is open, Switch 2 does nothing and conveyor belt does not move.
Switch 3 and 4 - create a 0-3 number for setting autonomous mode. Set before match.

Why not incorperate Switch 1 and 2 into a single switch? You can use a SPDT (or would it be SPTP?) toggle switch with a center neutral position. That way, when you push the switch up, it goes forward. When you put it in the down position, the conveyor goes in reverse. And when you put it back to the center position, it goes off. This would simplify things for the drivers. :)

Here are some pictures of the switches I'm refering to:


CronosPrime1 24-01-2006 00:35

Re: Using Switches on the Operator Interface
 
If I use a three way switch, I even have one right now, how would I wire it?

artdutra04 24-01-2006 01:29

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by CronosPrime1
If I use a three way switch, I even have one right now, how would I wire it?

You should be able to do this by grounding the center pin, and then connecting each of the two sides to a different wire on the joysticks - such as p1_sw_aux1 and p1_sw_aux2. If you get leave the switch in the center, there will be no signal. If you move the toggle switch in one direction, you get signal back in either the aux1 or aux2. If you move the toggle switch in the other direction, you will get back a signal from the other aux port.

Example:
Code:

      /-\
/-------------\
|  Toggle    |
|  Switch    |
+-------------+
  |  |  |
  1  2  3

Wire #1 contact to p1_sw_aux1, wire #2 to ground, and wire #3 to p1_sw_aux2.

CronosPrime1 24-01-2006 06:48

Re: Using Switches on the Operator Interface
 
Awesome. Thanks, I'll try that.

CronosPrime1 30-01-2006 17:57

Re: Using Switches on the Operator Interface
 
Oh, and if I have multiple switches that I want to wire to the same port, how do I do that? I know it is theoretically possible to wire up to eight switches each to ports 3 and 4, but how would I do that? Each port only has 2 or 3 ground pins. Can I wire the ground to several switches to the same pin? If so, is this advisable?

Al Skierkiewicz 31-01-2006 07:07

Re: Using Switches on the Operator Interface
 
Cronos,
You can have a common groung that attaches (daisey chain) to each switch and returns to only one pin in the connector for that port. There is very little current in this circuitry.
And now for something completely different...If you have the need to select just one of a multiple of chioces, you can use a rotary switch to selectively short out resistors in a string. Wire the string as you would a pot and return it to an analog input. We have used this method in the past for a autonomous mode selector that could be set for one of eleven different auto modes.

P1h3r1e3d13 02-02-2006 23:41

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by Al Skierkiewicz
If you have the need to select just one of a multiple of chioces, you can use a rotary switch to selectively short out resistors in a string. Wire the string as you would a pot and return it to an analog input.

Good idea; that sounds more user-friendly than my plan of discrete-ifying a pot in code (ie: for analog value between 0 and x, var=0; between x and y, var=1, etc.) Is a rotary switch like that available to buy with resistors pre-wired, or am I going to have to solder this up myself? If I do, what is an acceptable range of resistances for an analog input?

EricH 02-02-2006 23:57

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by Billfred
The general thing you'll see on most OI panels is that they're simple.

Simple--and well labeled. You don't want to be searching for the button that stops the belt and hit the one that shoots. I was helping sort out old electronics a couple nights ago and found our 1999 switch box. How did I know that's how old it was? The labels were still intact and legible on all(or almost all of) the (four) switches. Knowing what the robot did, I put a date on it. Meanwhile, our '02 box has one knob that few (except maybe some of our mentors) know what the function is. Split color switches might be good too.

Al Skierkiewicz 03-02-2006 07:32

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by P1h3r1e3d13
Good idea; that sounds more user-friendly than my plan of discrete-ifying a pot in code (ie: for analog value between 0 and x, var=0; between x and y, var=1, etc.) Is a rotary switch like that available to buy with resistors pre-wired, or am I going to have to solder this up myself? If I do, what is an acceptable range of resistances for an analog input?

You are going to have to wire this up yourself. It is best for the entire string to not exceed 100K. What you are looking to do is simulate a pot. Radio Shack has a six position switch, and some nice looking knobs. Use 18K resistors and you are all set to go. Each resistor would be wired between each of the terminals of the switch. Tie one end of the string to +5 volts from a joystick port. Then tie the wiper of the switch (the internal terminal) to an analog input. When you measure the switch (before you install it) it should read about 5 x 18K when it is all the way at one end, and step by 18k as you advance the shaft one click. Effectively, you now have a six position joystick. Write the code to search for a value and you are all set.

Denz 04-02-2006 01:34

Re: Using Switches on the Operator Interface
 
How would I go about wiring a light to the OI so that it turns on when a certain condition is met?

CronosPrime1 04-02-2006 15:41

Re: Using Switches on the Operator Interface
 
Well, that I can answer. The operator interface receives feedback from the robot controller, and this input can be used to determine which lights on the operator interface to light up. If you look on the operator interface, the entire third column of lights - the robot feedback section - can light up upon command from your operator interface. To do this, you must change some variables when whatever condition you want is met in the code. For the name of the variables, look at the default code, the IFI programming manual, or the OI reference guide. I don't remember the names right now.
To wire something like a light bulb for external display, I don't really think you can. The operator interface only accepts input through all of its ports, except for the radio output. There is one good alternative to something like a light bulb, though. You can use the dashboard port to connect the OI to your computer, and you can light up something on your computer screen.

Tureyhall 04-02-2006 16:13

Re: Using Switches on the Operator Interface
 
Quote:

Originally Posted by CronosPrime1
To wire something like a light bulb for external display, I don't really think you can. The operator interface only accepts input through all of its ports, except for the radio output. There is one good alternative to something like a light bulb, though. You can use the dashboard port to connect the OI to your computer, and you can light up something on your computer screen.


sorry, you're wrong. pins 5, 8, 9, and 15 on ports 1 & 3 are LED outputs. They are the same as the PWM and Relay lights on the OI. all this can be found in the oi ref guide.

CronosPrime1 04-02-2006 19:36

Re: Using Switches on the Operator Interface
 
Well, yes, I meant specifically an electronic part that isn't usually there, such as a lightbulb. You can wire external LEDs. I don't know whether you could use the LED outputs to wire your own lights. Tell me if you think it's possible, it would be cool to do that.

Tureyhall 04-02-2006 19:54

Re: Using Switches on the Operator Interface
 
nope, not possible. not enough power comes out of the joystick port for anything but an LED. we had the same idea a few days ago, and it didn't work.


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

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