#023: Running Edge AI in Their Sleep: How Elemind Built Embedded Firmware for On-Demand Rest

Coredump Sessions · 25 Jun 2026 · 58m · Episode 24

AI in practice: 4 real uses of AI described

What this episode covers

David Wang, CTO of Elemind, explains how his company built a wearable headband that uses real-time EEG sensing and closed-loop audio stimulation to help users fall asleep faster. The device achieves a critical 2-millisecond latency loop by optimizing embedded firmware on a Cortex-M33 processor, avoiding expensive FPGAs while handling signal processing and edge AI for sleep staging. Wang details the 5-year development journey, including the shift from uncomfortable hair-penetrating electrodes to comfortable dry carbon-graphite sensors and the discovery that alpha wave suppression is more effective than boosting delta waves. The team is now developing an 'AI sleep tailor' to personalize stimulation for the 24% of users who do not initially respond to the standard protocol.

AI in practice

Where this conversation describes AI being used to build or deliver a product. Part of the AI in practice tracker.

Engineering & simulationClaude Opus

The team used Claude Opus to generate test cases for their firmware, allowing them to verify feature implementations with higher confidence despite not trusting the AI to write features flawlessly.

“We actually spent a lot of time on with AI, writing test cases, more so than we do the feature side of things. So we found out that getting those test cases are critical in order to make sure the product works well, and then you can get the AI tool to write the features for you.”

David Wang · Hear it at 44:01

Engineering & simulationMatlab Embedded Coder

The CTO evaluated Matlab's embedded code generation, noting that while it produces faithful code, it creates significant computational overhead, requiring manual tuning to optimize for the embedded processor.

“I've used that embedded C coder before. So even before LMines. I already had an idea of the quality of the code that it generated, which while very faithful to the MATLab code was perhaps a little too faithful, a lot of computational overhead, needed to preserve the semantics of MATLab style processing.”

David Wang · Hear it at 50:58

Engineering & simulation

The team utilized Python and AI tools to experiment rapidly with large datasets of brainwave data, allowing them to ask scientific questions and identify promising research directions faster than before.

“one of the ways AI has AI tools have helped us is being able to experiment a lot faster. So we can ask scientific questions about the data set we have and actually get interesting, you know, signs of life one way or the other, whether it's an interesting research direction for us internally.”

David Wang · Hear it at 44:01

Engineering & simulation

The company runs sleep staging and microarousal detection AI models directly on a Cortex-M33 processor to determine when to taper audio stimulation in real-time, preventing the user from being kept in a hypnagogic state.

“we run the AI on our Cortex-M33 processor? We try to optimize it as best we can, but yeah, we do run it on the embedded processor. It actually is worth noting that we always develop these models in the cloud first, so full floating point precision, and then we try to stuff it on the device as best we can and preserve its fidelity.”

David Wang · Hear it at 49:26

Mentioned

Companies
Elemind, Memfault, Nordic Semiconductor
Products
Teensy
Chips
Cortex-M33
Tools
Matlab
Also
David Wang, FreeRTOS, Claude Opus

Other shows on the same ground, closest first.

  • Embedded.fm · 1h 09m

    174: It's Not Weird

    Evan Shapiro, CTO and co-founder of Knit Health, explains how his company uses a custom Linux-based camera with an onboard Qualcomm Snapdragon processor and deep learning neural networks to monitor infant sleep and respiration without wearable sensors. He details the engineering challenges of extracting weak respiration signals from noisy video, the decision to process data locally on the edge to preserve privacy and reduce cloud costs, and the rigorous security measures implemented to prevent hacking. Shapiro also discusses the history of neural networks, the 'Wizard of Oz' method used to train their models before having sufficient data, and his background as a professional poker player.

  • The Next Byte Podcast · 28m

    90. Solving the Billion Person Sleep Problem

    Daniel and Farbode discuss 8 Sleep, a company that builds smart mattresses with active heating and cooling to improve sleep quality, and highlight their use of the Duro PLM platform to manage hardware development. They then explore research by Dr. Gabrielle Papini from the Technical University of Eindhoven, who developed a machine learning algorithm to detect sleep apnea using data from existing wearable sensors like the Whoop strap and Apple Watch. The hosts analyze how this software-based approach leverages photoplethysmography (PPG) data to identify respiratory events without requiring new hardware, offering a scalable solution for the estimated billion people affected by the condition.

  • Embedded.fm · 56m

    319: Squidly Tentacles

    Hosts Elecia White and Christopher White discuss the technical implications of the 2038 time bug, the utility of the 'single-file libraries' GitHub repository for embedded development, and Christopher's hands-on MIDI project using an STM32 NUCLEO-144 board. Elecia also shares her exploration of Tiny ML for PID controller tuning and her attempt to apply for a NASA NIAC grant using curved crease origami for sensor systems.

  • EE Times Current · 22m

    Embedded World 2023 Recap

    Nitin Dahad, Francoise Pelle, and Sally Ward Foxton of EE Times recap Embedded World 2023, highlighting the shift toward edge AI, tiny ML, and software-defined vehicles. They discuss specific implementations from companies like Renaissance, STMicroelectronics, and Silicon Labs, focusing on running AI models on Cortex-M85 and STM32 microcontrollers with low power consumption. The episode also covers security initiatives from Kudosip and Trust In Software, as well as neuromorphic computing demos from InnerTense and Brain Chip.

  • How I Built This · 35m

    When your headphones listen to you with Ramses Alcaide of Neurable

    Ramses Alcaide, co-founder and CEO of Neurable, explains how his company developed Anten, a pair of headphones that use non-invasive brain-computer interface (BCI) technology to track focus and prevent burnout. Alcaide details the transition from his PhD research on EEG for ALS patients to creating a consumer product that integrates AI to boost signal-to-noise ratios from ear-level sensors. He outlines Neurable's roadmap, which includes upcoming in-earbuds and partnerships with OEMs to embed BCI into various headworn devices for both consumer productivity and enterprise safety applications.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by Coredump Sessions. The episode itself belongs to its publisher.