I have three momentary SPST switches attached to three of an Arduino Mega's hardware interrupt pins: 2, 18, and 19. A switch closure, grounds its respective interrupt pin. I am using "pinMode(sw, INPUT_PULLUP)" on the pins.
I also use: attachInterrupt(digitalPinToInterrupt(sw), SW, FALLING);
When I use short jumper wires between the switches and the Arduino, the interrupts respond accurately to switch closures. But when I extend the switches using a 4 or 5 foot long ribbon cable, interrupts other than the intended interrupt are randomly triggered with a switch closure.
Is there a standard noise bypass arrangement that is used in cases such as this? I am wondering whether a .01 mf cap on each lead would help. Or perhaps a 10K pull-up resistor on each lead.
I wanted to keep my wiring as standard as possible.