I was looking for a project to do with my Raspberry Pi and found this Instructable and thought I would have a go at something similar which worked with Google Play Music. I had a rough idea of what I wanted the final item to end up like and was able to get my dad interested in helping me with the design and construction of the enclosure.

All code and CAD drawings can be found in the GitHub repo.

Before we begin I should probably point out that a reasonably good understanding of electronics and Linux makes this project a lot easier, especially since my Instructables are probably not the easiest to follow (I do try my best), however feel free to ask if something isn't clear enough.

A full parts list is a little difficult for a project this size so I'll highlight the important parts only:
  • Arduino IC (i.e. ATmega 328 with Arduino bootloader, you can but them blank and flash then yourself or pre flashed with a bootloader)
  • Raspberry Pi (512MB version if possible, because you know, more memory is better... but seriously I haven't tested with a 256MB version, but it should still work)
  • Digital potentiometers (logarithmic taper (we'll be using it to attenuate audio) & i2c (from the Pi), a DS1807 will do)
  • Amplifiers (I used pre-built modules but feel free to build your own if you feel up to it)
  • DC-DC converters (12v to 5v, 600mA output, isolated)
  • Rotary encoders (from font panel, cursor movement and volume)
  • An LCD (4 rows, 20 columns works for me, if you have songs with really long names maybe get a 40 column one)
As for tools, you just need all the standard electronics and woodworking tools, a few others which may be useful:
  • Bus Pirate (I don't actually have one, but they are very useful, alternatively you can do what I do and write Arduino scripts to make an Arduino act like a Pus Pirate to some degree)
  • Laser cutter/engraver (not essential, but makes production of mounting hardware and front panels SO much easier)
  • Router (for construction of enclosure)
  • Accurate callipers (essential for measuring sizes for panels and mounting hardware)
I think that is about it for specialist parts and tools, but of course I would highly recommend you read through the entire Instructable before starting work on this project.

Video demoing the finished radio:
I'm having problems embedding videos in my Instructables, here is a link to YouTube: http://www.youtube.com/watch?v=tgPbvo-8iRc

Step 1: User Interface Electronics

The order in which I went about this project seemed fairly logical and seemed to work for me, so I'll go with that.

In that case first up is the electronics which control communication between the radio and the user, in my radio the included 6 buttons, two rotary encoders which also have a switch for when they are pressed and a 4 row, 20 column backlit LCD, the majority of this is controlled using a ATmega 328p which interfaces with the Raspberry Pi using RS232 (over a level converter, since the Pi has a logic level of 3.3v and the Arduino is 5v), the one exception is the LCD backlight which is switched on and off using a GPIO pin from the Pi.

So here is an overview of what IO devices were actually connected to the Arduino, how they were connected and why:
  • Pins 0 and 1 connected to the Raspberry Pi GPO header through a MOSFET level converter, this was for the serial communication between the Pi and the Arduino.
  • The front panel button were connected to ADC pins 0 to 5 with either an external pull up or pull down resistor (whichever is easiest, in hindsight pull up would have been easier then I would only need ground on my front panel board).
  • The LCD is connected on digital pins 8 to 13, the actual pin assignment is not important at this stage as it can be configured in the Arduino script.
  • The encoder buttons are on pins 6 and 7, using the internal pull up resistor.
  • The encoders are on pins 3 and 5 and 2 and 4, it is important to have at least one interrupt pin per encoder, this will greatly improve the performance.
Most of this can be seen easily on the schematic which has all of these relevant sections annotated, note that this is the schematic for the main board only, so the actual devices are shown as pin headers, I will go over wiring the actual devices in the next step.
<p>I like your work and the quality of the end product, do you think it would be possible to make one similar with a headphone jack, and do you think hooking it to a youtube playlist with only audio being played would be possible?</p>
<p>Can't see why that wouldn't work, the software would be quite different though.</p>
<p>Please help</p><p>I can not translate in English </p><p>who sent me an Arduino / Raspberry Pi Internet Radio on sd card </p><p> Raspberry Pi </p><p>Arduino UNO </p><p>16X2 LCD display </p><p>reply to navi2@seznam.cz </p><p>What would be the price through pay pal </p><p>thank you</p>
<p>Got a Pi a few months ago but not had the time to do anything with it. Great job. I have an old tube radio (Motorola). Still works, but I may just pull out the innards and mount the Pi inside. I was thinking about keeping the tube part, but the heat from the tube may degrade the Pi over time. This is my summer project! Thanks for your cool radio!</p>
<p>i like it too much, i wanna add some led lights to that proyect,,,</p>
This is very cool... I'm an apprentice cabinet maker and can see that you have excellent skill levels with woodworking. Might have to try this out, I'm just getting into electronics but if and when I do I will make sure to share my version with you! Cheers
Thanks, although I have to give credit to my dad for the enclosure since he did a lot of the work on the construction and finish, I mainly just did the mounting mechanisms for the electronics as far as the case is concerned.
Good project, Dan. I hope to find time to make a copy using a more compact and modern cabinet and IR only front panel controls.
Thanks.<br> Yeah I would have liked to have IR controls on mine, half the problem was time, but I also couldn't find a suitable remote (or at least one I would be happy with), I was planning on using my Roku remote which would be perfect (since I could map app the buttons to a function that is depicted well by the button label) if there was volume controls on it.<br> I would be interested to see other case ideas, I quite like the design I went with but a smaller compact one would be pretty good. I also thought about having one in a Hi-Fi separate (the systems with the separate tuner, amplifier, tape deck, CD player, etc) case, it would be a nice modern addition to a separate system (if I had one).<br>
Dude this thing looks awesome. One day if I have all the wood working tools to do this I will. Good job.
Thanks.<br> Also you don't really need a <em>lot </em>of tools to do this, mainly just a hand router with a basic set of bits should do, and some way of making templates for it (laser cutting them out of MDF is my preferred method).<br> I do try and keep my use of CNC machines down (or at least make it doable by hand) but router templates are something that probably needs the accuracy of a laser cutter to make.
Nice Work!
I think Google stole your idea: google.com/chromecast :p <br>Great work, though! Looks real nice too.
HQ making and instructable on every aspects ! <br>Congrats and many thanks
Very nicely done ! the use of Pi with Arduino is also a good way to introduce Pi to us Arduinians who are unsure if we want to take the leap yet. <br> <br>The cabinet is AWESOME ! I love antique radio ...and cathedral radios especially . You both worked to make an amazing project together ...I hope you are both proud of the end result ! <br>Build_it_Bob
Thanks a lot.<br>It's comments like this that make me want to continue making Instructables.
Great work. Congrats, very professional look. <br>It lacks some source code in this instructable
All the code is on GitHub.<br>I know it's not the best solution for an Instructable, but I changed the code several time throughout writing and after I published this Instructable and pointing to a GitHub repo is far easier than going back to edit my Instructable every time I change my code.
How about a dac for the analog signal? Less hiss?
I am using the DAC in the SoC on the Raspberry Pi.<br>I don't thing using a different sound output would really help, a lot of the problems were software based.
Nice project well done. Alas your DXF files don't load - I have tried several CAD applications including LibreCAD with no success.
Weird, I just checked the DXFs from GitHub using LibreCAD on Windows and Linux and I can open them no problem, what's happening when you try to open them?
Why don't you use arch linux? It boots up around 10-12sec on class 2,4 card. And why even you use X to start streaming... You just could use screen/tmux
I run the script from within an X session to avoid problems connecting to the JACK server (I think there may be a fix for this, on Arch at least).<br>I have no real reason for not running ArchLinux, other than I started developing it on Raspian and it works fine on Raspian - if it ain't broke, don't fix it.<br>I may take a blank SD card and give these fixes a try one day when I'm not as busy.
The enclosure is beautiful - great work :D
Yeah, the enclosure was all thanks to my dad, he did a brilliant job with it.

About This Instructable




More by DanNixon:Arduino Keyboard Learning Lights Attachment Google Play Music Internet Radio (Raspberry Pi and Arduino) Arduino Web Enabled RGB Lighting 
Add instructable to: