Inspiration

I love electronics and coding, and I have experience with Arduino. The problem is, I wanted to create a project by myself and I felt like I was limited to the contents inside the kit I had. In order to break those limits, I decided to make a number pad app on my phone that could then send Serial data to the Arduino. When I was thinking of what I could do with the number pad, this type of lock is what came into my mind.

What it does

All it does is lock or unlock a door based on if the correct pin is entered or not.

How I built it

Here is what I used:

  • IR Remote x1
  • IR Receiver x1
  • Arduino Uno x1
  • Inland 9G micro servo x1
  • RGB LED x1
  • 220 ohm resistor x3
  • 9V battery pack (six 1.5V batteries)
  • Several Jumper Wires
  • Arduino IDE

The number pad is the infrared remote. It sends the data of which button is pressed to the IR receiver. The receiver then sends that data to the Arduino, which is then decoded and given as a hexadecimal number. I printed the hexadecimal number on the Serial Monitor to find out which button gives what hexadecimal code and defined the buttons and the codes in the program. Whenever a button is clicked, the LED lights blue. When a wrong 4-digit pin is given, the LED lights red. When the correct 4-digit pin is given, the LED becomes green, stays like that for 10 seconds and turns off. The servo rotates from 0 to 180 degrees when the 4-digit pin is correctly given as well. It stays like that for 10 seconds and turns back to its original 0 degree position.

Challenges I ran into

At first I was going to have the number pad on my phone as an android app. The problem is that I realized that I lost my OTG cable (male USB-C to female USB) after I finished making the app. I spent valuable time on that when I could have spent it on something else. I also planned to use an ultrasonic sensor and a buzzer to detect people who came in without entering the correct passcode as safety incase the lock was broken. I then realized that either my trigger pin or echo pin on the ultrasonic sensor was broken and I needed to ditch that plan.

Accomplishments that I'm proud of

I am proud of how far I made it with this projects using what was just inside this box. I never thought that I could use an IR remote as a number pad. I am also proud of how I went past the complications with the android app and the ultrasonic sensor to finish the project in time. I have not done a "real" electronics project on my own without following tutorials and this is a first for me.

What I learned

During the course of this hackathon I learned a lot. This ranged from troubleshooting to overcoming obstacles. The experiences I gained from this hackathon are very valuable and will definitely help me moving forward.

What's next for Arduino Based Number Pad Door Lock

Next, I need to build the mechanical part of the project. This includes the lock and the gear head for the micro servo. The gear head would be hard for me to do as it seems like 3d printing would be the only way to do it, but the lock can be easily made out of wood. I also need wire management. I was thinking of soldering male header pins to wires and using those as jumper cables as I ran out of long ones, but I ran out of wire so I could not. Wire management is something that I definitely need to work on.

Built With

Share this project:

Updates