Qudio Player
An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp (again)
-In spring 2016 I finalized the "Musikrakete", a music player that our boys could operate without assistance. Later on, there was a second version. This is the third version, with all of the improvements I came up with during the last three years. It is easier and cheaper to build, the case is way smaller and much more robust. By switching to volumio the player now supports remote control from the phone and streaming services like Spotify. This is all combined with the existing features like playing MP3s from the local network and, most importantly, being easy to use even for small children. So if your children love music and audio books just like mine, this might be a project for you.
+In spring 2016 I finalized the "Musikrakete", a music player that our boys could operate without assistance. This is the third version, with all of the improvements I came up with during the last three years. It is easier and cheaper to build, the case is way smaller and much more robust. By switching to volumio the player now supports remote control from the phone and streaming services like Spotify. All of this combined with the existing features like playing MP3s from the local network and, most importantly, being easy to use even for small children. So if your children love music and audio books just like mine, this might be a project for you.
The Idea
-
+
- This project started in 2016, when Anica asked me if buying a hörbert MP3 player would be a good idea. At the time our boys wasted two to three CDs every week, trying to get some music out of the small player in their room. And the player in the living room also seemed to reach its end of life pretty soon due to their enthusiasm. Still I wasn't too sure about this hörbert thing. In order to get new files on the SD card of the player, the case had to be opened, the navigation with 11 buttons seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me. + This project started in 2016, when Anica asked me if buying a hörbert MP3 player would be a good idea. At the time our boys wasted two to three CDs every week, trying to get some music out of the small player in their room. And the player in the living room also seemed to reach its end of life pretty soon due to their enthusiasm. Still, I wasn't too sure about this hörbert thing. In order to get new files on the SD card of the player, the case had to be opened, the navigation with 11 buttons seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me.
@@ -104,11 +104,11 @@ h2, h3, h4 {
- As good as the project description seemed to be, I wanted to make some improvements on the original design: The player should detect the QR automatically, it should have buttons for play/pause and skipping and all components should be put together in a single case. Most importantly, the MP3 files should be delivered directly from our home server. No SD card replacement needed. + As good as the project description seemed to be, I wanted to make some improvements on the original design: The player should detect the QR card automatically, it should have buttons for play/pause and skipping and all components should be put together in a single case. Most importantly, the MP3 files should be delivered directly from our home server. No SD card replacement needed.
- Since we had an old JBL On Stage IIIp speaker lying around that wasn't used anymore due to its outdated iPhone dock connector, I decided to use this as a base. After playing around with Onshape, soldering and programming for three months, I had the Musikrakete ready by end of March 2016. It was a huge success with the boys and has been in heavy use ever since. + Since we had an old JBL On Stage IIIP speaker lying around that wasn't used anymore due to its outdated iPhone dock connector, I decided to use this as a base. After playing around with Onshape, soldering and programming for three months, I had the Musikrakete ready by end of March 2016. It was a huge success with the boys and has been in heavy use ever since.
@@ -124,7 +124,7 @@ h2, h3, h4 {
PiPlayer 3.0: Qudio
- This third version now relies on volumio which can play music from streaming services like Spotify Premium or LastFM, has a nice web interface and makes configuration easy. The case is much smaller than before, which makes it sturdier and easier to print. The electronic parts are all easily obtainable standard compontents and even cheaper than before. Again, it is built on top of the JBL On Stage IIIp speaker, that can still be found on ebay for little money and provides a perfect base for a player like this. + This third version now relies on volumio which can play music from streaming services like Spotify Premium or LastFM, has a nice web interface and makes configuration easy. The case is much smaller than before, which makes it sturdier and easier to print. The electronic parts are all easily obtainable standard compontents and even cheaper than before. Again, it is built on top of the JBL On Stage IIIP speaker, that can still be found on ebay for little money and provides a perfect base for a player like this.
@@ -140,11 +140,11 @@ h2, h3, h4 {
Caution: The older On Stage III with the mini USB port will probably not work! I tried several and they either did not power the Raspberry Pi properly or I had noise issues that I could not resolve.
Assembling the Components
Preparing Speaker and Printed Case
@@ -190,11 +166,11 @@ h2, h3, h4 {- After removing the screws you can upen up the case. (It is possible to drill the holes without removing the circuit board from the case. However, it might be a good idea to play it safe and get it out.) The circuit board is fastened with another four screws that have to be removed. Then the board can be pulled out of the case carefully. The power button of the speaker is the most sensitive part here. To make life easier, you can also pull off the speaker cables from the board. Now the cover is completely separated from the bottom and the circuit board. + After removing the screws you can upen up the case. The circuit board is fastened with another four screws that have to be removed. Then the board can be pulled out of the case carefully. The power button of the speaker is the most sensitive part here. To make life easier, you can also pull off the speaker cables from the board. Now the cover is completely separated from the bottom and the circuit board.
- The next step is to drill the three mounting holes into the cover, for which you can use this template. (Make sure to print without scaling.) Finally, we need to mount the base of the printed case to the speaker case using thee M3 screws with nuts. Afterwards, we can put the circuit board back in the case and put all the screws back in place. + The next step is to drill the three mounting holes into the cover, for which you can use this template. (Make sure to print without scaling.) Finally, we need to mount the base of the printed case to the speaker case using three M3 screws with nuts. Afterwards, we can put the circuit board back in the case and put all the screws back in place.
@@ -220,7 +196,7 @@ h2, h3, h4 {
Putting the Threaded Inserts into the Printed Parts
- Now is also a good moment to put the threaded inserts into the printed parts. This is done by carefully pushing them into the plastic with a heated soldering iron. As soon as the plastic has cooled down, the inserts will stay in place and allow to close and open the connections without tearing the plastic apart. This video on 3Dhubs shows how it is done. + Now is also a good moment to put the threaded inserts into the printed parts. This is done by carefully pushing them into the plastic with a heated soldering iron. As soon as the plastic has cooled down, the inserts will stay in place and allow to close and open the connections without tearing the plastic apart. This video on 3Dhubs shows how it is done.
@@ -235,7 +211,7 @@ h2, h3, h4 {
Installing the Window
- For the window on top of the case, we need to cut a 47 × 27 mm part of acrylic glass. This can be done with a normal cutter knife by (carefully!) repeatedly cutting along your marker line with a ruler until you can break it off. You might need to file the edges a bit until it fits into the 48 × 28 mm slot inside the cover. + For the window on top of the case, we need to cut a 50 × 28 mm part of acrylic glass. This can be done with a normal cutter knife by (carefully!) repeatedly cutting along your marker line with a ruler until you can break it off.
@@ -254,9 +230,9 @@ h2, h3, h4 {
Wiring
- -- Apart from preparing the audio module there is not much soldering involved. All the components are plugged together with jumper wires and put into the case. + +
+ Fritzing schema of the wiring
@@ -300,7 +276,7 @@ h2, h3, h4 {
- Unfortunately, the cable also has to be moved from the back of the case to the bottom, in order to be able to place the camera at the bottom. You can just make a small cutout with a sharp knife to make space for the cable. However, if you want to play it safe it might be better to open the case up with a screwdriver before cutting it. + Unfortunately, the cable also has to be moved from the back of the case, in order to be able to place the camera on top of the speaker. You can just make a small cutout with a sharp knife to make space for the cable. However, if you want to play it safe it might be better to open the case up with a screwdriver before cutting it.
@@ -308,8 +284,8 @@ h2, h3, h4 {
@@ -354,11 +330,11 @@ h2, h3, h4 {
- The pins of the module need to be bent up to fit in the case. (For some reason all the modules have 90 degree pins.) We can then use the M3 screw hole to fasten it to the top. The little potentiometer on board allows to adjust the sensitivity of the sensor in place. + The pins of the module need to be bent up to fit in the case. (For some reason all the modules have 90 degree pins.) We can then use the M3 screw hole to fasten it to the top. The little potentiometer on board allows to adjust the sensitivity of the sensor in place, if needed.
- My sensor permanently fired whenever if tightened the scew. Apparently the threaded insert connected two of the pins. I solved this by covering the pins on the back side with some hot glue. + My sensor permanently fired whenever I tightened the screw. Apparently the threaded insert connected two of the pins. I solved this by covering the pins on the back side with some hot glue.
@@ -381,13 +357,13 @@ h2, h3, h4 {
LED
- The led is put in the small holder at the front side inside the cover. Connect the long leg to pin 15 (GPIO 22) of the Raspberry Pi (with a resistor in between, if needed), the short one to pin 9 (GND). I dimmed the LED with a 220 Ω resistor even though it could work on 3.3 V because it was just too bright. + The led is put in the small holder at the front side inside the cover. Connect the long leg to pin 15 (GPIO 22) of the Raspberry Pi (with a resistor in between, if needed), the short one to pin 9 (GND). I dimmed the LED with a 220 Ω resistor even though mine could operate directly on 3.3 V because it was just too bright. The QR recognition does not need much light.
Closing the Case
- Now it is time to put the remaining parts in place: Hook up the camera to the Raspberry Pi using the micro USB adapter. Also connect the two ends of the dock adapter cable to the audio module and the Raspberry Pi. Move all the cables in a place where they do not block the camera and close the case. + Now it is time to put the remaining parts in place: Hook up the camera to the Raspberry Pi using the micro USB adapter. Also connect the two ends of the dock adapter cable to the audio module and the Raspberry Pi. Move all the cables in a place where they do not block the camera, bring up your best origami and close the case. You might need two or three attemps until everything is in the right place, but it fits in, believe me.
@@ -398,47 +374,99 @@ h2, h3, h4 {
+ OK, well done. Now reopen the case, the player is still missing its SD card with the software. +
Software Installation and Configuration
--TODO - -Etcher? --
Volumio
- First of all, you will have to download the volumio image for Raspberry Pi and put it on your micro SD card. Once you have done that, put it in and start the Raspberry Pi by powering the speaker.
+ First of all, you will have to download the volumio image for Raspberry Pi and put it on your micro SD card. (I had some problems using dd which I did not follow up on. Instead, I used balenaEtcher which worked fine.) Once you have done that, put it in and start the Raspberry Pi by powering the speaker.
- The initial configuration is pretty straight forward. Open up volumio.local (or the Raspberry Pi's IP address) in your browser and click through the installation assistant. Set the output to "Generic I2S DAC", activate the software mixer and connect to your network share (if any). You can also already set up plugins for streaming services like Spotify. Finally, activate SSH on the developer page volumio.local/dev for the next steps. + The initial configuration is pretty straight forward. Connect to the WiFi network "volumio" that has been opened up and click through the installation assistant. Set the output to "Generic I2S DAC", activate the software mixer and connect to your network share (if any). You can also already set up plugins for streaming services like Spotify. Finally, activate SSH on the developer page qudio.local/dev (or whatever your hostname was) for the next steps. +
+ + + + + ++ Before you leave the SD card in the Raspberry Pi for good, you might want to shutdown volumio, put the card back into your computer and copy over the contents of the /code directory into /data/INTERNAL/qudio. (The data directory is only available after first start, which is why we had to complete the installation assistant first.) +
+ ++ Alternatively you can copy over the code via ssh, but doing it directly on the SD card might be easier. In addition to that, you can put some music directly on the SD card, if you want to. Everything in the INTERNAL directory will be available in volumio after a rescan.
Python Script
- You can now connect to the Raspberry Pi via SSH as user volumio. The initial password is volumio which you might want to change with passwd.
+ After putting the SD card back in and booting up the player you can connect to the Raspberry Pi via SSH as user volumio. The initial password is volumio which you might want to change with passwd.
The next step is to install the necessary software packages:
-sudo apt-get install fswebcam zbar-tools
+ sudo apt-get update
+sudo apt-get install fswebcam zbar-tools
+
+
+ Now look for the camera (it should be available under /dev/video0) and make a test photo. You can check it out at http://qudio.local/backgrounds/webcam-test.jpg from your computer.
+
lsusb && ls /dev/video*
+fswebcam -r 320x240 -d /dev/video0 -v /data/backgrounds/webcam-test.jpg
+
+ + Before we go on, we need Python 3.6 on the Raspberry Pi. Earlier version have a bug in socketio-client (which we need for remote control of volumio) and the current version 3.7 has a problem with OpenSSL, so 3.6 it is. Unfortunately, we will have to built it from the source, which takes a while. +
+ +sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
+cd ~
+wget wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
+tar xf Python-3.6.5.tar.xz
+cd Python-3.6.5
+./configure
+make
+sudo make altinstall
+
+
+
+ When this is completed entering python3.6 --version should result in "Python 3.6.5" on the command line. Now add the required libraries:
+
sudo easy_install-3.6 -U pip
+sudo pip3.6 install --upgrade pip
+sudo pip3.6 install socketio-client
+sudo pip3.6 install RPi.GPIO
+
--Install python 3.6 and socketio-client -Copy over script -
Configuration und Test
-Test LED, Webcam +Test LED, Webcam and QR recognition






