This project implements a breath analysis system using an ESP32 and an INMP441 MEMS microphone. It records breath sounds, processes the signal to estimate the breath rate, diagnoses possible respiratory conditions, and sends the data to a mobile device via Wi-Fi.
- Real-time breath sound recording using the INMP441 MEMS microphone.
- Breath rate estimation based on detected peaks in the audio signal.
- Diagnosis of possible respiratory conditions (Bradypnea, Tachypnea, or Normal breathing).
- Wireless data transmission to a mobile device via HTTP.
- ESP32 Development Board
- INMP441 MEMS Microphone
- Jumper Wires
- Power Supply (5V/3.3V)
| INMP441 Pin | ESP32 Pin |
|---|---|
| VDD | 3.3V |
| GND | GND |
| SCK (BCLK) | GPIO 14 |
| WS (LRCL) | GPIO 15 |
| SD (DOUT) | GPIO 32 |
- Install Arduino IDE (if not already installed).
- Install Required Libraries:
- Install the ESP32 board package in Arduino IDE.
- Install
WiFi.h,HTTPClient.h, anddriver/i2s.h.
- Update Wi-Fi Credentials:
- Replace
YOUR_WIFI_SSIDandYOUR_WIFI_PASSWORDin the code with your network details.
- Replace
- Upload Code to ESP32:
- Compile and upload the code to the ESP32 using Arduino IDE.
- Set Up a Server to Receive Data:
- Use a local or cloud server to receive and process the breath rate and diagnosis messages.
- The ESP32 captures breath sound data using the INMP441 microphone.
- The breath rate is estimated by detecting peaks in the audio signal.
- The system determines the diagnosis based on breath rate thresholds.
- The data (breath rate and diagnosis) is sent to a mobile device via HTTP.
- The results are displayed on the mobile device.
- Bradypnea: Breath rate < 12 breaths per minute.
- Normal Breathing: Breath rate between 12-20 breaths per minute.
- Tachypnea: Breath rate > 20 breaths per minute.
- Integration with an Android/iOS app for real-time monitoring.
- Enhanced signal processing for better accuracy.
- Cloud-based data storage and analytics.
This project is open-source and can be modified for research and development purposes.
For any queries or contributions, feel free to reach out!