For our project, we pulled inspiration from events that were occurring around us: our roommates were stealing our beer, and didn't replace it with more. So we decided to find a way to track how often our fridge was opened.
At first, we wanted to use a photo resistor inside of the fridge in order to read whenever the light inside of the fridge was turned on and off. This worked for a little bit, however depending on how cold the fridge being used was, the readings from the photo resistor were skewed, and therefore making the experiment not repeatable.
So, we opted into using a trip wire system by using an LED beam and the photo resistor. Then, by attaching a piece of cardboard and command strips to the fridge door, we had a way to break the beam and put it back in tact. However, the beam would be in a constant state of "broken" when the fridge door was closed, and "intact" when the door was open, so we just switched the parameters. We would only be notified when the door was opened and the beam was intact.
1 / 4 • Door closed with beam broken
A second photon was used to turn on a piezo buzzer whenever the door was opened. Then this photon was linked with IFTTT to send a notification to the users phone, as well as update a live graph in Google Sheets (seen below).
Second Photon with a buzzer
Google Sheets Graph: https://docs.google.com/spreadsheets/d/1AKvcHYoBtCIu9vAf5Rr4s1Kz5T7g98v-STiwLmKFq3Y/edit?usp=sharing
3 applets were used: one to write a "1" when the fridge was opened, one to write a "0" when it was closed, and one to send a notification. This way, you wouldn't have to always be near the buzzer in order to know someone was inside your fridge.
With the alarm and notification system, we have been able to catch our roommates in the act of stealing our beer, as well as catching them off-guard with the buzzer! Budwhiner has certainly kept our beer in the clear.