Help reliably reading switch on long wire

NOTE: tkbyd you posted as I was writing this, I will read your post now.

Some of the posts that mention hardware filters:

Terry King said...

  • You add, across the switch, a series Resistor-Capacitor combination of 470 ohms and 4.7 uF (Or other appropriate combination)

When you press the button, you will have a discharge time constant of 2.2 ms during which Arduino will 'see' the transition with it's input circuit, which has a small amount of hysteresis and it should get a clean single, 'debounced' value. When you release the button, you will have a charge time constant of 50 ms, which is fast enough that you can't push the button again 'too soon'. Unless you have a 20 Hz finger, in which case you could be a drummer with U2.

Will this work for me? It seems like it would have the effect I want.

http://arduino.cc/forum/index.php/topic,15737.0.html
Grumpy_Mike said...

Protection

Also adding capacitors at the arduino end can help. Also consider using the analogue input to detect the push switch. That way you can set your own thresholds instead of having them set for you by the digital input pins.

I can't really use the analogue pins as I am using interrupts but what is meant by "adding capacitors at the arduino end"? A capacitor between the interrupt pin and ground? What value is sensible? Should I put a resistor between the switch and the Arduino as shown in the protection circuits at the above link?