FPGA-based realtime audiomixer with equalizer

Using an Arduino MKR Vidor4000 board I created a realtime multi-channel audiomixer with nice audio-processing-features.

General background

Sure, digital logic has ones and zeros - but in the right order these two states can have an impact on your sound. I wanted to know how digital logic can be used to change the volume and have influence on the brilliant highs and the chair-shaking bass-sounds of an audio-stream - and how could this can be done in realtime? For a couple of months I worked on an FPGA-based Audioplayer with Equalizer and some more features.

Hardware basis

Several years ago, Arduino published a very-special MKR-board with a quite unusual Arduino-IC-selection: the Arduino MKR Vidor 4000. This board has been presented by Massimo Banzi, a Co-Founder of Arduino. He said "The new MKR Vidor 4000 will finally make FPGA accessible to makers and innovators" but even in 2025 the internet is not showing lot of projects using this board. Of course this was a nice challenge for me: starting a project with a hardware-platform that is not very common - I like challenges :)

Beside some minor ICs, the board consists of three major devices:

  • Microchip SAM D21 32-bit Cortex M0+ Controller
  • NINA W102 Module containing an ESP32
  • Intel (Altera) Cyclone 10LP with 16kLE

Arduino MKR Vidor 4000

Based on the Arduino-documentation, noone should be forced to get in touch with VHDL or the logic itself. The Arduino-guys took some efford to create a predefined logic that interacts with the specific Arduino-Libraries for this MKR-device. So creating an HDMI-device seems to be very simple - but this is not my way... I figured out how to programm all three devices with own code (or logic) so that I could create a full-featured audio-device making use of the benefits of all three types of chips.

Software and Logic

In the final design I used the ESP32-chip for high-level-functions, that are not time-criticial:

  • reading audio-data from a connected SD-Card
  • offering a nice Webinterface to the user via the integrated WiFi
  • calculating EQ-parameters

The SAMD21 is used for communicating with a computer via the USB-connector and offers some information when an I2C-display is connected. Furthermore the SAMD21 generates the 48MHz main-clock for the FPGA.

Finally, the FPGA is used to process all incoming audio-data in realtime: the audio-data from SD-card (wave or mp3), an optional connected Stereo-ADC and audio-data from connected external digital-signals like SP/DIF.

Decoding and processing

In the FPGA I'm converting all incoming serial-data of the audio (mainly I2S) to 24-bit-wide logic-vectors. These vectors are fed into a volume-control and afterwards into multiple serialized IIR-filter-blocks for EQing. As the logic-cells of the Cyclone 10LP can be clocked with at least 100MHz, the processing of all individual blocks is done in under 20 microseconds. So I'm able to complete the processing and output the audio-data way before a new audio-sample is received. Hence, we can realize the system in realtime with only one sample of delay.

Youtube-Video

In 2024 I published a Youtube-video about this DIY digital audio-mixer. The final device has five EQs, a noise gate, an audio compressor and up to 22 channels with a total latency of 20.8 microseconds at 48kHz:

DIY FPGA based Mixing Console with OS/2 GUI - and more

More information

If this project is interesting for you, then you might want to have a look at the website of Elektor. Here I've written a two-part-article about this system: Elektor-Article. The articles will be published in the march- and april-issues. In the following blog-episodes I will tell you more about specific features of this system.

Sourcecode

The code and some more information are available on my GitHub-repository under GitHub/Audioplayer. Feel free to test it in your own projects and let me know if you have some ideas for improvements.

Comments