Team Information
Tianshu Wang - [email protected]
Jin Qian - [email protected]
Binsheng Zhang - [email protected]
Inspiration
This Smart Door Lock System project aims to revolutionize home security by merging modern technology with traditional safety measures. In an era where the security of personal spaces is increasingly vital, this system introduces a dual-mode access control – a keypad and wireless ESP control – offering both convenience and heightened security. The project is inspired by the need to enhance residential security without compromising ease of use. With features like an alarm system for unauthorized access attempts and an ultrasonic range finder for interactive engagement, the system is not just a lock but a comprehensive security solution. It also serves as an educational platform, delving into areas such as Timers, Interrupts, ADC, and Serial/wireless communication, embodying the fusion of practicality and technological advancement in everyday security.
What it does
The Smart Door Lock System is an innovative security solution designed for apartments and homes. This system enhances safety and convenience through two primary unlocking mechanisms: a password entry and wireless control using ESP technology.
Password Protection: Residents can securely access their homes by entering a predefined password. The system is programmed with a unique code, ensuring that only authorized individuals can unlock the door.
Wireless Control: The door can also be unlocked wirelessly, offering a seamless and modern approach to home security.
Advanced Alarm Features: To deter unauthorized access, the system includes an alarm that activates upon repeated incorrect password attempts, signaling potential security breaches.
Interactive User Interface: Equipped with an ultrasonic range finder, the system intuitively lights up its LCD screen when someone approaches, prompting them to either use their phone for wireless unlocking or enter the password.
Responsive Feedback: The system provides immediate feedback through light and sound notifications, indicating whether the door is unlocked successfully or if an incorrect password is entered.
How we built it
Our project's hardware has two broad sections:
a. Lock system with keypad
b. Esp32 wireless controller
For the Lock system comprised of the following:
a. Arduino-Uno-This compact yet powerful microcontroller, integral to our project, controls various functions like password processing and alarm management. It connects seamlessly with the keypad, ultrasonic sensor, and ESP module, ensuring a secure and efficient operation of the door lock system.
b. DEVMO-4 x 4-Keypad-This 4x4 matrix membrane keypad is a critical component of our Smart Door Lock System. It allows users to input their access codes easily. Durable and responsive, it interfaces seamlessly with the Arduino Uno, facilitating a reliable and user-friendly method for secure home entry.
c. HC-SR04-ultrasonic sensor-This sensor is a key element in our Smart Door Lock System, used for detecting the presence of individuals near the door. It measures distance through ultrasonic waves, triggering the LCD screen to activate and prompt for password entry or wireless unlocking, enhancing both security and user experience.
d. Electromagnetic-Solenoid-Lock-The Electromagnetic Solenoid Lock in our Smart Door Lock System acts as the final security gatekeeper. Upon receiving the correct code or wireless command, it activates to unlock, providing a strong and reliable mechanism that ensures the door remains securely locked when not in use.
e. LCD-1602-The LCD-1602 serves as the visual interface of our Smart Door Lock System. It displays messages, such as welcome prompts and password confirmation, enhancing user interaction. Its clear 16x2 character display, integrated with the Arduino Uno, offers an intuitive and user-friendly experience for secure home access.
f. LED-light- Integral to our Smart Door Lock System, these LED lights serve as clear visual cues for various system states. Connected to the Arduino Uno, they illuminate to indicate successful password entry or trigger an alarm in case of unauthorized access attempts, enhancing both functionality and security.
g. Passive-Buzzer-The Passive Buzzer in our Smart Door Lock System serves as an audio indicator. It provides audible feedback to users during password input and alerts, enhancing the interaction experience. Connected to the Arduino Uno, it's vital for signaling successful entry or unauthorized access attempts.
h. 5V-One-Channel-Relay-This relay acts as a crucial switch in our Smart Door Lock System, enabling control over high-power devices with the Arduino's low-power signals. It's integral for managing the system's power requirements and ensuring secure, responsive operation.
For the Esp32 system comprised of the following:
a. Esp32-The ESP32 is a versatile, high-performance Wi-Fi and Bluetooth module essential to our Smart Door Lock System. It enables wireless control of the lock, allowing users to operate it remotely via smartphone, adding a layer of convenience and modernity to home security.
b. Level-shifter-This essential component bridges the ESP32 and Arduino Uno, ensuring smooth communication between the two at compatible voltage levels. It's vital for the Smart Door Lock System, facilitating the wireless control aspect while protecting the circuitry from voltage mismatches.
Software comprised of following sections :
a. Microchip-Studio-with GCC executable project: This software environment is pivotal in our project, providing a comprehensive platform for developing and debugging the Smart Door Lock System's code. It integrates GCC compiler capabilities, enabling efficient coding and seamless firmware management for microcontrollers like Arduino.
b. Arduino-IDE: This intuitive development environment is key for programming the ESP module in our Smart Door Lock System. It offers an accessible platform for writing, testing, and uploading code, simplifying the process of implementing wireless control features and other functionalities.
TimeLine
Week1
During the initial week, we finalized the concept for our project and solidified the design of the Lock System, focusing on the Keypad and RFID as core components. Subsequently, I ordered the necessary parts and initiated the development of the RFID library in Microchip Studio.
Week2
In the second week, as the ordered components arrived, we started constructing the system's circuit and began debugging the interaction between the Keypad and the LCD screen. This enabled the LCD to accurately display the numbers inputted on the Keypad.
Week3
The third week brought a significant pivot due to challenges in developing the RFID library. We switched the RFID functionality to ESP for remote control. Concurrently, we finalized the Keypad's encryption logic and the alarm system's framework. The LCD screen was now capable of indicating correct and incorrect password entries through display feedback.
Week4
The final week was dedicated to completing the ESP32's functional design, establishing the relay and lock's circuit connections, and coding. We optimized the entire code for logic and execution speed, incorporating comprehensive comments for clarity. The week concluded with a thorough testing of the complete Smart Lock System and the documentation of a demonstration.
Challenges we ran into
a. The foremost challenge we faced initially was grasping and developing an RFID library within a constrained timeframe. Since our theme project in Microchip Studio necessitated crafting custom libraries, this endeavor marked our inaugural foray into RFID technology, presenting a steep learning curve.
b. The second objective involves coding for communication between the Keypad and the LCD screen to provide user feedback. Our Keypad is designed to accept numeric passwords, with the addition of utilizing the pound key (#) and star key (*) to represent 'Enter' and 'Clear' functions, respectively.
c. The third challenge we faced was resolving the dual system conflict inherent in our design, which features two distinct unlocking methods. We had to carefully craft the code to enable simultaneous use of both methods without any mutual interference. Additionally, it was essential to program the LCD screen to display unique feedback corresponding to each unlocking method, ensuring clear and distinct information for the user.
d. Ultimately, our project integrates an ultrasonic sensor to detect the presence of a user near the door lock, prompting password entry. A challenge we aim to address is ensuring uninterrupted password input, even if the user inadvertently steps out of the sensor's range mid-entry.
Accomplishments that we're proud of
a. We have successfully finalized our dual-channel unlocking system, enabling the opening of our door locks through both a Keypad and the Blynk app. Our design ensures that these two systems operate harmoniously without any conflicts, each having distinct codes and unlocking methods.
b. We have developed a comprehensive safety alert system that incorporates an LCD display, buzzer, and LED light. This system provides immediate and clear feedback based on the accuracy of the entered password, ensuring users are promptly informed about the status of their door lock access attempts.
c. We successfully integrated the ultrasonic sensor with the LCD screen without affecting the ESP32's display on it. Now, when a user approaches the door lock, the LCD screen lights up and displays a welcoming message, prompting the user to enter the password to unlock the door. As the user moves away from the lock, the screen turns off to conserve energy, making the system not only more efficient but also environmentally friendly.
What we learned
a. Integration of Diverse Hardware Components: Mastering the integration of various elements such as the Keypad, ESP32, LCD screen, and ultrasonic sensor was a key learning outcome, leading to a cohesive and functional system.
b. Development and Adaptation of Software Libraries: We gained valuable experience in developing custom software libraries for the Keypad and ESP32 within Microchip Studio, enhancing our understanding of software-hardware interaction.
c. Flexibility and Problem-Solving: The process of incorporating ESP32 for wireless control, in place of the initial RFID plan, underscored the importance of adaptability and innovative problem-solving in technical projects.
d. Security Logic and Encryption Techniques: We delved into the complexities of creating secure cryptographic logic for the Keypad, ensuring robust security measures for the lock system.
e. Energy Efficiency and Environmental Sustainability: A significant learning point was programming the LCD screen to conserve energy by turning off when not in use, reflecting our commitment to eco-friendly technology.
We have tried our best in this regard
Our RFID design process encountered some challenges, primarily stemming from difficulties in constructing the necessary libraries. We faced a hurdle due to the absence of RFID and SPI library files in Microchip Studio's standard C library. Consequently, we decided to delve into the library version of Arduino IDE to develop our own.
Despite dedicating a week to this endeavor, we successfully enabled Arduino to detect RFID card swipes. However, our implementation struggled to accurately determine whether the card was valid or not. We identified a problem with data extraction from the card. Our library failed to convert card data into a format (such as int or char) that Arduino could effectively interpret and compare.
Given our project's time constraints, we've decided to discontinue the RFID functionality after a week of effort and pivot to our backup plan: utilizing the ESP32 for remote control unlocking.
What's next for Smart door lock system
a. If we are given more time, we will first add the RFID function. Compared with Keypad, RFID is obviously a faster and safer way to unlock the door. Because the password can be seen secretly, but when you swipe the card, each card is unique.
b. Another function we want to add is the mobile phone alarm function. We can use esp32. When a stranger tries to open the door lock by frequently entering the wrong password, the lock system can send a warning text message to the house owner's mobile phone through esp32. superior. In this way, users can call the police in time.
Log in or sign up for Devpost to join the conversation.