Background
Do you have a pet, like a cat, that does not listen to you and jumps on countertops to get human food when you are not looking? Due to this being a common occurrence in our apartment, we decided to create an IOT device that detects motion and will scare our cat off the countertop. When motion is detected, a sound will be made through the speaker to scare the cat off the counter. In addition to the speaker making a sound, it will alert you through a text message and collect data every time motion is detected. Attached to our Hackster page are pictures, a video showing how this device works, code, and circuit diagrams for the device. Also on our page we have all the equipment and online programs needed complete this project. The main equipment used were two particle photons, a PIR motion sensor, and a 8 ohm 0.5 W speaker.
How It Works- Motion Sensor
The first photon, named CatMotion, is connected to a PIR motion sensor. When motion was detected by the motion sensor, a LED light placed in Pin D7 of the photon would light up. In addition to the LED light turning on, the photon would publish the event and thus, notify the second photon of the motion. When published, the data was collected, day and time, on a google sheet using ITFFF. From there a live graph, shown below, was created. Also using ITFFF, a text message would also be sent, to notify the owner of the cat being on the counter.
How It Works- Speaker
The second photon, named Cat Beeper, is connected to the 8 ohm 0.5 W speaker. When the first photon published the data to the event, the second photon was notified of the motion and thus cause the speaker to play a loud sound to scare the cat off the counter. The second photon would then publish an event turning the Pin D7 LED light off on the first photon. This demonstrates that the two photons successfully communicate with each other.
Comments