I’m looking to interface an rfid reader with my garage door opener but I’m not sure how to get the arduino to “press” the switch… I was thinking I would probably need a relay to do this but I’m not sure it there is a way to do it with just code on the arduino?
The switch I’m trying to “bypass” or replicate however you want to imagine it is a simple SPST momentary switch.
Pressing it the garage door activates… press it again the door stops, 3rd time starts again in opposite direction or initial press
If I completely remove the switch mechanism and just have the 2 bare wires that lead into it I get the same results when “pressing” the wires together.
I need to close the circuit when the correct RFID tag is read and the “access granted” function executes…
Can this be done purely with the arduino? (I don’t think so…)
If I need a relay(which I believe I do) which of these rat shack beauties would work?
Either 5V relay should do your job. I’d try the reed relay (.5A, not 1A) first. The way it might fail is for the contacts to stick - too much current will do that. You don’t want to require another power supply, so that’s why you choose a 5V relay instead of a 12V one.
Yes, you need a circuit as shown in the Relay-Interfacing.html to drive the relay. The conventional relay is too much for a port to drive directly, nothing for an external transistor to drive. You can skip R1 and D2 - they are just an indicator but DON’T miss D1. Your 1N4004 diode should be fine. The specified transistor BC547 is equivalent to a 2N2222 or 2N3904 - small signal NPN. You want to switch 5V and perhaps 90mA and these are rated for much more.
One thing that I don’t understand - do you REALLY want the state of the garage door to change every time you walk near the reader with the RFID thing? I think you should enable a button whenever you are close to the reader but NOT move the door until the button is also pressed. Sound good?