This system solves the seemingly ubiquitous problem of being able to listen to your music from anywhere in your house. Say goodbye to a separate iPod dock in each room! This instructable will show you step-by-step how to build a house wide, multi zone audio system which can be entirely controlled from your Smartphone or computer (really anything with a web browser) from anywhere in your house which you have a Wifi connection (no more annoying bluetooth range issues!). Did I mention it's also expandable to however many zones you need? There are systems which aim to accomplish this same task such as the Sonos brand of speakers, but this system allows you to use speakers and amps of your choosing and at a fraction of the cost of a Sonos system.
In this project we will be making use of an Arduino uno with an ethernet shield and a custom PCB which can be ordered from your favorite PCB manufacturer (I recommend OSH Park). The central component of the PCB is the PT2258 IC. This IC allows for volume control of 6 audio channels and communicates with the Arduino over the I2C bus.
Now that we've covered the basics of the system, LET'S GET BUILDING!
For this project, a number of components are required:
I was able to purchase and complete the build for around $300. My system includes 3 zones but you can expand it as much as you need to.
I soldered the components to the circuit board in the following order:
Using the male to female jumper wires connect the following pins on the PT2258 board to the Arduino
Connect the relay to the Arduino:
Connect VCC to +5V, GND to GND, and the signal pin to digital pin 8 on the Arduino
Powering the Amp
Cut off the non 3 prong end of the AC power cord and strip the three wires inside. Do some googling to find out which wire colors correspond to live, neutral, and ground. For my cord, live is brown, neutral is blue, and ground is green. Attach neutral and ground to the power supply as shown. The live wire needs to be routed through the relay so we can control when the amp gets power. Attach the end from the cord to the normally open pin of the relay and attach the load pin of the relay to the live pin of the power supply. Using some spare wire (I used speaker wire) connect + and - of the power supply to + and - on the amp.
If you chose to use several small amps such as the lepai 2020a+, they should have all come with their own smaller power supplies. I have not personally done this, but I recommend plugging all the power supplies for the 2020a+ into a power strip and using the relay in line with the power strip supply cord.
The final touches!
The only other thing left is to connect the Arduino to your home network with an ethernet cable and your router and plug USB power into the Arduino.
This is where the real magic happens. I have attached files containing the code for the Arduino as well as the HTML file for the ethernet shield.
Open the text file with the Arduino code in the Arduino IDE. There are a few things you will need to change to have a properly functioning system.
Now that your code is ready, upload it to the arduino!
The HTML file needs to be on the root directory of the SD card. Name the file "Kamdora.html" and put the SD card in the slot of the ethernet shield.
All this work would be pointless without some music, right?
In order to maintain the idea of being able to control the system from a smartphone, I used a Chromecast with an HDMI audio extractor. This allows us to take the audio the Chromecast outputs and plug it into our PT2258 control board. Thus we can simply cast our favorite Pandora station or music from Google Play Music to the Chromecast and control the volume from our Arduino. Simply plug the Chromecast into a TV and set it up on your home network, then unplug it from the tv and plug it into the HDMI audio extractor. Using a RCA to 3.5mm cable, plug the HDMI audio extractor into the input of the PT2258 board. Finally plug the outputs of the PT2258 Board into the inputs of the amp.
The system can be controlled by anything which has a web browser and is connected to your home network. All you have to do is type in the IP address of the arduino followed by "/?app" (i.e. 192.168.1.199/?app) and you will be brought to the control app for the system (shown in the picture). This allows you to change the volume of each zone and turn on an off the system.
The greatest limitation of this system is the fact that there is only one audio input for the entire system. That means you have to listen to the same song throughout the entire house. I'm currently working on a newer revision of the system which will have two inputs (2 chromecasts) and allow for switching between the inputs on a zone-by-zone basis. My initial thoughts are to use transistors and the digital output pins on the arduino to control which input goes to which channel. If you have any suggestions or problems be sure to let me know!
Thanks and I hope you enjoy your new audio system!