7. Gen 2 stereo 3-way DSP Board

user's profile picture You can contribute to this effort by clicking the link.

I still like the idea of an ADAU1701 stereo 3-way DSP board.  The ADAU1701 is getting fairly old and doesn’t provide anywhere near the performance of the newer DSP chips from Analog Devices, TI or Cirrus.  It lacks the ASRC functionality that makes connecting to master devices with different clocks and different clock rates possible, and it is no longer the only low-cost easy to use DSP chip.  Nonetheless, it has plenty of horsepower to implement complex 3-way loudspeaker designs with lots of EQ, delay, dynamic range control, bass enhancement, etc.  So it is a chip that is “good enough” for many applications, and it remains popular.   And because it is so popular, the ADAU1701 reference circuit from Analog Devices has shown up in very low-cost boards from overseas suppliers.  You no longer need to build your own ADAU1701 circuit with the eyesight-challenging SMD parts–you just need a “motherboard” into which you can plug a ready-made ADAU1701 module.

So, that is what this page is about:  the evolution of the stereo 3-way ADAU1701-based board to a fully modular design, where you can easily connect readily available modules and avoid the tedium of SMD soldering and long parts lists.

The designs on this page also make a jump to a next-generation control paradigm.  The original design of this board was an outgrowth of the piggy-back board that controlled a miniDSP.  That approach used the PC to calculate the biquad coefficients for the filters, which were sent across a USB interface to the DSP.  However, these Arduino boards have grown up, and they are able to calculate the coefficients in near real time.  So the bilinear transform to calculate the DSP Parameter Data is now done in the stereo 3-way board, and the old control interface for sending biquad coefficients has been eliminated.  The description of the interface in the article on the Arduino code on these pages is still mostly correct, although it needs to be updated somewhat.

The other major difference of the Generation 1 boards vs the Generation 1 series is that the CPU has been changed to the ESP32.  Those teensy boards are still very nice, but with the ESP32 you get both WiFi and Bluetooth, and if you use the Heltec board, you also get a nice OLED display that is useful for debugging and status indications.  It’s hard to pass up a fairly powerful CPU that has WiFi, Bluetooth and an OLED display when the price is about $10 direct from the overseas vendors.  The ESP32 also allows using the MQTT protocol, which is the pub-sub protocol used for the “Internet of Things”.  With MQTT, the control interface evolves again, as the commands become publications that the board subscribes to.  However, the commands are basically the same as for the Bluetooth control.  The article on the Arduino code could use some refreshing to provide more details on the MQTT pub-sub protocol, but it is still a valid guide for how to  control these boards.

The final difference of the Gen 1 vs Gen 2 boards is that the Gen 1 boards are “done”, whereas the Gen 2 boards are in various stages of design, debug or test.  So this page has all the designs that are still getting worked.  There is no guarantee that these designs will be completed, but the new “fund me” icon at the top of the page is a way of helping them along.  If there is no interest, I’ll focus on the electronically curved line array amp, which I think has a lot of promise for the DIY community.  If I get a few coffees from the link above, I will use the time I enjoy those coffees to work on these designs.

Stereo 3-way Board Revisions

The number of major revisions of these boards was getting difficult to follow, so the revision naming now includes the key features.  Here is a table showing the original designation of the boards and their new names:

The first three boards on this list are described on the previous (page 6).  This page is devoted to the designs originally called Rev 4 through Rev 5.

Fully Modular

The Fully Modular 2×6 board has a wonderfully simple schematic with just 4 major modules and some modular power supply components:

That simplicity is nice!   It uses the ubiquitous ADAU1701/ADAU1401 “Learning Board” that sells for less than $20, even with shipping, sales tax and Paypal fees.  That module has the same Analog Devices reference design that just about all of the ADAU1701 boards use, with the signals brought out to pins with “standard” .1″ spacing.  There are some limitations of this board, in that the MCLK signal isn’t available, and it doesn’t make the selfboot signal available on the connector, either.  Those are important issues for reasons described later, but there are ways to get around those limitations.

The PCB was made in the middle of 2019 and so far everything is working fine.  This version of the board introduces a new CPU for this design:  the ESP32, which allows some new software features and has also required some major changes to the software.  This is actually the second time the 2×6 board has used the ESP32, but for this design the interface will be using the WiFi capability of the ESP32 to send commands to the board.  The WiFi capability allows using the MQTT protocol, which supports a publish-subscribe messaging paradigm.  The reason we want to use MQTT is to allow having multiple 2×6 boards receive the same message.  For example, you may want a stereo pair of these boards to change the volume level or source or EQ all at the same time.  With MQTT, multiple boards can subscribe to a given message type and all respond when that message is published.  That broadcast capability is much harder to implement with Bluetooth messaging, which is point-to-point.

