Software apps and online services
Hand tools and fabrication machines
A water fountain for your pets is great for them and looks super cool! However, forgetting to keep the water reservoir filled? Not so much. With this water level monitoring system, you'll never forget to add water again. Your pets will survive long enough to thank you (maybe).
Pet Drinking Fountain
The Catit Flower Fountain is the water vessel we are using. This fountain features a three liter water reservoir. The water is pumped up to the top using a small motor placed in the bottom of the reservoir. It exits and streams down a flower attachment, and then flows through a filter back to the reservoir. The problem being solved is that the reservoir is a solid white, plastic container. It is hard to see the water level accurately without taking the entire top off the fountain. This can make it easy to forget to check the water level, and even easier to forget to refill it. If the water in the reservoir gets too low, the motor is at risk of burning out, which is definitely not what you want. Our sensor system works to resolve this issue!Sensors
Our system features two level sensors. The first is a gravity non-contact liquid level sensor fashioned to the exterior of the water fountain. This sensor supplies a Boolean response as to whether or not the water level is above or below a certain point.
The second sensor is an HC-SR04 ultrasonic level sensor that will tell how far the water level is from the fill-line. This sensor sends a "trigger" signal and waits to receive an "echo" signal back. The time it takes for this signal to return to the sensor is measued in microseconds and needs to be converted. The duration to distance conversion equation (Distance=Duration*(0.34/2)) was found in this video.
From these sensors, the feedback is interpreted and depending on the current status of the water level, it will send an alert when it gets too low. If the sensors disagree, no alert will be sent. The photon connected to the non-contact liquid level sensor will communicate with the photon connected to the ultrasonic distance sensor by sending a message based on the water level. It will then send an email that will say the water is either low or all good. When the other photon receives the message about water level, the ultrasonic distance photon will send a signal to check the distance between the sensor and the surface of the water. If the photon agrees the water is low, it will send a message back to the non-gravity photon saying the reservoir needs to be filled. Otherwise, it will send a message saying everything is good.System Configuration
In order to create our system, we first connected our two sensors to our photons using jumper wires. The ultrasonic distance sensor required four jumper wires for connections and the gravity non-contact sensor required three jumper wires for connections. To attach the ultrasonic distance sensor, we used some hot glue. This would ensure a solid connection to the plastic fountain while also allowing the sensor to be removed without any damage to the fountain. This sensor was placed under the green plate that water flowed over before entering the reservoir again.
The gravity non-contact sensor was attached to the outside of the reservoir at a specific height using a strip of electrical tape. The electrical tape would also allow the sensor to be removed without any damage to the fountain.
Once assembled and after the code was finished, the two sensors were connected to IFTTT Applets. The gravity non-contact sensor (Nick's photon, "myphoton") was subscribed to an IFTTT Applet that sends a push notification if the photon publishes that the water level is too low.
Here is an example of the notification the IFTTT Applet sends after receiving the event from the photon.
The ultrasonic distance sensor photon (Letice's photon, "echo_boi") was subscribed to an IFTTT applet that logged the distance data in Google Sheets.
This is an example of how the IFTTT Applet works when the ultrasonic distance sensor photon publishes to it.
The data above was then graphed to show the photon publishing in real time.
Disclaimer: No pets were harmed in the making of this project. They actually enjoyed it! Meet the team's furry friends: