Built to order

Digital Stethoscope Mini Project with Heart Sound Recording (ESP32)

This project builds a digital stethoscope that captures heart sounds through an acoustic chest piece, an electret microphone and a MAX9814 automatic-gain-control amplifier feeding an ESP32. The ESP32 samples the 20–200 Hz cardiac band with its 12-bit ADC, draws a live waveform on a 0.96-inch OLED, records one-touch 16-bit WAV clips to a microSD card, and plays recordings back through a headphone jack. A TP4056 module keeps the 3.7 V Li-ion cell charged for portable demos. Suitable for B.E./B.Tech final-year projects in Electronics and Communication Engineering.

Chat on WhatsApp — get a quotation

Electronics / E&TC ESP32 development boardArduino IDE · C/C++ firmwareMAX9814 AGC microphone amplifierElectret condenser microphone0.96" OLED display SSD1306microSD card module SPITP4056 Li-ion chargerHardware
Digital Stethoscope Mini Project with Heart Sound Recording (ESP32) — project thumbnail preview
More project photos (3)

The problem

An acoustic stethoscope is a brilliant piece of passive engineering: a chest piece, a column of air, and the listener's ears. It is also a one-way experience — faint heart sounds cannot be replayed, compared, or shown as a trace. Students learn auscultation from brief, unrepeatable listening sessions, and any interesting sound is gone the moment it happens. The Digital Stethoscope Mini Project with Heart Sound Recording (ESP32) fixes that for a final-year electronics student: an acoustic chest piece coupled to an electret microphone, a MAX9814 automatic-gain-control amplifier, and an ESP32 that digitizes the cardiac band, draws a live phonocardiogram-style waveform on a 0.96-inch OLED, records one-touch WAV clips to a microSD card, and plays them back through a headphone jack. A TP4056-charged Li-ion cell makes the unit portable for demos. It is an educational demonstrator — not a diagnostic instrument — but every stage, from valve-closure acoustics to AGC dynamics to SD-card WAV encoding, is real, measurable and viva-ready.

SYSTEM FLOW

5 components 4 connections

Live flow
Drag to explore
100%
sensorChest Piece

Acoustic chest piece couples heart sounds through its diaphragm and air column.

Follow the working sequence

How it works

Sound travels first through air: the acoustic chest piece collects body sound through its diaphragm and a short air column, and the electret microphone on the MAX9814 module converts it to a small electrical signal. The MAX9814 applies up to 60 dB of gain with automatic gain control — a 30 ms hold time and a 1:4000 attack-to-release ratio keep loud handling noise from clipping while faint heartbeats stay audible. A passive RC stage rolls the signal off above about 500 Hz, centering the 20–200 Hz cardiac band where S1 and S2 live. The ESP32 samples the conditioned signal with its 12-bit ADC at 2,000 samples per second, scrolls it as a waveform on the 0.96-inch OLED, and — when the record button is pressed — streams 16-bit PCM samples to the microSD card as a WAV file. A second press closes the file cleanly; play mode sends the clip out through the 8-bit DAC to the headphone jack.

  1. The chest piece is placed on the chest; its diaphragm and the air column couple heart sounds to the electret microphone on the MAX9814 module.
  2. The MAX9814 amplifies with AGC at up to 60 dB (or 40/50 dB by gain-pin jumper); the student waits about 2–3 s after contact for the AGC to settle before recording.
  3. A passive RC low-pass rolls the signal off above about 500 Hz; the 1.25 V-biased, 2 Vpp-max output feeds the ESP32 ADC input directly.
  4. Firmware samples the ADC at 2,000 samples/s and scrolls the live waveform across the OLED at roughly 25 frames/s (design target).
  5. Pressing the record button opens a .WAV file on the microSD card (SPI, FAT32) and streams 16-bit PCM samples; pressing it again closes the file cleanly.
  6. Play mode reads the clip back through the ESP32 DAC and a DC-blocking capacitor to the 3.5 mm headphone jack; the TP4056 keeps the Li-ion cell charged over USB.

Tech stack:

  • ESP32 development board
  • MAX9814 AGC microphone amplifier
  • Electret condenser microphone
  • 0.96" OLED display · SSD1306
  • microSD card module · SPI
  • TP4056 Li-ion charger
  • 16-bit PCM WAV audio recording
  • Arduino IDE firmware · C/C++
