Building a Wifi Radio – Part 10, Building the Box

May 29th, 2009 by Jeff

This is the tenth and final part of a series about building a low cost, open source streaming internet radio based on the ASUS WL-520gU Wireless Router.  If you haven’t already, check out the previous parts (see the links below) for some background about the project.

Wow, we’ve come a long way since part one!  To date, there have been nine parts in this series, each covering a different aspect of building the radio:

  1. Building a Wifi Radio – Part 1, Introduction
  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. You are here.

Preface to Part 10:

In this part, I’m going to show you a few steps in the process I used to turn a wireless router, a breadboard, and a pile of loose parts into a finished standalone internet streaming radio receiver.  Unlike the previous parts in the series, I’m not going to provide detailed step by step instructions.  This is primarily because I don’t think it’s realistic to expect everyone to have access to the same tools and materials as I do.  Think of it this way – this is your opportunity to customize your radio.  Maybe you don’t like wood veneer, but prefer brushed aluminum or carbon fiber?  Maybe you have a laser cutter at your disposal and can turn a flat sheet of clear acrylic into a snap-together radio in less than 5 minutes?  This is your chance to express your creativity!  Go ahead and copy my design, but don’t be afraid to go off into left field either…

The Box:

Some time ago, I posted a Google Sketchup model of the radio enclosure that I created with the help of Tony, a good friend of mine who lives in Southern California.  The idea was to build a box out of wood to mimic the style of a vintage table radio.  All the components of the radio would be mounted inside the box, with the exception of the antenna (not shown).  We also wanted to add some custom touches to make the design look modern and unique, like black controls and flush mounted contoured speaker grilles and a minimalist front panel layout.

Here’s the model we came up with:

Wifi Radio Enclosure - Google Sketchup Model

Tony and I spent a weekend in his garage near Los Angeles finalizing the design, cutting and bending sheets of plywood, making forms, and fitting various pieces of the box together.  Tony, who is far superior to me in the ways of woodworking and fabrication, did most of the work while I looked at stain colors and other details.

A few weeks later, Tony sent me this masterpiece.  Here’s the box, freshly stained and covered with many carefully sanded coats of polyurethane:

Wifi Radio Case Build

Hopefully Tony will write a post about the process of fabricating the box – he can provide a lot more details than I can.  For now, check out my photostream for some in-progress photos of the box.  Tony has some photos as well.

Once it arrived in the mail, it was up to me to combine the empty box with the pile of parts on my workbench to finish the project.

Finding an Audio Amplifier:

I wanted a small, inexpensive, stereo audio amplifier to mount inside the radio.  Originally, my goal was to find a kit with a few watts of power per channel, single supply operation (preferably with a common supply voltage, like 12V), volume and tone controls, and a compact PCB.  I never found any kits that I really liked (although I may look at 41hz for some future higher powered projects).  Eventually I gave up and bought a pair of used Altec Lansing ACS90 computer speakers for $5 from Weird Stuff in Sunnyvale, CA.

Altec Lansing PC Speakers

I took the speakers apart and threw away the plastic speaker boxes.  Inside one is a small stereo audio amplifier that runs on 12V @ < 2A and delivers 4W per channel.  I couldn’t ask for a better amp for this project, especially for the price!  I also salvaged the hefty speakers for reuse in the radio.

Building the LCD / Interface Circuit:

I carefully transferred my AVR microcontroller-based LCD driver / tuner control circuit from my breadboard to a piece of electronics protoboard.  Here’s the “component side” of the perfboard, showing the AVR ATmega168 microcontroller (socketed), 16MHz crystal, contrast trimpot, ICSP pins, and header socket for the LCD:

Wifi Radio - Final Assembly

The “solder side” is mostly just interconnect wiring.  The RESET button is in the lower left corner.  I had to notch the PCB to clear one of the control pots inside the radio box.

Wifi Radio - Final Assembly

Here’s the protoboard with the LCD installed and being tested.

Wifi Radio - Final Assembly

Modifying the router:

I removed the USB and DC power jacks from the WL-520gU PCB.  I’m planning to use the USB port solely to talk to my SYBA USB-Audio adapter, so I removed the USB connector from the SYBA as well and wired the USB lines directly to the router.  Some people may disagree with this, but wiring directly to the router simplified the wiring inside the radio and saved space by eliminating unnecessary USB connectors.  I can always put the USB jack back later if I want to connect other USB peripherals.  A pair of wires connects the DC power pins on the router to the radio’s 5V power supply.  Don’t attempt this unless you have a decent soldering iron – it’s easy to ruin the printed circuit board by overheating the traces.

