Building a Wifi Radio – Part 1, Introduction

This article is the first of a series that will document the development of a low cost, open source wireless streaming internet radio receiver.  All construction details, including schematics, source code, and even the design process itself will be documented on this blog.

Comments and (constructive) criticism are welcome. Click here to post a comment.

Table of Contents:

  1. Building a Wifi Radio – Part 1, Introduction (you are here)
  2. Building a Wifi Radio – Part 2, Choosing an Embedded Platform
  3. Building a Wifi Radio – Part 3, Hacking the Asus WL-520GU
  4. Building a Wifi Radio – Part 4, Installing OpenWrt
  5. Building a Wifi Radio – Part 5, Let’s Make Some Noise!
  6. Building a Wifi Radio – Part 6, A Conversation with Mpd
  7. Building a Wifi Radio – Part 7, Building an LCD Display
  8. Building a Wifi Radio – Part 8, Adding a Tuning Control
  9. Building a Wifi Radio – Part 9, A Few Odds and Ends
  10. Building a Wifi Radio – Part 10, Building the Box

Some background:

According to Wikipedia, in 1993 the first internet radio program began distribution.  At that time, radio programs were manually downloaded to be played later on the user’s home computer; the user experience was far from that of listening to a traditional broadcast radio receiver.  It was not until several years later that streaming radio became common, giving birth to internet radio stations that could be listened to much like traditional radio, but with several advantages.  Most notably, internet radio stations were (and still are for the most part) largely devoid of on-air advertising, and stations anywhere on the globe could be received by anyone with access to the internet.  Over time, improvements in audio compression (such as MP3) and larger end user bandwidth improved the fidelity and reliability of internet radio.  The birth of common standards like Shoutcast made it possible to listen to many stations with a single player program, like Winamp.

Today, most music playback software supports streaming radio in some way.  iTunes features thousands of streaming radio stations and even supports Shoutcast streams so that users can easily add additional stations of their own.

The beautiful thing about streaming radio is the huge diversity in programming that is available.  Many college radio stations have a streaming server, like KDVSDigitally Imported hosts many electronic and dance music streams that give the listener the choice to listen to specific genres like ambient or gabber hardcore (whoa).  Broadcast radio usually lumps all electronic dance music into one category, much to the dismay of their listeners (who probably tuned out during the commercial break, anyway).  Gems like Slay Radio specialize in music you would never hear on broadcast FM, like Commodore 64 remixes.

In the past couple years, products have started to appear that mimic the form and function of a traditional radio, but play internet radio instead.  Good examples of these are the Roku SoundbridgeRadio and the ASUS Internet Air.  Remote speaker devices, such as the Apple Airport Express, require a PC to receive and relay streaming radio but achieve a similar end result (but don’t really look much like a radio).

The Wifi Radio project:

I have been wanting to build a streaming radio for some time.  I frequently work in my garage, where I occasionally use my Macbook to play music through a small amplifier and bookshelf speakers.  The problem is that my laptop is not always set up in the garage, and greasy fingers are not a good thing to have around a white laptop, period.  I could simply buy an internet radio, but I couldn’t stomach the $150-$300 price tag on most players for such a luxury.

So I decided to build one instead.

I started the design process by drafting an outline of desired features, and then breaking them down into wants and needs, while trying to keep the project scope under control.

Requirements:

  • Wireless connectivity through existing Wifi network
  • Audio output (preferably 44kHz, 16 bit stereo)
  • An integrated amplifier and speaker(s)
  • Shoutcast/MP3 streaming audio decode
  • Several builtin station presets
  • A display to indicate the station and currently playing song
  • Simple user interface, using standard radio controls (volume, tune, etc)
  • 110VAC operation

Optional features:

  • Line output (to connect to a receiver/amplifier)
  • Web server for configuration/management
  • Ability to play files off a USB stick or iTunes server

Definitely won’t be a feature:

  • Any kind of over-the-air radio tuner
  • Commercials
  • Pledge season
  • Morning DJ’s
  • “Blah, blah, blah.”

Now that we’ve defined the project…  it’s time for a commercial break.  That’s it for part 1 of this series.  Stay tuned for part 2, where I’ll talk about choosing an embedded platform for the design and why Linux is so awesome!

Update: Part two is now available, click here to see it!

Update 2: There is a new Wifi Radio Discussion Forum, hop over there to ask questions about the project or see what other people are working on!  (4/12/09)

Update 3 (6/1/09): I finally added a table of contents to the top of this post to help everyone (including me) navigate the series!

