Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch


So I am working on a custom OI box, and sadly have about zilch experience.

I need to hook up a (1) potentiometer, (2) on-off switches, (1) 8-way switch to one of the joystick ports.

I have reviewed the OI reference guide:

But the fact is I am still unsure how to hook these up.

So the switches are digital, the potentiometer is analog. And that is about where I loose what to do.


The Blue Alliance has many great tutorials on line and one of them is a how to on custom controls.

That was quite helpful, thanks!

I understand just about everything concerning how to wire it, except for this; we need to hook up an 8 way switch, and there is, quite obviously, not enough digital switch inputs.

Some one told me that you can encode 16 positions into 4 digital inputs (binary) using routines or something like that, but I have no idea what they are speaking about.

Can anyone help me out in that regard?


Try that topic specifically the post by Alan. . . 16 positions is a lot . . That would be a lot of resisters. . .


Connect your switch via resistors to an analog input to get 16 distinct levels on that input.

This topic has been discussed many times in the past on these fori. If you do a search on the words switch, resistors and analog you will find a number of threads on this topic.


If you wanted really simple wiring, Joystick ports 2 & 4 each give you access to 8 digital inputs and 4 analog inputs. Using either one of those ports, you could use 7 of the digital inputs for the 8-position switch (one position would have nothing connected, and the other 7 positions would activate a different digital input), one digital for one of the on/off switches, one analog for the other on/off switch, and another analog for the potentiometer.

It would be really easy to wire with one of my wiring boards (See the Team 116 OI Adapter board thread and Web Page), or just wire it directly to a 15-pin cable.

If you want to conserve digital inputs, you could use an 8-position octal (3-bit binary) switch, and only use 3 digital inputs for the 8 position switch. You could also get eight 10.K Ohm resistors, and then use one analog input for the 8 position switch, where each position would add another 10.K ohms to the series resistance value, and the programmers would convert the 8 resulting analog ranges into 8 unique settings.

Ok, so I see this:

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

Looks perfectly feasible. So just to make sure I understand: I just keep increasing the resistance as I go from switch to switch? How high is the max?


  • Erik

Since you just need 8 distinct positions on one switch, you can put a 10.K resistor between each adjoining pin, then each position change will add (or subtract) 10.K ohms to (from) the value, and the value can essentially range from near 0 to 100.K ohms. The diagram you showed was for discrete switches, where any give switch could be on or off.

Kind of off topic, but where did you find your 8-way switch? One of these could be useful for us, or even a 5 way switch. Thanks in advance.

We got ours from a local electronics supply store called “Vetco”.

Radio Shack sells a 6 position rotary switch for $3 in most stores and online: Model # 275-1386. If you want higher quality switches or a wider selection, Digikey, Jameco, and many other places sell them online.

Brad, look maybe at guitar part stores like SamAsh or Guitar Center, but Stratocasters (Fender), have 5 way switches. Look at the electronics at StewMac for a whole bunch of cool electronics, like a push-pull potentiometer and stuff like that (i have two rigged to the LP im building for coil tapping). anyways, brad, here is the link to the site, http://www.stewmac.com/, and if you want the switches section directly, http://www.stewmac.com/shop/Electronics,_pickups/Components:_Switches_and_knobs.html

hope this helps.

anyways, yeah, resistors should do the job as mentioned. Sorry to shift the subject a little.