Introduction: The Smartphone Operated House-Wide Audio System

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!

Step 1: Gathering the Components

For this project, a number of components are required:

  1. Speaker wire run from a centralized location (such as a utility room in the basment) to each zone
  2. Speakers of your choosing for each zone
  3. 6 channel amp (such as this one) or multiple small 2 channel amps such as the popular Lepai 2020a+
  4. Power supply for the amp
  5. Spare 3 prong AC power cable
  6. SPST Relay (I used this kit from Sparkfun)
  7. Arduino Uno with Ethernet Shield
  8. Male to female jumper wires
  9. Custom PCB for the PT2258 (I have attached the file for this which you can upload and order from OSH Park)
  10. The PT2258 IC (I ordered this from ebay)
  11. 10uF Capacitors
  12. 100 kOhm resistors
  13. 3.5mm through hole jacks
  14. Male .1" spaced headers
  15. A microSD card (any size)
  16. Chromecast
  17. HDMI audio extractor (I used this one)
  18. RCA to 3.5mm cables

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.

Step 2: Soldering the PT2258 Board

I soldered the components to the circuit board in the following order:

  1. PT2258 IC
  2. Capacitors
  3. Resistors
  4. 3.5mm Jacks
  5. Male headers

Step 3: Connecting Everything Together!

Using the male to female jumper wires connect the following pins on the PT2258 board to the Arduino

  1. VCC to +5V
  2. GND to GND
  3. SDA to A4
  4. SCL to A5
  5. CODE2 to GND (Note: if using more than 1 PT2258 board for more than 3 zones, CODE2 needs to be connected to GND on one board and +5V on the other. This changes the address of the PT2258 IC so the arduino can communicate with the two boards separately)

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.

Step 4: CODE!

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.

Arduino Code

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.

  1. Change the IP address variable to a suitable IP address for your home network (this will be the ip address of the Arduino)
  2. Change the gateway variable to the IP address of your router
  3. Change the subnet variable to that of your home network
  4. Change the mac variable to the MAC address of your ethernet shield (it should be on a sticker)
  5. Change the two address variables to the address of your PT2258 chip

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.

Step 5: Audio Input

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.

Step 6: Accessing and Controlling the System

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. 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.

Step 7: Final Thoughts and Future Expansions

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!

Summer #mikehacks Contest

Participated in the
Summer #mikehacks Contest

Remote Control Contest

Participated in the
Remote Control Contest

squeeze more awesome out of summer contest

Participated in the
squeeze more awesome out of summer contest