How to Use simple push buttons over long distance (30m approx) from Arduino

I want to use simple push buttons as inputs to Arduino but I need to place that push button over a very long distance at around 30m from my Arduino (So wire length would be 60m as it'll start from Arduino to the button then again till Arduino). I need to send +5V to switch from Arduino itself and after switch is pressed I should detect it at any of the GPIO/Input pin. So is it possible that it will work over such distance or any other method I should use?

Sure it can work as long as the wires are not picking up severe electrical noise on the way.

Google:

optoisolator

Sure, you can but you need some protection on the line. It's better to use a pull up resistor and extend only the ground wire to the switch, so you don't accidentally short +5V to ground somewhere. There was a great discussion about this a while ago on this forum but I can't find it.

Basically you need: 1- pull up resistor from the input pin to +5V, e.g. 1k ohm 2- filter capacitor on the input to ground 3- Schottky diodes to ground and +5V 4- A low value (~10-100 ohm) series input resistor connected to the input

Always run the signal wire and ground together and twisted if possible.

Send 12v, the pass the returning signal thru an optoisolator, providing a 5V signal to your Arduino.

That way, if your length makes you loose a few volts, it will work fine.

There might not even be a problem... If you do get noise pickup, a low value pull-up resistor (~1K) is probably all you need. Then if you're still picking-up noise add a filter capacitor (0.1uF minimum).

What are the consequences of a "false trigger"?

DVDdoug: There might not even be a problem... If you do get noise pickup, a low value pull-up resistor (~1K) is probably all you need. Then if you're still picking-up noise add a filter capacitor (0.1uF minimum).

What are the consequences of a "false trigger"?

That's right - it's about reliability. If failure doesn't have huge consequences (like death, injury, or loss of reputation :) ) then you can probably just run the wire, with a 1k pullup as described. I wouldn't bother leaving out the external pull up for the internal pull up, it's sort of commonly experienced that a higher impedance (like the internal ~15k) will be noise sensitive.