52 thoughts on “Building a Wifi Radio – Part 1, Introduction”

  1. Congrats on the MAKE: coverage!

    Quick question… is their any chance the digital out (spdif) feature of the “sound card” can be enabled under openwrt?

    1. My USB-audio adapter doesn’t have SPDIF out. I’m not aware of a driver for SPDIF in OpenWrt, but that doesn’t mean there isn’t one out there. I would check over at openwrt.org and see what you can find.

      Good luck!

  2. I just ran across your site and project today, and I have to say that you stuck with it far longer than I would have! BUT, the end result is really amazing. The style and aesthetics of a modern take on a deco design really appeals to me. It’s also quite a step up from the mini FM transmitter I use to get radio streams around my house!

    On another note, from the viewpoint of us who produce internet radio stations and programs, that you would go to this much trouble validates the hope that we hold that internet radio IS a viable alternative to terrestrial radio. Your project and the emergence of in-dash internet car radios shows that we are on the right track.

    Congratulations on finishing an incredible job, and for sharing it with us.

    Best regards,

    John

  3. Hum ^_^… Intresting project. These days easer to combine together pre-mfg components to do a job. Did that on one. The enclosure took the bulk of the time.

    Be interesting to see display and controls for this.

  4. Perhaps you could consider one more capability. If you go to the cbc radio two site (cbc.ca) you will find two pages of streaming concerts on demand. The Roku and the squeezebox can’t play these. If your device could it would be a terrific addition.

  5. Eric –

    Thanks! Now that cheap consumer gear includes wifi, serial, and USB, and can be hacked to run Linux, I don’t see any reason to start from scratch. I hate to steer people away from great efforts like the Tin Can Tools Hammer, but the Asus routers are cheaper and more powerful. The fact that now that a very powerful open source embedded platform can be had for as little as $30 bucks is very exciting!

  6. Ah, yes. I was assuming that you were building from scratch, were going to do a PCB and all that. Hacking a mass-market router is definitely the way to go — using The Man’s economies of scale for our gain… :-).

    I see that Part 2’s out. I’ll definitely check it out. Keep that Dremel spinning!

    regards,
    -e

  7. It can be done, and so far it has cost me much less than $100.
    I need to hurry up and write part 2, but I’ll give away the secret now – cheap wireless routers with USB ports are the answer. They run Linux (OpenWRT), they are overpowered even for MP3 decode, and they are becoming very cheap (sub $50). Since a wireless router already has wireless built in, all you have to do is add an $8 USB audio dongle and you’re done. And it turns out you get a wireless access point and lots of other stuff out of it for free!

    Look at the Asus WL-520GU. In my opinion it is the best thing out there right now. The WL-500gPv2 is better but it costs almost 2x.

  8. Microchip sells a demo board (DM183033) for $100 that does much of what you want, but it’s wired. It’s described in http://ww1.microchip.com/downloads/en/AppNotes/01128a.pdf .

    You could probably start with the design and hack it to be wireless. And since they’re selling it already done for $100, you could probably get all the parts for less than half that, and free-up a bunch of cash for your Wi-Fi bolt-on. This even ignores the fact that you can sample four parts from them for nuthin’.

    However, if you’re wedded to it being Linux, then you’re setting yourself a fairly high floor for how cheap you can get out. And one of the premises *was* that you were unwilling to fork out $150+ in the first place — so I guess that I’m calling “shenanigans”… 🙂

    -e

  9. I’m looking at building a similar project using some sort of embedded linux on a small board. From what I’ve seen so far, you’re going to be hard pressed to get a project together with both wifi and audio for less than $100. At the moment I’m thinking the Beagle is the one to go for, but it feels a little too overpowered as I double I’ll be using its video out and graphics acceleration.

  10. Or maybe Connect One sells the Mini Socket iWifi module, that communicates rs232 up to 3Mbps, for $60, so it could probably be built for about $100-$120. I’d add a LCD display (dirt cheap these days) and of course some buttons. Bonus points for using a mechanical rotary encoder as a tuning control.

  11. Tony: there’s a good nearly credit-card sized (i.e. about twice the size of one) board called the TI Beagle that might be good for that. Netburner has a DIP-40 sized Freescale board that could probably run uclinux or a dedicated program.
    The main problem is that embedded WiFi is about $100 at the cheapest, bringing the cost of the walkman to $150-$250 at best. There’s also Gumstix, which has good portable boards.

  12. The real question is, how can you make it steampunk? Or, can you instead of using a plastic or metal case, knit a case?

    Really though, excellent idea. A really compact version that would automatically find an access point would make a really cool walkman.

  13. Great idea, but I wonder if there is a specific level of hell for a person who would buy a bakelite radio and rip the guts out? 🙂

Leave a Reply to TonyCancel reply