Back to Parent

Outcome


Knok Knok

Hua Fan

Proposal

Until now, apartment dwellers have had a difficult time protecting their homes. Unable to permanently install security systems has left their belongings and themselves vulnerable. Knok Knok is a smart home security solution with a goal being to help people monitor their home and notify potential dangers. Knok Knok will be installed on the door and will detect whether there are suspicious activities outside. If there are people wondering outside the door, they will trigger Knok Knok’s alarm and all the data will be registered online.

Parts

CPU: Photon* 1

Sensor: Tilt Sensor * 1

Input: Button * 1

Output: Piezo Buzzer * 1, Red LED * 1, Green LED * 1

Other: 220 ohm Resistor * 1, Wires

Problem Statement

How to secure a home by alarming the trespassers and notifying the residents when someone breaks in?

Goal

This project is designed for people who want to secure their home and can take control of their home security remotely. The user will be able to receive notification for any suspicious behaviours in his/her house. The system will also alarm anyone breaking into the house and scare them away.

Process

Designing the circuit

At the first step, I designed the circuit on Autodesk Tinkercad (see video for process). Since Tinkercad does not have a Photon icon, I used Arduino in the diagram, but the idea is the same. In the diagram, red wires go to 3.3V, green wires go to ground, and other colored wires go to pins. The idea is that the tilt sensor is installed on a door so that when someone breaks into the room, the red LED and the buzzer will go off. The green LED serves as a power indicator. The system can be controlled by a button.

Diagram
Show Advanced Options
Wiring the circuit

I tried my best to keep my circuit simple and clear. See the video for detailed process.

Parts
Show Advanced Options
Assembled
Show Advanced Options

Coding the circuits

In the coding step, two more functions were added into the system. First is the online control mechanism. The Wi-Fi connectivity of the Photon enables me to program an online portal for users to view system status and turn it ON/OFF. The online function is called "Knok". User can type "ON" or "OFF" to control the system. The variable "system" indicates the system status (1 for on and 0 for off).

Second, I utilized the IFTTT service so that whenever the alarm even is sent to the cloud, users will receive an email notification so that they do not need to log in to the particle console to view the status.

Show Advanced Options
Show Advanced Options

Reflection

Overall, the project was fun to work on and the result was successful, but there are also some places that can be improved"

What goes well:

  • The circuit works as expected;
  • The remote control function works as expected, so users can turn the system ON/OFF online;
  • The email notification feature works just fine;
  • It was difficult to align the green LED (power indicator) to the system status in the code, but I managed to make sure the LED is turned ON/OFF correctly whether the user is sending messages with the button or online.

What needs improvement:

  • The tile sensor is not super accurate. It has lag or requires extra shake to be triggered sometimes.
  • The system was not installed on an actual door. If given more time, I would further test its usability by putting it on my door.
  • The email notification from IFTTT is slow. It takes 1-2 minutes to receive the email. Also, the code does not prevent sending multiple emails at the same time. To avoid getting spammed, the code would work better if I include a mechanism to send one email at a time.
  • The button is too close to the sensor. In real life scenarios, the sensor should be far away from the button, as least on the inside of the door.
Drop files here or click to select

You can upload files of up to 20MB using this form.