[Learn, Build & Win] MachineEar – Final Project Update: Real-Time Acoustic Monitoring and Anomaly Detection Using MAX32655FTHR
Hello everyone!
I’m excited to share the final development update of MachineEar, my project developed as part of the DigiKey and Circuit Digest Learn, Build & Win initiative using the Analog Devices MAX32655FTHR Evaluation Kit.
When I started this project, my goal was to explore how acoustic signals could be used to monitor the operating conditions of machines and identify unusual changes in their sound patterns.
After working through the hardware bring-up, microphone integration, audio acquisition, digital signal processing, baseline learning, anomaly detection, Bluetooth Low Energy communication, and web dashboard development, I have successfully completed a working end-to-end MachineEar prototype.
This update covers the complete implementation, system architecture, hardware and software integration, experiments using two motors, observed results, challenges, and future improvements.
1. Project Introduction – What is MachineEar?
MachineEar is an embedded acoustic monitoring system designed to learn the normal sound characteristics of a machine and detect deviations from its learned acoustic baseline.
The idea is similar to a digital stethoscope for machines.
Machines such as motors, fans, pumps, and compressors produce characteristic sound patterns during operation. Changes in their operating conditions can influence these acoustic patterns.
MachineEar captures these sounds through a microphone, processes the audio locally on the MAX32655 microcontroller, extracts acoustic features, and compares them against a previously learned baseline.
When the measured acoustic characteristics deviate significantly from the baseline, the system generates an anomaly score and updates its monitoring status.
The primary objective is to perform acoustic monitoring directly on an embedded device without continuously streaming raw audio to a cloud server.
Main objectives
-
Capture machine sounds using an onboard digital MEMS microphone.
-
Process audio locally using the MAX32655.
-
Extract meaningful acoustic features using FFT-based signal processing.
-
Learn a baseline from normal operating conditions.
-
Detect deviations from the learned acoustic baseline.
-
Communicate monitoring information through Bluetooth Low Energy.
-
Display live monitoring information through a web dashboard.
The current implementation focuses on acoustic deviation detection. Mechanical fault classification and predictive-maintenance performance are areas for further validation.
2. Hardware and Software Components
The MAX32655FTHR Evaluation Kit acts as the central processing platform for MachineEar.
Hardware used
| Component |
Purpose |
| Analog Devices MAX32655FTHR |
Main embedded processing platform |
| Knowles SPH0644HM4H-1 |
Onboard digital MEMS microphone |
| MAX9867 audio codec |
Audio interface and microphone signal handling |
| Onboard BLE connectivity |
Wireless telemetry communication |
| Two motors |
Experimental acoustic monitoring setup |
| USB DAPLink |
Firmware programming and serial debugging |
Software and development tools
-
Maxim Microcontroller SDK (MSDK)
-
Visual Studio Code
-
Embedded C
-
ARM CMSIS-DSP
-
I²C communication
-
I²S audio interface
-
DMA-based audio acquisition
-
Bluetooth Low Energy
-
HTML, CSS, and JavaScript
-
Web Bluetooth API
3. System Architecture
The complete MachineEar implementation follows this processing pipeline:
Machine → Digital Microphone → MAX9867 Codec → I²S → MAX32655 → Audio Processing → Baseline Comparison → Anomaly Detection → BLE → Web Dashboard
The system is divided into the following functional stages:
-
Audio acquisition.
-
Audio preprocessing.
-
Acoustic feature extraction.
-
Healthy baseline learning.
-
Anomaly scoring and status determination.
-
BLE telemetry transmission.
-
Browser-based visualization.
The audio processing and anomaly detection are performed locally on the MAX32655. The dashboard receives compact telemetry rather than continuous raw audio.
4. Hardware Bring-Up and Audio Interface Configuration
One of the first major challenges was establishing communication between the MAX32655 and the onboard audio hardware.
The evaluation kit includes a Knowles SPH0644HM4H-1 digital microphone connected through the MAX9867 audio codec.
I first verified the I²C communication with the codec and confirmed that the MAX9867 responded at address 0x18.
The codec was then configured to establish the required audio path.
Audio configuration
-
Audio sampling rate: 48 kHz.
-
Audio interface: I²S.
-
Codec: MAX9867.
-
Audio acquisition: DMA.
-
Codec operating as I²S master.
-
MAX32655 configured to receive the audio stream.
The audio data is transferred from the codec to the microcontroller through the I²S interface.
After resolving the codec configuration and audio interface integration, I successfully initialized the audio subsystem and captured microphone data using the MAX32655.
5. Embedded Audio Acquisition and Digital Signal Processing
After completing the hardware bring-up, I implemented the audio acquisition and processing pipeline.
The firmware captures audio samples using I²S and DMA. The captured samples are then processed locally.
For each processing frame, the implementation uses:
The FFT is used to transform the captured time-domain audio signal into its frequency-domain representation.
This allows the system to analyze the frequency distribution and energy characteristics of the machine’s sound.
Acoustic feature extraction
MachineEar extracts seven acoustic features from each processing frame.
The implemented features include:
These features provide a compact representation of the captured acoustic signal.
Instead of sending the entire audio stream over BLE, the system uses these extracted features for anomaly detection and telemetry.
.
6. Healthy Baseline Learning and Anomaly Detection
This is the main intelligence component of MachineEar.
The system first observes the machine under a known operating condition and collects acoustic measurements.
During the initial learning period, it collects 30 processing frames and establishes a reference baseline.
The baseline represents the acoustic characteristics observed during that initial operating condition.
After the baseline is established, every new audio frame is processed and compared against the learned reference.
Anomaly detection process
-
Capture a new audio frame.
-
Apply the Hann window.
-
Perform FFT processing.
-
Extract acoustic features.
-
Compare the features with the learned baseline.
-
Calculate the anomaly score.
-
Apply configured deviation thresholds and persistence filtering.
-
Update the monitoring status.
The current implementation uses statistical deviation thresholds, including an aggregate deviation criterion and individual feature deviation criteria.
Persistence filtering helps prevent every small fluctuation from immediately becoming a sustained alert.
MachineEar monitoring states
NORMAL
The measured acoustic characteristics remain within the expected baseline range.
SUSPECT
A noticeable acoustic deviation has been detected and requires attention or further observation.
ALERT
The measured deviation has crossed the configured alert criteria.
These states represent acoustic deviation levels. They do not independently identify a particular mechanical fault.
7. Bluetooth Low Energy Integration
After implementing the audio processing and anomaly detection, I integrated the MachineEar application with the BLE peripheral functionality of the MAX32655.
The board advertises itself as a BLE peripheral and allows a central device to connect.
Once connected, the browser can discover the GATT service and characteristic and subscribe to notifications.
The firmware periodically transmits monitoring information through BLE notifications.
Telemetry information
The transmitted telemetry contains:
-
Frame counter.
-
Anomaly score.
-
Monitoring status.
-
RMS amplitude.
-
Dominant frequency.
-
Low-frequency energy.
-
Mid-frequency energy.
-
High-frequency energy.
BLE packet handling
One important implementation detail was handling the ATT MTU limitation.
The complete telemetry packet is 29 bytes, which can exceed the notification payload available with the default ATT MTU.
To handle this, I implemented MTU-aware telemetry transmission:
-
When the negotiated MTU supports the complete packet, the telemetry is sent in one notification.
-
When the available payload is smaller, the telemetry is divided into two notification fragments.
-
The dashboard reassembles the fragments using the frame counter.
This ensures that the dashboard receives a complete set of telemetry information.
I also resolved a Windows browser GATT service-discovery issue related to the BLE GATT Database Hash calculation during development.
After the fix, the browser successfully discovered the service, subscribed to notifications, and received periodic telemetry.
8. Web Dashboard – Real-Time Machine Monitoring
To make MachineEar easier to use and demonstrate, I developed a browser-based dashboard.
The dashboard connects directly to the MAX32655 using the Web Bluetooth API.
It does not require a separate cloud backend for the live monitoring connection.
The dashboard receives BLE notifications and updates the displayed information.
Dashboard features
The dashboard provides a visual representation of the acoustic monitoring information generated by the embedded firmware.
9. Experimental Testing Using Two Motors
After integrating the complete system, I moved to practical testing.
For the initial experiments, I used two motors as the acoustic sources and observed how MachineEar responded to different operating conditions.
The purpose was to understand how changes in the sound environment and motor operating states influenced the learned acoustic baseline and anomaly score.
I performed experiments involving different combinations of motor operation, motor shutdown, and operating-frequency changes.
Test 1 – Normal operating condition
I operated the motors under the initial reference operating condition and allowed MachineEar to learn the acoustic baseline.
Observations:
-
The system collected acoustic measurements.
-
The baseline-learning process completed.
-
The dashboard received live telemetry.
-
The system generally remained in the NORMAL state when the acoustic environment remained consistent.
This established the reference condition for the subsequent experiments.
Test 2 – Switching off one motor
While monitoring the system, I changed the operating condition by switching off one of the two motors.
This changed the combined acoustic environment because one of the sound sources was no longer operating.
Observations:
-
The captured acoustic characteristics changed.
-
The extracted features deviated from the original reference baseline.
-
The anomaly score changed.
-
The monitoring status moved to SUSPECT or ALERT depending on the measured deviation.
This demonstrated that the system responds to a change in the combined acoustic signature.
Test 3 – Switching off both motors
I also tested the condition in which both motors were switched off.
With both motors stopped, the acoustic environment was substantially different from the original motor-running reference condition.
Observations:
-
The acoustic measurements changed significantly compared with the learned baseline.
-
The anomaly score responded to the change.
-
The system identified the deviation through its monitoring status.
This experiment demonstrated that MachineEar can recognize a substantial change in the acoustic environment relative to its initial operating reference.
Test 4 – Changing motor operating frequency
I also changed the operating frequency of the motors during testing.
Changing the operating frequency affects the motor’s operating speed and can change the acoustic characteristics produced during operation.
Observations:
-
The frequency-domain features changed.
-
The anomaly score responded to the new acoustic measurements.
-
The monitoring status transitioned to SUSPECT or ALERT when the deviation crossed the configured criteria.
This demonstrated the response of the anomaly-detection pipeline to changes in motor operating conditions.
Test 5 – Returning to the original operating condition
After changing the motor operating conditions, I restored the original reference condition.
Observations:
-
The acoustic characteristics moved closer to the learned baseline.
-
The anomaly score decreased.
-
The system returned to NORMAL when the measurements were again within the configured normal range.
This was an important observation because it demonstrated that the detector responds to changes relative to its learned reference condition rather than simply remaining in ALERT after a deviation.
Overall experimental observation
The two-motor experiments demonstrated that MachineEar can:
-
Learn an initial acoustic reference condition.
-
Detect changes when one motor is switched off.
-
Respond to changes when both motors are switched off.
-
Detect acoustic deviations associated with motor operating-frequency changes.
-
Update its monitoring state according to the measured deviation.
-
Return to NORMAL when the acoustic measurements return to the learned reference range.
These experiments validate the initial acoustic deviation-monitoring functionality.
However, switching motors on or off and changing their operating frequency are changes in operating conditions, not confirmed mechanical faults. Further controlled experiments are necessary to establish whether MachineEar can distinguish actual mechanical degradation from normal operating variations.
For demo purposes, we use two normal motors because, for the industrial-grade motors, it was very tough, and it needs a lot of time to train and show the differences.
SERIAL MONITOR OUTPUT DURING MOTOR TESTING
DASHBOARD OUTPUT DURING MOTOR TESTING
10. Development Challenges and How I Addressed Them
The development of MachineEar involved integrating multiple hardware and software subsystems.
Some of the important challenges I encountered were:
1. MAX9867 audio codec configuration
Establishing communication with the codec and configuring the correct audio path required careful register-level debugging.
I verified the I²C communication, configured the codec, and established the I²S audio interface.
2. I²S and DMA audio acquisition
Capturing audio reliably required integrating the I²S peripheral and DMA-based data transfer.
I also had to understand how the audio samples were represented and transferred through the SDK’s I²S driver.
3. CMSIS-DSP integration
Integrating the CMSIS-DSP library into the Maxim SDK project and implementing the FFT-based feature extraction pipeline required additional build configuration and debugging.
4. Embedded processing and BLE integration
The audio processing and BLE peripheral functionality had to operate together without disrupting the wireless communication.
I integrated periodic audio processing with the BLE event loop and handled telemetry notifications.
5. BLE MTU and GATT service discovery
The default notification payload size was insufficient for the complete telemetry packet.
I implemented packet fragmentation and reassembly and resolved a GATT Database Hash calculation issue that prevented successful service discovery in the Windows browser.
6. Browser-based BLE communication
Getting the dashboard to connect, discover the GATT service, subscribe to notifications, and correctly decode the telemetry required additional debugging on both the embedded firmware and JavaScript sides.
Solving these challenges gave me practical experience with the complete embedded development process, from peripheral configuration to application-level communication.
11. Final System Demonstration
The final demonstration shows the complete MachineEar implementation working as an integrated system.
It includes:
-
MAX32655FTHR initialization.
-
Audio codec and microphone initialization.
-
Audio capture and DSP processing.
-
Baseline learning.
-
Acoustic anomaly detection.
-
BLE advertising and connection.
-
GATT service discovery.
-
Live BLE telemetry notifications.
-
Browser-based monitoring.
-
Experimental testing using two motors.
Project source code
The complete project source code, including the embedded firmware, audio-processing implementation, BLE integration, and web dashboard, is available on GitHub.
GitHub Repository:
Yadavallitejas/MachineEar
Project demonstration video
I have also recorded a demonstration showing the working prototype and its response during experimental testing.
Demo Video:
Additional implementation and testing evidence
The following supporting materials are included with this update:
-
Serial monitor/CMD output showing firmware initialization and system operation.
-
Dashboard screenshots showing live BLE telemetry.
-
Experimental screenshots showing NORMAL, SUSPECT, and ALERT states.
-
Photographs of the hardware and two-motor test setup.
12. Current Limitations and Future Improvements
Although the first end-to-end prototype is complete, there are several areas that require additional research and validation.
Current limitations
-
The detector identifies acoustic deviations but does not currently identify the exact cause of a deviation.
-
External noise can influence the measured acoustic features.
-
Changes in motor operating speed or frequency can trigger deviations even when the motors are functioning normally.
-
The current baseline represents the initial operating condition and does not yet provide validated separate profiles for different speeds and loads.
-
Controlled mechanical fault experiments have not yet been completed.
-
More extensive testing across different machines and environments is required.
Future improvements
-
Develop separate baseline profiles for different operating conditions.
-
Improve resistance to environmental noise and transient disturbances.
-
Investigate more robust anomaly-detection algorithms.
-
Perform controlled mechanical degradation and fault experiments.
-
Explore combining acoustic monitoring with vibration and temperature measurements.
-
Evaluate long-duration stability and false-positive rates.
-
Test the system with different types of motors, fans, and pumps.
The long-term objective is to investigate whether acoustic monitoring can become a useful component of an edge-based machine-condition monitoring solution.
13. Final Project Status
I have successfully completed the first working end-to-end prototype of MachineEar using the Analog Devices MAX32655FTHR Evaluation Kit.
The completed implementation includes:
-
Onboard digital microphone integration.
-
MAX9867 codec configuration.
-
I²S and DMA-based audio acquisition.
-
FFT-based acoustic feature extraction.
-
ARM CMSIS-DSP integration.
-
Initial healthy baseline learning.
-
Statistical anomaly scoring.
-
NORMAL, SUSPECT, and ALERT monitoring states.
-
BLE telemetry communication.
-
MTU-aware notification handling.
-
Browser-based Web Bluetooth dashboard.
-
Experimental monitoring using two motors.
The project successfully demonstrates the integration of embedded audio processing, edge-based anomaly detection, wireless communication, and browser-based visualization on a single microcontroller platform.
One of the most valuable parts of this project was learning how to integrate multiple embedded subsystems and bring them together into a working application.
I started with basic board bring-up and I²C communication and gradually developed the complete audio acquisition, DSP, anomaly detection, and BLE monitoring pipeline.
This project has significantly improved my practical understanding of embedded C, audio interfaces, digital signal processing, BLE, and edge computing.
14. Acknowledgements
I would like to sincerely thank DigiKey, Circuit Digest, and Analog Devices for providing the MAX32655FTHR Evaluation Kit and for organizing the Learn, Build & Win initiative.
This opportunity allowed me to explore the MAX32655 platform, experiment with embedded audio processing, and develop a complete working prototype.
I am grateful for the opportunity and for the knowledge gained throughout this development journey.
Thank you to everyone in the DigiKey TechForum community for sharing their knowledge, experiences, and technical guidance.
Project: MachineEar
Developed By: Yadavalli Tejas
Development Platform: Analog Devices MAX32655FTHR Evaluation Kit
Microphone: Knowles SPH0644HM4H-1
Audio Codec: MAX9867
Audio Processing: Embedded C and ARM CMSIS-DSP
Audio Interface: I²S and DMA
Connectivity: Bluetooth Low Energy
User Interface: HTML, CSS, JavaScript, and Web Bluetooth
Experimental Setup: Two motors
Project Status: Working end-to-end acoustic-monitoring prototype
Thank you for following my MachineEar development journey!
I would be happy to receive your feedback, suggestions, and ideas for further improving the project.