The down side of using the MQTT protocol is that you need to have a message broker somewhere on the network.  That’s how home automation technologies such as Ring doorbells, internet-based cameras and thermostats all work:  they use a variant of MQTT.  Web service companies such as Amazon provide MQTT brokers at no cost for small users, or you can run an MQTT broker on a PC or cell phone in your own home.  But you need some way to tell the software the IP address of the broker and the login information.  Fortunately, beegee1962 at the ESP32 forum provided a nice solution that is getting integrated into the software for this board–it uses a Bluetooth app that runs on a cell phone to set up the ESP32 networking parameters.  So by extending his app, we can specify the home network SSID, the user name and password, and also specify the MQTT broker IP and the credentials.  The board still hasn’t been fully tested, but this somewhat confusing software solution is finally working and I should be getting audio from this board soon.  (This section written Mar 30,2020).

Here is what the board looks like:

What really sets this board apart is the 4-channel amplifier module in the upper left corner of the picture.  That board has two SSM3582 class D amplifier chips that are each rated at 35W output.  But these amps are intended for the tweeters and midranges of a 3-way system, and for that application, the power requirements are minimal.  But even for 2-way applications these amps will do quite well.

The SSM3582 is a very low distortion amp with a digital input driven directly from the digital outputs of the ADAU1701.  I used the analog input version of this amp (SSM3302) in the line array amp on another page of this web site, and it was easy to use and the sound was excellent.  This module will be used on a next-generation version of the line array amp, and this is the prototype.  Obviously, this amplifier board isn’t a pre-assembled module, but this will be my new go-to amp for line arrays, and given the quantity needed it will make sense to work with a fabrication house to have them built.  So maybe it will be a module that can be purchased–that decision is still several months away.  BTW, those Faston tabs on the amplifier module aren’t speaker connections:  they are heat sinks :).

[This section still under construction]

WiFi Fully Modular

Ahhh…coffee!  Someone graciously sent me a gift of coffee, and I’m enjoying it now.  Thank you.

The WiFi Fully Modular design is a cross between the 2×6 WiFi Modular design described on Page 6 (Rev 3) and the Fully Modular design described above.  The 2×6 WiFi Modular design has a flaw that can be fixed with some changes to the PCB, but instead of coming up with a new revision of that board, it makes more sense to move on to a new major revision.  This revision uses the readily available “ADAU1701 Learning Module” to replace that SMD forest on the Rev 3 board.  This design is a big step forward for the DIY’er, as it has 0 SMD components–everything is either a module or through-hole part.  It’s also got a very cool WiFi module that lets you play audio from your music collection via DLNA, and it allows playback from Spotify and some other online sources.  Here is the block diagram:

As you can see, the schematic isn’t a whole lot different:

And the preliminary PCB is simple, with lots of plug-in stuff and no SMD parts:

The board is laid out and ready to be sent out for fabrication.  But there is a thread on diyAudio that describes a “snag” with this design, so I haven’t sent out the files for fab.  The problem is that WiiMu (Linkplay) modules that you can purchase from Parts Express are “set up” for a 44.1KHz clock rate as an I2S slave.  That means we need to provide a bit clock and LR clock from the ADAU1701 and then it will output the I2S data.  The fact that it is a slave isn’t a problem, because the ADAU1701 can provide the require signals on the multi-purpose pins.  However, the fact that the WiiMu software is set up for 44.1KHz sample rate creates a problem.  The problem isn’t a huge one for some, but might be a big issue for those who are looking for an “SMD-free” solution, as you need to replace the 12.288MHz crystal with an 11.289MHz crystal.  *Rats*

Let’s look at “why” this hardware change is necessary.  There might be a software solution to get around this problem, but right now I’m unaware of a solution.  The WiiMu module conforms to the UPnP AV and DLNA model of an “audio renderer”.  As explained in more detail in that link, the UPnP AV model consists of an audio server, an audio renderer and an audio controller.  The audio renderer publishes its capabilities to the server, and the server is responsible for formatting the data at the requested sample rate.  The audio renderer (the Linkplay module) actually clocks the data samples, but if the data is formatted in the server for a different sample rate, the audio will not sound right.  So here’s the problem:  the clock used for the audio renderer must agree with the sample rate that is published; otherwise the server will format the data incorrectly.

We can look at this issue in more detail using the Media Renderer Analyzer by Whitebear, available at another one of those coffee-powered websites :).  When you run this application, you will find the WiiMu devices nearby (you may need to click the “Use Windows Discovery” checkbox to get results).  This application has a tab for “Renderer Information” that shows the various URL’s supported by the WiiMu device and another tab shows the audio formats supported.   Here is the Audio Format list for the A31V3 board:

As you can see from this table, the board is capable of 48000 sample rates, and, in fact, if you run the Renderer Tests available on another tab of the application, the WiiMu module is capable of outputting data at a wide range of sample rates.  So what’s the problem with using the 48000Hz clock from the ADAU1701?  The problem is that the WiiMu module doesn’t know that a 48000Hz clock is applied–it is assuming a 44.1KHz clock.  So, for outputting FLAC and MP3 and Spotify and other sources, it tells the server to format the data as 44.1KHz data, because that is how the WiiMu software is configured.  If we could change the WiiMu software to request 48KHz data, we could use the ADAU1701 module without changing the crystal.  But, since there is no easy way to change the software, we are left with some SMD “surgery” on the board to change the crystal on the ADAU1701 module.

