The purpose of this in-home security system is to alert the user when someone is walking towards the front door. This is a two-part device: The motion sensor is located at the door, and the alert system is located at the user’s choice.
There are two parts to the device, the motion detection subsystem, and the notification subsystem. This versatile device was originally developed as an inexpensive in-home security system. It was convenient to have the motion detection system above the outside of the front door while the buzzer and LED notification system was at the bedside table. Next, the motion detection system was connected to a phone, so the user can be notified by an app notification through IFTTT. This offered a separate use for the apartment this device was applied to: The device became a remote security system as well as a package delivery notification system. This multi-use device proved to be versatile and was under one-hundred dollars.
How it Works:
In each of the two subsystems, there was a photon connected to a local WI-FI. Photon one was connected to the PIR motion detection subsystem, and Photon two was connected to the notification subsystem.
For the motion detection subsystem, a PIR motion sensor was connected to the VIN and GND pins on Photon one. The third terminal of the PIR was connected to the D1 pin on Photon one but could be connected to any of the DX pins on Photon one and programmed accordingly. The process of the subsystem was as follows: First, the motion sensor sensed motion. Next, the D1 pin read a HIGH signal and an if statement was executed so that when both the current PIR state is LOW and the incoming signal is read HIGH, then the on-board LED of Photon one lit up and “detected_motion” was published to the photon cloud. The sensor was not read again until after ten-thousand milliseconds from the last motion detected.
For the notification subsystem, a five-volt buzzer was connected to the GND and D2 pins of Photon two. The buzzer could have been connected to any one of the DX pins and programmed accordingly. The process of the subsystem was as follows: Particle two was subscribed to Photon one so that when the event “detected_motion” was published to the photon cloud, the on-board LED of Photon two lit up, and an analog frequency was executed on the buzzer.
Additionally, the IFTTT application was subscribed to the photon cloud of Photon one so when the “detected_motion” event was published to the cloud a notification appeared on the user’s phone. Using IFTTT, a google sheets file was also subscribed to the photon cloud where data was captured for detections vs time.
Figure 2: Detection VS Time