diff --git a/code/piplayer2.py b/code/piplayer2.py index 0ee4a5c..98ff966 100644 --- a/code/piplayer2.py +++ b/code/piplayer2.py @@ -1,4 +1,4 @@ -# piplayer2 +# piplayer2 - The AudioSphere # http://www.tilman.de/piplayer2 import RPi.GPIO as GPIO import logging diff --git a/documentation/images/micro-usb-hub.jpg b/documentation/images/micro-usb-hub.jpg new file mode 100644 index 0000000..e2d5365 Binary files /dev/null and b/documentation/images/micro-usb-hub.jpg differ diff --git a/documentation/images/piplayer-02-07.png b/documentation/images/piplayer-02-07.png new file mode 100644 index 0000000..a225b0e Binary files /dev/null and b/documentation/images/piplayer-02-07.png differ diff --git a/documentation/images/piplayer-02-500.gif b/documentation/images/piplayer-02-500.gif new file mode 100644 index 0000000..6b7cbcf Binary files /dev/null and b/documentation/images/piplayer-02-500.gif differ diff --git a/documentation/images/piplayer-04-04.png b/documentation/images/piplayer-04-04.png new file mode 100644 index 0000000..37f3cab Binary files /dev/null and b/documentation/images/piplayer-04-04.png differ diff --git a/documentation/images/piplayer-04-07.png b/documentation/images/piplayer-04-07.png new file mode 100644 index 0000000..19f52aa Binary files /dev/null and b/documentation/images/piplayer-04-07.png differ diff --git a/documentation/index.html b/documentation/index.html index 8d651f2..6e999fb 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -1,7 +1,7 @@ -piPlayer +PiPlayer 2: The AudioSphere @@ -86,52 +86,132 @@ h2, h3 {
-

2017-01-08

-

Music Ball

-

An mp3 player for children based on the Raspberry Pi Zero and the JBL OnStage IIIp

+

2017-01-14

+

AudioSphere

+

An MP3 player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp

- - -

Der CD-Player im Kinderzimmer war zwar beliebt, aber nicht wirklich praktisch: Die CDs waren so - schnell zerkratzt, dass ich mit dem nachbrennen kaum hinterherkam und auch das Gerät selbst schien schon nach einem dreiviertel - Jahr seinem Ende entgegen zu gehen. Deshalb sollte eine neue Lösung her. Möglichst robust, ohne CDs und auf jeden Fall ohne - Hilfe der Eltern bedienbar.

- - + +

Contents

+
    +
  1. The Idea
  2. +
  3. PiPlayer, version 2.0: AudioSphere
  4. +
  5. 3D Printed Case
  6. +
  7. Hardware
  8. +
  9. Software
  10. +
  11. User Manual
  12. +
+ +

The Idea

- Es fing damit an, dass Anica mich mit Begeisterung auf den hörbert aufmerksam - machte. Das ist ein mp3-Player für Kinder, genauer gesagt ein Mono-Lautsprecher im Holzgehäuse mit einem SD-Slot und vier - AA-Batterien. An der Vorderseite können bis zu neun Tracks über bunte Tasten direkt ausgewählt werden. + This project started about a year ago, when Anica asked me if buying a hörbert mp3 player would be a good idea. After all our boys wasted two to three CDs every week, trying to get some music out of the small player in their room. And the CD player in the living room also seemed to reach its end of life pretty soon. Nevertheless, I wasn't too sure about the device. In order to get new files on the SD card of the player, the case had to be opened, the navigation with 11 buttons also seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me. +

+ +

+ I had seen a project description of an mp3 player for small children shortly before: A Raspberry Pi, connected to a webcam and speakers reads QR codes and plays the respective track or playlist. So this was what I suggested and to my surprise it was considered a better solution right away. And I had a project. +

+ +

+ As good as the description seemed to be - I wanted to make some improvements on the original design: The player should detect the QR cards on its own, all components should be put together in a single case and, most important, the mp3 should be delivered directly from our home server. No SD card replacement needed. +

+ +

