top of page

Door Lock

After more than a year, I finally got the time to work on my idea. I had been thinking of making an electric door lock for more than six months but sadly never got the time. The last week of August, after my SAT, I finally made my idea a reality. â€‹

​

This project has two modes, the Alexa mode, and NFC. The buttons located on the underside help you choose which way you need it to operate.  

​

The code for this project can be found here. 

20220910_211939.jpeg
20220910_134838.jpeg

Mode 1, The Alexa Mode

Insights and Coding. 

Screen Shot 2022-09-10 at 10.30.18 PM.png

When the lock is reset, you can select button 2 from the underside. This activates Sinricpro allowing Alexa to have full control. 

Mode 2, NFC 

The NFC mode locks the door if any NFC tag or device is detected. This includes random UFI singles from a mobile phone or a smartwatch. Only the right tag can unlock the door making it a hotel-style lock. 

Insights and coding

The actual hardware used here is the ESP nodemcu, a motor driver, three switches, and a 12v DC adaptor for its power supply. The motor driver powers both the node MCU and the motor itself. 

​

Switch 1 is connected directly to the reset pin of the microcontroller. 

Switch 2 is connected to D0 and acts as the Alexa mode button. 

Switch 3 is connected to D1 and acts as the NFC mode. 

​

Switch 1 is required to be pressed while switching modes. This is so that nodemcu can disconnect itself from sinricpro, thus breaking off the connection between Alexa and the lock. 

​

​

The exterior is entirely 3D printed, approximating 140g of filament. It fits altogether onto the door lock via its already existing screws, and this print uses no glue. 

A key-to-motor adaptor is used to control the key via just a simple motor. 

  • Twitter
  • LinkedIn

©2025 by Rehan Agrawal

bottom of page