Sproky - Smart Speaker

by HoPE in Circuits > Raspberry Pi

293 Views, 0 Favorites, 0 Comments

Sproky - Smart Speaker

IMG_8554.JPEG
IMG_8558.JPEG
IMG_8555.JPEG
IMG_8556.JPEG
IMG_8557.JPEG

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 reflects the weather outside or not. For example, if outside it's raining and you want to reproduce music that reflects 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-reflecting" button.

The speaker works with a Raspberry PI and a touch screen, from which you can control the whole project.

Supplies

  • 1 Raspberry PI 4 https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
  • 1 Display touch 5-inch Waveshare https://www.waveshare.com/wiki/5inch_HDMI_LCD
  • 2 Speakers
  • 1 Amplifier
  • 1 Rechargeable battery of 12 volt
  • 1 Button
  • Electrical cables
  • 2 Capacitors (electrolythic 1000uF, 25V)
  • 1 Voltage regulator (5 volt)
  • Wood
  • Spray cans

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.

Downloads

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 artificial 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.

Downloads

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.

Building the Electrical Circuit

Elecrtical Circuit.PNG

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.

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 wifi and run the Sproky application.