Have you ever left your apartment and couldn't remember if you locked your front door or not? Sadly, if it is unlocked, there is not much you can do about it until you get back home. This system is an attempt to solve the problem. Simply put, it consists of attaching an actuator to the door's original locking mechanism control it with through WiFi.
I chose an MG996R as an actuator for its sufficient torque and angle range (180 deg). Most of the parts for this project have been 3D printed and designed in Fusion 360. The STL files are available on Thingiverse. The servo's shaft and the door's locking mechanism are connected with parts designed specially so as to have a 90 degree play between them. This allows the lock to be operated normally without having the servo interfering.
The MG996R is driven by a Wemos D1 mini, an ESP8266 breakout board. The ESP8266 is made so as to operate the lock upon receiving MQTT messages or via a web UI that it serves. Limit switches are used to provide feedback about the lock state to the ESP8266. The electronics is built on a proto board which also features red and green LEDs to indicate the state of the lock to the user. The source code is vailable on GitHub.
Here are the parts used in this project:
- Wemos D1 Mini
- MG996R servo
- 2x Limit switch
- 2x LED + resistor
- 1mF decoupling capacitor