Wifi Radio - Final Assembly

The power supply:

To supply power to the radio, AVR microcontroller, and amplifier, I needed a power supply that could provide both 5V and 12VDC.  I found a used “brick” style power supply (also at Weird Stuff) rated at 5V and 12V @ 1.5A.  I believe this type of supply is very commonly used with external hard drive enclosures and shouldn’t be too hard to find.  Initially I was concerned that a switching supply would be too noisy to use with an audio amplifier, but a quick test showed no unexpected noise from the amp.

Wifi Radio Power Supply

Final assembly:

Mounting all of the components inside the radio box took a lot of time, epoxy, velcro, and hot glue.  Eventually I was able to get everything except the power supply to fit.  Although originally I had wanted to mount the supply inside the radio, keeping it external ensures that there is no 110V running around inside the box.  This is a nice safety feature, and I think it was a worthwhile compromise.

Wifi Radio - Final Assembly

The router is mounted on the left side of the box.  I positioned it close to the back panel so that the antenna connector can pass through and the antenna can be attached.  The amplifier is on the right side.

Here’s a shot inside the box, showing the microcontroller circuit and LCD display.  The LCD is simply hot glued to the inside of the box.  You can also see the speakers mounted on either side of the display.

Wifi Radio - Final Assembly

The finished result:

