documentation
This commit is contained in:
+28
-17
@@ -149,7 +149,7 @@ h2, h3 {
|
||||
<h2 id="case">3D Printed Case</h2>
|
||||
|
||||
<p>
|
||||
First step was the design of the new case. Like the first <a href="https://cad.onshape.com/documents/56f3cf83e4b02f6312a93771/w/785ccf8684baed006305bb0d/e/c68592f13fbf9a2c69b8dd05">rocket case</a> it's public, you can find it <a href="https://cad.onshape.com/documents/584e7d080f617710a60fc5d3/w/28f44a0afe402320fa3f3faa/e/765c3d5ab7a1032836866ac8">here on Onshape</a>. (You will need to create an account to open the document.) Or you can download the <a href="https://github.com/tliero/audiosphere/tree/master/case">STL files</a> 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.)
|
||||
First step was the design of the new case. Like the first <a href="https://cad.onshape.com/documents/56f3cf83e4b02f6312a93771/w/785ccf8684baed006305bb0d/e/c68592f13fbf9a2c69b8dd05">rocket case</a> it's public, you can find it <a href="https://cad.onshape.com/documents/584e7d080f617710a60fc5d3/w/28f44a0afe402320fa3f3faa/e/765c3d5ab7a1032836866ac8">here on Onshape</a>. (You will need to create an account to open the document.) Or you can download the <a href="https://github.com/tliero/audiosphere/tree/master/case">STL files</a> 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. Also be careful about the Raspberry holder: The Raspberry Pi together with the PHAT DAC should have a height of about 7 mm (or less) which depends on the GPIO header that is used to solder the PHAT DAC to the RasPi. If the height exeeds 7 mm the distance has to be adjusted before printing.
|
||||
</p>
|
||||
|
||||
<p class="gallery">
|
||||
@@ -215,6 +215,10 @@ h2, h3 {
|
||||
<p>
|
||||
After drilling, washers and screws are added and the infrared LED is glued directly in front of the speaker's IR sensor in order to send it commands. Before that the PINs of the IR LED are soldered to cables, that are long enough to connect it to the circuit board through one of the additional holes. Also, all the electronics should be tested together before anything is hot-glued into the case.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
(Disclaimer: I only did a proof of concept test script for remote contolling the speaker via the IR LED until now. I am planning on using that component later on via a web app but for the time being you could as well leave it out.)
|
||||
</p>
|
||||
|
||||
<p class="gallery">
|
||||
<a href="images/jbl_01.jpg" class="fancybox" rel="collection02"><img src="images/jbl_01.jpg" width="320" alt="The opened speaker case with the drilling template" /></a>
|
||||
@@ -228,13 +232,13 @@ h2, h3 {
|
||||
</p>
|
||||
|
||||
<p>
|
||||
After <a href="http://www.instructables.com/id/Multiroom-Client-With-Raspberry-Pi-ZERO-and-PHAT-D/?ALLSTEPS">soldering the PHAT DAC onto the Raspberri Pi</a> (preferably using a <a href="images/gpio-header.jpg">GPIO header</a> that directly routes through all the GPIOs), the used PINs are connected with the jumper cables. Where these were not soldered to the contact, I used hot glue to fix the connection which worked pretty well.
|
||||
After <a href="http://www.instructables.com/id/Multiroom-Client-With-Raspberry-Pi-ZERO-and-PHAT-D/?ALLSTEPS">soldering the PHAT DAC onto the Raspberri Pi</a> (preferably using a <a href="images/gpio-header.jpg">GPIO header</a> that directly routes through all the GPIOs) the used PINs are connected with the jumper cables. Where these were not soldered to the contact, I used hot glue to fix the connection which worked pretty well.
|
||||
</p>
|
||||
|
||||
<p class="gallery">
|
||||
<a href="images/audiosphere-electronics.png" class="fancybox" rel="collection03"><img src="images/audiosphere-electronics.png" width="320" alt="The electronics in a single diagram with the optical sensor on the left, the LED, the infrared LED for remote controlling the speaker and the three buttons." /></a>
|
||||
<a href="images/circuit_board.jpg" class="fancybox" rel="collection03"><img src="images/circuit_board.jpg" width="320" alt="The circuit board after soldering with all resistors and the LED for illumination. Buttons, optical sensor and infrared LED are installed directly in the case." /></a>
|
||||
<a href="images/piplayer-opened.jpg" class="fancybox" rel="collection03"><img src="images/piplayer-opened.jpg" width="320" alt="" /></a>
|
||||
<a href="images/piplayer-opened.jpg" class="fancybox" rel="collection03"><img src="images/piplayer-opened.jpg" width="320" alt="Interior view of the AudioSphere player with all components assebled. The circuit board is glued to the front side (not visible from this angle)." /></a>
|
||||
</p>
|
||||
|
||||
<h2 id="software">Software</h2>
|
||||
@@ -276,8 +280,6 @@ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
sudo ifdown wlan0
|
||||
sudo ifup wlan0
|
||||
|
||||
sudo reboot
|
||||
|
||||
# disable HDMI (http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy)
|
||||
sudo nano /etc/rc.local
|
||||
# /usr/bin/tvservice -o
|
||||
@@ -294,10 +296,16 @@ sudo nano /etc/ntp.conf
|
||||
# server de.pool.ntp.org
|
||||
sudo /etc/init.d/ntp restart
|
||||
date
|
||||
|
||||
sudo reboot
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Now configure the additional hardware and software that's needed for the player. Before doing that, copy the Python scripts and some MP3 files for testing to <code>/home/pi</code> (either directly or via SCP). Have also one of the QR test cards from the template ready for testing. <b>TODO ADD LINK TO TEMPLATE</b>
|
||||
After the basic installation is done, it's time to bring everything together in the case. All components are connected but we'll wait using the glue gun until everything is tested thoroughly. Especially the webcam might need some in-place live adjustment. The easiest way to do this is by connecting the webcam to another computer while it is already in the case (see bash history below).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Now configure the additional hardware and software that is needed for the player. Before doing that, copy the contents of the <a href="https://github.com/tliero/audiosphere/tree/master/piplayer2">piplayer2 directory</a> (including subdirectories <code>sounds</code> and <code>test</code>) to <code>/home/pi</code> (either directly or via SCP). Have also one of the <a href="https://github.com/tliero/audiosphere/raw/master/documentation/QR%20Card%20Template.odt">test cards from the template</a> ready for testing the QR recognition.
|
||||
</p>
|
||||
|
||||
<pre class="pre-scrollable">
|
||||
@@ -310,12 +318,9 @@ curl -sS get.pimoroni.com/phatdac | bash
|
||||
# Check for errors
|
||||
dmesg
|
||||
|
||||
# Start mocp and test the PHAT DAC
|
||||
??????????????? TESTEN
|
||||
??????????????? NÖTIG? sudo nano /etc/modprobe.d/alsa-base.conf
|
||||
# Plug in headphones or JBL connector cable, start mocp and test audio output via the PHAT DAC
|
||||
mocp -S
|
||||
mocp -l ~/piplayer2/sounds/scanning.mp3
|
||||
mocp -p
|
||||
mocp -x
|
||||
|
||||
# Determine the webcams USB ID and the available resolutions (http://askubuntu.com/questions/214977/how-can-i-find-out-the-supported-webcam-resolutions)
|
||||
@@ -329,9 +334,9 @@ sudo fswebcam -r 320x240 -d /dev/video0 -v ~/webcam-test.jpg
|
||||
python3 ~/piplayer2/test/lightoff.py
|
||||
|
||||
# Copy ~/webcam-test.jpg to another computer and have a look at it
|
||||
# If needed, adjust the webcam and repeat the procedure until the QR code can be recognized
|
||||
# If needed, adjust the webcam and repeat the step until the QR code recognition is reliable
|
||||
|
||||
# QR-Test
|
||||
# QR-Test: Hold a QR code card above the webcam then turn on the LED, decode the QR code and turn the LED off
|
||||
python3 ~/piplayer2/test/lighton.py
|
||||
zbarcam --quiet --nodisplay --raw -Sdisable -Sqrcode.enable --prescale=320x240 /dev/video0
|
||||
python3 ~/piplayer2/test/lightoff.py
|
||||
@@ -352,9 +357,9 @@ sudo nano /etc/lirc/hardware.conf
|
||||
# LIRCMD_CONF=""
|
||||
|
||||
sudo reboot
|
||||
<!--
|
||||
|
||||
# Copy the contents of the JBL remote configuration from ~/misc/lirc_jbl_iiip.conf to /etc/lirc/lircd.conf
|
||||
# then restart lircd
|
||||
# Copy the contents of the <a href="https://github.com/tliero/audiosphere/blob/master/documentation/lirc_jbl_iiip.conf">JBL remote configuration</a> to /etc/lirc/lircd.conf then restart lircd
|
||||
sudo /etc/init.d/lirc restart
|
||||
|
||||
# Turn on music, list available commands and test remote control
|
||||
@@ -363,12 +368,18 @@ sudo lircd -d /dev/lirc0
|
||||
irsend LIST JBLIIIP ""
|
||||
## Der Befehl muss 2x schnell hintereinander gesendet werden. Offensichtlich muss die Konfiguration noch verbessert werden.
|
||||
irsend SEND_ONCE JBLIIIP KEY_MUTE
|
||||
-->
|
||||
</pre>
|
||||
|
||||
# autostart for piplayer with log output redirection
|
||||
# (siehe http://raspberrypi.stackexchange.com/questions/8169/run-startup-application-as-a-specific-user)
|
||||
<p>
|
||||
When everything works as expected, use hot glue to fix the components together. In particular I glued the webcam, the circuit board and the USB hub in place so that nothing will fall out of place anymore, even if the player is moved around roughly.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# Autostart for piplayer2.py with log output redirection (http://raspberrypi.stackexchange.com/questions/8169/run-startup-application-as-a-specific-user)
|
||||
sudo nano /etc/rc.local
|
||||
# ...
|
||||
# su pi -c 'python3 /home/pi/piplayer2/piplayer2.py >> /home/pi/piplayer2/piplayer2.log 2>&1 &'
|
||||
# su pi -c 'python3 /home/pi/piplayer2.py >> /home/pi/piplayer2.log 2>&1 &'
|
||||
# exit 0
|
||||
|
||||
sudo reboot
|
||||
|
||||
Reference in New Issue
Block a user