Let me just start by saying that this DIY
amplifier sounds so good. Dare I say, even
better than the original amplifier that was
present within the speakers, which is this
one here. Is it as good as expensive commercial
amplifiers?
Definitely not but you can theoretically make
it sound just as good if not better by upgrading
the modules depending on your budget.
I’ve mainly spent less than $35 to build
this and I am very pleased with the results.
There were a couple of tweaks that had to
be made to get here and I will go over them
in this video. For a start,
I decided to switch from using MoodeAudio
that I covered in a recent video to using
PiCorePlayer. I still recommend using MoodeAudio
is you want a simple, all in one setup that
will take care of everything for you. The
main drawback of using a system like that
is that you have to safely shutdown the Raspberry
Pi or else you run the risk of corrupting
the file system on the microSD card.
This is not a new issue and it is a common
thing to keep in mind when using the Raspberry
Pi, however, I wanted an extremely simple
setup wherein I could use the speakers like
commercially available ones. This meant being
able to unplug the power without having to
worry about file systems. That is the main
reason why I switched to PiCorePlayer.
Having said this, you can add external circuity
to monitor the power input and safely shutdown
the Raspberry Pi. However, since it consumes
several hundred milliamps of current, you
will need to use a battery that can provide
this current. Something like a LiPo or 18650
battery. It did not make sense to add this
to a simple speaker as I would much rather
add it to a central media server instead.
PiCorePlayer is designed to be a lightweight
yet complete audio system. It is built using
Tiny Core Linux and the end result is so small
that it can be run directly from RAM and this
allows you to unplug the power without running
the risk of corrupting the microSD card. There
are three popular options by which you can
use PiCorePlayer and to get the most of the
system, you would want to use option 2 where
you have several speaker units around your
home and a central server to control them
all. This allows you to stream music from
your local server, devices or through the
various cloud services. The server is the
Logitech Media Server or LMS and we will set
this up in a future video. You will then be
able to control all the players through Home
Assistant or by using any of the popular voice
assistants. Of course, you also have the option
to use a touch screen display or your phone
as the interface.
If you do not care about such a multi-room
setup then you can use PiCorePlayer as a standalone
player that will allow you to stream music
from your phone or computer by using Airplay
or Bluetooth. You can then link this to a
server later. We will be setting up the standalone
player in this video. The third and final
option is a combination of both the above.
This means that the server itself can act
like a player.
Keep in mind that whenever you have a server,
you need to safely shut it down so that is
something we will take a look at in a future
video.
Getting started with PiCorePlayer is fairly
straightforward. You need to first download
the image file which is the same for all platforms.
You can then follow the normal process of
using Etcher to load it to a microSD card.
I am using an old, 8 GB microSD card here
as you do not need a lot of storage. If you
plan on using a wired ethernet connection
then you can simply plug it in, insert the
microSD card and you are good to go. However,
since we will be using the Pi Zero that does
not have an ethernet port, we have to provide
the WiFi connection details. Doing that is
simple as well. There is already a sample
file on the microSD card and you can make
a copy of it, rename it and then open it using
a text editor like notepad++ or sublime text.
You then need to enter your country code,
the network name, followed by the password.
Once done, you can save the file and that’s
that. If you face any issues then there are
plenty of guides on the website to help you
along.
Before we power it ON, let’s take a look
at the hardware setup that is very similar
to what I had before. A 19V/40W DC power adaptor
is used as the main supply which is then stepped
down to 5V using the LM2576 DC-DC step down
converter module. The 5V output from this
is used to power the Raspberry Pi. The digital
output from the Raspberry Pi is sent to the
DAC which converts it to an analog output
that is sent to the amplifier board. This
board is powered directly from the 19V supply.
The amplified output is then sent to the speakers
and this is also controlled by the relays.
The negative speaker terminal is directly
connected to the amplifier output while the
positive speaker terminal is switched by the
relay that is controlled by the RC board.
The RC control board is simply a delay circuit
that switches ON the relays after a set time
interval. This gets rid of the loud thump
that occurs when you first power ON the unit.
For the values used here, you can expect a
delay of around 1.5 seconds, after which,
the transistor will switch ON and activate
the speakers.
If we had a central server, then we could
check the status of the player and activate
the relays only when we are playing audio
through the speakers. We will try to do this
in a future video.
You do get these speaker terminals that can
be used to connect the speakers but since
I had these generic connection blocks, I decided
to use them. The wires simply slide in easily
which makes them easy enough and practical
to use. From there, I can connect the other
end to the speakers. The unit takes about
45 seconds to fully boot and get ready to
stream music and once again, this is pretty
standard for a Raspberry Pi setup. Once up,
you can use the IP address of the board to
log in and make the necessary changes. You
have different options which give you a lot
of flexibility to customize this the way you
like – from the basics like network settings
to more advanced things like enabling different
audio streams and so on. The LMS tab is for
the server and we will not be setting it up
in this video.
The first thing I had to do was enable the
audio DC output. To do this, I had to navigate
to the Squeezelite settings tab, select the
HIFiBerry DAC+ Light option and then save.
The board will make the necessary changes
and since it runs from RAM, it creates a backup
to a file that is read every time it boots
up. I then had to reboot the board and wait
for it to start up again. The next thing I
wanted to do was enable Airplay and to do
this I had to go to the Tweaks tab and scroll
to the audio section where I could enable
shairport and save. The board made the necessary
changes and that’s all I had to do. From
there, I could connect to it using my computer
and stream audio to the speakers. There is
a slight pop when the audio starts and this
is because of the DAC that I’m using. Adafruit
have written about this and there are some
settings that can be used to eliminate it
if you like. However, I will not be doing
this as I will most likely upgrade to a better
DAC once I am happy with the setup.
Now that Airplay was working, I decided to
test out the Bluetooth setup. For this, I
selected the Bluetooth option from the home
screen which took me to the Bluetooth page.
Here, I could enable the Bluetooth adapter,
reboot and then install the Bluetooth extension
which took about a minute to complete. I could
then power it ON and restart the Bluetooth
client which enabled everything for me. The
next bit is a little tricky. I had to enable
the discover mode and then look for devices
around me. I could then pair and briefly connect
to the player. However, it turns out that
by default, it uses the Bluetooth speaker
mode which means that it streams audio to
the connected Bluetooth device, instead of
the other way around. This behaviour can be
changed by selecting the Player type and then
saving the settings. You might have to fix
any invalid characters in the player name.
Once done, I could enable the discover mode
again and connect to it. This meant that I
could stream audio to it like any other Bluetooth
speaker.
Keep in mind that you are going to get the
most of this speaker by using a media server
and we probably would not have to do all of
this for the individual speakers. I then designed
a very simple enclosure to house all the modules
so that I could test the speakers for a longer
time.
This is what it looked like on the inside
and the setup is the same as per the schematic.
I made an opening for the power switch but
this hasn’t arrived yet. Either way, there
was an issue with this setup as I could hear
a lot of interference which initially sounded
like a grounding issue. However, after testing
a few things, I realized that the sound is
being caused due to the proximity of the Raspberry
Pi and the DC-DC step down converter module.
The power module uses a shielded inductor
seen here, however the Raspberry Pi inductor
is said to be semi-shielded. I believe there
is a bit of magnetic coupling between the
two which is causing the issue that was observed.
Repositioning the Raspberry PI completely
eliminated this and I was back to a clean
audio output again.
This goes to show that there are a lot of
things that you need to take into account
when building an audio project. Having clean
power supplies is critical and you also need
to take care of the cabling, particularly
the analog audio output from the DAC to the
amplifier board as this is of a very low amplitude.
I will be testing this setup for a long time
and once I am happy with everything, I will
consider upgrading the power supply, DAC and
amplifier to something more professional for
the long run as this will enhance the audio
output.
As of now, I am totally happy with the way
it sounds and this will be my daily driver
for a while. I do hope you learned something
through this video. Thank you for watching
and I will see you in the next one.