And what happens if we don’t change the crystal?  I tried that–everything plays from Spotify or FLAC files at a 9% faster rate.  It actually sounds OK with some music, but it’s wrong, and you will notice it.  Also, once the crystal gets changed on the DSP, the SigmaStudio files will need to be updated, as all of the filter coefficient data will be off by 9% as well.

Of course, it isn’t good practice anyway to change the DSP clock rate just to accommodate some other device–the better solution is to use a sample rate converter (ASRC) to isolate the two clock rates.  And that’s why the ADAU1452 chip has multiple ASRC circuits that can be used on the I2S inputs–it provides a lot more flexibility.  So this design is getting set aside temporarily until I can decide on what to do with this approach.  I can accept the the “kludge” but low-cost solution of changing the crystal on the ADAU1701 board, or update the design to use the ADAU1452 module.  I’m also looking at adding TWS Bluetooth audio capability, since that is becoming popular.  So this design is on hold for a while.  If you want the PCB design in its untested state, I’ll be happy to send you the files, but right now I can’t say that this design will work, because I don’t have a prototype.

2×6 Turbo

The 2×6 Turbo board will be a big jump forward for this design, as it uses the much more powerful ADAU1466 DSP.  The ADAU1466 is a newer version of the ADAU1452 with more memory, and it has ASRC’s and an SPDIF decoder built into the chip.  Those two features give us a lot more input flexibility, as we will be able to switch between a TOSLINK input, a WiFi module with digital output, and a Bluetooth adapter.  All of these devices are I2S masters providing their own clocks, but the sample rate converters will make switching between sources easy.

The obvious use case is for a TV sound system.  We can receive the TV audio via TOSLINK and switch to a streaming CD-quality WiFi audio or use this with a cell phone to play back audio via Bluetooth.  We can mate this board with a 6-channel amp and have stereo 3-way active crossovers.  That’s a nice DIY amp for a thoroughly modern audio system that doesn’t require a big, clunky AV receiver.  And by using a Bluetooth with TWS (true wireless stereo), we can build an active speaker with one of these boards in each box, and we have enough DSP resources for 4, 5, or 6-way speakers.  Plus, the DSP can do FIR filters, which make active room equalization much simpler.

So, what does the board look like?  There is a long way to go on this design, but I made the component models for the schematic and PCB to see how “messy” it would be.  I think it will be a manageable design that will be easy to build.  Here is a rough view of the preliminary schematic and PCB.  There is no wiring between the components yet, but you can see how it will look.  Also, there isn’t a clock yet for the A31 module, but that’s coming.

The first look is promising!  The board is about 4″ by 5″, which is OK, and no SMD parts will be needed.  All of the modules are currently available and reasonably priced.  This should be fun and it can be used in many different ways.

[…This section under construction.  You can encourage development of this design by buying me a coffee.  I work best with those pricey quad venti 3-pump mochas, so be generous  🙂 ]

ESP-DSP (ADAU1701 “Last Gasp”)

It became clear while looking at some PE threads for small speakers that there is a need for a small stripped-down ADAU1710 board.   This small board could be used for small subwoofers, mini speakers and simple multi-way designs connected to PC’s or TV’s.  It can be configured as a sub DSP, a stereo 2-way or a mono 3-way board.

By “stripped-down” I mean just two modules plus a few power supply parts.  And by small I mean 1.5″ by 3″.  The board uses a switching regulator module that allows getting power from a 12 to 24V source, and it uses the ADAU1701 learning module and ESP32 CPU as the only other parts besides some power supply decoupling.  With the Heltec ESP32, you can set up the DSP from a cell phone app and confirm the setup on the built-in OLED display.  The board doesn’t provide audio connectors, but there are pins available, or you can solder wires directly to the pads.


The board has the ESP32 mounted on the bottom to keep the overall dimensions small.  However, it might be a “thick” assembly, depending on the length of the mounting pins used for the DSP and CPU modules.

This board is called the ESP-DSP, but I’ve also toyed with names such as “Last Gasp”, “ADAU1701_exit” and some others that convey an ending of the ADAU1701 as the go-to DSP.  It’s still a potent device for speaker-building, as it does a great job with active crossovers, BSC, EQ, delay and even bass enhancement for small woofers.  But there are some new challenges for line arrays and more sophisticated bass management and more complex digital processing where the additional speed and precision of a more capable DSP is needed, so it’s time to move on.

This final ADAU1701 design will be the platform I’ll use to get the software in better shape and hopefully at a point where it can be distributed publicly.  Up to now, the code has undergone revisions for every iteration described in these pages, and that constant change is not conducive to good code design.  The software is in need of reorganization and refactoring, and this simple board will be a great opportunity to “finalize” the code.