Introduction: Arduino Nano Garage Door Keypad Relay Project

Arduino Nano Garage Door Keypad Project

(Keypad relay project)

This is a simple keypad that controls a relay. My garage door opener accepts a momentary pulse to open or close the garage door. I wanted to make one using an Arduino Nano and a few simple and cheap parts.

The idea was to use parts I had available in my own inventory and have a completely isolated output to the garage door via a relay module.

The Nano accepts a password from the keypad and then controls the ground power to the relay using a PNP Mosfet. If a correct password is recognized it grounds the power to the relay coil and the Normally Open contacts close for 1.5 seconds.

There is a red LED to indicate the circuit is locked, and a green LED to indicate the relay is operating. Current limiting resistors were used to protect the LED’s.

Step 1: Build the Enclosure

The enclosure is larger than I needed but it is what I had on hand. I cut a slot in the face to allow the keypad ribbon cable to slip through and I drilled holes for the LED’s.

I used pins to convert the keypad from a female end to a male end so I could plug it into my breadboard. I used a breadboard since I had one on hand and they are fairly inexpensive.

You can see the back side of the face-plate with the LED’s and the keypad ribbon cable going to the breadboard.

Step 2: Build the Circuit

The bottom half of the relay is the coil side, and on the top half of the relay are the contacts. The NPN Mosfet is a IRF540N and I used a heat sink.

I was originally going to use a 9 volt battery to power the keypad but after doing some research on battery life cycles I decided to use a transformer to supply the 9 volts.

Once I completed the project I used a hot glue gun to glue all of the components in place to secure them as well as to help protect the circuit from the elements. If I have any issues in the future the glue can be peeled off to replace a component.

This is a very rough schematic of the circuit. I drew it my first time using Eagle and I wasn’t able to correctly label each component. Please verify this circuit independently.

Step 3: The Code

In the code I set the password to “1234”. You can change this to any four digits you prefer.

This code uses characters rather than number values so I’m not sure what you would need to do to add additional passwords.

The * and # characters will reset the input if you make an error while entering the password.

Arduino Contest 2016

Participated in the
Arduino Contest 2016

First Time Authors Contest 2016

Participated in the
First Time Authors Contest 2016