Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1

    Raspberry Pi powered squeezebox/internet radio/airplay/bluetooth speaker

    Disclaimer: This is just a copy of a thread of mine on the Raspberry Pi forum but I thought I'd share here too in case anyone's interested.


    First off, I should say this is not a new idea. I'm aware that this has been done before (https://www.raspberrypi.org/forums/v...p?f=38&t=68167). This is just a summary of my own project.

    The Background

    This project came about because my current audio set-up in my kitchen which, while sounding great, did not score well on the wife acceptance front.

    The Brief

    To be acceptable, I needed a solution that:
    • Looked good (WAF tick)
    • Easy to use (WAF tick)
    • Satisfied all my music needs (radio, squeezeplayer etc.)


    Seemed like a perfect project for a Pi.

    The Idea

    My plan was to get an vintage(-looking) Roberts radio, gut it and put in a Pi.

    I got this off eBay:


    Hopefully that would satisfy the first part of the brief!

    To be easy to use I figured a nice LCD plus a couple of rotary encoder dials should be sufficient.

    For my music needs:
    • It needs to sound good
    • I need it to run squeezelite (for my multi-room audio sync set-up)
    • Loud (the Roberts only had 1 speaker, there's definitely space for 2!)
    • To be honest, that's enough for me!


    The Parts

    I bought the following:
    • Roberts Radio
    • 20x4 LCD display
    • 2x rotary encoders + oversized knobs (no giggling at the back!)
    • MAX98306 amplifier
    • 2x 4ohm 5W speakers


    The Software

    I figured it wasn't worth doing the hardware build unless I could get the software working first.

    Using Raspbian Jessie as a base, I installed:
    • Squeezelite
    • Shairport-Sync (let people use this as an Airplay device)
    • Bluetooth audio streaming capability (to use radio as a bluetooth speaker)
    • MPD/MPC for internet radio playing


    With all of that installed and working I then started on writing my interface.

    I'd never used rotary encoders before but I found some useful code in the forum already (using Joan's pigpio module) which worked on the first attempt. Very satisfying.

    Next up, I wrote a basic menu class (for those familiar with my posts on the forum, you'll know I do everything in python) which allowed for simple actions and submenus.

    After that, I figured that making this radio extensible (I think that's a word) would be good. So each function (radio, squeezeplayer etc) would be a "mode" which means I could easily drop in new "modes" in the future if I needed.

    Next was the display code. The idea was very simple, just show as much info as possible (time, menu, current playing track info etc.). Each "mode" has the ability to send information to the display.

    I then wrote an eveloping bit of code to pull it all together and then wrote a systemd service to start the software on boot.

    The Build

    I realised had one big problem to overcome if I was going to get this to work: I needed to replace the top panel on the radio with a custom one that would house my dials and LCD. Douglas6 kindly suggested that I could get a custom piece laser cut pretty cheaply.

    Armed with some digital calipers and spec sheets I designed a top panel for the radio and mount for the speakers and got these cut.

    With that done, it was time to gut the radio:


    (One speaker...)


    The skeleton:


    I then built my top panel and was delighted to find that all parts fitted first time.



    I then wired up the amp to the speakers on the custom panel and put them into the case.

    I mounted the Pi on the inside cover.


    I used a Adafruit Perma-Proto Pi HAT for the wiring.


    The Result

    Very happy.


    The Code

    On Github: https://github.com/elParaguayo/PiRadio

    The Future

    Things to do/fix:
    • Only 1 speaker works at the moment (checked the wiring more times than I care to admit and I don't see a problem) - I suspect the amp is the issue.
    • Think about a dedicated DAC - the hiss from the Pi is off-putting (but only at low volumes)
    • [s]Tidy up code and post on Github[/s]
    Last edited by elParaguayo; 2017-03-05 at 11:39.

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    1,931

  3. #3
    Yes, saw that. Unfortunately, it didn't help. Thanks for the suggestion though.

  4. #4
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,185
    Great job!

  5. #5
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,079
    Wow, cool project !
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  6. #6
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    851
    How about an amp HAT to do both AMP and DAC ?
    Players: SliMP3,Squeezebox3 x3,Receiver,SqueezePlayer,PiCorePlayer x3,Wandboard
    Server: LMS Version: 7.9.1 - 1503129892 on Centos 7 VM on ESXi 6.5.0U1 on Dell T320
    Plugins: AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud
    Remotes: iPeng8/Orangesqueeze/PC/Jivelite
    Music: 383GB,1269 albums 17756 songs 4381 artists mostly FLACs

    Want a webapp ? See http://forums.slimdevices.com/showth...Webapp-for-LMS

  7. #7
    Senior Member Max2Play's Avatar
    Join Date
    Oct 2016
    Posts
    103
    Wow, that really does look great! Have you tried using our Max2Play OS for the software? We have a bluetooth plugin to easily pair speakers or smartphones, Squeezelite preinstalled, Squeezebox Server one-click installer, MPD, rotary encoder and IR remote solutions and Jivelite implementation (but I think no skin for the small screen). We also love to collaborate on making an article on your setup with M2P if you would be interested.

  8. #8
    Quote Originally Posted by Jeff07971 View Post
    How about an amp HAT to do both AMP and DAC ?
    Yes, I think that's the obvious next step with this one.

  9. #9
    Quote Originally Posted by Max2Play View Post
    Wow, that really does look great! Have you tried using our Max2Play OS for the software? We have a bluetooth plugin to easily pair speakers or smartphones, Squeezelite preinstalled, Squeezebox Server one-click installer, MPD, rotary encoder and IR remote solutions and Jivelite implementation (but I think no skin for the small screen). We also love to collaborate on making an article on your setup with M2P if you would be interested.
    I've not heard of your OS before.

    However, being very honest, part of the reason I wanted to do this project was because I enjoy writing code and so the challenge of building my own interface was very appealing!

  10. #10
    Senior Member Max2Play's Avatar
    Join Date
    Oct 2016
    Posts
    103
    Makes sense. However, we also try to offer an open experience. In this vein, our images are all based on the official Jessie Lite distro and we have a Plugin Builder to create your own solutions under the webinterface and immediately save and share with other users: https://www.max2play.com/en/developers-corner/
    Our head developer did a video on creating such versatile plugins. Just an idea for your great project. Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •