Drivers Station Magical Current

I was trying to get a switch working on the 3rd Digital Input of the drivers station, and I noticed something VERY strange.
I checked all of my connections multiple times, check my switch, tried different wires, different switches, nothing was working. I finally noticed that for some reason whenever I had the PWM end plugged into the 3rd DI port, it acted as a jumper and triggered my code as that input being enabled, regardless of what state the switch was. I unplugged the cable and it went to the default setting.
Just out of curiosity I took a pair of needle nose pliers (I know you guys aren’t going to like what I’m about to say) that weren’t grounded at all (rubber handle) and touched it to the signal pin of the 3rd input, and SOMEHOW it triggered it, acting again as a jumper.
How could this happen? There’s no current or signal flowing from ANYWHERE. My team and I are stumped.

The Driver Station design does not include any pull-up or pull-down resistors on the digital inputs. What this means is that with nothing connected, the input to the DS is “floating” meaning it could read either on or off. In your case, it is reading off, but then when you connect your PWM wire to it, the wire is probably acting like an antenna and picking up some kind of signal (it doesn’t take much) and triggering the DS input. What you need to do is make sure that you have a switch that switches between positive and ground, not just a simple make/break switch. What kind of switch were you using?

Oh, well that could be one reason. I think I hooked the poles of the switch to the Posative and the Signal, was that incorrect? O.o I don’t do much wiring but I figured it couldn’t be that tricky, and I thought I had it right, but aparently not. I tried using a simple 2 position “on/off” switch, and a pushbutton, both ended with the same result as mentioned in the OP

Here is a quick diagram showing how you can hook up to a digital input. Use this method to prevent a ‘floating’ input.

It’s exactly as magical as radio.

The Driver Station digital inputs present essentially no load to whatever is connected to them. They respond to voltage, not current. This means that the teeniest amount of current is capable of bringing the voltage on the pin up or down to the point where the DS sees a signal. A fingertip, a short piece of wire, or an insulated pair of pliers is perfectly capable of acting as an antenna and providing enough current from ambient electromagnetic fields to affect the DS input.

The DS is a high impedance input. If you are also using a high impedance signal source, like an open switch, it is necessary to provide an external load on the pin so that the voltage doesn’t go randomly bouncing around due to those few stray electrons. A resistor to either ground or +5 volts is the proper solution. Kevin’s diagram will match the closed state of the switch with a logic “1” in software. Reversing the +5 and ground connections will instead make it a logic “1” when the switch is open, if that makes more sense for your application.

Try watching the inputs and then running your finger across the pins. =)

KevinReid’s diagram will work with a straight through switch. Many switches have three pins. One is for 5V, one for signal, one for 0V. When the switch is off, 0V and signal are connected. When the switch is on, 5V and signal are connected.