View Full Version : Wiring a switch
When you want to have a switch do something for you, where do you wire it, to the analog/digital inputs on the robot controller, and then sauder the wires onto the pins you need?
Sparks333
15-02-2005, 22:14
If this is an on/off two position switch, then you wire one side of the switch to the digital i/o ground (black) and the middle pin of the switch to the digital i/o signal (white). Look in software for either a 1 or 0 on that digital port.
If this is more than two positions, then you can do two things: you can wire the black to the middle switch port, and a signal on either side, and use more than one digital port. Or, if you feel, and it's a 3 position switch, you can put +5 on one side, GND on the opposite side, signal in the middle, and wire resistors between each port (I suggest a 50K ohm on each side.) Put that into analog inputs, and you should get 0, 128, and 255. If that was confusing, i can go into more depth, but if this is not your situation, then ignore it.
Al Skierkiewicz
16-02-2005, 07:42
Steve,
Sparks outlined a method that is spelled out in the RC and OI manual and you should check there for complete explanation. You can also make a switch that acts like a pot if you need more than one or two positions. We do it all the time. One thing to add, I don't recommend soldering directly to the pins on the RC or OI. If you need to replace it for some reason it will take forever, and the heat might unsolder the pins on the board or do some other damage. If you need to make a connection, you can buy individual pins or you can cut apart a PWM cable and make splices into the wire ends.
When you want to have a switch do something for you, where do you wire it, to the analog/digital inputs on the robot controller, and then sauder the wires onto the pins you need?
Here are three reasons that I have used switches on FIRST robots:
1. As a limit switch. Place the switch at the end of travel of an arm or mast to shut the motor off.
2. To select autonomous mode options before the beginning of the match.
3. Custom switches placed on the OI for operator controls.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.