1

I have a ceiling fan remote that I want to control using the Raspberry Pi. Instead of sending RF signals or buying a Wi-Fi wall switch to do any of this, I'd like to use an existing RF remote and press the buttons in software by making electrical connections using GPIO.

If I take a paperclip and attach it to metal connections at either end of the button, it will trigger the button as if I pressed it.

Knowing this, how would I connect up the connections at the sides of the button to the Raspberry Pi's GPIO such that I could trigger the electrical connection in software?

I need to know which pins to connect, what resistors I'd need and why, and what I'd do in software (such as set HIGH and immediately set LOW after) to make the electrical connection as if I pressed the button on the remote by hand.

Sawtaytoes
  • 211
  • 3
  • 13

2 Answers2

4

Connect a relay or an NPN transistor to bridge the two sides of your switch and program the Pi to set the base of the transistor or relay to high for about half a second - as if a button were being pressed.

Mohammad Ali
  • 2,373
  • 1
  • 12
  • 18
0

Doing a quick search for "raspberry pi push button", I got this answer, which would seem to answer your question. https://www.allaboutcircuits.com/projects/build-a-raspberry-pi-pushbutton-switch/

I don't mean to sound snarky and day 'google it and come back with the results', but I wonder if there's more to this question.

One big thing is: don't connect the input pins to the 5V outputs.

baldPrussian
  • 101
  • 1