Arduino/Android 4 Zone Speaker Selector
Here’s my write-up of an Arduino project that will enable speaker zone switching across your home WiFi network from your Android smartphone. A networked 4-zone speaker setup using Android as a remote control. Here are the instructions and code you need to do it too!
Watch the demo to see if it’ll do what you need (Youtube)
Speaker Selector – Overview
In theory, we have an impedance protector that is switched via relay rather than giant buttons. The relays are controlled by our smartphone, which is hitting the Arduino server. Simple!
This provides the 4 big resistors to add 4 speaker zones to your powered second zone (or first zone, even). The watts delivered to a speaker varies based on how many speakers you have turned on, because there are resistors that get turned on/off to keep your receiver/amplifier from frying (impedance protection). I’m starting to question whether I should have gone with 8 zones!
Update 10/17/14: This 4 zone device has been working great under pretty consistent use for well over a year now.
- Speaker Selector –
OSD ISS4 4-Zone Speaker Selector with Impedance Protection on Amazon
- Arduino Relays –
SainSmart 8-Channel 5V Relay Module on Amazon
- Arduino –
Arduino UNO R3 on Amazon
- Arduino Ethernet Shield –
Arduino Ethernet Shield R3 on Amazon
Making the speaker selector work over the Internet
The Sainsmart relay module is great… it really simplifies the construction of this whole thing. It is marketed as being Arduino compatible, but really anything with low voltage driver output would work, and it really speeds up connecting the relays.
For four zones, it turns out you need 8 relays (4 left speakers & 4 right speakers). Soldering is no longer the suggested method to implement this, just clever wiring in order to put the relays in the middle of each speaker circuit. You’ll want to route the positive wire for each speaker through the relays, and no changes to the negative are needed.
Here is my original version (solder-method) all hooked up:
And the whole system:
(The breadboard just has a 315MHz transmitter, see my last blog post to find out why. The entire breadboard is completely optional for this project.)
I added the code to my Arduino webserver, which will handle requests at /speakerStatus to see which are active, and /speaker?zone=&state=<0/1> to turn a zone on/off.
Speaking of the Arduino, I used the Ethernet model rather than buying an Ethernet shield separately. I couldn’t find anyone still selling that, so I linked to the Arduino Uno and the Ethernet shield.
Take a look at the Arduino server code on Bitbucket here!
Android App Speaker Selector
Along with all that, there is a great Android/IPhone app that will request those URLs for you with toggle buttons. Code for that is also in the above repo. In addition to the basic functionality – querying status and updating the zones, a long-press on a button will allow you to rename any zone, remove unused zones, etc. See more about that here.
Modernizing the audio receiver
To complete my houses audio setup, I bought a web-enabled receiver for my Pandora/Spotify playing. I timed it right and got a good deal on an end-of run of 2012 model for this receiver… this is the current version: Onkyo TX-NR535 5.2-Channel Network A/V Receiver
Of course it comes with an Android/iPhone app for remote control, to make this entire system complete! I’d say that Onkyo’s app for Android is pretty good, with a nice selection of internet radio options, Spotify being the one that sold it for me.
Bottom line… I can be in the basement and turn on my workout music without running upstairs to change any settings.