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:
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:
The Parts
I bought the following:
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:
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:
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:
![](http://i67.tinypic.com/2eq3xxx.jpg)
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.
![](http://i63.tinypic.com/2elvxmt.jpg)
With that done, it was time to gut the radio:
![](http://i63.tinypic.com/2nis19j.jpg)
(One speaker...)
![](http://i64.tinypic.com/2dsk5jd.jpg)
The skeleton:
![](http://i65.tinypic.com/x3761u.jpg)
I then built my top panel and was delighted to find that all parts fitted first time.
![](http://i68.tinypic.com/jqkzcx.jpg)
![](http://i66.tinypic.com/bga2ro.jpg)
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.
![](http://i65.tinypic.com/2jbqxl4.jpg)
I used a Adafruit Perma-Proto Pi HAT for the wiring.
![](http://i66.tinypic.com/2v0dgco.jpg)
The Result
Very happy.
![](http://i63.tinypic.com/2ec11g9.jpg)
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]