48

pnoi-phone module

Embedded system to perform simultaneous recording of breath sounds from vital locations with desired quality and transmit data wirelessly.

spire-lab

embedded-sys

c

Overview

The Pnoi-phone module is an embedded system designed to perform simultaneous recording of breath sounds from vital locations with desired quality and transmit data wirelessly. The module is designed to be compact, energy-efficient, and capable of capturing high-quality audio data. The module is integrated with the Pnoi-phone app, which serves as a control interface for the module and a data storage platform.

General Schematics

pnoi-mems-schematic

Pnoi-phone ESD schematic with MEMS microphone

pnoi-condenser-schematic

Pnoi-phone ESD schematic with Condenser microphone

Embedded System Design Process

  • Define requirements

  • Develop architecture and select components

  • Prototype circuit layout

  • Write embedded firmware

  • Build and test prototypes

  • Industry

    • Optimize manufacturing process
    • Validate before launch

Component Selection

Component research and selection process for the Pnoi-phone hardware development project.

Requirements:

  • Microphones to capture sound simultaneously from two sources
  • Development board for recording and wireless transmission (Bluetooth/ wifi)

Phase 1

Image

Microphone
  • Condenser microphone with 3.5mm jack: analog sound signal output
  • Sound card: convert the analog signal to digital output

Readily available components for prototype development

Development Board
  • Raspberry Pi 3B: 1.4GHz 64-bit quad-core processor, dual-band wireless LAN, Bluetooth 4.2/BLE

Powerful processor; easy to set up and program


Phase 2

Image

Microphone

Digital output in I2S protocol

Development Board
  • Raspberry Pi Zero W: quad-core 64-bit ARM Cortex-A53 processor clocked at 1GHz and 512MB of SDRAM; Bluetooth 4.2, Bluetooth Low Energy (BLE), onboard antenna; I2S Audio

smaller size ( 65mm × 30mm ) and powerful


Phase 3

Image

Microphone

Digital output in I2S protocol

Development Board
  • Adafruit HUZZAH32: 240 MHz dual core Tensilica LX6 microcontroller with 600 DMIPS; Integrated dual mode Bluetooth (classic and BLE); 2 x I2S Audio; SD-card interface support

more advanced and compact board, energy efficient and suitable for the required function


Breadboard prototypes

Testing basic functionalities on a breadboard

Functions:

  • Simultaneously record from two microphones
  • Wirelessly control to Start and Stop recording
  • Trasmitt recorded data wirelessly for storage

Phase 1

RPi-3B version

Image

Two electret condenser microphones were employed for sound capture, while sound cards were utilized to convert analog signals into digital format. Simultaneously, the Raspberry Pi records the digital signal through sound drivers (Linux 'arecord'). The Raspberry Pi is programmed to establish a Bluetooth connection with the Pnoi-phone app. This app serves the purpose of initiating and terminating the recording function on the Raspberry Pi. Subsequently, the recorded data is transferred to the app once the recording process is halted.

image-alt
Problems:
  • A lot static of noise was observed from the condenser microphone
  • The setup is bulky and not easy for encapsulation
  • It also consumes a lot of power and gets hot
  • Data transfer of raw audio files in bulk is slow

Phase 2

Rpi-Zero version

Image

To address prior issues, two MEMS microphones were selected. These microphones feature built-in audio digitization, reducing noise susceptibility. The digital audio data follows the I2S protocol. Raspberry Pi Zero W, a smaller and more power-efficient board, offers comparable performance to the RPi 3B+.

Problems:
  • RPi zero is still pretty heavy for the task and possesses many unused features
  • Bluetooth audio streaming

Phase 3

ESP32 version

Image

The MEMS microphone delivered excellent recording quality. To address limitations with the RPi Zero, the ESP32 Feather Board was selected as the development board. Its compact size and lower power consumption, combined with the necessary features, made it the optimal choice.

Problems:
  • Bluetooth Audio Protocol: No support for A2DP (Advanced Audio Distribution Profile) in ESP32
  • But can be solved by using a Bluetooth HSP (Headset Profile) and HFP (Hands-Free Profile) to stream audio
  • HS/HFP is a simpler protocol and can be implemented with the ESP32, but the audio quality is not as good as A2DP

Pnoi-phone PCB Design

To transform the breadboard circuit into a compact module for the Pnoi-phone, a custom PCB was created to efficiently integrate and secure all components.

  • Two MEMS mics: M1, M2
  • ESP32 Feather board
  • Power input pins

pnoi-phone ESP32 PCB schematics

Image

pnoi-phone ESP32 PCB design

Image

Image

Embodiment of the Pnoi-phone module

esd-package-alt

For further details, refer

  • Pnoi-phone: Main post for Pnoi-phone project.
  • User Research: User research conducted for Pnoi-phone to understand the user needs and requirements.
  • Pnoi Corpus: A multimodal breath sounds corpus of patients and controls (recorded with a high-end microphone and digital stethoscope) and corresponding PFT values.
  • Pnoi Stor: Data collection protocol, organisation scheme and storage for Pnoi-phone project.
  • Product Design: Design and development of Pnoi-phone biomedical device integrated with AI models to diagnose and monitor airway diseases.
  • Pnoi-phone App: Design and development of Pnoi-phone android app.