Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch (http://www.chiefdelphi.com/forums/showthread.php?t=53341)

Ethulin 03-02-2007 01:51

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

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:
http://www.ifirobotics.com/docs/oi-r...de-1-30-07.pdf

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.

Help?

AJ R 03-02-2007 11:29

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
The Blue Alliance has many great tutorials on line and one of them is a how to on custom controls.

Ethulin 03-02-2007 14:01

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

Originally Posted by AJ R (Post 570838)
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?

Gamer930 03-02-2007 14:15

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
http://www.chiefdelphi.com/forums/sh...oto=nextnewest

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

Mike Betts 03-02-2007 14:18

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

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.

Mike

ECarlson 03-02-2007 15:04

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
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.

Ethulin 03-02-2007 17:27

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

Originally Posted by Gamer930 (Post 570931)
http://www.chiefdelphi.com/forums/sh...oto=nextnewest

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

Ok, so I see this:
Code:

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?

Thanks,
- Erik

ECarlson 03-02-2007 20:22

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

Originally Posted by Ethulin (Post 571024)
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?

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.

Brad Voracek 04-02-2007 15:16

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
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.

Ethulin 04-02-2007 16:59

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

Originally Posted by Brad Voracek (Post 571598)
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".

ECarlson 04-02-2007 17:13

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
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.

EricRobodox 04-02-2007 21:17

Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
 
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/Electron...and_knobs.html

hope this helps.

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


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

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