Introduction: Homemade App Door Lock
In this project, I show how a simple phone app door lock/unlock can be made from simple components, and introduce a user friendly app called Blynk. I use a Wemos D1 Mini wifi chip and the Arduino IDE to create the code. You can use this setup to share access to rooms without having to make a key copy as Blynk has a share feature, or allow someone to enter when you're not home.
Step 1: Components Needed
- Wemos D1 Mini Wifi Chip
- 9V AC/DC Adapter
- 5V/3.3V Breadboard Power Supply
- 4 Digit 7 Segment Display
- 860 Ohm Resistor
- Jumper Wires & Breadboard Wires
- Door Mounting Supplies (cardboard, tape, etc)
- The Free Blynk Phone App
- Available Wifi
Step 2: Circuit & App Setup
The picture above shows how I connected my circuit. I used the LED to test the functionality of the Blynk app (as it was my first time using it).
My recommended steps for first timers to get familiar with Blynk:
- Follow Blynk directions and download Blynk library.
- Download Blynk app, and choose the Wemos D1 Mini device.
- Create a new Blynk Project on the app and add a button Widget and set it to a virtual pin (I set mine to V3)
- Google and download the Wemos drivers.
- Connect the Wemos D1 Mini chip to your laptop and run the wifi connectivity example Arduino sketch (I built my final sketch using it).
- I then connected the LED, and wrote code that when I pressed the app button widget, the LED would turn on.
- After getting the above to work and hooking up the rest of the components, use my code in the next section to get it up and running.
Notes on Hooking Up the Rest:
- I googled and downloaded the 'SevenSegmentTM163' library for the Display so I could easily display words.
- The Display has two signal wires that need to be plugged in to any pin, as well as the servo signal wire. Next, 5V and ground need to be supplied to to the servo and display.
- The Wemos is a 3.3V chip, so I tied the 3.3V pin of the chip to the 3.3V breadboard power supply pin (as shown in the picture).
Why I used certain components
- 4 Digit 7 Segment Display - I wanted to be able to easily see if the door was locked or unlocked
- Blynk - Very user friendly and easy to jump in.
- Wemos D1 Mini - beginner wifi chip
Step 3: Code
Step 4: Mounting
I aimed for this to be a beginner project, so I used readily available materials around my house (and roommate labor) to Macgyver this setup.
Materials I Used:
- Rubber bands
- Binder clips
- Paper Clips
This mounting method works best with a deadbolt, and feel free to use sturdier materials. The main goals is to stick the circuit to the door, attach the servo teeth to the lock, and somehow securely attach the the servo casing to the door (otherwise you have a rotating servo instead of a rotating lock).
Steps to my mounting method:
- Tape breadboard to door.
- Use binder clip to clamp on to deadbolt lock and secure using rubber bands.
- Nest servo teeth/wheel in metal binder clip ends and secure using more rubber bands.
- Stick straightened paper clips in the rubber bands to add extra rigidity.
- Cut cardboard piece, with hole to keep servo in place, and securely tape to the door.