Close
0%
0%

Acoustic Parabola with NLMS Adaptive Filtering on

How to spy on your neighbor (scientifically)? Acoustic parabola + NLMS on ESP32.

Public Chat
Similar projects worth following
This project implements a real-time NLMS adaptive filter on an ESP32, within the framework of a 3D-printed acoustic parabola. The goal is to improve the signal-to-noise ratio of a MEMS microphone placed at the focal point of the parabola by subtracting ambient noise measured by a second MEMS microphone positioned outside the focus.

The microphones used are INMP441 MEMS digital microphones, connected via I2S to the ESP32. Both channels of the ESP32’s I2S peripheral are used to capture the signals simultaneously with stereo. Audio is decoded with a UDA1334.

The signal processing is based on a Normalized Least Mean Square (NLMS). The algorithm dynamically adjusts the coefficients of a FIR filter to minimize the mean squared error between the focused microphone signal and the reference noise signal. DSP functions from Espressif are used as much as possible. The implementation uses double buffering.

Project Details – Acoustic Parabola with NLMS Filtering on ESP32

This project implements a real-time NLMS adaptive filter on an ESP32, using a 3D-printed acoustic parabola. The goal is to improve the signal-to-noise ratio (SNR) of a microphone placed at the focus of the parabola by dynamically subtracting ambient noise measured by a second microphone placed outside the focal area.
The entire data processing pipeline is fully digital, from input to output.

Goal

The idea is to suppress part of the noise captured by the focused microphone using a second microphone placed off-axis. The parabola provides a passive acoustic gain estimated at around 20 dB. The INMP441 microphone used here has a sensitivity of -26 dBFS, which theoretically allows for a decent range. In practice, the system has been mainly tested indoors, during filter development — and I never really took the time to try it outdoors.

Hardware Architecture

  • ESP32 DevKit (Xtensa LX6, dual-core, running FreeRTOS)

  • Two INMP441 digital microphones connected via I2S

    • Focus mic: captures signal + noise

    • Reference mic: captures mostly noise

  • Audio output: UDA1334 DAC connected to the second I2S port

  • RGB LED on the ESP32 dev board used to display real-time SNR

  • 3D-printed parabola, with STL files included in the repository

Signal Processing & Implementation

The NLMS filter is implemented in fixed-point arithmetic, with double buffering to ensure smooth real-time operation. The code runs under FreeRTOS, with a dedicated task for processing. Espressif’s optimized DSP functions are used whenever possible to improve performance (dot products, vector ops...).


FIR Filter & Minimization Criterion

The adaptive filter implemented here is a Finite Impulse Response (FIR) filter. It works by producing an output signal y(n), which is a weighted sum of the past values of the input (the noise reference from the second microphone). These weights — the filter coefficients — are continuously updated.

The goal is to make this output y(n) match the noise component present in the main microphone signal d(n), so that it can be subtracted. The error e(n) is the difference between the desired signal (signal + noise) and the estimated noise.

The filter uses the Normalized Least Mean Squares (NLMS) algorithm to adjust its coefficients. It does this by minimizing the squared error e(n)^2, which means it constantly tries to improve its estimation of the noise. Normalization ensures that the learning rate remains stable even if the input signal varies in amplitude.

This approach allows the system to adapt in real time to changing noise conditions and continuously clean the signal.

Code & Resources

The code is written in C (ESP-IDF + FreeRTOS), with a modular design.
The GitLab repository includes:

  • Full source code (filter, I2S, LED, DAC)

  • files for the 3D-printed parabola

  • A README with wiring, schematic, and explanations

👉 GitLab Source Code

I plan to explore other signal processing methods on this platform, such as:

  • Wiener filtering

  • Spectral techniques

  • Even lightweight deep learning for detection or classification

This hardware setup offers a simple, accessible, and reusable test platform. If anyone wants to continue the experiment or suggest improvements, everything is open: code + CAD files are available.

👉 Full article on SelvaSystems.net

parabole-GERBER.zip

Gerber file for the PCB that holds the various breakout boards, the decoupling capacitors, the MEMS microphone, and the connector to the microphone in the parabolic reflector.

x-zip-compressed - 10.71 kB - 05/05/2025 at 11:03

Download

  • 1 × ESP32 S3
  • 2 × micro MEMS NMLP441
  • 1 × UDA1334A

  • PCB for breakout boards and MEMS mic

    Bertrand Selva05/05/2025 at 11:37 0 comments

    new PCB for breakout boards and MEMS mic

    You’ll find in the project files the Gerber files for the PCB that holds the breakout boards.
    It’s definitely better than a mess of Dupont wires with connections that get unreliable over time…

    A huge thanks to PCBWay for their service on this PCB !

    This new PCB holds the decoupling capacitors, the MEMS mic, the breakout boards, and provides a connector for the parabolic mic assembly.

    Gerbers and design files are now available in the files section.

View project log

  • 1
    Assembly Instructions

    There is no custom PCB for this project — everything is wired using Dupont jumper cables. The various components (ESP32, microphones, DAC) are mounted on the back of the parabola, attached to small 3D-printed brackets.

    The pinout is specified in the repository, and you’ll need to refer to the source code to match the correct GPIO assignments.

    🔧 Mechanical Assembly

    The most time-consuming part is 3D printing the two halves of the parabola.
    The two parts are assembled using M3 screws, and I used melt-in brass threaded inserts to secure the mounting holes by heating them into the PLA.

    The structure is designed to fit on a standard tripod mount, which gives good mobility and stability.

    Power was supplied using a standard USB power bank during testing, but any 5V or 3.3V source should work.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates