UPDATE MAY 26 2013
Project blog launched, name changed to PiFi Mini, tutorials part 1 and 2 posted.
Check it all out at the new spiffy blog.
A quick word of warning, though I've taken quite a bit of time to work through the tutorials and eliminate any bugs there may still be a few so feel free to let me know about them in the comments section of the tutorial post and I'll try and get it sorted out as quickly as I can.
Thanks to everyone that helped and that expressed interest!
PiFi Mini Build Story:
http://pi-fidelity.blogspot.ca/2013/05/ ... ombox.html
Tutorial Part 1 - Everything but the LCD
http://pi-fidelity.blogspot.ca/2013/05/ ... t-one.html
Tutorial Part 2 - The LCD
http://pi-fidelity.blogspot.ca/2013/05/ ... t-two.html
UPDATE MAY 15 2013
I figured out the issue with Airplay when in AP mode, my initial testing for AP mode was done using a different wifi dongle with a Railink RT5370 chipset and everything worked great. Later I found a hack that allowed the RTL8192 to work in AP mode but it required a custom bin for the hostapd program. My thinking is that the custom bin has some bugs in it that for whatever reason causes buffer under-runs with shairport. For this reason I'm changing the recommended wifi dongle to an RT5370 based one, everything else will still work for 8192 based dongles but airplay over AP mode won't. Since these dongles are $5 on ebay I'd highly recommend just going with an RT5370 based one.
UPDATE MAY 9 2013
I've ran into a bit of a snag, when in AP mode it seems that Airplay (via shairport) isn't working very well. After about 1 second of audio the stream starts to break up. I swore this was working when I first got AP mode working but that might have been when I was using a different wifi dongle initially. Further investigation required. The rough outline of the start to finish tutorial is mostly done, I'll have to run through it one more time using a fresh sd card and then I'll be able to pretty it up and post it.
UPDATE MAY 8 2013
Just about finished!
I'm in the process of writing up a full start-to-finish tutorial and trying to create as small of an image file as possible so users have the option to skip the hard stuff and install it directly onto an SD card.
Also worth noting, I've managed to get the rtl8192 based wifi dongle to work as an Access Point so the boombox will now work as a standalone Airplay speaker! It was actually pretty easy once I found this post http://blog.sip2serve.com/post/38010690 ... -rtl8192cu
, it turns out I just needed to use a different binary for hostapd and then change one line in the config. Now instead of ad-hoc failover mode it's going to be AP failover mode.
There are a few other software additions as well which I've added below, mainly simple stuff like adding a few more buttons in the webUI (reboot, safely eject USB drive, Switch to AP Mode). I've also decided to remove all but one of the mpd web clients because by default a lot aren't php5 compliant without manually editing a bunch of files to replace deprecated functions. Instead I'm just keeping with phpMP since it does pretty much everything.
UPDATE APRIL 22 2013
A lot has changed since I began this project so I'm re-writing this initial post to cover what has changed like what options were added removed and what hardware made that final cut. This project is very near complete now, just waiting on a few parts as well as a custom made plasma cut aluminum case! There still may be additions and tweaks, software can always be improved and new features added, hardware is about 99% finalized.
Hey everyone, I'm slowly picking away a project I've been wanting to make for awhile, the ultimate boombox. I'm sure there are others wanting to do similar things so hopefully we can all learn together and can help each other out! Once I'm done I plan on documenting the whole process fully.
Current build photos http://www.flickr.com/search/?q=boombox ... 0N00&s=rec
Raspberry Pi Model B (512MB or 256MB model shouldn't matter)
Wifi Dongle - RT5370 chipset recommended, will work with RTL8192 chipset but Airplay in AP mode does not function properly.
LCD Display - HD44780 compatible (dx.com sku 121356)
Power Supply - At the moment a 1Amp phone charger is sufficient, current draw with volume 100% tends to hover around 600mA
Speakers and amp from Logitech Z110
- While tough to take apart the speakers have mounting brackets and decent sized magnets. Sound quality is pretty good.
Custom PCB - (Note: Optional!! PCB files will be linked to for anyone wanting to build their own)
-A custom PCB that the LCD solders to and the Pi connects to via ribbon cable or via a connector.
-Contains a POT for LCD contrast, 5V input connection with option to add a switch, vias for wiring in 6 buttons complete with pads for pull-up resistors.
Case - A friend who has a plasma table owes me so I designed a case as shown above in the 3d rendering. It is 4" by 4" by 10". I've posted drawings in my flickr gallery with dimensions.
Rubber "stompbox" feet for case
Panel Mount USB Connectors - http://www.ebay.com/itm/USB-A-male-to-U ... OU:CA:3160
Hardware choices that were changed or scrapped:
[SCRAPPED] Bluetooth A2DP Receiver - modified for alternate power input and audio out (dx.com sku 106950)
- Decided with all of the various options for streaming music over wifi that bluetooth was not needed.
[CHANGED]Amplifier (dx.com sku 126103)
- Using cannibalized Logitech Z110 instead
[SCAPPED] Push buttons - Not sure how many, it'll depend on what I want them to do
- Between the webUI and the various IOS and Android apps I realized physical buttons just weren't needed, however the custom pcb I made allows for 6 buttons to be added in the future if I want.
Hardware that may be added:
Audio USB DAC - It is well known that the Pi's onboard analog audio isn't that great, for a simple boombox I think it's adequate but I'd like to have a solution for connecting it to a proper stereo. There are two DACs that I've ordered, one is the HiFiMe Sabre USB DAC ($42USD) and the other is an ebay special "ELE EL-D01" USB DAC. I'm not sure who this will impact the current draw so we'll see what happens. Since I've already done all of the "hard" work I'm thinking I might simply fork this into two projects, the boombox being one and a more permanent component style version that would just sit on your amp with the rest of your audio. The latter would use the Sabre DAC and possibly do away with wifi but add in a large USB hard drive to host my entire music collection.
The features that made the final cut:
A very clever name which I won't reveal until the whole thing is done
Internet radio streams (MPD)
Local file playback and playlist support (MPD)
Airplay (shairport) **Now working in standalone mode with the boombox as an AP
- Allows for easy wifi configuration,
- PMPReloaded web clients for MPD
- Soft shutdown button
Access Point failover mode
- Unit begins boot process, rc.local script initiates the wpa_supplicant
- If unit is unable to connect to any of the network in the wpa_supplicant conf file AP mode is initiated
- Display info to LCD display (Current song, player state, volume, IP address, wifi signal quality out of 100)
- Audio pops fixed - Only pops once when it turns on and once again when powered off.
- Script that monitors whether Airplay is active so that it is impossible for both MPD and Airplay to be playing at the same time.
Features that may be added:
- 8Tracks.com - Very recently someone started work on a python based command line interface for 8tracks.com https://github.com/dbrgn/orochi
I love 8tracks so I might figure out a way to make use of the cli by adding a basic front end in my web ui.
- 20x4 LCD support - I ordered some of these quite awhile back thinking they'd get here sooner. I have them now but since I'd already committed my case design to 16x2 I opted to stay with that. I may write up two versions of the my python scripts that use lcd proc for displaying song info etc, also the lcdproc config file would have to be edited to make use of the 20x4 lcd.
Features that were removed:
[Scrapped] bluetooth a2dp (via separate receiver)
- See comment under hardware
[Scrapped for now] Airplay via AdHoc
- I corresponded with the developer of Shairport and we couldn't figure out why this isn't working, it may be possible in the future. A workaround, if you're brave enough, is to use a second wifi dongle and use hostapd to configure it as an access point. If you do this you could bridge wlan0 and wlan1 so it could also serve as a mobile hotspot.
[Scrapped]- Button controls
- As stated under the hardware section there are so many other ways to control it physical buttons didn't seem necessary. My custom pcb allows for 6 buttons though so they could be added later.
Resources and tutorials I've used:
Crackle free audio in MPD http://dbader.org/blog/crackle-free-aud ... pulseaudio
Ad-hoc fail safe mode http://lcdev.dk/2012/11/18/raspberry-pi ... omment-640
Shairport on Pi http://pi-raspberry.blogspot.ca/2012/08 ... 2968121371
MPD on Pi http://lesbonscomptes.com/pages/raspmpd.html
and other google searches
Webserver using Lighttpd and php http://www.penguintutor.com/linux/light-webserver
Wiring up an HD44780 display - http://learn.adafruit.com/drive-a-16x2- ... pberry-pi/
Installing lcdproc and writing to it - http://www.tech-fruits.com/hardware/set ... pi-part-1/
lcdproc developer guide - http://lcdproc.sourceforge.net/docs/current-dev.html
mpdlcd - https://github.com/rbarrois/mpdlcd
Audio glitch fix replacing start.elf and fixup.dat files https://github.com/raspberrypi/linux/issues/128
rtl8192 AP mode - http://blog.sip2serve.com/post/38010690 ... -rtl8192cu
Revised LCD proc drivers for Pi that support rev 2 http://www.raspberrypi.org/phpBB3/viewt ... 7&start=50