DeadSkunk
Posts: 3
Joined: Fri May 15, 2015 2:42 am

Best way to connect a far away button

Fri May 15, 2015 4:15 am

I'm working on a project where I need to connect a button to a Raspberry Pi, but the button needs to be about 20 feet away. I think I know how to do this, but since I am fairly new, I wondered if someone with more experience could confirm that this will work:

The best example I've seen is the button set up from the 'Grandpa Scarer' tutorial, where it looks like they've soldered their wires to the button, then run those wires into female/female jumper wires plugged onto the GPIO pins.

If that will work, that seems like the easiest thing, but if there's something I'm missing, or there's a better way I haven't thought of, I would love to hear about it. I just want to make sure I'm on the right track before I jump in.

Thanks in advance!

JMK8
Posts: 42
Joined: Tue Apr 28, 2015 10:00 am

Re: Best way to connect a far away button

Fri May 15, 2015 8:01 am

The link you show should work. The only thing that would concern me is the possibility of noise pick-up in the long wires causing false triggering. I would try using screened lead and maybe a capacitor (0.1uF ? to ground after a series 1K resistor ?) between the GPIO pin and ground. I'm no expert on R-C filters but I would try that and see if it worked if noise was a problem.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: Best way to connect a far away button

Fri May 15, 2015 8:18 am

DeadSkunk wrote:I'm working on a project where I need to connect a button to a Raspberry Pi, but the button needs to be about 20 feet away. I think I know how to do this, but since I am fairly new, I wondered if someone with more experience could confirm that this will work:

The best example I've seen is the button set up from the 'Grandpa Scarer' tutorial, where it looks like they've soldered their wires to the button, then run those wires into female/female jumper wires plugged onto the GPIO pins.

If that will work, that seems like the easiest thing, but if there's something I'm missing, or there's a better way I haven't thought of, I would love to hear about it. I just want to make sure I'm on the right track before I jump in.

Thanks in advance!
in my opinion 20 feet is not "far away"
You can manage it easily just taking a two way wire to it.
remember pullup (or pulldown, it depends how you'll connect it), but this is a matter of getting a button working, not of distance..

Return to “Beginners”