Parameter Value
Microphone amplifier MAX9814 with automatic gain control (datasheet)
Selectable maximum gain 40 / 50 / 60 dB via gain-pin jumper (datasheet)
Amplifier output 2 Vpp on 1.25 V DC bias (datasheet)
AGC attack/release ratio 1:4000 default; 1:2000 or 1:500 programmable (datasheet)
AGC hold time 30 ms (datasheet)
Targeted cardiac band 20–200 Hz (design target)
Analog low-pass roll-off Above approximately 500 Hz (design choice)
ESP32 ADC 12-bit SAR, 3.3 V operation (datasheet value)
Sampling rate 2,000 samples/s (design choice)
Recording format 16-bit PCM mono WAV (design choice)
Data rate Approximately 4 kB per second of audio (design arithmetic)
OLED 0.96 inch, 128×64, SSD1306, I2C
Display refresh Approximately 25 frames/s (design target)
Playback output 8-bit DAC through DC-blocking capacitor to 3.5 mm jack (design)
Battery 3.7 V Li-ion cell, e.g. 1000 mAh (buyer-supplied)
Charger TP4056 USB charger module
Expected runtime Approximately 6–8 h per charge (expected)
Controls Record/stop push button, record LED, power LED

Project features

The Digital Stethoscope Mini Project with Heart Sound Recording (ESP32) is built around four capabilities. First, automatic-gain-control capture: the MAX9814 amplifier holds its maximum gain at 60 dB for faint heart sounds and backs off instantly on loud contact noise, so the student never trims a gain knob mid-demo. Second, a live phonocardiogram trace: the ESP32 samples the cardiac band at 2,000 samples per second and scrolls a real-time waveform across a 0.96-inch OLED, so the S1 and S2 beats are seen as well as heard. Third, one-touch WAV recording: a push button starts and stops 16-bit PCM clips written to a microSD card, ready to drop into the report or replay in a viva. Fourth, headphone playback and portable power: recorded clips play back through a 3.5 mm headphone jack, and a TP4056-charged Li-ion cell gives roughly six to eight hours of demonstration time without a bench supply.

  • [AGC heart-sound capture] MAX9814 electret-microphone amplifier module: AGC holds the selectable 40/50/60 dB maximum gain for faint beats and backs off on loud contact noise; output is 2 Vpp on a 1.25 V bias, matched to the ESP32 ADC input.
  • [Live waveform display] 0.96-inch 128×64 OLED (SSD1306, I2C) scrolls the cardiac-band trace in real time, so S1 and S2 complexes are visible at a glance during a demo.
  • [One-touch WAV recording] Push button starts and stops 16-bit PCM mono clips on the microSD card (FAT32); a red LED marks recording in progress.
  • [Cardiac-band conditioning] A passive RC low-pass in the analog chain rolls off above about 500 Hz, centering the 20–200 Hz heart-sound band and rejecting hiss and switching noise.
  • [Headphone playback] Recorded clips play back through the ESP32 DAC and a DC-blocking capacitor to a 3.5 mm jack for immediate review.
  • [Portable Li-ion power] Single 3.7 V Li-ion cell with a TP4056 USB charger module; power and recording status LEDs keep the demo self-contained.
  • [Jumper-selectable max gain] The MAX9814 gain pin straps to 40, 50 or 60 dB maximum, letting the student trade sensitivity for headroom across chest, wrist or abdominal placements.

What is included

  • Working digital-stethoscope prototype (chest piece, MAX9814 module, ESP32 board, OLED, microSD module, headphone jack, battery + TP4056)
  • Complete Arduino IDE firmware (sampling, waveform display, WAV recording/playback, button and LED handling)
  • Wiring diagram and breadboard assembly documentation
  • Project report PDF (background, circuit theory, firmware design, test procedure, results)
  • PPT presentation for final review
  • Viva Q&A preparation document (AGC dynamics, sampling, ADC, WAV format, power budget)

Limitations & prerequisites

  • Educational demonstrator, not a medical device: no diagnostic claims are made and the build carries no clinical certification; demos are for body-sound visualization only.
  • AGC dynamics (30 ms hold, 1:4000 attack/release) deliberately distort absolute amplitude, so sound-pressure levels cannot be measured with this build.
  • The roll-off above about 500 Hz removes higher-frequency heart-sound components and murmurs; this is not full-fidelity auscultation.
  • The ESP32 12-bit ADC is nonlinear near its supply rails; the 1.25 V output bias keeps the signal mid-range by design, and clipping there is the student's problem to avoid.
  • 8-bit DAC playback is intelligible but lo-fi — fine for review, not for analysis-grade audio.
  • The breadboard build needs a quiet room: mains hum, handling noise and loose contacts all intrude, and low-quality SD cards can cause write glitches (Class 10 recommended).
  • Battery and microSD card are buyer-supplied consumables; the 6–8 h runtime is expected, not measured.

