Tag Archives: Dayton

Raspberry Pi GPIO Audio Amp control with relays using squeezlite

I have had a project in the making for some time. We use a Raspberry Pi with a Squeezeplug image to run Squeezelight on it to do basic audio out in our bathroom. As an amp I use the Dayton DTA-1. The amp has to be manually turned on and off each time we use it. This is subobtimal, as the whole idea behind the Logitech Media Server is to be able to use an app to use it.

While researching I came across the Squeezelite RPI GPIO project. It is a drop in replacement for the squeezelight binary provided by the Squeezeplug guys. To get it to work you need to change the code in a few places.

First log into your Raspberry Pi as root.

Get the latest git version of Squeezelite RPI GPIO:
git clone https://code.google.com/r/phermann2-squeezelite-rpi-gpio/
cd phermann2-squeezelite-rpi-gpio/

Then edit the Makefile:
nano Makefile

Change the CFlags to this:
notice the -DGPIO, this gives you access to the desired functions.

compile with this command

now make a backup copy of your current squeezelight binary:
cp /opt/squeezelight/squeezelight /opt/squeezelight/squeezelight.original

edit the start script of squeezelight, as we need root rights
nano /etc/init.d/squeezelite
all I did is add a
after the first fi in the file… it overrides everything it detects automatically.

restart the squeezelite service to check if it worked.

You now need to connect pin 18 on the Raspberry PI to the input on your relais.

Relais for a Raspberry Pi Squeezbox Amp control

In my case I got a board for Arduino with 5 Volt relais and 3,3 volt pins. I took an old power cable and spliced it to attach it to the fist relais and added a socket for the power source of the amp.

Raspberry Pi + Dayton DTA-1 + Bluetooth

Raspberry Pi + Dayton DTA-1I have been on the lookout for a way of playing music in our bathroom without a huge installation but with a lot of flexibility. Thanks to a recommendation by XY I bought a Dayton DTA-1 amplifier and a Raspberry Pi.

I installed Raspbian following this tutorial. The bluetooth adapter worked like a charm.

Getting AirPort to work required some tinkering using this tutorial.

The Dayton is really good at playing back the MP3s. The sound quality for 33€ is very good and the case small and light. I did not choose to add a USB DAC as I can’t hear the difference.

Next step: getting it to be controlled with KNX…