Here’s the front of the radio.  The LCD display is behind a thin sheet of smoked plexiglass that is press fit into the rectangular opening in the front panel.  The two smaller knobs are connected to potentiometers that I wired to the amplifier in place of the original controls.  The left knob controls volume, the right is for tone.  I originally wanted the volume knob to also be the power switch, but I couldn’t find a dual audio taper pot that included a switch as well.   The small knobs are from HSC in Sunnyvale.  The large knob in the center is the tuning control.  I spotted it at Mouser Electronics (#450-1755 / datasheet) and couldn’t resist using it on the radio.

Finished Wifi Radio

Here’s a closeup of the front panel with the LCD display powered on:

Finished Wifi Radio

The back panel is made of fiberboard from Home Depot.  The Wi-Fi antenna is shown on the left.  The LAN ports and buttons of the router are accessible through cutouts in the back panel.  A 6-pin mini-DIN power jack that matches the power supply I’m using and the power switch are shown on the right.  Four screws hold the back panel onto the box, so it’s easy to remove.

Finished Wifi Radio

Here’s a side view showing the radio’s rounded corners and matching curved speaker grilles:

Finished Wifi Radio

Here’s a video of the radio in action, tuning between a few different preset stations, including Slay Radio, di.fm, and San Francisco’s somafm with Groove Salad.

There are a lot more pictures on Flickr.  Check them out and keep watching the Asus Wireless Router Hacks group for other people’s creations as well!

Conclusion:

This has been an epic journey.  Back in October, when I first posted about this project, I never anticipated how much interest there would be in creating a low-cost DIY wireless streaming radio.  I am really thankful for all of the encouragement I have received, both on this site and elsewhere.  Thanks to everyone who has visited from Make and Hack a Day, as well as everyone who complimented me on my talk at NOTACON.  You guys make it all worthwhile!

By the way, if you have questions or comments, join the forums!

Thanks for reading, and until next time, happy hacking!

- Jeff Keyzer aka mightyohm

Tags: , , , , , , , , ,

20 Responses to “Building a Wifi Radio – Part 10, Building the Box”

  1. Craig says:

    Jeff-

    What a great project. A couple things you mentioned in your build process that I thought I’d comment on were:

    1. Try an ALPS RK097 pot for your power/volume control needs. It’s a stereo pot. I’ve used them before. A great source (also a great resource for audio headphone amps) is http://tangentsoft.net/shop/ and a link to what I used the pot in here: http://www.bushwoodworking.com/2006/03/21/millet-hybrid-headphone-amplifier-project/. I just used it as a power switch in my application, but it should work just fine for what you’re doing.

    2. The 41Hz kits are great. The Amp6 is a kit I’ve built 2 of, and built enclosures for both. See my site for more details: http://www.bushwoodworking.com/2007/06/07/amp6-basic/ and http://www.bushwoodworking.com/2007/07/26/amp6-portable-enclosure/ (friend of mine who sells speakers for a living uses the portable to demo his speakers). The Amp6 would probably work really well in a setup like yours.

    Craig

  2. Madox says:

    Nice :)
    I like the wood finish and the dials.

  3. Alan Parekh says:

    The radio turned out real good. It looks like something that you would buy in a store.

  4. Paul Kimbrel says:

    Ok… here’s a small detail that would be slick… a 1/4″ stereo jack on the front that cuts off the signal to the amplifier from the USB audio interface. Then you could plug in your headphones and it would automatically shut off the speakers.

    For those moments you need some discretionary listening.

    Man, I have GOT to get my workshop cleaned up. I HAVE to build this.

    • Jeff says:

      Thanks for the positive feedback, guys! It means a lot to me.

      Paul – An audio output of some sort is a terrific idea. I was originally planning to include one but simply ran out of time before the Maker Faire. I’ll probably add one at some point so that I can use the radio as an audio source for my home theater system.

  5. Somnath Purkayastha says:

    Awesome project, nice finishing. Now I HAVE TO find time to build it. One request. As you are now done with the project, can you please create an exhaustive list of all items required for this porject. It would be even nice to add price information. So that people like me, who cannot wait to start building this radio, will have a list ready to start shopping for raw materials. Thank you very much for taking the time to finish this project.

  6. Grapsus says:

    Very impressive result! And it’s running open source software!

    I’d like to build one this summer.

  7. [...] Keyzer from mightyOhm has completed his DIY WiFi Radio build. The finish is fantastic but look closer, the case was built from scratch. Best of all it is based [...]

  8. Jeff says:

    Somnath – Excellent suggestion. I’ll see what I can put together.

  9. Sunny says:

    I like both, the build of the box and well as the electronic design. Overall a very well done job.. Keep it up.

  10. Cleon says:

    WOW! This is one impressive project! Open source is the way to go & your finished radio looks like something which would cost several hundred USD$$$. Great job & thanks for sharing it!

  11. JesseG says:

    Nice to see Bassdrive in your selektah.

    If you ever get tired of not having totally awesome sound from your box, check out the NS3-193-8A from Aura Sound:
    http://www.aurasound.com/
    http://www.aurasound.com/public/pdf/NS3-193-8A.pdf

    For a 3-inch driver, the specs are nuttahs, and they are LOUD despite the frequency response and very low distortion. 40 watts RMS for a pair. You’ll probably need a new power supply, and of course a new amp. ;)

    • Jeff says:

      Those are some nice speakers!

      The radio is definitely not constructed with audio quality in mind. There are a lot of things I would change if I really cared about getting good sound, but given my budget I had relatively few options.

  12. Jeff says:

    For people who were asking about cost, I posted a cost breakdown of the radio here:

    http://mightyohm.com/blog/2009/06/wifi-radio-cost-breakdown/

    Enjoy…

  13. Tommy Tesla says:

    Great project! I’m impressed. I’m in the middle of doing the same thing with an older (25$) laptop. I wanted to be able to play mp3 burned on dvds as well as streaming radio and over the air broadcast for weatherband and traffic(am) – The software part is easy (for me anyhow) but the hardware interfacing is all new, and great fun to learn.

    I wanted to mention that if you want to move your game up a notch on the audio quality, everybody is raving about these class “T” amplifiers, you can get them pretty cheap on ebay “Lepai TA2020″ is a good search string. About 20$ plus shipping and they are supposed to make several hundred dollar amps sound bad in comparison. There are also some prefabbed boards with the magic TRIPATH TA2020-020 IC for sale on ebay if you don’t want to mess with the tearing down the case and recycling the aluminium.

    Thanks so much for putting this all together, really a great project. I fear I’ll spend the weekend tearing apart all my routers and contemplating giving them organ transplants now that I’ve seen what can be had with a bit of solder and some hard work.

  14. Dmitry says:

    Wow! This project is so cool. Imho, you should paint antenna into brown (or black) color and put second one on the other side for the symmetry.

  15. jotaki says:

    Thanks so much for putting this all together, really a great project. I fear I’ll spend the weekend tearing apart all my routers and contemplating giving them organ transplants now that I’ve seen what can be had with a bit of solder and some hard work.
    I believe the 41hz kits use the Tripath amplifiers. I have heard good things about them.

  16. Chris says:

    Just want to add my voice to the thanks and congratulations – Jeff sir you are a star.

    Like all the best home-brew projects, it is simultaneously both a fait accompli and a springboard (and I have all sorts of ideas for mine, when it’s finished).

    Again, well done.


www.flickr.com
mightyohm More of mightyohm

%d bloggers like this: