documentation
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
+72
-45
@@ -90,7 +90,7 @@ h2, h3 {
|
|||||||
<h1>AudioSphere</h1>
|
<h1>AudioSphere</h1>
|
||||||
<p id="subtitle">An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp</p>
|
<p id="subtitle">An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp</p>
|
||||||
|
|
||||||
<p style="font-weight: 700;">In spring 2016 I finalized the <a href="http://tilman.de/projekte/musikrakete/">Musikrakete</a>, an MP3 player that our boys could use without assistance. This is the second version: Not a rocket anymore, but with many improvements. <!-- Music is played by simply placing QR code cards on the window on top. --></p>
|
<p style="font-weight: 700;">In spring 2016 I finalized the <a href="http://tilman.de/projekte/musikrakete/">Musikrakete</a>, an MP3 player that our boys could operate without assistance. This is the second version, that is even easier to use. Music is played by simply placing a QR code card on top of the sphere.</p>
|
||||||
|
|
||||||
<p class="gallery" style="float:right;">
|
<p class="gallery" style="float:right;">
|
||||||
<a href="photos/02.jpg" class="fancybox"><img src="images/audiosphere-02.jpg"
|
<a href="photos/02.jpg" class="fancybox"><img src="images/audiosphere-02.jpg"
|
||||||
@@ -109,7 +109,7 @@ h2, h3 {
|
|||||||
|
|
||||||
<h2 id="idea">The Idea</h2>
|
<h2 id="idea">The Idea</h2>
|
||||||
<p>
|
<p>
|
||||||
This project started about a year ago, when Anica asked me if buying a <a href="https://de-de.hoerbert.com/">hörbert</a> 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 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 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.
|
This project started about a year ago, when Anica asked me if buying a <a href="https://de-de.hoerbert.com/">hörbert</a> 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 also seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -117,7 +117,7 @@ h2, h3 {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
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.
|
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 cards on its own, all components should be put together in a single case and, most important, the MP3 files should be delivered directly from our home server. No SD card replacement needed.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -131,11 +131,11 @@ h2, h3 {
|
|||||||
<h2 id="piplayer2">PiPlayer 2.0: AudioSphere</h2>
|
<h2 id="piplayer2">PiPlayer 2.0: AudioSphere</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
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.
|
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 8 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 relatively large cards from the first player in the new one as well.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
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 <a href="https://shop.pimoroni.com/products/phat-dac">Pimoroni PHAT DAC</a> I removed all the audio-related headaches.
|
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 power all the components. No additonal power source needed. By incorporating a <a href="https://shop.pimoroni.com/products/phat-dac">Pimoroni PHAT DAC</a> I removed all the audio-related headaches.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -149,7 +149,7 @@ h2, h3 {
|
|||||||
<h2 id="case">3D Printed Case</h2>
|
<h2 id="case">3D Printed Case</h2>
|
||||||
|
|
||||||
<p>
|
<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. 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.
|
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 <a href="images/phat_dac_measure.jpg" class="fancybox">height of 7.2 mm</a> (or less) which depends on the GPIO header that is used to solder the PHAT DAC to the RasPi. If the height exeeds that, the distance needs to be adjusted before printing.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="gallery">
|
<p class="gallery">
|
||||||
@@ -169,15 +169,15 @@ h2, h3 {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>The sphere case, printed via <a href="https://www.3dhubs.com/">3dhubs.com</a></li>
|
<li>The sphere case, printed via <a href="https://www.3dhubs.com/">3dhubs.com</a></li>
|
||||||
<li>JBL On Stage IIIP (used via ebay for less than 20 €)</li>
|
<li>JBL On Stage IIIP (used via ebay for less than 20 €)</li>
|
||||||
<li>3 × M3 screws with nuts and washers for mounting the case on the speaker</li>
|
<li>Raspberry Pi Zero with a micro SD card</li>
|
||||||
<li>Raspberry Pi Zero with an SD card</li>
|
|
||||||
<li><a href="https://shop.pimoroni.com/products/phat-dac">Pimoroni PHAT DAC</a></li>
|
<li><a href="https://shop.pimoroni.com/products/phat-dac">Pimoroni PHAT DAC</a></li>
|
||||||
<li>cheap USB Wi-Fi adapter</li>
|
<li>cheap USB Wi-Fi adapter</li>
|
||||||
<li>ultra-cheap <a href="images/micro-usb-hub.jpg">Micro USB HUB with ethernet port</a></li>
|
<li>ultra-cheap <a href="images/micro-usb-hub.jpg" class="fancybox">Micro USB HUB with ethernet port</a></li>
|
||||||
<li>even cheaper <a href="http://www.penguin.cz/~utx/hardware/USB_Camera_AX2311/">USB webcam</a></li>
|
<li>even cheaper <a href="http://www.penguin.cz/~utx/hardware/USB_Camera_AX2311/">USB webcam</a></li>
|
||||||
<li><a href="images/30-pin-apple-dock-to-micro-usb-and-audio-adapter.jpg">30-pin Apple dock adapter to micro USB and 3.5 mm audio</a></li>
|
<li><a href="images/30-pin-apple-dock-to-micro-usb-and-audio-adapter.jpg" class="fancybox">30-pin Apple dock adapter to micro USB and 3.5 mm audio</a></li>
|
||||||
<li>2 mm acrylic glass circle with 75 mm diameter. You can order these on ebay.</li>
|
<li>2 mm acrylic glass circle with 75 mm diameter. You can order these on ebay.</li>
|
||||||
<li>5 × M2.5 screws for the Raspberry Pi and the case</li>
|
<li>3 × M3 nylon screws with nuts and washers for mounting the case on the speaker</li>
|
||||||
|
<li>5 × M2.5 nylon screws (with 3 washers and 8 nuts) for the Raspberry Pi and the case</li>
|
||||||
<li>
|
<li>
|
||||||
Electronic components:
|
Electronic components:
|
||||||
<ul>
|
<ul>
|
||||||
@@ -189,6 +189,7 @@ h2, h3 {
|
|||||||
<li>Infrared LED (904 nm) for remote controlling the speaker</li>
|
<li>Infrared LED (904 nm) for remote controlling the speaker</li>
|
||||||
<li>Jumper wires</li>
|
<li>Jumper wires</li>
|
||||||
<li>copper wire, circuit board, solder</li>
|
<li>copper wire, circuit board, solder</li>
|
||||||
|
<li>probably a breadboard for testing everything out before soldering</li>
|
||||||
</ul>
|
</ul>
|
||||||
<li>
|
<li>
|
||||||
Tools:
|
Tools:
|
||||||
@@ -198,14 +199,14 @@ h2, h3 {
|
|||||||
<li>Screwdriver</li>
|
<li>Screwdriver</li>
|
||||||
<li>Cutting knife</li>
|
<li>Cutting knife</li>
|
||||||
<li>Power drill</li>
|
<li>Power drill</li>
|
||||||
<li>Superglue (for the window)</li>
|
<li>Superglue (for the window and the case nuts)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3 id="jblpreparation">Preparing the JBL IIIp Speaker</h3>
|
<h3 id="jblpreparation">Preparing the JBL IIIp Speaker</h3>
|
||||||
<p>
|
<p>
|
||||||
In order to drill the holes for the screws, the JBL On Stage IIIp has to be disassembled. The procedure is described <a href="https://de.ifixit.com/Guide/JBL+On+Stage+II+Speakers+Replacement/22462">here at ifixit.com for the predecessor</a> which works basically the same way: Remove the rubber pads, then remove all screws from the case. (Don't forget the center screw in the battery case.) Once the speaker case is opened, the circuit board is unscrewed and removed.
|
In order to drill the holes for the screws, the speaker has to be disassembled. The procedure is described <a href="https://de.ifixit.com/Guide/JBL+On+Stage+II+Speakers+Replacement/22462">here at ifixit.com for the predecessor</a> which works basically the same way: Remove the rubber pads, then remove all screws from the case. (Don't forget the center screw in the battery case.) Once the speaker case is opened, the circuit board is unscrewed and removed.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -213,11 +214,11 @@ h2, h3 {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<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.
|
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>
|
||||||
|
|
||||||
<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.)
|
(Disclaimer: Until now, I only did a proof of concept test script for remote contolling the speaker via the IR LED. 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>
|
||||||
|
|
||||||
<p class="gallery">
|
<p class="gallery">
|
||||||
@@ -228,36 +229,61 @@ h2, h3 {
|
|||||||
|
|
||||||
<h3 id="electronics">Electronics</h3>
|
<h3 id="electronics">Electronics</h3>
|
||||||
<p>
|
<p>
|
||||||
There are four electronic parts: The reflective optical sensor that triggers the QR recognition process, the LED that illuminates the QR card from within the case, the infrared LED that passes commands to the speaker and the 3 momentary push buttions that are used to pause/unpause playback and move within the current playlist. While the buttons and the LEDs are put directly in the case, all other elements are brought together on a circuit board from where they are connected to the RasPi via jumper cables. (Below is a diagram of the electronics and <a href="https://github.com/tliero/audiosphere/blob/master/misc/electronics-final.fzz">here's the source file</a> for <a href="http://fritzing.org">fritzing</a>.)
|
There are four electronic parts: The reflective optical sensor that triggers the QR recognition process, the LED that illuminates the QR card from within the case, the infrared LED that passes commands to the speaker and the 3 momentary push buttions that are used to pause/unpause playback and move within the current playlist. While the buttons and the LEDs are put directly in the case, all other elements are brought together on a circuit board from where they are connected to the RasPi via jumper cables. So this is what we're aiming for:
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
After <!-- http://www.instructables.com/id/Multiroom-Client-With-Raspberry-Pi-ZERO-and-PHAT-D/?ALLSTEPS --><a href="https://learn.pimoroni.com/tutorial/sandyj/soldering-phats">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>
|
||||||
|
|
||||||
<p class="gallery">
|
<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/audiosphere-electronics.png" class="fancybox"><img src="images/audiosphere-electronics.png" width="480" alt="The electronics in a single diagram with the optical sensor on the left, the LED, the infrared LED and the three buttons on the right. (<a href='https://github.com/tliero/audiosphere/blob/master/misc/electronics-final.fzz'>Source file</a> for <a href='http://fritzing.org'>fritzing</a>)" /></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>
|
</p>
|
||||||
<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>
|
||||||
|
Assembling the circuit is pretty straight forward. Be careful about the optical sensor, though: There are two versions out there, <a href="http://www.vishay.com/docs/83751/cny70.pdf">one from Vishay</a> and <a hreaf="http://smallsystems.isn-oldenburg.de/smallrobots/ws2001/Tischkante/cny70.pdf">one from TEMIC</a> that has the detector transistor upside down compared to the other one. Also note that I used a LED that can operate directly on the RasPi's 3.3 V without a series resistor. If you use a smaller one (which should also be sufficient for illumination), you will need one.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
After <!-- http://www.instructables.com/id/Multiroom-Client-With-Raspberry-Pi-ZERO-and-PHAT-D/?ALLSTEPS --><a href="https://learn.pimoroni.com/tutorial/sandyj/soldering-phats">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>
|
||||||
|
Once everything is connected together, it can be put in the case for the software installation and final adjustments. Wait with the hot glue until everything has been tested, especially on the camera!
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="gallery">
|
||||||
|
<a href="images/buttons_and_circuit_board.jpg" class="fancybox" rel="collection03"><img src="images/buttons_and_circuit_board.jpg" width="320" alt="The circuit board after soldering with all resistors, the transistor and open contacts to be connected via jumper cables. In order to protect the wire cables and soldering points from breaking, I applied hot glue after testing." /></a>
|
||||||
|
<a href="images/phat_dac_soldering.jpg" class="fancybox" rel="collection03"><img src="images/phat_dac_soldering.jpg" width="320" alt="The PHAT DAC after soldering." /></a>
|
||||||
|
<a href="images/phat_dac_soldering_back.jpg" class="fancybox" rel="collection03"><img src="images/phat_dac_soldering_back.jpg" width="320" alt="By my low standards, that is a pretty decent soldering. You can also see the nylon nuts I used as spacers." /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="gallery">
|
||||||
|
<a href="images/circuit_board.jpg" class="fancybox" rel="collection04"><img src="images/circuit_board.jpg" width="320" alt="I did not solder the jumper wires to the RasPi but also fixed them with hot glue. This keeps them together as a unit, isolates them from one another, and the hot glue can be peeled off if something goes wrong." /></a>
|
||||||
|
<a href="images/piplayer-opened.jpg" class="fancybox" rel="collection04"><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>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
What's missing in the pictures is how to get a screw thread behind the holes in the case: Use super glue to put three M3 nuts on washers (in order to enlarge the surface). When dried, use the super glue again to attach these nuts-on-washers behind the screw holes of the case. (Use the screws to adjust them so you can turn them in and out. I used <a href="http://www.uhu.com/produkte/alleskleber/detail/uhu-alleskleber-superstrong-safe.html?cHash=6d17927cfdf1797595540fe083329e0a">UHU Super Strong and Safe</a> which gives you some time for corrections after applying.) Et voilà, you now got yourself screw holes with threads on the player's case.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2 id="software">Software</h2>
|
<h2 id="software">Software</h2>
|
||||||
|
|
||||||
<h3 id="system">System Installation</h3>
|
<h3 id="system">System Installation</h3>
|
||||||
<p>
|
<p>
|
||||||
Before installing anything additionally, <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Lite</a> has to be <a href="https://www.raspberrypi.org/documentation/installation/installing-images/README.md">installed on the SD card</a>. When the SD card is ready, it is necessary to at least once connect a monitor and a keyboard to the RasPi for the initial setup since SSH is disabled by default. As soon as wi-fi is configured, we can remove all the cables and continue to work remotely over ssh.
|
Before installing anything additionally, <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Lite</a> has to be <a href="https://www.raspberrypi.org/documentation/installation/installing-images/README.md">installed on the SD card</a>. When the card is ready, it is necessary to at least once connect a monitor and a keyboard to the RasPi for the initial setup since SSH is disabled by default. As soon as SSH is enabled and Wi-Fi is configured, we can remove all the cables and continue to work remotely over ssh.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Basic setup:
|
<em>From here on it's basically copy-and-paste to your SSH terminal. You might need to confirm or close something every now and then. Where a configuration file has to be edited, the contents that go to the file are also put in comments with a leading tab.</em>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Basic setup (with links to the references):
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre class="pre-scrollable">
|
<pre class="pre-scrollable">
|
||||||
# Make sure that the latest versions are installed (this might take some time) (<a href="https://www.raspberrypi.org/documentation/raspbian/updating.md">https://www.raspberrypi.org/documentation/raspbian/updating.md</a>)
|
# Make sure that the latest versions are installed (this might take some time) (<a href="https://www.raspberrypi.org/documentation/raspbian/updating.md">https://www.raspberrypi.org/documentation/raspbian/updating.md</a>)
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt dist-upgrade
|
sudo apt dist-upgrade
|
||||||
|
|
||||||
# Basic setup: password, keyboard layout, wi-fi channels, hostname, ssh
|
# Basic setup: change the password, set the keyboard layout, Wi-Fi channels and hostname and enable SSH
|
||||||
sudo raspi-config
|
sudo raspi-config
|
||||||
|
|
||||||
# Check kernel messages for errors
|
# Check kernel messages for errors
|
||||||
@@ -266,10 +292,10 @@ dmesg
|
|||||||
# Check for connected USB devices
|
# Check for connected USB devices
|
||||||
lsusb
|
lsusb
|
||||||
|
|
||||||
# Install wi-fi client (<a href="https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md">https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md</a>)
|
# Install Wi-Fi client (<a href="https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md">https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md</a>)
|
||||||
sudo apt install iw
|
sudo apt install iw
|
||||||
|
|
||||||
# If not done yet, plug in wi-fi adapter and reboot
|
# If not done yet, plug in the Wi-Fi adapter and reboot
|
||||||
sudo reboot
|
sudo reboot
|
||||||
|
|
||||||
# Scan networks and add wi-fi network to configuration
|
# Scan networks and add wi-fi network to configuration
|
||||||
@@ -280,7 +306,7 @@ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
|
|||||||
# psk="Your_wifi_password"
|
# psk="Your_wifi_password"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# Restart wi-fi
|
# Restart Wi-Fi
|
||||||
sudo ifdown wlan0
|
sudo ifdown wlan0
|
||||||
sudo ifup wlan0
|
sudo ifup wlan0
|
||||||
|
|
||||||
@@ -292,16 +318,17 @@ sudo shutdown -h now
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
From here on you can connect via SSH over wi-fi. Unplug monitor, keyboard and the ethernet cable. It might also be helpful to configure a static IP for the wi-fi adapter in your router, before continuing. Then restart the RasPi, <a href="https://www.raspberrypi.org/documentation/remote-access/ssh/">connect via SSH</a> from a different computer and go on with the setup procedure.
|
From here on you can connect via SSH over wi-fi. Unplug monitor, keyboard and the ethernet cable. It might also be helpful to configure a static IP for the Wi-Fi adapter in your router before continuing. Then restart the RasPi, <a href="https://www.raspberrypi.org/documentation/remote-access/ssh/">connect via SSH</a> from a different computer and go on with the setup procedure.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# Now that remote connection is available, disable HDMI (<a href="http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy">http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy</a>)
|
# Now that remote connection is available, disable HDMI (<a href="http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy">http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy</a>)
|
||||||
|
# (This line has to go *before* "exit 0" at the end of the file)
|
||||||
sudo nano /etc/rc.local
|
sudo nano /etc/rc.local
|
||||||
# # disable HDMI
|
# # disable HDMI
|
||||||
# /usr/bin/tvservice -o
|
# /usr/bin/tvservice -o
|
||||||
|
|
||||||
# Disable the ACT LED
|
# Add this to config.txt to disable the ACT LED
|
||||||
sudo nano /boot/config.txt
|
sudo nano /boot/config.txt
|
||||||
# dtparam=act_led_trigger=none
|
# dtparam=act_led_trigger=none
|
||||||
# dtparam=act_led_activelow=off
|
# dtparam=act_led_activelow=off
|
||||||
@@ -321,11 +348,11 @@ sudo shutdown -h now
|
|||||||
<p>
|
<p>
|
||||||
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).
|
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>
|
||||||
|
|
||||||
<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.
|
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>
|
</p>
|
||||||
|
|
||||||
<pre class="pre-scrollable">
|
<pre class="pre-scrollable">
|
||||||
# Install additional software
|
# Install additional software
|
||||||
sudo apt install lirc zbar-tools mc moc fswebcam python3 python-rpi.gpio python3-rpi.gpio
|
sudo apt install lirc zbar-tools mc moc fswebcam python3 python-rpi.gpio python3-rpi.gpio
|
||||||
@@ -402,13 +429,13 @@ irsend SEND_ONCE JBLIIIP KEY_MUTE
|
|||||||
<p>
|
<p>
|
||||||
When everything works as expected, everything is fixed together using hot glue. 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.
|
When everything works as expected, everything is fixed together using hot glue. 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>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<em>
|
<em>
|
||||||
While I really like hot glue, it's got its limits: I thought I could skip soldering the buttons to their wires by just twirling the cable ends to the contacts and then fix everything down with the hot pistol - bad idea. While being hot, the glue gets in between the wire ends and the contacts and perfectly isolates them. None of the buttons worked anymore. I had to peel the glue off the contacts with a cutter knife before soldering them properly back on again...
|
While I really like hot glue, it's got its limits: I thought I could skip soldering the buttons to their wires by just twirling the cable ends to the contacts and then fix everything down with the hot pistol - bad idea. While being hot, the glue gets in between the wire ends and the contacts and perfectly isolates them. None of the buttons worked anymore. I had to peel the glue off the contacts with a cutter knife before soldering them properly back on again...
|
||||||
</em>
|
</em>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Now that everything is in place, we are ready for the final adjustments: Configure autostart for the player script and mount the SD card in read-only mode which makes the player robust against sudden loss of power. For that, we redirect the write access to a RAM disk.
|
Now that everything is in place, we are ready for the final adjustments: Configure autostart for the player script and mount the SD card in read-only mode which makes the player robust against sudden loss of power. For that, we redirect the write access to a RAM disk.
|
||||||
</p>
|
</p>
|
||||||
@@ -452,16 +479,16 @@ sudo ln -s /tmp/resolv.conf /etc/resolv.conf
|
|||||||
# shown here with the former additions to rc.local - note that the log redirect for the player script is changed also
|
# shown here with the former additions to rc.local - note that the log redirect for the player script is changed also
|
||||||
sudo nano /etc/rc.local
|
sudo nano /etc/rc.local
|
||||||
# ...
|
# ...
|
||||||
#
|
#
|
||||||
# # make /tmp on RAM disk writable
|
# # make /tmp on RAM disk writable
|
||||||
# chmod 777 /tmp
|
# chmod 777 /tmp
|
||||||
#
|
#
|
||||||
# # disable HDMI
|
# # disable HDMI
|
||||||
# /usr/bin/tvservice -o
|
# /usr/bin/tvservice -o
|
||||||
#
|
#
|
||||||
# # start piplayer
|
# # start piplayer
|
||||||
# su pi -c 'python3 /home/pi/piplayer2.py >> /tmp/piplayer2.log 2>&1 &'
|
# su pi -c 'python3 /home/pi/piplayer2.py >> /tmp/piplayer2.log 2>&1 &'
|
||||||
#
|
#
|
||||||
# exit 0
|
# exit 0
|
||||||
|
|
||||||
sudo reboot
|
sudo reboot
|
||||||
@@ -498,8 +525,8 @@ sudo nano /etc/rc.local
|
|||||||
HIER WEITER:
|
HIER WEITER:
|
||||||
- Test-MP3 zu Template und Repository hinzufügen
|
- Test-MP3 zu Template und Repository hinzufügen
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3 id="python">Python Script</h3>
|
<h3 id="python">Python Script</h3>
|
||||||
|
|
||||||
<h2 id="manual">User Manual</h2>
|
<h2 id="manual">User Manual</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user