6. ADAU1701-based stereo 3-way DSP Board

Objective

There are a number of boards using the ADAU1701 that provide a 2-input with 4-output capability, and those boards are good choices for building a stereo 2-way active speaker.  However, there aren’t any comparable boards that are small and low-cost that will work for 3-way speakers or 2-way speakers with one or two subs.  So that’s our goal:  a low-cost stereo 3-way DSP board.

The ADAU1701 supports 8 output channels, and it turns out that adding the extra two channels needed for a stereo 3-way active crossover is relatively easy.  This article describes the extra hardware required and it walks through all of the steps required to design, fabricate, assemble and test this DSP board.

The stereo 3-way board has many applications.  We can use it to make active 3-way systems, or use it for “active 2.1” systems.  By “active 2.1” I mean stereo active speakers, each with a separate woofer and tweeter channel, plus one or two subwoofers.  This is not a commonly referenced configuration, but it turns out to be very useful for computer speakers or TV speakers.  This is a “centralized” electronics configuration, where all of the electronics can be housed in the subwoofer box or in a small amplifier chassis.  I’ve used configurations like this for many years, and in case study #2 we will show the details of building some nice computer or TV speakers with the electronics inside of a subwoofer cabinet.  But first we need that stereo 3-way DSP board!

Block Diagram

The block diagram below shows all of the major functions of the stereo 3-way DSP board.  This is the block diagram for the first version of the board, and the second version of the board is very similar.  The first version works well, and you can download the board files and build it and have a lot of fun.  But the first version has a lot of tiny surface mount components, and building it requires a lot of tedious effort and more “inspiration” from inebriating spirits.  The second version fixes some problems and uses as many commonly available “eBay modules” as possible to simplify the construction.  The goal of the second version was to reduce the small parts count by a factor of 2 by using the modules.  Of course, modules available in 2017 may not survive beyond 2018, but that’s a feature of the rapidly moving world we live in.  Since you can download the source files for this board, you can change the board design to use other modules that may be available.

 

The Rev 1 board has a lot of commonality with the miniDSP or freeDSP boards, in that both are adaptations of the reference circuit in the data sheet for the ADAU1701.  However, our DSP board has some key differences.  First, we’ve added those extra two channels by including a stereo DAC.  We’ve selected the Wolfson/Cirrus Logic WM1824 for this DAC, as it is reasonably high quality, is readily available, and it has an on-board charge pump to eliminate the output capacitor and provide additional voltage swing for driving subwoofer plate amps.  Second, we have eliminated the EEPROM needed for self-boot on the freeDSP board, as the Adruino CPU loads the code into the ADAU1701.  The reason for not using self-boot mode is that the Arduino code needs to “know” the addresses for the Parameter RAM for each of the ADAU1701 DSP cells, by processing the output of the SigmaStudio compiler.  In order to ensure that the cell addresses correspond to the ADAU1701 Program RAM, it is best to have the Arduino microprocessor load that code.

The third way in which this board is unique is by using an Arduino CPU to provide a high-level interface to external computers or by providing a local user interface with an LCD display.  A lot more will be said about this Arduino CPU in the article on the Arduino Software.  This high-level interface provides 4 different physical control interfaces.  The user can use a “smart” LCD display (the Nextion displays) along with an IR keyboard, a “heavyweight” speaker design client running on a PC, or a Bluetooth cell phone app to select crossover types and frequencies, baffle step control, EQ, and other DSP functions.

Revision 1 DSP Schematic and PCB

The DSP boards were designed using DesignSpark PCB.  DesignSpark is free, it is easy to use and well documented, and it generates the Gerber files we need to get the board manufactured.  The schematic is shown below, but in order to examine the circuit you will need to download the project files and open them in DesignSpark.  There are also some custom library components made for this board, and you will need them if you want to make changes.  The files are in the Download section of this web site.

