Overview
A commissioned biomedical prototype: a battery-powered, hand-held device that listens for the fetal heartbeat, works out the heart rate, shows it on the device and sends it to a phone. NexivoLabs built the whole thing: the acoustic sensor front-end, a hand-wired electronics board, the ESP32-S3 firmware and a companion app that receives readings over Bluetooth.
We don't name clients for commissioned work, and we only share the details each engagement allows.
Problem
The fetal heartbeat is a faint sound buried under much louder ones: the mother's own heartbeat, breathing, bowel sounds, movement of the probe against the skin and room noise. The device had to pick out a stable heart rate from that mix, show it clearly to the person holding the probe, and send it to a phone for viewing and record-keeping. It also had to stay small and simple enough to use by hand.
Requirements
- Pick up heart sounds through a shielded acoustic probe placed on the abdomen
- Amplify the signal with automatic gain, so readings hold up across different users and probe positions
- Detect individual beats and calculate the heart rate continuously
- Show the rate on the device and flag readings outside the expected range
- Stream live readings to a phone app over Bluetooth
- Run on battery, so it can be used anywhere without a cable to the wall
- Keep the controls simple: a power switch, a knob for the detection threshold and two buttons for the menu
System architecture
Hardware
The prototype is hand-wired on perfboard, with solder-bridge traces instead of a printed circuit board. That kept the circuit easy to change while the front-end was still being tuned. Every cable entry is glued for strain relief, since the probe and its cable get handled constantly.
| Function | Part | Interface |
|---|---|---|
| Controller | ESP32-S3 | ADC, I²C, GPIO, Bluetooth LE |
| Acoustic front-end | MAX9814 electret microphone amplifier with automatic gain control, mounted in the probe head | Analogue to ESP32-S3 ADC |
| Probe connection | Shielded multi-core cable (power, ground, signal) | Braid tied to ground at the board end only |
| Display | 0.96" SSD1306 OLED | I²C |
| Detection threshold | Panel potentiometer with aluminium knob | ESP32-S3 ADC |
| Menu navigation | Two 16 mm stainless-steel panel push buttons: up/down and select | GPIO |
| Status indication | On-board LED with series resistors | GPIO |
| Power | Rechargeable single-cell Li-ion battery, USB charging, 3.3 V regulator, slide switch | Supply rail |
The MAX9814 was chosen because its automatic gain control (AGC) keeps the output level steady as the signal gets stronger or weaker. That matters here: how loud a heart sound is depends heavily on where the probe sits and on the person, but the heart rate comes from the timing between beats, not their loudness. AGC trades away amplitude information that the device doesn't need for a signal level the ADC can always use.
The knob sets the beat-detection threshold directly. That gives the person using the device a quick way to adapt to a noisy room or a weak signal without opening a menu. Everything else is set through a menu on the OLED, using the two panel buttons: one moves up and down, the other selects.
Probe head
The probe works like an electronic stethoscope. An electret microphone sits behind a small bell-shaped chest piece that is pressed against the abdomen. The bell couples sound from the skin into the microphone and blocks some of the room noise.
The MAX9814 amplifier is mounted inside the probe head, right behind the microphone, rather than on the main board. A heart sound picked up by an electret microphone is only a few millivolts. If that tiny signal travelled down a metre of cable before amplification, the cable would pick up interference almost as large as the signal. Amplifying at the probe means the cable carries a strong signal that interference barely affects. The cable's shield braid is grounded at the board end only, so it can't form a ground loop.
Power
The device runs from a rechargeable single-cell lithium-ion battery, charged over USB. A low-dropout regulator supplies a steady 3.3 V to the ESP32-S3 and the analogue front-end. A steady supply matters here because ripple on the supply rail ends up in the microphone signal. The firmware keeps power use low by turning down the OLED brightness when nobody is pressing buttons. It also advertises over Bluetooth LE at a slow rate until the app connects, and only streams once a connection is open.
Firmware
The firmware runs a continuous signal pipeline on the ESP32-S3:
- Sample the amplified probe signal on the ADC at a fixed rate
- Filter it to the heart-sound band, cutting low-frequency movement artefacts and higher-frequency noise
- Envelope the filtered signal, so each heartbeat becomes one clear pulse
- Detect beats against the threshold set by the knob, with a refractory period so one beat is never counted twice
- Calculate the rate from the intervals between beats over a moving window, rejecting intervals that are physiologically impossible
- Flag readings that fall outside the configured normal range
The current rate and signal status appear on the OLED, and the same readings go out over Bluetooth LE.
The device has a fixed rule for when it shows a number. Before it displays a heart rate, it needs several consecutive beats with consistent intervals. If the beat intervals become erratic, for example because the probe moved or the mother's heartbeat took over, the display shows "searching" instead of a stale or made-up number. A monitor that sometimes says "no reading" is far more trustworthy than one that always shows something.
Companion app
An Android companion app connects to the device over Bluetooth LE. The ESP32-S3 only supports Bluetooth LE, not Classic Bluetooth, so the link uses a custom GATT service. The device sends a reading roughly once a second as a notification, and each reading carries:
- the current heart rate in beats per minute
- a signal-quality flag (good, weak or searching)
- an out-of-range flag
- the battery level
The app shows the rate in large type, with colour that changes when a reading is out of range. It plots a trend line over the session and saves each session with a timestamp, so it can be reviewed or shared later. It reconnects automatically if the link drops during a session. The device keeps working without the phone: the app adds a record and a bigger screen, but the OLED alone is enough to take a reading.
Testing & validation
Testing moved from known signals to real ones:
- Known-rate bench signals. Recorded heart sounds were played through a small speaker coupled to the probe head at set rates across the normal fetal range and beyond it. This checked that the displayed rate matched the known rate and that out-of-range readings were flagged.
- Noise and interference. The same recordings were replayed with room noise, cable movement and simulated probe slips. This set the default threshold, refractory period and interval-rejection limits, and checked that the device showed "searching" instead of a wrong number.
- Threshold knob. Weak and strong signals were tested across the full range of the knob, to confirm there's a usable setting for each and that the default position works for most cases.
- End to end. The rate and flags in the app were compared against the OLED over long sessions, including disconnects and reconnects, and the battery was run down to check that the device warns before it shuts off.
Results & lessons
- Delivered as a working end-to-end system: acoustic front-end, hand-wired battery-powered electronics, ESP32-S3 firmware and a Bluetooth companion app.
- In a biomedical signal chain, most of the effort goes into getting a clean signal. Shielding the probe cable, using automatic gain and filtering carefully do more for accuracy than any clever beat-detection algorithm.
- Putting the amplifier in the probe head, rather than on the main board, was the single biggest improvement to signal quality.
- Showing "searching" instead of guessing makes the device more trustworthy, not less.
- Building on perfboard first made it fast to try out front-end changes before committing to a custom PCB.



