Reading several articles on several blogs - especially hackaday.com - about the Arduino and projects realized with the Arduino I thought it would be fun to build an internet radio on my own too. I'm a software developer with only basic knowledge of hardware. So I googled a lot of stuff about Arduino tutorials and other radios that have been build with it. There are three pages that helped my to design the hardware architecture of the radio:
Here is the list of components I used building the radio:
There are different descriptions how to hack this router to install a mpd server for mp3 playback on it. I already mentioned the most important ones at the beginning of this article. The basic idea is to install openWRT on the router with all the advantages of a Linux system. Unfortunatly none of the descriptions worked for me. I really really really(!!!) spent a lot of time to get openWRT working but was never able to establish a wireless connection. I followed the instructions of tinkernut and some other. Finally, I switched to tomato USB and found this thread that helped me to get the router online and running. The original idea included to have an http server with PHP running on the router to support a web interface. But I soon realized that the router does not have the necessary performance to support this kind of feature.
Besides the router and the Arduino, I wasn't sure which components I need to build the radio, so I bought an Arduino Ethernet Starterkit. There are a lot of good Arduinio tutorials on youtube, so I started with the Blink tutorial:
The next step was to connect the LCD with the Arduino. Thanks to Laday Ada that was not problem. The router was already running the mpd server, so it didn't took me long to find some tutorial about how to establish a telnet connection and executing some remote commands to read the mpd status and update the server using mpc commands. Displaying the current song information on the LCD was easy thanks to the Arduino libraries for that. But of course, I ran into some problems too:
Ok, when you look on the photos and a big ARRGGH! is coming out your mouth just remember: this was my first hack and I learned a lot about circuit board wiring through that. So yes: it's ugly but it works :-)
The circuit board contains cables for connecting the LCD and the two push buttons for the station selection. The relay is used as on/off switch for the amplifier: the front poti volume control has an on/off switch. If the radio is switched on, the router is powered. The arduino is powered by the USB port of the router, so the Arduino boots up next. When the init() method of the Arduino is called, the relay is switched and will power the amp of the former Logitech speakers. The second switch on the front allows to choose a different input source. I wired an iPod dock on the top of the case and a cinch connection on the back to connect alternative music sources. The display does not reflect selector changes and only shows the radio information, even if an iPod is connected.
After hacking the router, finishing the circuit board and programming the Arduino I thought I only have to put everything together....so I thought. But I only reached the famous last 20 percent. I wanted to put all hardware into a small rack I bought on Amazon, and close the front and back of the rack with 5mm wooden panels.
Installing the speakers and the buttons was easy, also to screw the LCD on the front panel. But then I realized that there is not enough space left to put the router into the rack too. So I had to re-wire the LCD to save some space, had some loose connections after installing the front panel and also detected some minor software bugs (after!) closing the rack. But after all, the radio runs smoothly now and even if it took me a lot of time and nerves, I'm happy about all the stuff I've learned building this radio.
This was not only my first Arduino hack, but my first hack at all. I learned a lot of stuff and made a lot of mistakes I want to sum up here: