PDA

View Full Version : OI Port Y-Cable and switch hook up!?


cdennisxlx2
02-13-2006, 08:21 PM
Ok i must not be seing something right, i need to hook more then 2 switches to ports 3 and 4, so far thats all i can figure out how to do. Would i use the Y-cable (that is described in the oi ref guide on IFI) to make it possable to hook 4 switches to that port? or what? Help Please!!! thanks!

DanDon
02-13-2006, 08:50 PM
Ok i must not be seing something right, i need to hook more then 2 switches to ports 3 and 4, so far thats all i can figure out how to do. Would i use the Y-cable (that is described in the oi ref guide on IFI) to make it possable to hook 4 switches to that port? or what? Help Please!!! thanks!

All the joystick ports can have up to 4 two-position switches per port hooked up (trig, top, aux1, and aux2). Let's say you're hooked up to port 3:

p3_sw_trig;//switch 1
p3_sw_top;//switch 2
p3_sw_aux1;//switch 3
p3_sw_aux2;//switch 4

The joystick port pinouts can be found here (http://www.ifirobotics.com/docs/oi-ref-guide-11-21-05.pdf). (Pages 7-10)

cdennisxlx2
02-13-2006, 08:59 PM
well the switches we have are on-off-on switches and we need 3 of them then an on-off-on momentary then just 2 on-off switches. And on the pinout sheet it shows that p3-aux 1 is relay fwd and p3-aux 2 is relay rev, so how can i connect all my switches to the ports when all there is is just 2 relay fwd and 2 relay rev to each port?

DanDon
02-13-2006, 09:09 PM
well the switches we have are on-off-on switches and we need 3 of them then an on-off-on momentary then just 2 on-off switches. And on the pinout sheet it shows that p3-aux 1 is relay fwd and p3-aux 2 is relay rev, so how can i connect all my switches to the ports when all there is is just 2 relay fwd and 2 relay rev to each port?

Ok, just to make sure that I understand. You need to hook up a total of 5 switches? 3 center-off and 2 two-position?

You can get 2 of the center-off switches hooked up to port 3, the other on off hooked up to port 4, and the two on-off switches onto the two pins left on port 4.

Port 3

on-off-on
| | |
pin pin pin
2 4 7
trig top

on-off-on
| | |
pin pin pin
10 12 14
aux1 aux2

Port 4

on-off-on
| | |
pin pin pin
2 4 7
trig top

on-off
| |
pin pin
10 12
aux1

on-off
| |
pin pin
14 12
aux2

Hope this helps,

cdennisxlx2
02-13-2006, 09:14 PM
well thats not exactly it, i have 4 on-off-on switches (one of them is a momentary switch) and 2 on-off switches. at the moment i have the 4 on-off-on switches hooked up as top-trig and aux 1&2 on p3 and p4, i have no idea where to put the 2 on-off switches

DanDon
02-13-2006, 09:15 PM
well thats not exactly it, i have 4 on-off-on switches (one of them is a momentary switch) and 2 on-off switches. at the moment i have the 4 on-off-on switches hooked up as top-trig and aux 1&2 on p3 and p4, i have no idea where to put the 2 on-off switches

I guess you're using 2-joystick (tank style) drive? (which puts ports 1 and 2 out of the question)

cdennisxlx2
02-13-2006, 09:20 PM
yeah

DanDon
02-13-2006, 09:26 PM
What about using something like a potentiometer and hooking it up to an analog input on one of the joystick ports? Maybe devide the pot's range into a three steps, one step for on in one direction, one for off, and one for on in the other direction?

Or if you're not using all the buttons on your drive joysticks, then use pins 5, 8, 9, and 15 on port 4 which correspong to port 1 trig, top, aux1, and aux2.

cdennisxlx2
02-13-2006, 09:30 PM
Just open the sticks and cut the wires to 2 buttons and splice it with my switches and just use the joystick as a host for it?

DanDon
02-13-2006, 09:33 PM
Just open the sticks and cut the wires to 2 buttons and splice it with my switches and just use the joystick as a host for it?

Not really. Actually, according to the IFI specs, if you hook up a switch to port 4:

pin 5 - same as OI Port 1 Joystick Trigger Switch - p1_sw_trig
pin 8 - same as OI Port 1 Joystick Thumb Switch - p1_sw_top
pin 9 - same as OI Port 1 Aux Switch1 - p1_sw_aux1
pin 15 - same as OI Port 1 Aux Switch2 - p1_sw_aux2

So the switches that are hooked up to port 4 would acutally be read using the port 1 variables.

Alan Anderson
02-13-2006, 09:35 PM
...i have no idea where to put the 2 on-off switches
You've used up all four of the switch inputs on both ports. The only thing left is to use analog inputs!

Connect the switches and some resistors in the following magical arrangement on port 3:

pin 1 ----+---- switch 1 ----+---- /\/\/\/ ----+---- /\/\/\/ ---- pin 11
| | 20 k | 33 k
+---- /\/\/\/ -----+---- switch 2 ---|
10 k

Then read the value of p3_aux to see which combination of switches yields what number. That's very much like the way the white joystick's "hat" button works.

cdennisxlx2
02-13-2006, 09:41 PM
I get it now, all i have to do is just wire p4 as i did to it b4 but with those ports as the positive connections on my switches and just solder the gnd to pin 4 or 12