Inspiration

Have you ever forgotten to close a door when you leave? Have you ever came back to your home to check if the front door is closed only realized that you have already closed it? Have you ever suspicious of people sneaking into your room when you're gone?

Worry not, our new door alarm invention will help you solve all these problems! With our door alarm, you can know instantly when someone opens or closes your door even when you’re away so you don't have to worry about unnoticed intrusions anymore! Additionally, this sensor updates the door and light close/open status directly to your phone so you have check the status miles away. At work? On a vacation? No problem! The door alarm will solve all your door problems!

What it does

Our door alarm, as its name suggested, alarms you when the door is opened/closed or changes from its status. It also can help to infer if someone approaches the door with its light sensor (if someone approaches the door, he’ll likely change the light status in some way either by covering the light or open a light in a dark room), and update the light status accordingly. To make it more convenient and easy to use when you're away, we also incorporated a wifi component where it can send the status of a door to your phone so you can check the door and light status when you're away!

How we built it (explanation of our design)

We used the light sensor and the ping sensor together to detect the door motion as a fail-proof measurement (since both have to sense a difference to indicate the change of the door status). We used Arduino to build it, and more details on the board design and the code can be seen in the photo.

For the light sensor, we use it to sense the amount of light by the doorknob so we can know if someone approaches the door. There are five status of the light: dark, dim, light, bright, and very bright. The status will be updated in every loop and you can check the status update with the serial monitor. We also use a variable to keep track of the previous measurement of light to compare with the current measurement of light. This way, we’ll know when there is a change in the amount of light, which will trigger the signal oof “someone is at the door” and proceed into the next step.

For the next step, we use the ping sensor to sense the motion of the door by measuring its distance from the sensor. Similar to the light measurement, we also use a variable to keep track of the old distance to compare with the new distance. If there is a difference that’s greater than 5 and the light difference is already triggered, then it will update the door status to be either close or open depending on its current status. This will then trigger then LED light and send a signal to your phone. You can find more details on this function in the code snippet in the attached photos.

Challenges we ran into (further explanation of our design)

One major challenge we had is the distance detection accuracy for the ping sensor. The ping sensor is overly sensitive and it always detects motion even when no one is approaching the door. This is a difficult problem to resolve since we cannot directly alter the PIR sensor itself, so we decided to add the light sensor as an extra layer of check. The door status change can only be triggered when both the differences in the light measurement and distance of the door are detected.

Another more minor challenge is deciding which sensor to use for this door alarm. In the beginning, we wanted to use an accelorometer to determine the motion of the door, but we find the measurement tends to be inaccurate, so we decide to go with the ping sensor and the light sensor.

Accomplishments that we're proud of

We are proud that we incorporated two different sensors into this alarm and make them work together to detect the door status change. We are also proud to incorporate the wifi component by connecting the alarm to network so it can send the door status directly to your phone! This makes possible for the door alarm to appear more discrete (since it doesn't need to be connected directly to a device via a wire and only need a batter to function) and the system more convenient to use.

What we learned

We learned how to combine the light sensor and the ping sensor together to effectively to detect the door open/close status and motion of anyone coming close to the door.

What's next for ESE190 Door Alarm

We can further improve our door alarm by adding another light sensor to sense if there is light inside the room. It can send the light status to user's phone so the user can know if he closed the light before leaving the room.

We can also add a micro surveillance camera to the alarm to record the area outside the door, and if possible we want to incorporate a face detection component so that it can auto detect any unknown face and send an alarm to the user's phone. Please look forward to these exciting improvements in our door alarm 2.0!!!

Built With

Share this project:

Updates