Water crisis is a pressing problem around the world. There are 1.1 Billion people lack access to water and 2.7 Billion experience water scarcity at least one month a year. (worldwildlife.org) Nearly, 1 Million people die each year from water, sanitation, and hygiene-related disease. Every 2 minutes, a child die from water-related disease. (water.org) Reducing shower time by just a minute or two can save significant amount of water. Saving water in the shower also saves energy as well, which makes a huge impact on the environment.
What it does
This app connects to the user's Spotify account and allows the user to pick his/her favorite playlist. The algorithm then randomly selects 2 songs from the playlist that add up to 7 minutes of total play time. The user will then play the songs from Spotify and starts the count down. Once the 2 songs finish playing, the algorithm sends a command to the arduino board activating the motor to reduce the pressure of the showerhead. This indicates that the user has reached optimal shower time and should stop showering.
How we built it
We used the python library called Spotipy which is a wrapper around the Spotify API to make a connection and get access to our Spotify accounts. For the front end, we used a python library called Streamlit which takes care of all of the GUI elements. We also used requests to make a connection with an ESP 8266 Arduino board that operates the motor. The motor is coded to turn one rotation after receiving the signal from the ESP 8266 module to reduce the pressure of the showerhead.
Challenges we ran into
The motor we have was not powerful enough to pull the adjusting knob all the way. Therefore, in order for this system to work, we will have to purchase a more powerful motor.
Accomplishments that we're proud of
Getting the user authentication working for the app around the Spotify API was a huge challenge for us and we were happy that we have learnt a lot about Spotipy and making it work in a way to read the playlist and randomize the selection of the songs.
What we learned
We have learnt a lot about the different libraries of Python and connecting the software and hardware parts together. We have also learnt to manage our time properly to make sure we get equal work done for different components and that we can present our ideas clearly and concisely.
What's next for Shower Better
We are looking forward to optimizing the flow of the application and making the hardware work with a more powerful motor. We are also hoping to publish the website to raise more awareness around the world on the problem of water shortage.