I have a Sonos system set up at home. The Play:1 speakers start to play music whenever I press the play button on the Android control app; however, the Connect units which hook up to my existing amplifiers need something different. For my AV receiver I solved the problem using Python SoCo library and Marantz telnet interface. For my PC amplifier Scythe SDAR-2100 I had to think of something else as it does not have any control interface.
I took a look at the amplifier and noticed that the preamplifier board is separate from the power amplifier. Therefore I decided to replace the preamp with one that sniffs the inputs and changes the input if needed. As a bonus that way I could get rid of an intermittent volume control potentiometer.
The circuitry is nothing fancy; Arduino Pro Mini takes care of all the processing involved; PGA2311 is used for the volume control. Inputs are amplified with a pair of LM358 op-amps and then fed to the A/D converter of the AVR. A bank of relays takes care of switching the input. Switching regulator AM1D-1205DZ generates the +/-5 V rails from the 12V rail. As a bonus I use the AVR to pulse width modulate the backlight of the VU meters (the black/red cable in the photo).
The trickiest part of the project was to design the PCB layout so that all the potentiometers, switches and connectors meet up with the main PCB and the holes in the enclosure. It involved a lot of measuring. I also experienced some software bugs which resulted in some VERY LOUD output… luckily I tackled those quite quickly.
While I had the amplifier in bits I also replaced the horrible stock speaker jacks to better ones. Overall I am very happy about how the modifications turned out. I no longer have to turn any knobs in order to play music from Sonos!