The boards were made using ITEAD.  For about $45 you get 10 good quality boards.  It will cost another $20 if you want them shipped quickly, but I’ve gotten some boards back in about 2 weeks using the standard shipping option.

The figure below shows the completed board, along with the low-cost ($16) Nextion touch screen display.  The figure shows the board before I modified it to add a Bluetooth interface.  There was a lot of interest on the Parts Express Techtalk board about being able to control the DSP from a cell phone app, so I removed the parts for the FTDI interface and hot-melt glued a Bluetooth board in their place.  This figure also shows the teensy-LC board, which was the initial selection for the Arduino CPU.  However, as the code kept increasing in size, I exceeded the code space limitation of the teensy-LC (64K) and had to switch to the teensy3.2 board.  The board will accept either module, since they used nearly identical pinouts.  The teensy3.2 board is more expensive, but it is also a lot faster, and it has plenty of code space for this project to evolve.  It’s also got 5V-tolerant pins, so we don’t need a level shifter to connect the 5V Nextion display.

As noted earlier, this board works fine for the stereo 3-way project described in Case Study #2, but only if you are OK with soldering all of these components.  However, there are a lot of SMD parts on this board that can be replaced by some readily available modules.  For example, the stereo DAC chip, which is in the upper right section of this board, uses a 24-lead QFN package and has about 8 supporting components.  You can buy a PCM5102 module for about $4 on eBay that uses an easy-to-solder 6 pin connector, and that is much less work.  Similarly, there are a number of switching regulator modules, FTDI modules, and Bluetooth and WiFi modules available at surprisingly low prices.  So the next iteration of the board is a bit larger to accommodate these modules, but it is much easier to assemble.

Revision 2 Board

The block diagram shows the modules in a reddish color, with the blue blocks indicating areas of SMD components that need to be assembled.  Unfortunately, there are no ADAU1701 modules that meet our needs.  The Sure ADAU1701 DSP module is somewhat close to being useful for this application, but the number of I/O connections would make that approach cumbersome.  So there is still some tedious SMD soldering involved, but this situation has improved to where you can view this as a one day, one or two beer project, instead of a multiple evening effort.

The block diagram also shows a new component:  an isolated 5V supply.  This is needed for the external Dayton WiFi Adapter, which makes a lot of interesting noises unless it uses an isolated ground.

 

The assembled PCB is shown below, and you can see from the schematic that it is more modular and there are fewer SMD components to deal with.  Some of the modules are “stuffing options” to provide different interfaces.  For example, you can use either Bluetooth or WiFi to control the DSP, but you can’t use both because they share the same serial port.  And you can use the FTDI USB interface for controlling the DSP from a PC or for the Arduino debugger, or you can leave this module off the board if you don’t need those interfaces.  You will still need to solder on the 64-pin ADAU1701, but all of the passive SMD components are 0805-sized, which isn’t that difficult to solder.  If someone wants to investigate getting these boards machine assembled or if someone wants to build some up to sell, I’d be happy to help with some of the details.

Getting Boards Made

There are many good PCB manufacturing companies that will allow you to upload the Gerber files and have boards made within several days.  Since most of these PCB companies are in China, the cost of quick shipping is often about the same as the cost of the board fabrication.  However, if you are willing to wait for relatively slow economy shipping, you can get a small run of boards made for about $40 with shipping about $10.  I’ve been using ITEAD for the last two years to have the boards made, and I’ve had consistently good service.

