Parte1
Parte1
or la • Elek
b
kt
to
Ele
r la
ORIGI
b
NAL
Ele k
ab
rl rl
to
ab
• Elek to
Audio DSP FX
Processor Board
Part 1: Features and Design
By Clemens Valens (Elektor)
The Audio DSP FX Processor combines an Espressif ESP32 microcon- Before exploring the different use cases of the Audio DSP FX Processor
troller and an ADAU1701 Audio DSP from Analog Devices. The Audio board, let us first have a look at its schematic. As they say, a picture
DSP family is a series of high-performance digital signal processors is worth a thousand words. Also, have a look at the Specifications
(DSPs) optimized for audio processing. Programs for these DSPs are and suggested Applications inserts. This will help you understand
created with the free visual programming tool SigmaStudio by dragging the description of the circuit that follows. Now that you have done
and dropping pre-defined algorithm blocks on a canvas. that, let’s jump right in.
The ADAU1701 used here is not the most recent device, but it is the most Circuit Overview
accessible. Besides a user-programmable DSP core, the ADAU1701 A functional block diagram of the Audio DSP FX Processor board
has high-quality analog-to-digital and digital-to-analog converters is shown in Figure 1. It shows two main blocks, the ESP32 and the
built-in and features an I²S port. This makes it suitable as an audio ADAU1701, connected to each other with multiple busses. In the center,
interface for the ESP32. we find the I²S bus for transporting audio signals between the two
I2 C
Extension EEPROM
Wi-Fi
Bluetooth
IC11
solution because the ESP32 software libraries didn’t 15
Y
Y0
2 1µ 1µ
onto the main board saves a lot of antenna-match- C23 IO0 Pico-Kit IO37
C58 *
P3 P4 RED 3V3 EN
ing and other RF-related issues and allows you to 100n 10k 10k GND GND
NC
+3V15
5V 3V3
mount the module only when it is needed. C58 is +5V
USB
P5
only needed in the rare case the ESP32 module will +3V3_ESP 1k
R36 *
/RESET
P2 P1
not boot when it is not connected to USB. If you R34
GND
VCC
SDA
SCL
10k 10k
WP
MIDI
NC
MBR0580S1 D2
1 2 3 4 5 6
4
&
R40
R39
R38
R37
IC3
220Ω
VCC
powered from either the USB port or from IC8.
The observant reader may wonder why there is no
protection diode like D3 in the 5 V supply coming
from the ESP32 module. The reason is that this
diode is already present on the ESP32 module.
Programs for the DSP can be stored in IC7, the EEPROM (called E2Prom LED1 is available as a user-programmable LED, practical when debug-
in SigmaStudio). It provides much more memory space than required ging software or as mode indicator, or for other purposes.
for a DSP program, so the ESP32 can also use it for storing other
data. It is also accessible from connector K1 over the I²C bus, so it The current consumption depends highly on the application, of course,
can be read and written by an external device like an Arduino UNO but is, on average, around 200 mA for a supply voltage of 9 VDC.
or a Raspberry Pi Pico.
A Multifunction Board
A word about the MIDI interface. It is a straightforward optically-isolated Now that you have a vague idea of what the Audio DSP FX Proces-
input and a non-isolated output but connected to a 4-way 3.5 mm jack sor board is, let’s explore the multi-mode-operation specification in
socket (TRRS, tip-ring-ring-sleeve) due to board space constraints. more detail. As it suggests, it means that the board can be used in
Most people interested in MIDI will need only the input and use a TRS different configurations:
cable. Such a cable will short the MIDI output (pin R2 of K5) to ground,
K6 D1 LM78M05 D3 AP2127N-3.3
R11*
IC8 IC9 0Ω VCC
MBR0580S1 MBR0580S1
C45 C46 C47
C40
10µ 1µ 1µ
16V C24 100n
VCC 4 2
C26 R18
470p 1 OUT0
R20 R21 IC2 604Ω
3
4k75 4k75 47µ
5 10V
C3 R1 R24
C1 C28 C29
1k
49k9
R6 10µ
47µ 16V T1
16V 3 JP2 C2 150p 3n3 Line out 1
R12 *
470Ω
100n
2 Selfboot C18 BC857
C4
10µ
3n3 C17 16V +1V8 VCC
1 C6 C5
K3 FC68125
100n 10µ
56n 16V
C7 C9
C41
100n 100n
C8 C10
C32 100n
100n 100n
4 2
R10 * 34 36 48 18 17 13 24 C34 R26
470p 1 OUT1
VDRIVE R28 R29 IC5 604Ω
IOVDD
PVDD
AVDD
AVDD
DVDD
DVDD
3
4k75 4k75 47µ
5 10V
6 R32
SELFBOOT C36 C37
R15 * 20
49k9
ADDR1/CDATA/WB 46
39 ADCOUT0
PLL MODE1 45 150p 3n3
5 ADCOUT1
RESET 44
ADCOUT2
R2 1% 43
Line in C11 2 ADCOUT3
18k ADC0
47µ VCC
16V R3 1% IC2, IC4, IC5, IC6 = MCP6401RT
C12 4
18k ADC1
47µ
16V IC1
C42
K2 FC68125
21 C25 100n
CLATCH/WP
23 11 MP0 4 2
SCL/CCLK MP0 C27 R19
22 10 MP1 470p 1 OUT2
SDA/COUT MP1 R22 R23 IC4 604Ω
29 MP2 3
MP2 4k75 4k75 47µ
ADAU1701 28 MP3 5 10V
MP3 R25
35 8 MP4 C30 C31
PLL_LF MP4
49k9
40 9 MP5
CM MP5
47 15 MP6 150p 3n3 Line out 2
FILTA MP6
R14 * 41 14 MP7
FILTD MP7
38 27 MP8
PLL_MODE0 MP8
3 26 MP9
ADCRES MP9 VCC
R8 * 30 16 MP10
RSVD MP10 K4 FC68125
7 19 MP11
ADDR0 MP11
C43
100n
DGND
DGND
PGND
AGND
AGND
AGND
C33
OSCO MCLKI 4 2
C35 R27
R42 33 1 37 42 31 32 12 25 470p 1 OUT3
10k R30 R31 IC6 604Ω
3
R43 R5 4k75 4k75 47µ
VCC 10k 5
100Ω
10V R33
R17 C38 C39
NC X1
49k9
R4
VCC C15 C16 C19 C20 C22 C21
150p 3n3
18k
230510-006
Figure 2: The schematic of the Audio DSP FX Processor. Everything fits on a board of approx. 102 mm by 66 mm.
Figure 3: Both active and passive output filters are supported by the Audio DSP FX Processor.
> DSP only ing and testing new SigmaStudio algorithms on the fly. Place JP2 on
> DSP with on-board EEPROM programmer pins 1 and 2 to tell the DSP not to load its program from the EEPROM.
> DSP with OTA
> DSP as I²S DAC DSP as I²S DAC
> Music Synthesizer / Sound Generator In this configuration, the ESP32-Pico-Kit is the audio source while
> Advanced Audio Effects (FX) Processor the DSP acts as a high-quality digital-to-analog converter (DAC).
> Other Audio data is sent over I²S. Place jumper JP1 in position ext. MCLK (on
pins 2 and 3, the DSP clock is provided by the ESP32). For simplicity,
DSP Only place JP2 in the position Selfboot (pins 2 and 3, make the DSP load its
In this configuration (Figure 4), the board is identical to the “ADAU1701 program from the EEPROM) and program the DSP with a simple I²S
Universal Audio DSP Board” published in January 2014 (Elektor project pass-through program (included in the downloads). This configuration
130232). Programs for the DSP are created in SigmaStudio 4.7, exported is suitable for wireless (Wi-Fi or Bluetooth) streaming audio players.
as a HEX file, and loaded into the EEPROM through connector K1 with Sound effects like reverb or pitch shifting can be added easily by
e.g. an Arduino UNO [1]. Place jumper JP1 in position X1 (on pins 1 and 2, creating suitable algorithms in SigmaStudio and loading them into the
the DSP clock is provided by crystal X1) and JP2 in the position Selfboot DSP’s EEPROM. The four potentiometers are available for controlling
(pins 2 and 3, telling the DSP to load its program from the EEPROM). parameters (make sure the jumper resistors are positioned properly).
Jumper resistors R7, R9, R13, R16 should be positioned on the right, The analog audio input can, of course, be used too, allowing sing-along,
i.e., away from their name printed on the board, to enable potentiom- karaoke or other audio mixing applications.
eter control. This configuration allows for adding audio effects (reverb,
filtering, etc.) to the input signal. Popular applications include cross- Music Synthesizer / Sound Generator
over filters for loudspeakers, made possible by the four independent This configuration is basically the same as the previous one, except that
audio outputs, and guitar effects. now the ESP32 takes care of most (if not all) of the signal processing;
the DSP functions as a fancy I²S audio DAC. The ESP32 is the (sound)
DSP with On-Board EEPROM Programmer engine creating sounds from scratch using user-defined algorithms.
As DSP-only, but with the ESP32-Pico-Kit added to the board to simplify Several sound synthesis libraries are available online, making this an
EEPROM programming. DSP programs can now be uploaded over USB interesting domain to explore. The MIDI input allows you to play the
to the ESP32, which burns them into the EEPROM. Besides simplified synthesizer with a MIDI keyboard and control it with e.g., MIDI CC
EEPROM programming, this configuration also allows storing more (Control Change a.k.a. Continuous Controller) messages. Of course,
than one DSP program. As an example, a webserver running on the wireless control is possible as well, as is serial. The four potentiom-
ESP32 can provide a user interface that allows choosing between eters provide even more controls. For more fun, the DSP can add its
different DSP algorithms. own sound effects.
We connect you
with technology
Visit us
November 12-15
Hall C4.420
Figure 5: The locations of jumpers JP1 (middle) and JP2 (top). In the left The preferred, more flexible way is, however, to connect the potentiom-
bottom corner, you’ll find R36 that enables the MIDI output. eters to the ESP32. The device has two analog outputs that are turned
into four through multiplexing (IC10 and IC11) and they are connected
to the DSP’s auxiliary ADCs (pins MP9, MP2, MP3 and MP8). This
outputs up to four analog audio signals. The ADAU1701 can add, of allows the ESP32 to control the DSP’s auxiliary ADCs by the potenti-
course, its own (pre)processing. Effect parameters can be controlled ometers or in some other way (e.g., MIDI CC messages or wirelessly).
wirelessly, serially, over MIDI, and by the potentiometers, and even
over I²C if desired. Note that the multiplexed analog outputs can also be used as (slow)
digital outputs, which can be treated by a DSP algorithm as switches
Other or pushbuttons.
This configuration is for people who acquired the board but don’t
have a use for audio processing. Place JP1 in the position ext. MCLK MIDI
(pins 2 and 3) and JP2 on pins 1 and 2 (not Selfboot) so the DSP will The board’s optically isolated input (IC3) is intended as MIDI input (but
not consume much energy. The ESP32 module can be used as a it can also be used for something else, of course). For board-space
webserver, a USB-serial MIDI bridge, a USB-serial I²C bridge, a MIDI-to- reasons, the connector is a 3.5 mm jack socket (known in MIDI land
I²C converter, MIDI-to-analog converter and vice-versa, a 4-channel as TRS, from Tip, Ring, Sleeve) and not a 5-way DIN connector. The
analog-to-digital converter, an IoT sensor thingy or an LED blinker. MIDI input lets you control the ESP32 and/or the DSP with a keyboard
You are only limited by your own creativity, as they say. or a control surface.
Parameter Control As said, a MIDI output is available too. Mount R36 (82 Ω) to enable
Audio effects usually have one or more user-controllable parame- the output (Figure 5). Since the value of R36 is rather low, be careful
ters for adjusting the sound or effect in real-time. The Audio DSP FX with what you connect to K5. This must now be a 4-way 3.5 mm jack
Processor features several methods of doing this, most of which can (TRRS) and not a 2-way (mono or TS) or 3-way (stereo or TRS) type.
be used simultaneously. Because the MIDI output will probably not be needed by many people,
R36 is not mounted by default to avoid damaging the ESP32.
I²C
No matter which configuration is used, the DSP can always be USB Serial
controlled over I²C, either through K1 or by the ESP32. Since the The USB connector on the ESP32-Pico-Kit is a USB-to-serial port.
latter is connected to the same bus, it can be controlled over I²C too In Arduino, it is available as the default serial port (a.k.a. “Serial”). A
in case you wish to do so. computer can use this port to communicate with the ESP32, which
Wireless
One of the main attractions of the
ESP32 is, of course, its wireless
capabilities. The ESP32-Pico-Kit
supports Wi-Fi 802.11b/g/n, Bluetooth
v4.2 BR/EDR, and Bluetooth LE. For
audio applications, the Bluetooth
functionality is particularly interest-
ing as it allows using the board as a
Bluetooth speaker (driver or “sink”)
but using it as a Bluetooth audio
source is possible too.
Getting Started
Out of the box with an empt y
EEPROM, the board doesn’t do
anything. Therefore, the first step is
to load a program into the EEPROM. Figure 7: Choose the serial port that corresponds to the ESP32 module.
There are several ways to do this, but
the easiest is by using the ESP32-Pico-Kit. Follow the steps below.
install a version before 3.0.0 (e.g. 2.0.17) because certain drivers
Prepare the board have been completely overhauled in version 3.0.0 (e.g., I²S, ADC,
> Plug the ESP32-Pico-Kit module on the main board with the USB and DAC). It will take a while before other libraries using these
connector pointing to the side and its antenna near the center of peripherals will have integrated the modifications. We have also
the main board. observed code bloating with applications based on version 3.0.x.
> Place a jumper on pins 2 and 3 of JP2 (Selfboot). that will no longer fit in the ESP32 module’s memory.
> A jumper must be placed on JP1 (DSP Clock), but its position > Once the Boards Package is installed, you should be able to
depends on the application. Pins 1 and 2 (X1) select the quartz select the ESP32 PICO-D4.
crystal X1. Use this position for applications that do not need > From the Tools menu, select the correct Port (Figure 7).
the ESP32 to clock the DSP (probably everything not using I²S > In the Arduino IDE, open the Library Manager (Tools menu →
communication between the DSP and the ESP32). JP1 position Manage Libraries…). Search for Elektor. You should find a library
2 and 3 (ext. MCLK) selects the ESP32’s MCLK signal as clock for named Elektor_AudioDSP (Figure 8). Install it. By default, the
the DSP. This is the required position when using I²S communica- most recent version will be installed. Normally, there is no reason
tion between the ESP32 and the DSP. to install an older version unless you want more bugs and fewer
> Connect the micro-USB port of the ESP32-Pico-Kit to a free USB options. The library can also be downloaded from GitHub at [4]
port on a computer. The power LED on the ESP32-Pico-Kit and installed manually.
should light up (red) and the computer should detect a new
serial port. If the port is not found, install the driver for the CP2101 Application Examples
USB-to-serial converter mounted on the ESP32-Pico-Kit. For You’re now ready to create and upload programs to the Audio DSP FX
details, please see [3]. Processor. To help you get started, the Elektor_AudioDSP library comes
with a collection of examples. Open an example by clicking Files →
Prepare your computer Examples and scrolling down to the section Examples from Custom
> Launch the Arduino IDE (this project was developed using IDE Libraries. Here you should see an entry for the Elektor_AudioDSP
version 1.8.19). library. Click on it and choose an example (Figure 9).
> From the Tools menu, select the Board ESP32 PICO-D4 (Figure 6).
If the ESP32 PICO-D4 isn’t listed in the Boards list, install the Note that entries with an arrow to the right (e.g., AudioTools) require
ESP32 Boards Package first. For details on how to do this, please a third-party library with the name of the entry. This means that the
refer to the tutorial at [2]. Note that it is highly recommended to examples in the AudioTools submenu require the library AudioTools.
Try an Example
Figure 8: Install the Elektor_AudioDSP library with the help of the Library Manager built in the Arduino IDE. To illustrate how to use an example,
let’s load sine_generator_adau1701.
After uploading this sketch to the
Some of these libraries can be installed through the IDE’s Library board, it will program the EEPROM (a.k.a. “E2Prom”) with the DSP
Manager as described above, but not all. The link to the library is algorithm i2s_pass_through_48000. Its name doesn’t show it, but this
included in the sketch. algorithm turns the DSP into a voltage-controlled sinewave generator
with its output on connector K4 (not K3). The oscillator’s frequency is
An example consists of an Arduino sketch and, in most cases, an controlled by P1, connected to the ESP32. In the main loop, the four
executable for the DSP to be loaded into the board’s EEPROM. The potentiometers are read, and their values are printed on the serial port.
comments at the top of the sketch tell you how to set the board’s These values are also sent as voltages to the control inputs of the DSP.
jumpers and how to use the example. The example takes care of After programming the EEPROM (this takes about one second), the
Here are the instructions (from the sketch) to make it all work:
Visit us!
A4.242
VOX-POWER.COM
VOX-
Unique Power Solutions.
sample rate. These two executables turn the DSP into a stereo audio
output on connector K3 (with a sine generator on connector K4). JP1 Related Products
must be in position ext. MCLK.
> Elektor Audio DSP FX Processor
To Be Continued… www.elektor.com/20895
That’s it for now. This article presented a lot of information and,
> Dogan & Ahmet Ibrahim, Practical Audio DSP Projects
hopefully, enough to get you started. In the next installment, we will with the ESP32, (Elektor, 2023)
go deeper into creating your own applications for the Audio DSP FX www.elektor.com/20558
Processor board.
230510-01 > ESP32-PICO-KIT
www.elektor.com/18423
Questions or Comments?
Do you have technical questions or comments about this article?
Email the author at [email protected], or contact Elektor
at [email protected].
WEB LINKS
[1] R
amkumar Ramaswamy, “ADAU1701 Universal Audio DSP Board,” Elektor 1-2/2014:
https://www.elektormagazine.com/magazine/elektor-201401/24348
[2] ESP32 FAQ, How-to & Getting Started: https://www.elektormagazine.com/esp32-faq
[3] CP210x USB to UART Bridge VCP Drivers: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
[4] The Elektor_AudioDSP library at GitHub: https://github.com/ClemensAtElektor/Elektor_AudioDSP
[5] Get SigmaStudio (not SigmaStudio +): https://www.analog.com/sigmastudio
[6] The Audio DSP FX Processor on Elektor Labs: https://www.elektormagazine.com/labs/audio-dsp-fx-processor
nxp.com/FRDM
NXP and the NXP logo are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2024 NXP B.V.