Frequently Asked Questions

How does it actually capture heart sounds?

An acoustic stethoscope chest piece presses against the chest; its diaphragm vibrates with each heartbeat and the short air column carries that vibration to an electret microphone on the MAX9814 module. The MAX9814 applies up to 60 dB of automatic-gain-control amplification, a passive RC stage keeps the 20–200 Hz cardiac band, and the ESP32 digitizes it. Good skin contact and a quiet room matter more than any setting: an air gap or loose tube collapses the signal before the electronics ever see it.

What does the AGC do, and why does it matter here?

The automatic gain control continuously raises gain for faint sounds and backs it off for loud ones, with a 30 ms hold time and a 1:4000 attack-to-release ratio. That means a loud bump when the chest piece seats itself does not clip the amplifier into uselessness, while faint heartbeats still get full 60 dB amplification. The maximum gain is jumper-selectable at 40, 50 or 60 dB, so the student can trade sensitivity for headroom across chest, wrist or abdominal placements without touching firmware.

What gets recorded, and in what format?

Pressing the record button writes 16-bit PCM mono WAV clips to the microSD card (FAT32) at 2,000 samples per second — a 30-second clip is about 120 kB, and any audio player or Python opens it directly. A red LED marks recording, and a second button press closes the file cleanly so no data is lost. Because the format is plain WAV, the student can plot the waveform, run an FFT, or measure beat timing in the report without any conversion step.

Why is the first heartbeat after contact often quiet or distorted?

That is the AGC settling, not a fault: the MAX9814 needs a couple of seconds after the chest piece seats to find the right gain — the 30 ms hold time and 1:4000 release ratio mean it eases into the correct level rather than snapping. The builder's rule from the bench is simple: press the chest piece on, watch the OLED trace for two or three clean beats, then press record. Recording cold also catches the handling thump of seating the chest piece, which the AGC then has to recover from.

Can this be used for real diagnosis?

No — this is an educational demonstrator, not a medical device. The AGC deliberately distorts absolute amplitude so sound-pressure levels cannot be measured, the analog chain rolls off above about 500 Hz so higher-frequency heart-sound components are lost, and the build carries no clinical certification. It is honest about what it is: a way to see, record and replay heart sounds while learning analog front ends, sampling and embedded firmware. It must never be presented as a diagnostic instrument, and the report states this limit plainly.

Is this project suitable for a final-year project?

Yes — for Electronics and E&TC programs. It demonstrates an analog front end (electret biasing, AGC dynamics, RC filtering), mixed-signal interfacing (12-bit ADC sampling at 2 kHz), embedded firmware (WAV file handling, OLED graphics, power management), and honest engineering limits. The AGC settling behavior, the 500 Hz roll-off choice, and the amplitude-measurement limit each make a strong viva talking point, and the working prototype gives the examiner something real to test.

Components & software requirements
  • ESP32 development board
  • MAX9814 AGC microphone amplifier
  • Electret condenser microphone
  • 0.96" OLED display · SSD1306
  • microSD card module · SPI
  • TP4056 Li-ion charger
  • 16-bit PCM WAV audio recording
  • Arduino IDE firmware · C/C++
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides

Instrumentation Amplifiers Explained: Measuring Tiny Signals from Strain Gauges and Load Cells

Strain gauges and load cells output millivolt-level differential signals that a microcontroller ADC cannot read directly. This guide explains how instrumentation amplifiers solve that — the three-op-amp topology, the gain equation, wiring a load cell through an INA125, layout rules, software calibration and the mistakes students make most.

Read guide

50+ Final Year Project Ideas for Electronics (ECE) Students

This guide lists 50+ final year project ideas for ECE (Electronics / E&TC) students, grouped by domain — IoT & embedded systems, robotics & automation, power & energy systems, communication & signal processing, plus mini-project picks — each with a one-line scope note covering the core hardware. Pick your idea based on four realities: a component budget (typical prototypes cost ₹2,000–8,000), what lab equipment you can access, a 6–8 month timeline, and whether your team can handle soldering and basic PCB work.

Read guide

Op-Amp Basics with the LM358: Amplifiers, Comparators and Sensor Conditioning

The LM358 is the cheapest op-amp in every student kit, and it is all you need to learn the two circuits that matter: the inverting and non-inverting amplifier (gain = resistor ratio) and the comparator (sensor threshold into a digital signal). This guide works the gain math with real resistor values, explains single-supply limitations, shows sensor signal-conditioning circuits for LDRs, thermistors and current sensing, and lists the classic wiring mistakes that make an op-amp circuit sit at the rail.

Read guide
Get a quotation