Building a Wifi Radio – Part 1, Introduction

October 9th, 2008 by Jeff

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!

Tags: , , , , , ,

44 Responses to “Building a Wifi Radio – Part 1, Introduction”

  1. Mark says:

    Bonus points if you can get it into some sort of retro housing. :)

  2. Jeff says:

    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? :-)

  3. Robert Diamond says:

    You could tap into the input of the audio amp stage ;-)

  4. Tony says:

    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.

  5. Robert Diamond says:

    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.

  6. Robert Diamond says:

    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.

  7. Kupo says:

    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.

  8. ericwertz says:

    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. Jeff says:

    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.

  10. ericwertz says:

    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

  11. Jeff says:

    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!

  12. Maurice says:

    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.

  13. Nightstar says:

    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.

  14. [...] is continuing to work on his WiFi streaming radio project and is now into part 7. The reason it’s taken so long is because he’s bothering to [...]

  15. Seb says:

    There is an alternative to the user interface. Using SqueezeCenter from a PC to stream music to the player. Using slimp3slave (http://www.ex-parrot.com/~pdw/slimp3slave/) and madplay should do it.

  16. [...] I did some more searching and found two similar projects. This one is very detailed, detailed enough for me to follow it even, so that’s where I started. [...]

  17. [...] our last post about his WiFi Streaming Radio Project, [Jeff] has been hard at work to release part 8 of the project where he adds tuning control to the [...]

  18. [...] a Wifi Radio – [Link] Tags: Radio, Wifi Filed in Audio | 1 views No Comments [...]

  19. [...] a Wifi Radio – [Link] Share and Share [...]

  20. [...] use it in his Internet radio receiver project he is building according to the project published on mightyOhm.com. The PCM2704 was selected due to the low number of external components required. The PCM2704 has [...]

  21. [...] data LCD display driver I developed to be used in conjunction with Jeff Keyser’s Wifi router webradio project. In order to get this display driver working together with the router, see the interface related [...]

  22. [...] bin, soll der Arduino aber ein externes Internetradio steuern. Dieses besteht nach dem Vorbild von MightyOhm aus einem modifizierten W-Lan Router und einem Arduino als Steuerung. Im Gegensatz zu MightyOhms [...]

  23. [...] build owes much of its inspiration to Jeff Keyzer’s DIY WiFi radio from back in 2008.  The various parts have a DIY controller board keeping them all in check, and [...]

  24. Sonny80 says:

    Nice patching! What about wma/aac+ support? Is there are players for mms:// real audio support?
    Link to my DIY web radio project without WiFi http://alyer.frihost.net/ethradio/eth_radio_en.htm

  25. [...] would send the stream to a second Amp somewhere in the field. The Wi-Fi client is based on the internet radio setup from MightyOhm. Unfortunately, the newer OpenWRT sources get pretty close to the flash limit of the Asus WL-520GU. [...]

  26. 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

  27. [...] uses Windows, but if you want to use a different OS, you can follow the instructions over at MightyOhm instead. There are a lot of steps, but overall this isn’t too difficult of a hack. You just [...]

  28. justDIY says:

    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?

    • Jeff says:

      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!

  29. [...] the Windows operating system, but those who run on other operating systems can always check out the instructions at MightyOhm instead. While plenty of steps are involved, it isn't all that difficult to work on although it [...]


www.flickr.com
mightyohm More of mightyohm

%d bloggers like this: