• Rana Basheer

Wireless speakers

After exploring several solutions to transmit music wirelessly around my home, I ended up with a hybrid hack involving an analog FM receiver for audio and a digital wireless transceiver for controlling volume/power. The current configuration involves 5 wireless FM speakers that I hacked into and added the wireless transceiver and an FM transmitter that is connected to my TV’s audio output. These speakers are placed around my house. The TV is my central hub where all my media sources such as Roku, Chromecast, Skype Cam, DVD etc are connected. Below is  a quick demo of the mobile web interface for my wireless speakers as a short video. If you don’t care about all the details and just want to get the entire source code then download it here

Zolertia wireless transceiver uses TinyOS and is programmed in nesC. The folder nesC in the zipped file contains all the code for multi-hop speaker communication. Multi-hop communication was necessary to overcome the limited range of Zolertia. The web interface is a combination of javascript + css + html. It uses a very well written shiny knob by Martin Angelov to control the volume of wireless speakers.


So why did I go with a hack when there are solutions like Sonos that are already available? I will list some of the issues I faced with Sonos..

  1. Lag in audio between the transmitter and the speakers. This is because the Sonos uses digital audio packets. Depending on your WiFi traffic things can get seriously congested and the receivers will start buffering data or you will start hearing wierd audio skipping

  2. Speakers sometime go out of sync between themselves. Again this is due to digital audio packet buffering.

  3. Limited range of WiFi. They advertise 30m. However, that is totally dependent on your house.

  4. Overload on your WiFi network due to all the music data. If you already have Roku streaming HD data then this music data will be another traffic adding to the bottleneck.

  5. You are limited as to what you can stream over the network.

  6. I am bored……………….


circuit15

FM Transmitter


My solution solves all the above problems with one minor hiccup of random burst of RF static from FM speakers and not so stellar audio reception. The speakers I have are cheap analog FM receivers that operate at around 918MHz. The lower operating frequency when compared to the 2.45GHz used for Sonos lends them to larger range than Sonos. Additionally, since they are analog FM receivers with no audio packet buffering, these receivers are perfectly synchronized to the transmitter and among themselves.


FM Receiver

FM Receiver


I was lucky to find these speakers from my trusty Goodwill for around $15 a pop. I have also seen them listed on Ebay for anywhere between $25 to $100. The wireless interface to control these speakers is made possible through a digital transceiver called Zolertia. These were left overs from my PhD research. These transceivers are expensive, costing around $100, and has several inertial sensors built into them. For this task something cheaper like the ones from Digikey which sells for $30 would suffice but I decided to go with the bird in hand.


Zolertia Mote

Zolertia Mote


My first plan was to control these speakers through their infrared remote control. This would have been a clean solution with no need to open up these speakers. For this, I built an external circuit with an infrared LED connected to the Zolertia motes. The infrared codes were captured using the WinLIRC and then I beamed them from the motes to the speakers to control their volume or turn them on or off. This worked fine except that the FM speakers had this annoying issue that once you turn it off using the remote control, you have to manually switch them back on. So I opted for the riskier option of opening these speakers and taking control of their interface to the switches for power on/off and volume up/down.


Circuit Diagram

Drive Circuit Diagram


The circuit to control these speakers is shown to the left and is quite simple. Essentially, the GPIO lines from zolertia drives the volume up/down and also turns the power on/off. Additionally, I connected a pin to sense the on/off status of the speakers. The series of pictures below are self explanatory and the video above shows how I used a web interface on my mobile phone to control these speakers.

Random Images


FM Receiver Internals

FM Receiver Internals. The board contains the FM receiver + Audio amplifier



circuit_internals

Hijacked the FM receiver’s control switches



circuit_internals1

Zoomed in view of speaker’s switch interface



circuit6

Close-up of the hijacked switches with the wires going to Zolertia



Zolertia connected to the FM receiver

Zolertia connected to the FM receiver’s switch interface



Linear Regulator

11v to 5v Linear regulator to power Zolertia


#TinyOS #Wireless #IEEE802154 #homeimprovement #electronics #hack #Zolertia

4 views