I am a newbie. I am going to try and make my first Raspberry Pi project. I have the Model B revision 2.0 board and want to connect a spare garage door opener remote. I have an option of using a relay but wanted to optimize, if possible.

The remote uses a single CR2032 coin lithium battery (3V - 3.4V, I suppose). So two questions:

  1. Can I power the remote by the 3.3V coming out of the RPi header? Save a battery basically and keep everything on the same power rails?

  2. Can I directly connect the GPIO to short the push button on the remote? This would save the relay and some wiring and keep the whole design small.

Best regards and thanks in advance!! Guraaf

  • Yes, I would like that. I didn't realize that there was a dedicated community there. My bad. Please do migrate my topic there, if possible.
    – guraaf
    Aug 19, 2014 at 3:04
  • use a transistor "to short" the garage button. Check some tutorials on the web about transistors. Almost any kind will work for this and it will be safe to drive form GPIO
    – Piotr Kula
    Nov 21, 2014 at 0:17

3 Answers 3


It is possible to optimise the interface without knowing details of the remote control. This requires some measurements to be made. If there is only one switch then there is no multiplexing. This I have assumed.

Consider the terminals of the button A and B. Measure the voltage at the terminals with respect to -ve of the battery using a digital multimeter. mark A and B on the circuit board.

Measure A and B without the button pressed.

Measure A and B with the button pressed.

There are quite a few options for an interface. For example: If A is at the battery supply of 3.3v and B is 0v when the switch is open, then both are at 3.3V when the switch is closed. In this case B needs to be pulled to 3.3V to operate the remote.

The safest way is to use 2 transistors a NPN followed by a PNP to switch 3.3V to the remote . This is called a "high side switch"

An example is the 3rd digram down on this page, but we would need lower value resistors: http://jeelabs.org/2012/11/12/high-side-switching/

It should also work by connecting the IO pin straight to B. Putting a 100 ohm resistor between the IO pin and B would limit the current if a mistake had been made and would not usually prevent operation.

What is the supply current from the battery when it is transmitting? What is the current through the switch when it is transmitting?

This is one case. If you state the voltages and currents measured, it should be possible to give more specific advise.


  • Thanks Andrew!! I finally decided to get a relay (mechanical) - Sainsmart 2-channel to keep it manageable and simple for me.
    – guraaf
    Aug 24, 2014 at 17:30
  • You might have bounce problems with the relay. keep that in mind. Some garage door remotes will stop, reverse if pressed sequentially quickly. This is the bounce problem caused by mechanical switches when applied to a "digital" circuit. Solvable using a small capacitor. Check the web to solve this.
    – Piotr Kula
    Nov 21, 2014 at 0:19

You could try a 74HC4066 across the push button switch instead of a relay. You will need to connect the grounds together and the 4066 needs a power supply such as 3.3V.

Powering the remote from the 3.3V is probably okay- take extreme care as to the polarity and make sure you remove the battery. I might suggest trying it with 100 ohms in series first and see if that works.

  • Thanks Spehro. That is useful for sure. I will remove the battery from the remote control. Why do I need the analog switch 4066? Just curious - to understand. I shorted the push button switch with a piece of wire and the garage door opener worked. So I am wondering if I can just control that with the RPi directly?
    – guraaf
    Aug 19, 2014 at 3:07
  • It's possible. If one side of the switch is common with one side of the power or the other then you can probably use the RPi output. In any case, the analog switch will very likely work and is < $1.
    – Spehro Pefhany
    Aug 19, 2014 at 3:51

As far as I get your question you open the remote control and not the garage opener itself, right? If so, do the following: Yes, you can use the 3.3V from the Pi, given it is 3.3 V output, to power the remote control. I thought the pi had 5V, so make sure it is 3.3V! If it is as I assumed 5V, give it a Voltage regulator! You better use the relay between the two connections of the button, they are small, easy to use and save to use since you do not know the schematic of your remote control. If you really don't want to use a relay, you could use a resistor in between the GPIO Pins and the the sensitive pin of the button. I would start out with 1M down to 10k, but this is on your responsibility since you don't know the schematic of the remote control and you could (yet unlikely) damage it.

EDIT: The button is probably connected to an IC which you don't know. So it is possible that it has internally a transistor that opens when a positive voltage is applied or shuts off when a negative voltage is applied. In this case you need to use a resistor to protect the base from overvoltage. More likely your IC has something resembling digital inputs where you can connect V++ or gnd directly. But they might probably respond the same way when the voltage is applied via a resistor (in series). On the other hand it my be that there is a pull-up oder pull-down so it won't work with a resistor but only when you apply v++ or gnd directly. So: It would be of great help if you can either post what remote control it is or what IC is used as main controller in the control (that would be most helpful. Open that thing and find the partnumber of the main IC in it).

  • RPi has both 5V and 3.3V, the GPIO pins are 3.3V / 20mA, which is not a lot, so be careful! RPi is not quite protected against overloads, so draining too much simply switches off the device (usually, it can get worse I believe, e.g. your SD card can be damaged)!
    – yo'
    Aug 18, 2014 at 13:03
  • Thanks jjstcool and tohecz. Appreciate the discussion. The RPi does have a 3.3V supply on Pin 1 as tohecz said. The remote control runs off a 170Ah coin cell for maybe a year? So I am guessing that 20mA might be sufficient? In any case, my main idea was to avoid using a relay or some analog switch and directly connect the GPIO to the push button switch and that is why I didn't want another power rail in the circuit and have everything use the same ground and the 3.3V come from RPi as well. How and why does a resistor help? Again, I am trying to learn - I know some basics but not a whole lot.
    – guraaf
    Aug 19, 2014 at 3:08
  • @guraaf see my edit
    – jjstcool
    Aug 19, 2014 at 6:16
  • Thanks jjstcool. The remote is a Chamberlain IC:2666A and 953CD marked on the outside. The PCB marked is 14LG481A on battery side and 14PC481B on the solder side. The IC is on reverse solder side and is 125C0471 0J7478 with 8 pins. There are 3 push buttons and a resistor and two capacitors. I tried to look for the details. There are lots of search results on Google selling the IC but I can't seem to find datasheet. Perhaps it is an Atmel transmitter IC? Can't tell for sure. Thanks a lot for your help. Really appreciate it.
    – guraaf
    Aug 19, 2014 at 12:25
  • @guraaf sorry, I can't seem to find anything about it either. Can you post a picture of both sides of the PCB? It's really easy in this forum, once you have it on your computer. The part might be an EEPROM, which are named very similar (e.g. 25C04)
    – jjstcool
    Aug 20, 2014 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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