We were trying to target something having to do with water conservation. I was just running through ideas of simulations of home life that could teach water conservation tips. Then I thought about showering and how long I wait for my shower to be the correct temperature to not risk the chance of feeling cold water, and, BOOM, it clicked that a lot of water is likely wasted with that time spent. But, why stop at just tracking time spent getting your shower to the right temperature? We moved on to tracking the full length of your shower, and stating how many gallons of water are used with both to make people more aware of the resources they spend.
What it does
This is a device that is attached to the shower head, and, using a combination of a temperature sensor and a button, it tracks the time it takes to reach your desired water temperature and time spent showering. It uses that data along with the average flow rate of shower heads in the US to determine how much water is spent during your shower. This data is saved and tracked on a React web app and a flutter mobile app.
How I built it
Back-End We used Firebase's Cloud Firestore as a noSQL database that we could store our shower information. We used Arduino's easy hardware compatibility to gather data with sensors. We used the mobility and wifi accessibility of the Raspberry pi as a means to take the data and add it to our database. A long running python program is used to continually update the database.
Front-End We used React to make a web app that allows the user to see their shower data. We used the Shards UI to style the web app, and we fetch the data displayed from our Firestore database. However, some people like the portability of a mobile app to track things and reflect on water usage on the go. So, we developed a flutter mobile app that displays the same data as the web app.
Hardware With Arduino we are using a temperature sensor, a buzzer, a button, and an RGB LCD screen to create an interactive sensor platform. The temperature sensor is used to track the temperature of the water going through the shower. In addition to that we use drastic temperature changes to know when to start timing (e.g., sudden positive change means the shower is on, continuous temperature decrease means the shower is over. However, the button provides a failsafe, as other factors may affect the temperature. When a continuous decrease occurs the user will be prompted to press the button if they are still taking a shower. Otherwise, it will end automatically. The buzzer is used to warn the user when their shower has reached the desired temperature, and to let the user know when their shower might be taking longer than desired. The real magic comes from the lcd display which changes color over time once a shower begins to provide a gentle reminder that the shower should start coming to an end.The role of the raspberry pi is a lot simpler and acts mostly as a wifi shield and a power supply for the Arduino. This allows all the data collected to be continuously uploaded to the database. In this way, the user can receive immediate feedback on their actions
Challenges I ran into
The biggest challenges was implementing Firestore in three different languages and frameworks. It had to be implemented in python to upload data onto the database. It had to be implemented in React and Flutter to be able to fetch the data that was being uploaded. The documentation for the api was not the most clear so it took a bit of online instruction studying.
For a while we were trying to cut out the Arduino entirely, but the raspberry pi had some hardware drawback that we could not easily overcome. The pi was only expecting to deal with 3.3v components, and there were no level shifters available at the hardware lab. We looked up some circuit diagrams of building our own level shifter, but in the end we determined using both an Arduino and pi would be faster.
The other difficult thing was implementing the button failsafe on the Arduino. Figuring out exactly how to use interrupt with our button in conjunction with our temperature sensor took quite a bit of trial and error.
Accomplishments that I'm proud of
The greatest accomplishment is the surprisingly smooth combination of such a diverse pool of technologies. Everyone in the group was truly capable of developing in their specific niche. On top of that, the majority of the group had never met. So, for a group of strangers to come together on a project like this is truly beautiful. One member being versed in web development, One member in mobile development, One member in Hardware, and myself as a python developer and jack of all trades to smooth things over and provide an extra hand where needed allowed my goofy 3am idea to actually come to fruition.
On top of that half the group had never been to a hackathon before, and the member that had gone to the most hackathons only had two under his belt. So, to have created something of this magnitude, at least with respect to my experience, and in such a short timespan is something I am very proud of.
What I learned
I got a lot of experience with Hardware that I had not had before. I had not worked with this brand of components so seeking out the wiring documentation was fun. I also did not have a lot of Arduino development under my belt so it was fun learning a bit of that.
I know one of my group members who was focused on the mobile app development did not have a lot of prior flutter experience. I know connecting to the Firestore api was a fun implementation to learn.
We also had two group members that joined for very short periods of time then left the group without a word. So it was a good learning experience to remain flexible and focused with a changing group.
What's next for Project warm water
In terms of software, it would be great to be able to add a social aspect to the system. In this way users could compete to conserve water. Users would be able to follow other users to see how efficient their friends and family are making showers. It would be such a positive form of gamification! In terms of hardware, it would be great, long-term, to shrink the hole system down to fit inside a shower head that someone could buy. Short-term, our system is clunky and not quite ready for use. So, slimming it down and making it truly waterproof would be a good next step.