OpenEar: Final Update — An Open-Source, Self-Tunable Assistive-Listening Prototype on the MAX32655FTHR
Hi everyone!
This is the final update from my OpenEar build week.
On Day 6, the board finally got its printed enclosure. In this post, I’ll bring everything together: what OpenEar does, how I built it, the results from testing on the physical board, the problems I encountered and fixed, and the limitations that remain.
«OpenEar is an experimental assistive-listening project, not a medical device. It has not been clinically evaluated, and its hearing test is not a clinical audiogram.»
Day 6: Giving OpenEar a Case
I designed the enclosure using Python and “manifold3d”, rather than a conventional CAD program. This means the dimensions and geometry are defined directly in the script, so the model can be regenerated and modified programmatically.
I measured the board from a calibrated top-view photograph, including the mounting holes, buttons, microphone port, both 3.5 mm jacks and the micro-USB connector. The enclosure openings were positioned using those measurements.
Enclosure features
Physical Design & Enclosure Features
Overall size
Shape
- Rounded pod design with filleted top edges and a 45° chamfered bottom edge.
Wordmark
- Raised OpenEar lettering, 0.8 mm high.
Microphone
- Seven-hole hexagonal grille positioned over the MEMS microphone.
- Three raised sound-wave arcs.
Buttons
- Openings for all six buttons: bypass, volume, reset, wake, power and SW6.
Connectors
- Headphone and line-in jacks at one end.
- Micro-USB port at the other end.
- Dedicated slot for the LiPo battery lead.
Board Mounting
- Four standoffs with locating pins that pass through the board’s mounting holes.
Lid
- Friction-fit design with a base lip.
- Matching lid rabbet and a small reveal groove.
Pocket Clip
- Separate pen-style clip.
- 38 mm arm with a 1.8 mm gap.
The microphone grille sits directly over the board’s microphone, while the connector openings provide access without having to remove the board from the enclosure.
The pocket clip
The clip is a separate printed component. I printed it lying on its side so that the layer orientation runs along the arm, rather than across it.
The idea is to make the clip more flexible along its length.
It attaches using two dowels cut from 1.75 mm filament and a small amount of superglue. It sits near the jack end, allowing the earphone cable to come straight upwards when the pod is clipped to a pocket.
Printing without supports
One of the design goals was to print all three parts without support material.
I wrote a small geometric checker that examines surfaces facing down more steeply than 45° in each component’s intended print orientation. The resulting checks reported 0 mm² of unsupported surface area for all three parts.
This is a geometry check rather than a guarantee for every printer and material combination, but the final parts were successfully printed without supports.
Getting the geometry to that point took several iterations:
- A 45° chamfer on the bottom edge instead of a rounded fillet.
- Flat-topped teardrop-shaped jack openings instead of circular holes.
- 45° chamfered corners on the USB opening.
- A 40° roof where the lid steps over the base lip.
- Chamfered clip corners and teardrop-shaped dowel holes.
The base prints open-side up. The lid prints rim-down, using its 25 mm ceiling as a bridge. The clip prints on its side.
The parts were printed in PLA at 0.2 mm layer height.
One important distinction: this is a display and carry enclosure, not a sealed battery enclosure. The LiPo remains external, with its lead passing through the dedicated slot.
The Complete Project
What is OpenEar?
OpenEar takes audio from the board’s microphone and processes it through a six-band digital signal-processing pipeline.
Each frequency band can be adjusted independently to create an experimental hearing profile. The system also includes compression, quiet-signal expansion, feedback suppression and output limiting.
The processed audio is then sent to a wired earphone.
A companion web application connects over Bluetooth. It provides a short experimental hearing test, generates a starting profile and allows the six frequency bands to be adjusted live.
The design target is approximately 3.3 ms of microphone-to-earphone latency, based on the measurements described below.
What I built
Hardware
- MAX32655FTHR development board.
- MAX32655 Arm Cortex-M4F microcontroller, running at 100 MHz.
- MAX9867 audio codec.
- MAX20303 power-management IC.
- Wired in-ear earphone.
- 300 mAh LiPo battery.
- Custom 3D-printed enclosure.
Audio pipeline
Microphone → codec → I²S with DMA → six-band DSP → I²S with DMA → codec → earphone.
The main audio pipeline operates at 48 kHz, using 64-sample blocks. Each block represents approximately 1.33 ms of audio.
DSP
- Six-band Linkwitz-Riley crossover with phase compensation.
- Independent gain adjustment for each band.
- Per-band compression and quiet-noise expansion.
- Click-free volume and bypass transitions.
- Feedback suppression, also referred to as a howl guard.
- Output limiter configured with a ceiling of −3 dBFS.
Control
- A text console accessible over USB and Bluetooth.
- Settings saved to flash.
- Commands for monitoring and controlling the audio system.
Phone application
- Experimental hearing test.
- Starting-profile generation.
- Six-band adjustment sliders.
- Live per-band level meters.
- Console access.
The application runs as a web page and uses Web Bluetooth.
Recorder
- Stereo WAV recording to microSD.
- Left channel: raw microphone input.
- Right channel: processed OpenEar output.
Firmware-level limits
The firmware includes several limits independently of the phone application:
- Maximum band gain of +30 dB.
- Configured output ceiling.
- Test tones limited to −20 dBFS and automatically stopped after 15 seconds.
- Tighter volume limits for Bluetooth commands, because the current Bluetooth control implementation does not use pairing.
These are engineering safeguards, not a substitute for clinical or product-safety validation.
Results Measured on the Physical Board
The following table separates physical-board measurements from the PC-side test results.
Performance & Test Results (Firmware v0.3.1)
Audio Performance
- End-to-end latency: 3.30 ms median (five finger snaps recorded in Audacity).
- DSP load: 35.3% average, 41.7% peak.
- DSP load with phone connected: 43.8%.
- Interrupt delay: Maximum 4 samples (0.08 ms).
Audio Reliability
- Late audio blocks (phone disconnected): 0 of 15,568.
- Late audio blocks (phone connected): 234 of 126,293 (0.19%).
Battery Performance
- Battery runtime: More than 8.5 hours.
- Tested using a 300 mAh LiPo battery; test stopped with 30% charge remaining.
Storage
- SD recording: Stereo WAV recording successfully opened and played in Audacity.
Automated Testing
- 314 automated PC checks passing.
- Test suite: run_all_tests.sh
Overall Results
- 3.30 ms median end-to-end latency.
- Zero late audio blocks without a phone connection.
- Only 0.19% late audio blocks with a phone connected.
- More than 8.5 hours of battery runtime.
- All 314 automated PC tests passing.
The latency, CPU load, audio-block counters, interrupt delay and battery runtime were measured on the physical board. The 314 automated checks were run on the PC test environment; they are not 314 separate hardware tests.
What Went Wrong, and How I Fixed It
The most useful part of this project was probably not the features that worked. It was the problems that forced me to understand what was happening inside the system.
- The codec would not start — Day 1
The first firmware build reported error “-6”, indicating that the I²C bus was busy. There was no audio output.
After comparing my startup sequence with the working Analog Devices example, I found several differences:
- I was starting the I²C bus multiple times.
- I was communicating with the power-management chip before configuring the codec.
- Bluetooth was being started before the audio system.
Firmware 0.2.1 corrected the startup sequence:
- Initialise the I²C bus once.
- Configure the codec first.
- Initialise the remaining audio components.
- Start Bluetooth after the audio system.
After flashing the corrected firmware, the codec started successfully and audio output worked.
- A CPU meter that reported 0.0% — Day 2
The firmware initially used the Cortex-M4 cycle counter to measure CPU utilisation.
On this board, that counter was not providing usable measurements, so the displayed CPU load remained at 0.0%.
Firmware 0.3.0 replaced it with a hardware timer.
The physical-board measurement was approximately 35.3% average load, much closer to the 36.7% estimate I had obtained earlier using a Cortex-M4 emulator.
That gave me a useful reminder: a measurement method needs to be validated before its output can be trusted.
- Static, followed by crackling audio — Days 2 to 4
This was the biggest debugging problem.
In firmware 0.2.2, approximately 20% of audio blocks were late. The DSP was estimated to consume around 62% of the available block time, while the output deadline arrived at around 65%.
That left very little timing margin.
Firmware 0.3.0 made the DSP approximately 1.7 times faster and changed the deadline handling. The hiss disappeared, but the late-block rate increased to approximately 37%, and the output started crackling.
The important clue came from comparing the input and output timing.
The output stream was losing approximately 19 samples per second relative to the input. As a result, the point where the output switched buffers gradually moved through the processing window.
Eventually, the switch point crossed the DSP’s active processing time, producing the crackling.
Firmware 0.3.1 introduced a timing correction mechanism:
- It measures the output switch point on every block.
- When the measured drift reaches two samples, the next output block is adjusted by two samples.
- This brings the output timing back towards the input timing.
The physical-board tests showed zero late blocks during the phone-disconnected test. The board’s correction counter also independently measured the timing slip at approximately 19.2 samples per second.
This corrected the observed synchronisation problem, although the underlying cause of the original timing drift is still under investigation.
- Clicky hearing-test tones — Day 2
The original hearing-test tones started and stopped instantly.
Because they could begin or end at arbitrary points in the sine wave, the transitions produced audible clicks.
I added 10 ms fade-in and fade-out ramps to the tone generation.
The resulting tones were clean during the physical-board test.
What Is Still Not Perfect?
There are still a few issues I want to be transparent about.
- The microphone is not muted between hearing-test tones.
The PC tests show the intended microphone-muting behaviour, but it is not working as expected on the physical board.
During the board test, microphone input remained audible between tones. The microphone amplification had been increased deliberately to verify the input path, but the remaining mute behaviour still needs to be fixed.
The hearing test therefore needs a quiet environment, and its results should be treated as experimental.
- A small number of late audio blocks remain when the phone is connected.
The phone-connected test recorded 234 late blocks out of 126,293, approximately 0.19%.
No corresponding glitches were audible during that test, but the firmware counter still detects them.
Bluetooth activity also increases the measured timing slip from approximately 19.2 to 27.8 samples per second.
- The original timing drift does not yet have a confirmed root cause.
My current hypothesis is that the I²S output buffer may occasionally run empty.
The timing-correction mechanism handles the resulting drift, but it does not establish why the drift occurs. I still need to investigate the I²S FIFO behaviour and related timing.
- The hearing test is not calibrated.
The test can provide an experimental starting profile, but it does not measure absolute hearing thresholds.
Without a calibrated reference and proper validation, it cannot be treated as a clinical audiogram or used to diagnose hearing conditions.
What I Learned
A few lessons from building OpenEar:
Real-time audio is about deadlines, not just averages.
A DSP operating at 35% average load can still miss deadlines if input and output timing are not properly synchronised.
Counters can reveal problems that listening alone cannot.
The crackling was audible, but counters such as “late blocks”, “played” and “blocks” helped identify the timing behaviour behind it.
Test on the PC, prove on the board.
The PC simulation helped reproduce and investigate the timing issue, but only the physical board could establish the actual behaviour of the hardware.
Safety limits belong in the firmware.
The application is not the only possible source of commands. Limits should be enforced by the firmware itself, especially when commands can arrive over Bluetooth.
Mechanical design is part of the engineering too.
The enclosure needed to accommodate the actual board, buttons, microphone, connectors and battery lead. Designing it parametrically made those relationships easier to adjust and reproduce.
Reproducing the Project
The source code, firmware, application, tests and enclosure files will be available in the project repository.
- Get a MAX32655FTHR development board and a wired in-ear earphone. A microSD card and small LiPo battery are optional for the corresponding features.
- Download the repository.
- Follow “BRINGUP.md” for the initial setup.
- To use the prebuilt firmware, copy “firmware/prebuilt/openear-full.bin” to the DAPLINK drive that appears when the board is connected.
- Open the companion application in a supported browser, press Connect, and begin with a low volume.
- The enclosure models and associated files are available in “enclosure/stl/”.
“TROUBLESHOOTING.md” documents the issues encountered during development.
Source code, firmware, tests and enclosure files: GitHub - khushitpratikshah/OpenEar · GitHub
Live companion application: openear.pages.dev
License: MIT
Next Steps
There is still room to improve OpenEar:
- Fix microphone muting between hearing-test tones.
- Investigate the underlying cause of the output timing drift.
- Further reduce late audio blocks during Bluetooth activity.
- Calibrate and validate the experimental hearing test against appropriate reference equipment.
- Explore a two-microphone configuration for directional listening in noisy environments.
These are future development goals, not features that I am claiming as completed.
Thank You
A big thank-you to CircuitDigest and DigiKey for providing the opportunity and supporting this project through the programme.
Thanks also to Analog Devices for the open MSDK examples that helped me bring up the hardware.
Building OpenEar took me through hardware bring-up, embedded firmware, real-time DSP, Bluetooth communication, PC-side testing, battery measurements and mechanical design.
It was a challenging build, but getting the complete system running on the physical board and into a printed enclosure was a great way to finish the project.
OpenEar is an experimental assistive-listening project, not a medical device.
Thanks for following the build!