Long distance button over twisted pair

(full size @ ImageShack - Best place for all of your image hosting and image sharing needs )

Will this work ? Is there chance of interference if a 12 VDC power feed is run through the same UTP cable (over another twisted pair of course) ?


That should work OK. If the 12V is noisy, I would guess there is a chance for some crosstalk, but debouncing the input should take care of that.


How do I "debounce" the input ?

I would use a 1K pull up resistor at the Arduino end. Debounce could be done with a 1uF capacitor from input to ground with a 220R resistor in line with the pull down switch.

Like this ?

With the resistor at 220 Ohm and the capacitor at 1 microFarad ?

No the resistor in line.
Arduino input, capacitor and 220R resistor, 1K resistor all to the same point.
Then other end of the capacitor to ground, other end of the 220R resistor to the push switch, other end of the 1K resistor to +5V
Then the other end of push switch to ground.

Sorry, I'm very new to this, but I'm exploring the possibility of creating a home automation system using buttons installed in a wall plate, all to an Arduino board. The runs will all be between 20 - 75 feet long. Is this possible, or is it beyond what the Arduino is capable of?

Thanks for reading.

Is this possible, or is it beyond what the Arduino is capable of?

It is not a question of the arduino being capable of doing this it is a matter of any electronic logic device. Logic level signals are not specified to travel over these distances, but they can be made to do so. Any particular installation may give different results depending on the circumstances and you may have to do additional work to make a particular installation a) work at all and b) work reliably.
In this case you might want to allow three wires up to your button, signal ground and supply and have your pull up resistor in the switch. You might even want to use a higher supply voltage and then limit it at the arduino end.
However this is not the sort of thing to do if you are very new to it. Get some experience first then you will be in a better state to tackle any difficulties you encounter.

I probably use opto isolators too often, but hey! They are cheap, and they work for me!

How I'd use one here? It would be near the Arduino, and the transistor side of it connected to the Arduino. The LED (inside the opto-isolator) would be driven via a largish (12v (DC)) voltage, through the switch at the end of your long wire. (And there would be the usual current limiting resistor in series with LED, 12v and switch).

More at...

You wouldn't want to load down the 5V supply for long periods with 100 ohm loads, but it would seem appropriate for occasional button pushes.

Richard can you clarify that statement? I plan on doing something very similar. Building an alarm system with standard alarm contacts that are normally closed (shorted) while the doors are closed (90% of the time). I plan on using 100 ft runs of Cat5 twister pair.

My digital pins would be HIGH most of the time.

I have a system running on a skifield, that consists of a number of switches, at the end of telephone cabling. The maximum of these is 800m away.

These switches are normally closed and on the earth (negative) side of opto couplers.
The opto coupler then holds a pullup resistor low on each of the 8 input pins of the uP.

The normally closed means a break in the wire is detected, plus interference is eliminated, since its usually at zero volts.

I have always preferred to put the switch on the earth side (rather than switching a voltage) so that if the cable is shorted it doesn't take out the power supply, and the smoke stays inside the transistors, opto couplers and other electronic fuses, used to control things.

Switching earths also means that if necessary, you can use a single wire, and connect to the nearest earth point.