Inspiration
The inspiration for this project was the break-in at Clara Dickson Hall about a month ago. Break-ins are a somewhat frequent occurrence in Ithaca, and for this particular break-in, nobody knew about it until the day after. Whenever an incident occurs, there is currently no way to notify the relevant people until long after it has happened. Our project fixes this issue, as safety is not just a personal responsibility, but a communal concern.
What it does
The lock is motorized and controlled by an app on your phone. Users can lock and unlock remotely from the app, allowing for ease of use and convenience. Users can also create a neighborhood, where groups can be formed, similar to dorm blocks. Whenever a certain set of triggers is activated within a short time frame, a break-in flag is raised, in which case, a push notification and email is sent to everyone in the group.
How we built it
The device interfaces with an existing deadbolt/lock using a servo. This servo is connected to a hat, which is connected to a KY002 shock sensor, and a KY037 Sound sensor. The HAT connects to a raspberry pi. This raspberry pi runs a webserver, which allows a client to lock and unlock their lock from a distance. TO constantly poll input from the two sensors, is multithreads the process. If both sensors are triggered within 3 seconds of each other, a break-in message is posted. (the sensors were tuned to reduce false positives). Break-in flags stay up for 5 seconds.
We CADed the frame, and 3d printed three iterations of it before finalizing the design. The frame has M3 holes to screw the servo, sensors, and raspberry pi. We couldn't screw the raspberry pi because we didn't have M2.5 screws :(
For the app, we built it using React Native for the frontend and Flask for the backend.
Challenges we ran into
The polling rate of the sensors didn't align well with how often they received input, so we had to keep flags up for 3 seconds, and the break in flag for 5.
How to send emails? We had a lot of trouble sending emails out. But then, it turned out to be easier to write a python script, so we just called that instead.
How to communicate between the app and the pi? We developed the two in parallel, but we weren't sure how to get them to talk to each other. Then, I realized we could make a webserver on the pi! It worked wonderfully.
Accomplishments that we're proud of
- proud that we were able to get the raspberry pi and the app to talk to each other.
- proud that we took the leap of faith to make our project part hardware.
- proud that we were able to make well-structured software on the PI using encapsulation ideas.
- proud that we were able to learn some completely new things and bring our idea to life.
What we learned
On the hardware side, we learned how to use sensors to receive and use information. On the software side, we learned how to use the Pi to host API endpoints, which we then hit. We also learned mobile development.
What's next for Lockd
Making more locks! The best part of lockd is to show your community that you care enough to tell them whats going on.
Log in or sign up for Devpost to join the conversation.