Thursday, August 11, 2011

WiFi Wireless Speakers Set

Following the development of the wired speaker project of which I prepared only a demo prototype that included the boards connected externally to a set of computer speakers, I have now ported that project to a wireless version where I replaced the original Ethernet board (the official arduino Ethernet shield) with the Wifly shield from Sparkfun (see below for detailed hardware description). All code is open source and available on

With this setup you can stream files wirelessly from your PC (using the wifly shield from sparkfun) or with a cable (using the official Arduino Ethernet shield) to a set of speakers anywhere you can get a connection to your LAN.

Here's a video showing the operation (as requested, please see more videos and photos of the construction at the bottom of he page):

As a reminder, the original project included the following:

1. server software to stream files to a remote speaker set (originally connected to the network using cables, but now wireless) - this server software is available for download from the google code pages - made with DELPHI, requires VLC 0.8.6 as streaming engine - also available from my google code pages for convenience because it may or may not work with other versions of VLC - note that the software is for PC only - tested on windows 7 and winXP.
Main server Window
2. client software where I can stream files to another PC on the network (also needs VLC on the client computer)

3. Arduino code for both the wired and the wireless version - files are well identified on the google code pages.

4. Extra library for interaction with SD cards at low level but not actually used on the final versions of the project (see description here, download also from the google code pages).

5. The speakers will be auto-detected by the server. You just need to switch them on, start a stream on the server, and the IP of the new speakers will show up on the list automatically.

6. The server supports at least 20 different speakers sets on the network and the selection of which speakers are going to play the stream is done speaker by speaker or by groups of speakers (the server has a configuration area where groups of speakers can be defined).
The manage speakers and groups window on the server.
Hardware you will need: (links below  to not because I particularly endorse them - although I do like them ;-) but because info on their site is plentiful and I did get their mp3 decoder chip and wifly shields:

Arduino Controller Board - tested with the duemilanove, probably works with the UNO, but that needs to be confirmed.

The old version of the mp3 decoder shield from sparkfun. May work with the new one since it uses the same decoder chip, but that needs to be tested.

For the WIRED version, I used the Official Arduino Ethernet Shield.

For the WIRELESS version, I used the Sparkfun Wifly Shield.

As mentioned above, all the code required is available on the pages - including the required version of VLC and the Wifly library version that was used for the project.

Things still not quite right:

1. Improve sound quality. Currently the system allows playback of streams with 32kbps only. Above that the sound is chirping and not good at all. After a lot of tests, I think that perhaps we are limited to that value because of the very modest specs of the hardware used.
2. The server software currently only streams on file at a time, hardly useful if you would like to have the speakers streaming songs ALL DAY LONG!!! Should not require a lot of modifications to have it stream a playlist - code is available, maybe you can do it?

More videos and Photos:
Inside the prototype speakers - The boards are tightly held inside using some foam (also serves as electrical isolation from the speaker surface just below) and compressed slightly by the speaker back cover.

WiFi speakers, completely wireless!! The connections you see between the speakers are for sound signal between the amplifier on one of the speakers and the other one, the sound signal from the decoder board to the amplifier, the power connection between the main speaker and the controller boards I added.
 Thankfully the original speakers had plenty of room to add stuff inside!!

I had to add the filtering capacitor because the main power from the amplifier was extremely noisy and it affected the output too much. You can still hear the noise now, but you really need to be trying. Why that oversized capacitor value? Simple: the only one I had laying around!