I'm using a relay to bypass a button thats connected to a Raspberry Pi. Code works fine, relay switches fine, and if I connect the 2 wires that bypass the remote it works fine too.

I cannot figure out why the button bypass isn't working when I put it all together. When I switch the relay via code, the relay switches to complete the circuit, but the button doesn't get bypassed.

Any advice?

My ultimate goal is to use a Raspberry Pi to trigger a Go Pro via the remote that's wired to bypass.


Heres an example of what I'm basically doing, Gopro remote hack raspberry pi, I have the button hard wired. If I touch the two ends of the wire, It acts as a button press. I try to do the same using the relay and I wont work.

I have tested the relay, the wire, and the code and they all work individually it would seem.

Heres a image. currently GoproRemote+ is plugged into 18, GoproRemote- is plugged into GND enter image description here

  • 3
    Perhaps a picture of the actual wiring would be good. – goldilocks Feb 12 '16 at 4:59
  • added a very crude picture. It looks better than my work space thats for sure. – ProjectPokket Feb 12 '16 at 9:53
  • 1
    I'm afraid I still can't make heads or tails of what you're doing. To make any kind of diagnosis as to what's wrong you'll need to post an actual wiring diagram showing all of the components and connections. I'd recommend Fritzing or the nifty built in schematic doodler. – goobering Feb 12 '16 at 10:22
  • 1
    By "picture" I meant photograph -- a common problem around here is people saying they are doing one thing, even drawing a diagram to illustrate, then we see the actual wiring and it is wrong because of something misunderstood. I know a relay seems impossible to get wrong but probably not... – goldilocks Feb 12 '16 at 15:12

You can use a simple transistor to achieve this. It is much simpler than using a mechanical relay, and much smaller.

For NPN Only

  • You just need to find the + voltage (signal) of the remote wire and wire it properly to the transistor (C) Collector
  • Then the GND is common for the Pi and the Remote and wired to (E) Emiter
  • GPIO triggers the (B) Base
  • R1 are values between 1K and 20K safe.
  • -

Trigger the GPIO high and the switch is "pressed"


simulate this circuit – Schematic created using CircuitLab

enter image description here

If you dont want to specially buy 3904 you can try and salvage a transistor from some spare thing lying around. Anything from power supplies to remotes. Find the transistor number and check if its PNP or NPN, and what voltages it handles. Usually almost any transistor will work in such circuits as long as its NPN. PNP may not work and required different wiring and setup. More info

| improve this answer | |
  • I have tried this, but definitely not wired up like that. I will try it as soon as I have time. thanks – ProjectPokket Feb 12 '16 at 13:04
  • Sorry, I just updated. Yea, you need to check if its PNP or NPN transistor. The way you wire them and also NPN you set GPIO High and PNP you set GPIO Low (with pulldown) But if the battery voltage is more than 3.3v it may not work. That is why its recomeded to use NPN transistor. – Piotr Kula Feb 12 '16 at 13:05
  • hmm, so its really strange. It DOES work, and it doesn't. Seems like a sort of debounce issue or its built into the remote so people dont hold down the button. Hooked up in the diagram above, it doesn't work as expected. So I added a button between the GPIO and transistor. And when I toggle the GPIO high then hit the button, it works but only after the button is released. Thanks though, you've given me much better results than I was getting before. – ProjectPokket Feb 14 '16 at 21:47
  • What timing? Could you share please ;) – Piotr Kula Feb 14 '16 at 22:56
  • 1
    Anything longer than a second seem to not register the press at all. (I originally had it with a 1 second delay). I have it currently set to half a second and it works. – ProjectPokket Feb 15 '16 at 18:09

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.