Places like ITEAD (https://www.itead.cc/open-pcb.html) require that you pay them for the boards using an online form, and then they will send you a link for uploading the zipped Gerber files.  The files are automatically analyzed, and for some reason, my DesignSpark files don’t pass the automated test.  But don’t worry–they look at the files manually before making the boards and they will send you email if they find problems.  I’ve had some part issues where the silkscreen turned up in the wrong layer, or one layer didn’t use the same measurement scale, and ITEAD was very good about pointing out the problems.  If you run into problems, download the Gerbv program or other Gerber viewer app to help debug the problems.  DesignSpark has a tutorial on preparing the manufacturing files that can also be helpful.  The zipped Gerber file will include about 15 files, with top and bottom layer information and drill data.

The zip file in the Download section for this project is what was used for the current design.  You should be able to send it to ITEAD and have your own boards made without any problems.

Parts List
Assembly Instructions
Testing and Debug

Revision 3 Board

The Revision 2 boards are a good solution for an active 2.1 system or a stereo 3-way system, and it’s a lot easier to build than the original board.  By adding an external Linkplay-based WiFi adapter the Rev2 board can be the core of a high performance active speaker system.  However, we can improve the design and make it smaller and simpler by adding a Linkplay A28 module to the board, and that is the major change for the Revision 3 board.  But there are some “gotcha’s” that need to be addressed.

First, the WiFi adapter is usually connected via the analog output of the WiFi adapter, which uses the WM8918 CODEC.  The WM8918 isn’t on the Linkplay module itself:  it is on the board that includes the Linkplay module.  So if we want to use the analog input of the ADAU1701, we need to include both the Linkplay module along with the WM8918 and its associated circuitry.  But we are trying to minimize the number of tiny SMD chips, and adding the WM8918 doesn’t help achieve that goal.

A better approach is to use the I2S input of the ADAU1701 and connect the Linkplay module using the digital output.  This eliminates the need for the WM8918 and makes the path to the DSP all-digital, without an extra DAC and ADC in the signal path.  However, this digital input also creates a problem in that the ADAU1701 needs to use the Linkplay clock, as there is no sample rate converter in the ADAU1701.  Fortunately, the ADAU1701 includes a PLL for multiplying the bit clock to generate the necessary internal clock, and the Linkplay sample clock is “close” to the clock normally used for the ADAU1701 (44.1KHz vs 48KHz).  So with a couple of changes to the ADAU1701 circuit and a different SigmaStudio load and some Arduino software changes to account for the different sample rate, we will be able to connect the ADAU1701 as an I2S slave to the Linkplay A28 module.

In order to keep the board about the same size, I used a vertical switching power supply IC instead of the large module, and removed a couple of features such as the IR remote control for the Nextion display.   I also added a switch input that isn’t shown on the block diagram that allows using the ADAU1701 analog inputs for playback of “local” audio such as a PC.  The Linkplay module provides an analog input via the WM8918 CODEC, so removing that chip means we need to provide an alternate path for analog input to maintain that useful feature.

Status:  as of 3/18/2018, 4 of the Rev 2 boards are partially assembled and close to being tested.  Once they are tested, the Rev 3 PCB’s will get sent out for manufacture.  The Rev 3 boards are actually ready to go out now, but I need to test the Rev 2 boards first because there is a lot of commonality between those boards and I want to make sure there are no mistakes.  Here is a look at the Rev 3 board:

Status update: as of 8/31/2018, the Rev 2 board is getting put in a chassis for testing, but the Rev 3 board is out for fabrication, even though Rev 2 isn’t fully tested yet.  I didn’t specify quick shipping as I have other projects underway that will keep this project from being expedited.  But in about a month I’ll probably have all the parts and boards to get started on this.

Revision 4 Board

Really?  Sure, why not…

The follow-on iteration of this design will get rid of the analog output filters and connectors, and replace them with 2 Analog Devices SSM3582 class D power amp chips.  This design will provide an all-digital path from the WiFi input module to the power amp chips.  The SSM3582 amps are very high quality, with Delta-Sigma modulation and high order filters that result in very low distortion.  The amps are relatively low power, but they should be adequate for small speakers and for the tweeters and midranges of larger 3-way speakers.  Since we can use the analog outputs of the ADAU1701 for external amplifiers for woofers and subwoofers, the DAC module on the Revision 3 board can be eliminated, and the amplifiers can be added without changing the overall size of the board.