|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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? |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
||||
|
||||
|
Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
Quote:
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? |
|
#4
|
|||||
|
|||||
|
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. . . |
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||||
|
|||||
|
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. Last edited by ECarlson : 03-02-2007 at 16:19. |
|
#7
|
||||
|
||||
|
Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
Quote:
Code:
pin 1 ----+---- switch 1 ----+---- /\/\/\/ ----+---- /\/\/\/ ---- pin 11
| | 20 k | 33 k
+---- /\/\/\/ -----+---- switch 2 ---|
10 k
Thanks, - Erik |
|
#8
|
|||||
|
|||||
|
Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
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.
|
|
#9
|
||||
|
||||
|
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.
|
|
#10
|
||||
|
||||
|
Re: Hooking up a (1) potentiometer, (2) on-off switches, (1) 8-way switch
We got ours from a local electronics supply store called "Vetco".
|
|
#11
|
|||||
|
|||||
|
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.
|
|
#12
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best way to collect balls [off the field]? | DonRotolo | Technical Discussion | 46 | 14-01-2006 15:15 |
| pic: Another one from way, WAY up | CD47-Bot | Extra Discussion | 18 | 01-05-2004 02:31 |
| OFF TOPIC: av switch | matt111 | Electrical | 2 | 21-03-2004 15:34 |
| 3 way toggle switch programming | LeadRiccardoT | Programming | 3 | 17-02-2003 02:02 |