DISCLAIMER:[/B] 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/VIEWTOPIC.PHP?F=38&T=68167). THIS IS
JUST A SUMMARY OF MY OWN PROJECT.

[B]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:
[image: 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.[image:
http://i63.tinypic.com/2elvxmt.jpg]

With that done, it was time to gut the radio:
[image: http://i63.tinypic.com/2nis19j.jpg]

(One speaker...)
[image: http://i64.tinypic.com/2dsk5jd.jpg]

The skeleton:
[image: http://i65.tinypic.com/x3761u.jpg]

I then built my top panel and was delighted to find that all parts
fitted first time.
[image: http://i68.tinypic.com/jqkzcx.jpg]
[image: 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.
[image: http://i65.tinypic.com/2jbqxl4.jpg]

I used a Adafruit Perma-Proto Pi HAT for the wiring.
[image: http://i66.tinypic.com/2v0dgco.jpg]

THE RESULT

Very happy.
[image: 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)
- Tidy up code and post on Github


------------------------------------------------------------------------
elParaguayo's Profile: http://forums.slimdevices.com/member.php?userid=65009
View this thread: http://forums.slimdevices.com/showthread.php?t=107068

_______________________________________________
diy mailing list
diy@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/diy

Reply via email to