Student: Cristina-Amalia Mustățea
Master: SCPD
Git Repo: https://github.com/cozzoo/SmartLock.git
Video Demo:https://drive.google.com/file/d/1CLmVIQDFO4Gkl8qLKqH47F718Nh1zUgw/view?usp=sharing
Slides: https://docs.google.com/presentation/d/1a5u2QfCTyhC0O2Ejqf5nhIk7VQ9atWrWkD72XmPtRX9A/edit?usp=sharing
The project depicts a Smart Cabinet Lock System. This is a user-friendly security solution designed to safeguard your personal belongings. This system offers remote access control, enabling you to lock and unlock your cabinet or drawer from anywhere. The system will be equipped with an LED that automatically illuminate the drawer's contents when opened and turn off when closed, providing convenience and energy efficiency. A unique feature of this system is its ability to count the number of times the drawer is opened or closed in a day, providing valuable insights into usage patterns. Additionally, the system is programmed to send alerts for any unusual activities.
This is the component list of the setup:
I used a simple plastic storage container with 2 drawers to be able to easily create my prototype. I also chose this model to be able to drill through the plastic and arrange my components to it's design is more pleasant.
I hid the ESP controller, the LED and the motor driver under this top lid. I wanted to be able to still access the board in case modifications to the Arduino sketch needed to be done.
In the back of the container, I have the input for the 12V power source, as well as the Reed sensor which registers whether or not the door has been opened. The initial Reed sensor broke after I initially added it. I has a spare 3-pin module. After connecting it I saw it worked without a problem, so I chose to leave it as it was.
Finally, the lock was mounted so that it would rest against the drawer and not let it open, unless the command from the user has been received.
I used Arduino IDE to program the ESP32 controler. I also based my approapch based on the example project in the Other Resources section.
Each query to Firebase is done every 3 seconds so as not to overload the DB and potentially create lag due to many requests.
The lock is designed to be normally closed. So when sending an “open” command, we actually drive the lock and maintain it in that state for 10 seconds, so users can have enough time to open the drawer and take what they need.
#define DB_QUERY_INTERVAL 3000 //wait 3 seconds between each query #define DOOR_UNLOCK_TIME 10000 //unlock the door for 10 seconds
The web app was created using HTML, CSS and JavaScript.
Users can chose to activate/deactivate the Home Away mode.
Unlock commands are possible with just the press of a button.
I enjoyed making this prototype. I also learned a lot about the ESP32 controller and the interconnectivity it has with other platforms. It is cheap and reliable, while delivering suitable functionalities for an IoT project.
I was also interested of using the Cordova framework to transform the web app to a native Android APK file. So users can also have access to some nicer features, inherent to mobile devices. This would bring the project closer to an actual physical implementation, which could potentially be marketed, improved, and shrunk down (maybe integrated, as well).
Followed this tutorial to create my initial web app: https://randomnerdtutorials.com/esp32-firebase-web-app/#install-nodejs.