Post

Sound Locator M33

A real-time sound source localization system using embedded microcontroller and triangular microphone array on a Raspberry Pi Pico 2.

Grade: 8.4

View Repository

Sound Locator M33

Sound Locator M33

This project represents an ambitious attempt to create a real-time sound source localization system using an embedded platform. The objective was to accurately detect and locate a stationary sound source on a two-dimensional plane using multiple microphones and advanced signal processing techniques. This project was developed in collaboration with James Schutte and Julian Bruin as part of the 5LIU0: Premaster Linear Systems course at Eindhoven University of Technology.

Content

The system demonstrates core functionality for sound source localization, though with some components implemented as post-processing solutions due to time constraints.

Sound Locator Results Figure: Localization accuracy results showing better precision within the triangular sensor array

System Abstract

This project aimed to create a real-time sound localization system to address the challenge of accurately determining the position of acoustic sources in 2D space. The system uses a triangular microphone array with time difference of arrival (TDoA) algorithms and embedded signal processing.

System Architecture System block diagram showing the complete signal processing pipeline

Features

  • Triangular Microphone Array: Three omnidirectional MEMS microphones positioned 50cm apart for optimal spatial resolution
  • Real-time Sampling: 166.67 kHz effective sampling rate per microphone using DMA-based batch processing
  • Signal Amplification: Custom non-inverting operational amplifier with 8 kHz low-pass anti-aliasing filter
  • Advanced Signal Processing: Cross-correlation based time difference of arrival determination
  • Embedded Localization: Newton-Raphson method for real-time 2D position estimation
  • Frequency Detection: FFT-based target signal validation using CMSIS-DSP library
  • FreeRTOS Integration: Real-time operating system for concurrent signal processing tasks
  • Precision Targeting: Theoretical millimeter-level accuracy with 2.06mm distance resolution

Technologies Used

  • Hardware: Raspberry Pi Pico 2 (RP2350 Cortex-M33) with Floating-Point Unit
  • Programming Languages: C++ Standard 17 with embedded signal processing libraries
  • Real-time OS: FreeRTOS for concurrent task management
  • Signal Processing: CMSIS-DSP and Eigen3 libraries for mathematical operations
  • Simulation Tools: MATLAB for algorithm validation and LTspice for circuit design
  • Analysis Tools: Python with signal processing libraries for post-processing validation
  • Development Environment: CMake build system with GitHub version control
  • Debugging: J-Link Edu with VSCode integration for real-time debugging

Implementation Details

The system architecture consists of several key components working together:

Prototype photo 1
Prototype photo 1
Prototype photo 1

Hardware Signal Processing:

  • Custom PCB design with non-inverting amplifiers providing optimized gain
  • 8 kHz low-pass filters serving as anti-aliasing protection
  • Variable amplifier stages with stable reference voltage signals
Prototype photo 1
Prototype photo 1
Prototype photo 1
Prototype photo 1

Embedded Software:

  • DMA-based ADC sampling for maximum throughput (500 kHz total, 166.67 kHz per channel)
  • Cross-correlation algorithms for time difference determination
  • Newton-Raphson iterative solver for 2D position estimation
  • FFT-based frequency detection for target signal validation

Technical Challenges Solved:

  • Signal sensitivity optimization through calculated amplifier gain
  • Noise reduction through digital filtering and frequency domain analysis
  • Real-time processing constraints addressed with optimized algorithms
  • Electromagnetic interference mitigation through proper PCB design considerations
Prototype photo 1
Prototype photo 1
Prototype photo 1

Performance Results

The system achieved mixed results during evaluation:

Precision Metrics:

  • Average X-coordinate error: 5.18 cm
  • Average Y-coordinate error: 4.34 cm
  • Success rate: 50% of measurements within 5.0 cm accuracy target

Key Findings:

  • Best accuracy achieved when sound source is positioned within the triangular sensor array
  • Performance degrades significantly for sources outside the sensor triangle
  • Lower frequency signals (250 Hz) provide more reliable results than higher frequencies (4 kHz)
  • Cross-correlation method sensitive to signal period relative to sensor spacing

System Limitations:

  • Maximum effective distance limited by frequency: d = 1/(f × 340.29 × 100)
  • Sensor casing may obstruct audio from certain angles
  • Batch processing introduces timing artifacts affecting analysis

Future Improvements

Several enhancements have been identified for system optimization:

Hardware Enhancements:

  • CAD-based PCB design with improved ground plane and signal integrity
  • Active bandpass filtering instead of simple low-pass filtering
  • Optimized sensor housing to reduce directional sensitivity

Software Optimizations:

  • Complete integration of TDoA algorithms on embedded platform
  • Real-time performance optimization for sub-5-second inference
  • Enhanced noise filtering and signal validation algorithms

System Integration:

  • Unified real-time processing pipeline eliminating post-processing dependencies
  • Improved calibration procedures for sensor array geometry
  • Advanced correlation techniques like GCC-PHAT for enhanced accuracy

Lessons Learned

This project provided valuable insights into embedded signal processing:

  • Peak-based time difference methods proved unreliable for consistent localization
  • Square wave signal sources (buzzers) create processing artifacts; sinusoidal sources preferred
  • Batch sampling introduces timing challenges that must be carefully managed
  • Cross-correlation requires careful consideration of signal period relative to sensor spacing
  • Real-time embedded constraints demand algorithmic optimization and approximation techniques

The Sound Locator M33 project demonstrates the complexity and challenges inherent in real-time embedded signal processing while providing a solid foundation for future development in acoustic localization systems.


This project was completed as part of the Linear Systems - Project (5LIU0) course at Technical University of Eindhoven (TUe), Embedded Systems pre-master program, 2024-2025.

This post is licensed under CC BY 4.0 by the author.