+ Since we had an old JBL OnStage IIIp speaker lying around that wasn't used anymore due to its outdated 30 pin 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's been a huge success with the boys and has been in heavy use ever since. +

+ +

+ But there were still some open ends on the technical side and I knew that we might need a second player, once the boys have both a room of their own. So when Anica was searching for a good gift to her best friend's son we decided that an updated version would be a good idea. +

+ +

PiPlayer, version 2.0: AudioSphere

+ +

+ The major improvement in handling was switching from a QR card slot to a window on top where the QR cards are placed on. I had seen that especially the smaller one had problems getting the cards into the narrow slot. Unfortunately, this also meant that a rocket shape was not an option anymore. At first I tried to put only a hemisphere on top of the JBL speaker which would make it look like a UFO. But the webcam needed at least 10 cm distance to the card in order have the entire QR code covered. Technically, it would be possible to further reduce the size of the ball but fitting all the components in there is hard enough as it is. Also, I wanted to be able to use the cards from the first player in the new one as well. +

+ +

+ Also, an ethernet port is now available (since we had problems with the Wi-Fi connection in the boy's room) and thanks to switching to the Raspberry Pi Zero, the Apple dock port is now able to provide power for all the components. No additonal power source needed. By incorporating a Pimoroni PHAT DAC I removed all the audio-related headaches. +

+ +

+ On the software side there's two major improvements: The SD card is now mounted read-only by default. This makes unplugging the AudioSphere (by accident or for reboot) unproblematic. And the Python script that operates the player now uses interrupts instead of polling for checking the input sources. This removes unnecessary overhead from the CPU and also reduces power-consumption. +

+ +

+ OK, so much for the overview - let's build this, step by step. +

+ +

3D Printed Case

+ +

+ First step was the design of the new case. Like the first rocket case it's public, you can find it here on Onshape. (You will need to create an account to open the document.) Or you can directly download the STL files for printing if you are using the very same components. (Please note that you will need to rotate the top of the sphere 180° for printing.)

-
-

Für alle, die es genau wissen wollen und als Dokumentation noch der - Projektverlauf mit allen Details:

+

Hardware and Assembly

+ +

Parts list

+ + + +

Preparing the JBL IIIp Speaker

+

Electronics

+ +

Software

+

System Installation

+

Python Script

+ +

User Manual

+

+

QR Cards

+ -

Planung und erste Schritte

diff --git a/documentation/misc/audiosphere-stl.zip b/documentation/misc/audiosphere-stl.zip new file mode 100644 index 0000000..338b3fc Binary files /dev/null and b/documentation/misc/audiosphere-stl.zip differ diff --git a/documentation/misc/lirc_jbl_iiip.conf b/documentation/misc/lirc_jbl_iiip.conf new file mode 100644 index 0000000..157469b --- /dev/null +++ b/documentation/misc/lirc_jbl_iiip.conf @@ -0,0 +1,46 @@ +# Please make this file available to others +# by sending it to +# +# this config file was automatically generated +# using lirc-0.9.0-pre1(default) on Sun Dec 11 19:02:32 2016 +# +# contributed by +# +# brand: JBL +# model no. of remote control: JBL 10-Button Remote +# devices being controlled by this remote: JBL IIIP +# + +begin remote + + name JBLIIIP + bits 16 + flags SPACE_ENC|CONST_LENGTH + eps 30 + aeps 100 + + header 9059 4509 + one 565 1694 + zero 565 564 + ptrail 567 + repeat 9062 2252 + pre_data_bits 16 + pre_data 0x2F5 + gap 108487 + toggle_bit_mask 0x0 + + begin codes + KEY_VOLUMEDOWN 0x807F + KEY_VOLUMEUP 0xC03F + KEY_MUTE 0x9867 + KEY_PLAYPAUSE 0x40BF + KEY_PREVIOUS 0x48B7 + KEY_NEXT 0xA05F + KEY_SCROLLUP 0x7887 + KEY_SCROLLDOWN 0xF00F + KEY_MENU 0x58A7 + KEY_ENTER 0x609F + end codes + +end remote +