I'm working on a simple RPi project wherein I can control my garage door with my phone via Tasker. I am using an RPi to connect to my wifi network and power on a remote garage door opener. My current setup is to short out the button on the remote and use the RPi's GPIO pins to supply power to the remote (wired up to the battery terminals) when I want to activate the remote signal. This generally works, but after not being used for a short while (overnight or less) it takes two activations to operate properly, making me suspect that the capacitors are losing charge when the device is unpowered. So I need to make it more complex and traditional, continuously powering the remote via a 3.3 VDC pin from the RPi, and using a switching circuit to make the button connection.
I can easily purchase purpose-built switches for the RPi, but I would like for this to be a fun learning experience, not just a functional final product. Also, I would like to purchase my parts locally from a specific store (in links below).
The remote switch has ~2.85 VDC around it when active. I would have needed to desolder it to see what the current through it would be when active, so I don't know exactly how to spec out a relay. For what it's worth, the current through the battery is 3.2 mA when active.
I does not seem that I can operate a relay directly from the RPi's 3.3 V GPIO pins, since I cannot find any relays with 3.3 V (or lower) coil voltages, so I need to use a 5 V relay. I found a cheap relay that seems appropriate, but I cannot find a datasheet for it, so I'm thinking about this relay instead, even though it is probably overkill. The datasheet I found isn't for the exact model number, but I think it's basically the same. It seems to have a ~140 Ohm coil resistance, so at 5 V it would require 36 mA of current.
Of course, I will now need a transistor, so I think an NPN would be best to make sure my system is not "active" during boot. But I'm not sure what specs to look for. This transistor [(PREVIOUSDOMAIN)/commerce/catalog/product.jsp?product_id=13754&czuid=1481073107852] has the lowest rated current, so I'm guessing that's the current needed at the base? Not sure about the gain or if the voltages matter, or if I need a resistor in line with it. The relay will push 36 mA of current between the collector and emitter, and the RPi will push 5 mA (assuming I'm looking at it right), so does that make it ok? V_CE will be less than V_BE, so I don't know if that's an issue...
And I know I should include a flyback diode, so I'll try to figure out that part once I know the rest makes sense.
Thank you to anyone who can help me evaluate my project!