I am building a circuit with the Raspberry Pi that requires a button about fifty feet away from the central circuit. I am planning on using speaker wire for the connection from the Pi to the button. Is this an OK solution? If so, what gauge of wire should I use, or does it matter? If it isn't an OK solution, what should I use instead?

  • 2
    Not really a Pi question. More suited to an electrical site I would have thought. Who can say? If it works it works, it depends on the environment through which the wires are running. Twisted pair as is found in cat 5 cable may be a better choice as it has better immunity to interference.
    – joan
    Nov 21 '16 at 17:21
  • For right now, I'm going to use a 16 gauge speaker wire, and if it doesn't work, I'll try a cat 5 cable like @joan suggested. Nov 21 '16 at 22:02

In fact, while this question if not specifically Pi oriented, it is (marginally) relevant to using the GPIO on a long cable.

The wire gauge is irrelevant.

You are in fact connecting an antenna to the GPIO, so you should minimise interference.

Twisted pair is a good idea, but a pair like speaker wire is acceptable.

You should avoid running the wire parallel to any other circuitry.

The most important is to use a low impedance circuit - i.e. a low value Pull up (say 470Ω) near the Pi itself.

  • Do you think that an RC low pass would additionally help EMI issues besides low impedance of the setup?
    – Ghanima
    Nov 21 '16 at 22:54
  • @Ghanima It wouldn't hurt, but unless the environment is next to a transmitter the signal level you can get on 15m cable would be low enough to cause no problem, provided it is terminated.
    – Milliways
    Nov 21 '16 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.