Sproky is a smart speaker capable of playing a certain type of music based on the weather outside, considering the time of the day and also the temperature. The most notable aspect of the speaker is that when you switch it on you can choose if you want to play a genre of music that reects the weather outside or not. For example, if outside it’s raining and you want to reproduce music that reects the weather, you’ll be listening to sad music, but if you want to cheer yourself up, you can listen to happy music by clicking the “non-reecting” button.
The speaker works with a Raspberry PI and a touch screen, from which you can control the whole project.
- 1 Raspberry PI 4
- 1 Display touch 5-inch Waveshare
- 2 Speakers
- 1 Amplifier
- 1 Rechargeable battery of 12 volt
- 1 Button
- Electrical cables
- 2 Capacitors (electrolythic 1000uF, 25V)
- 1 Voltage regulator (5 volt)
- Spray cans
Step 1: Building the Structure
First of all, we gathered all the components we needed for the speaker and then we took measurements. We cut the wood comprising all the parts of the structure. Finally, we built the speaker making the upper part possible to open and close and we spray-painted it.
After cutting all the parts we had to pay attention to all the electronic components we had to insert into the enclousure. We made four holes: one for the screen, two for the speakers and a small one for the button.
Step 2: Making the Code
We wrote the code in Python. Our program gets a .csv file from an online weather provider to determine the rain status and the actual temperature.
Mixing the data obtained with the time and user preferences, the program selects the right playlist to play. We also made an application for running the code.
For the music we would have preferred using articial intelligence to select playlists for each genre of music but, unfortunately, we weren’t able to do that. Instead, we designed the four playlists ourselves.
Step 3: Making the Playlists
After we wrote the code we made the playlists. The playlists are:
- Melancholy and sad music;
- Relaxing and peaceful music;
- Moderately happy music;
- Energetic and euphoric music.
We have mixed these playlists looking at all the parameters the speaker can obtain. All the possible combinations are in the file below. You can see the combinations for the music that will be played when you want to reflect the weather and also for when you click the non-reflect button.
Step 4: Building the Electrical Circuit
Once the system was functioning we converted from a plug-in DC power supply to a 12V battery. We used two capacitors to help maintain constant working voltages and one voltage regulator of 5V. It’s very important to put a heatsink attached to the voltage regulator to cool it down while working.
Step 5: Enjoy Sproky!
Our project is now concluded!
You have only to switch on the power button, wait until the Raspberry is on and then connect it to the Wi-Fi and run the Sproky application.