A while ago, I released a speaker teardown video and I had mentioned that I will be upgrading
it with a Raspberry Pi to add more features and make the most of it. I was impressed at
how easy it is to do and, in this video, I will share with you the progress so far.
The first thing was listing out the requirements. At a minimum, I wanted to be able to stream
music using Bluetooth. Being able to stream internet radio, Spotify premium while also
being able to use airplay would be a bonus. The ability to integrate it with home assistant
and stream music from a local media server were both critical requirements for the long
run. And the most important thing is that I wanted to do all of this at the lowest cost
possible. If you want to replicate everything I’ve done in this video, then it will cost
you less than fifty dollars. Of this, seventeen dollars are only for the raspberry Pi and
microSD card. Here’s what the setup looks like and everything is modular, which means
that you can upgrade it depending on your budget. This makes it possible to get some
really good quality audio by upgrading the DAC, amplifier and so on.
MoodeAudio can do all that want and a lot more. Setting it up was a breeze and you can
even connect a display and use a touchscreen as the interface. Out of the box, you can
use your web-browser to control it and it also works with your phone which is pretty
convenient. I did consider four other alternatives but there was something holding me back for
each of them and you can view my thoughts here. There’s nothing stopping you from
upgrading the platform in the future if you want something more, so that’s definitely
a bonus.
One of the speakers that I had was active, which meant that it had the electronics along
with the actual speaker drivers. The other one was passive and only had the drivers.
Instead of replicating this design and making a smart speaker, I decided to make a smart
amplifier. This makes it easy to add more hardware features to the system and it also
allows me to upgrade the speakers later. I removed the electronics from the active speaker
and replaced the rear panel with a spare one that I had. This gave me two identical, passive
speakers which is what I wanted. I would encourage you to visit eBay and take a look at the used
floor or bookshelf speakers that are available as you can usually pick up a pretty good deal.
The first thing I had to do was download the image file from the website. There is also
a setup guide that you can refer to if you need some more help. Once I had the file,
I used Etcher to flash it to the microSD card. This is exactly the same process for any other
Raspberry Pi image. Before powering it ON, I decided to connect the DAC or digital to
audio converter module. The Raspberry Pi Zero does not have an audio output, which means
that you will either have to use an external USB audio device or an I2S audio DAC. I2S
is an interface that is used to send digital audio signals between devices. To keep things
simple and cost effective, I used the UDA1334A from Adafruit, though if you are looking for
something of better quality then take a look at HiFiberry or even Allo as they have good
reviews. This is another benefit of keeping things modular as you can upgrade it later.
I used this reference wiring diagram to connect the two and this is the outcome. Connecting
a display is optional but I decided to do that to show you what appears on screen. I
also had to connect a USB cable as my display uses that for power and for the touch interface.
Upon powering it up, I received the regular boot up messages and this continued for about
a minute at which point it switched blank indicating that it had completed booting.
By default, the display is going to be inactive and we can enable it from the settings. The
board created a hotspot named Moode and I had to connect to it with the password moodeaudio.
Once done, I could then type in moode.local to access the web interface. The first thing
I wanted to do was configure the WiFi network and I could do that by clicking this icon
here, selecting configure, then the network option to give me this page. I could then
scan the available networks, select the one I wanted, enter the password and change the
location. All I had to do next was save the settings and it then prompted me to reboot.
To do this, I had to click the M icon again, select power and then restart. The board took
about 40 seconds to reboot this time and sure enough it started using my WiFi network. I
had to type in moode.local to go back to the web interface and once done, I could go to
the system settings this time to enable the local display. Once enabled, I had to reboot
the system again and this time I could view the web interface on to the display, which
was simply brilliant. However, I will still be using the browser to show you around. The
next thing I had to do was configure the audio DAC and for this, I had to navigate to the
audio settings and then select an audio device from the list. There are plenty of options
here but if you are using the UDA1334A, then select the HiFiberry DAC+ Light option to
get it to work. Once again, I had to reboot the unit before I could use it.
Once the boot was complete, I could play a test track to make sure that the audio was
being processed correctly. There are plenty of options for you to play around with and
customize it the way you like, so I will not discuss each of them in detail. One thing
I would like to mention is that you can do all of this using your phone as well. Simply
type in the IP address of the board using Chrome. This will take you to the web interface
as seen here. You can add this as a shortcut to your desktop and that way you will be able
to gain access with just a tap.
Now that everything was working, it was time to add the remaining bits. The first thing
that was needed was the amplifier module and for this, I decided to use the OEP30WX2 to
keep the cost low. It is a decent class D amplifier and is rated for a total of 60 watts,
30 watts per channel. It can handle a max voltage of 24V and with a speaker impedance
ranging between 4 to 8 ohms. Without a heatsink, it is recommended to keep the power output
below 15W per channel which is still fairly loud. The speakers I am using can handle 30
watts each which meant that there was plenty of headroom. This is how you can connect it
to the DAC output. All that was left to add was a DC-DC step down converter to power the
Raspberry Pi. For this, I used the LM2596 module that I had which is very similar to
the commonly available XL6009 module. Both would work just as good. This gives us the
final setup seen here and all that was left to do was wire it all together.
At this point, I realized that I ordered the wrong amplifier board. Instead of the 2 channel
variant, I ordered the single channel version which meant that I could only drive one channel
for now. Either way I wired it up to give me something as seen here. For the input,
I used this 40W DC power supply that I had which supplies 19 volts. This is stepped down
to 5V and is used to power the Raspberry Pi. The 19 volts is also directly connected to
the amplifier board. The digital I2S audio output from the raspberry pi is converted
to analog audio that is then used as an input by the amplifier board. The amplified audio
is then sent along this connector which is plugged into the speaker itself. I will need
to replace the amplifier so that I can drive both the channels. For now, I simply used
the right one only. Things looked very promising upon powering
it ON. There was an initial thump that needs to be eliminated. I suspect this is because
of the cheap DAC that I am currently using. Playing back music was once again simple enough
and I could switch through the streaming sources easily enough. If you click the album art
then you will be taking to this screen where you can browse the library. Selecting the
Radio source will show you all the available stations that you can listen to. You can also
add a new station by specifying the stream URL. There’s a lot of customization available
and by accessing the audio settings, you can enable the equalizer option. You have a couple
of pre-sets available but you can also edit the curve to suit your preferences. Let’s
learn how to use the different audio sources.
In order to use it as a Bluetooth speaker, first make sure that the Bluetooth adaptor
has been activated from within the settings menu. You then need to navigate to the Audio
settings to enable the Bluetooth mode. I would recommend enabling the pairing agent as this
will allow you to automatically pair and play music to the device. If not enabled, then
you will have to manually select the Bluetooth device from the BlueZ screen. Once this is
done, you can then pair with the device and play music just like you would with a normal
Bluetooth speaker. For apple devices, you have the option of using Airplay which is
a bit more convenient. To use this, you can simply enable the Airplay mode and once done,
you are free to stream audio to it from any apple device that’s connected on the same
network. Finally, you also have the option to stream directly using Spotify premium but
I do not use it so I will not be testing this out.
To playback music from the SD card, you can use the Library menu and navigate to the folder
option. You can then browse and play back any music that is stored. By default, you
only have this test track available. Playing back music from a USB device is supposed to
be just as easy but the current version appears to have a bug as it cannot recognize my USB
device. For the raspberry pi, you need to navigate to the system settings and change
the auto-mounter option but even this does not work for me. I managed to get it to work
by mounting it manually. To do this, I had to SSH into the board by using the password
moodeaudio. I then had to execute a couple of commands to manually mount the USB device.
I will leave a link to this article if you want to do the same. Once that was done, I
could head over to the library option, request it to scan the device and once that was complete,
I could view all the files and play music from the USB device.
For a multiroom setup, there are a couple of options. For apple devices, you can stream
to multiple speakers directly using Airplay 2. For all other devices, you need to setup
a server like the Squeezebox which is also referred to as LMS. I will look into this
when creating a media server and I will release a video on this. Another option is using a
Home Assistant add-on to do this so I might work on that first.
That’s how you can get a smart audio system up and running in almost no time. The system
is not perfect but it is certainly something to consider particularly when you add the
multi-room capabilities. Here are some of the things I would like to add to the setup
and I will cover them in future videos. I do hope you found this somewhat useful. Thank
you for watching and I will see you in the next one!