🌐 এই লেখাটি বাংলায় পড়ুন: বাংলা সংস্করণ →

mmWave radar heart rate monitor with 60 GHz MR60BHA2 and ESP32-C6: contactless breathing and heart-rate project

Quick answer: A mmWave radar heart rate monitor sends 60 GHz radio chirps at a sleeping person and measures tiny changes in the phase of the reflected signal as the chest moves. Band-pass filtering separates slow breathing motion (about 0.1–0.5 Hz) from the much smaller heartbeat motion (about 0.8–2 Hz), giving breaths and beats per minute with no camera and nothing worn on the body. Here a Seeed MR60BHA2 kit with XIAO ESP32-C6 does the sensing; we add an OLED, alarms, night logging and a phone dashboard.

Advertisements

Important: This is an educational prototype, not a medical device. Do not use it to diagnose, treat or replace hospital monitoring, and never rely on it to keep a patient safe.

Why a contactless breathing monitor is a smart project in 2026

A few years ago, radar vital-sign sensing needed an expensive evaluation board and MATLAB. Now Seeed sells the MR60BHA2 kit with a XIAO ESP32-C6 already mounted, for about USD 24 on the Seeed store (Nov 2026). Research groups are still actively comparing 24, 60 and 120 GHz radars for non-contact monitoring, for example in this 2023 study of mmWave vital-sign monitoring.

The Bangladesh angle: elderly parents, privacy and hospital cost

How does mmWave radar detect breathing and heartbeat?

According to the MR60BHA2 module datasheet, the MR60BHA2 is an FMCW (frequency-modulated continuous-wave) radar. It repeatedly sends a “chirp” whose frequency sweeps linearly around 60 GHz. Mixing the delayed echo with the transmitted chirp gives a low “beat” frequency proportional to distance. Then:

  1. Range bins. An FFT of each chirp’s beat signal splits the room into distance slots called range bins. The range resolution is c/(2B), where B is the sweep bandwidth. A 4 GHz sweep, for example, gives about 3.75 cm per bin.
  2. Phase, not just distance. A chest moving by a few millimetres is too small to jump range bins, but it changes the phase of the echo: Δφ = 4π·Δd/λ. At 60 GHz the wavelength λ is only about 5 mm, so a 1 mm chest movement shifts the phase by roughly 2.5 rad. That is why 60 GHz is so sensitive.
  3. Unwrap and track. The phase in the chest’s range bin is tracked chirp after chirp and unwrapped (it wraps every 2π) into a displacement waveform.
  4. Band-pass filtering. Breathing is a large, slow movement, typically 0.1–0.5 Hz (6–30 breaths/min). The heartbeat adds a tiny, faster ripple, typically 0.8–2 Hz (48–120 beats/min). Two band-pass filters separate them.
  5. Rate estimation. An FFT peak or peak counting on each filtered signal gives breaths per minute (BR) and beats per minute (HR).

The heartbeat movement is much smaller than breathing, breathing harmonics can fall inside the heart band, and any body movement swamps both. This is why Seeed’s own wiki says the breathing and heart-rate functions are intended for sleep scenarios only, and warns of large errors when you are seated at a desk or exercising. In the MR60BHA2 this processing runs on the radar module, which sends breath rate, heart rate, distance, presence and breath/heart phase values over UART. Your ESP32 firmware adds the system logic.

MR60BHA2 kit specifications that matter

ItemValue (Seeed wiki / module datasheet)
RadarFMCW, 58–62 GHz, 2T2R antenna, about ±60° beam (−3 dB)
Breathing / heartbeat range0.4–1.5 m to the chest, one still person
Static presence rangeUp to 6 m
ControllerXIAO ESP32-C6 (Wi-Fi 6, BLE 5, Thread/Zigbee)
On-board extrasBH1750 light sensor, WS2812 RGB LED, Grove GPIO port (D0, D10)
Power5 V / 1 A input
Recommended mountingAbout 1 m above the bed head, tilted 45° down to mid-bed

Block diagram of the contactless breathing monitor ESP32 system

mmWave radar heart rate monitor block diagram: MR60BHA2 radar, XIAO ESP32-C6, OLED, buzzer, SD log, MQTT and Home Assistant

The radar does the signal processing. The XIAO ESP32-C6 validates readings, runs the alarms, drives the OLED, buzzer and LED, logs CSV and publishes over Wi-Fi to MQTT or Home Assistant, which feeds the dashboard and Telegram alerts. A MAX30102 is connected only during testing, as the reference.

mmWave radar heart rate monitor circuit diagram

mmWave radar heart rate monitor circuit diagram: MR60BHA2 kit, XIAO ESP32-C6 pins, SSD1306 OLED, buzzer driver, LED, microSD and MAX30102

Pin sources. XIAO pin names come from the Seeed XIAO ESP32-C6 wiki. The kit’s internal wiring comes from Seeed’s MR60BHA2 ESPHome configuration: radar UART on RX GPIO17 / TX GPIO16 at 115200 baud, BH1750 on I2C GPIO22/GPIO23 (address 0x23), and WS2812 LED on GPIO1. The MR60BHA2 wiki itself has no radar-UART pin table, so treat D6/D7 as reserved.

Header access. Seeed documents only the Grove port (D0, D10) and 2.54 mm header spacing. CNX Software’s launch article describes two 7-pin 2.54 mm female headers carrying UART, I2C, SPI, GPIO, 5 V, 3.3 V and GND. The positions are not mapped in the wiki, so check each header pin against the XIAO pad with a multimeter first.

Pin-by-pin wiring table

Peripheral pinXIAO ESP32-C6 pinGPIONotes
Radar UART TX → XIAO RXD7 / RXGPIO17Internal, 115200 8N1
Radar UART RX ← XIAO TXD6 / TXGPIO16Internal
BH1750 SDA / SCL (on kit)D4 / D5GPIO22 / GPIO23Internal, I2C address 0x23
WS2812 DIN (on kit)D1GPIO1Internal
OLED SSD1306 VCC / GND3V3 / GND–100 nF across VCC-GND
OLED SDAD4 / SDAGPIO22Shared bus, address 0x3C
OLED SCLD5 / SCLGPIO23Shared bus
MAX30102 SDA / SCL (test only)D4 / D5GPIO22 / GPIO23Address 0x57, VIN from 3V3
Buzzer driver (R1 1 kΩ → BC547 base)D2GPIO25 V active buzzer, 1N4148 flyback
Red alert LED (via 330 Ω)D0GPIO0About 4 mA (Grove pin)
microSD CSD3GPIO2110 kΩ pull-up to 3V3
microSD SCKD8 / SCKGPIO19SPI
microSD MISOD9 / MISOGPIO20SPI
microSD MOSID10 / MOSIGPIO18SPI (Grove pin)
Buzzer +5 V5V–Through a 200 mA PTC fuse

Also leave GPIO15 (user LED) and GPIO3/GPIO14 (antenna RF switch) alone. Power OLED and SD modules from 3V3: their pull-ups follow VCC, so 5 V would reach an ESP32-C6 pin.

Bill of materials (approx. BDT cost)

PartQtyApprox. cost (BDT)
Seeed MR60BHA2 kit with XIAO ESP32-C6 (imported)14,500–6,000
0.96″ SSD1306 I2C OLED, 128×641250–350
MAX30102 pulse-oximeter module (reference)1250–400
microSD SPI module + 8–16 GB card1450–650
5 V active buzzer, BC547/2N2222, 1N4148, red LED1 set60–100
Resistors (330 Ω, 1 kΩ, 10 kΩ x2, 4.7 kΩ x2), 100 nF, 10 µF, PTC 200 mA1 set60–100
5 V 2 A USB adapter + USB-C cable1450–700
Perfboard, headers, wires, enclosure/bracket1 set450–1,050
Optional: Seeed MR60FDA2 fall-detection kit14,500–6,000
Total (without MR60FDA2)about 6,500–9,400

Prices are approx., Nov 2026, local market (Patuatuli, Elephant Road and online shops). The radar kit is usually imported, so its price depends on shipping and duty. Avoid fakes: see how to spot fake electronic components.

Step-by-step build guide

Step 1: Test the kit out of the box

The kit ships with ESPHome firmware. Power it from USB-C, join its Wi-Fi hotspot, and add it to Home Assistant following the Seeed Home Assistant guide. Lie still within 1.5 m and confirm that breath rate, heart rate and distance appear. This proves the radar works before you change anything. Seeed warns that a failed radar firmware update can brick the module, so update only if you need a fix.

Step 2: Choose your firmware path

  • ESPHome path (fastest dashboard): extend Seeed’s YAML with an ssd1306_i2c display, a GPIO output for the buzzer and template logic for alarms. Home Assistant stores the history.
  • Arduino path (best for a thesis): use the Seeed Arduino mmWave library (class SEEED_MR60BHA2) and write your own alarm, logging and MQTT code. You get full control and can explain every line in the viva. Flashing Arduino code replaces the ESPHome firmware, but you can reflash ESPHome later.

Step 3: Wire the external board

Build a small perfboard “hat” that plugs onto the kit headers, following the wiring table. Put the OLED and LED on the enclosure front. Never put metal in front of the radar face.

Step 4: Mount it correctly above the bed

Follow Seeed’s recommendation: about 1 m above the bed head, tilted 45° down towards mid-bed, chest within 1.5 m. Avoid ceiling fans directly in the beam. Fan blades and swinging curtains cause most fake readings.

Step 5: Firmware structure

  • Radar task: calls mmWave.update() and stores time-stamped BR, HR, distance, presence and phases.
  • Validation: rejects out-of-range values, applies a 5-sample moving median, and ignores data while the person is moving.
  • Alarm state machine: NORMAL → WARNING → ALARM, with a no-breathing timer, high/low rate limits held for at least 30–60 s, and acknowledgement from the app.
  • Outputs: OLED, buzzer/LED/WS2812, a CSV line to SD every 10 s, MQTT.
  • Time: the XIAO has no battery-backed RTC, so sync time by SNTP over Wi-Fi.

Step 6: Calibrate thresholds on healthy volunteers

Breath-phase amplitude depends on distance, angle and blanket, so tune the “no breathing” threshold. Record a few nights (with consent), note the breath-phase RMS during normal breathing and set the threshold well below it. Test with a brief breath-hold only by a healthy, willing volunteer, never a patient.

ESP32 code for the MR60BHA2 (key snippets)

Snippet 1: read the radar with the Seeed library (API from the library’s mmWaveBreath example):

#include <Arduino.h>
#include "Seeed_Arduino_mmWave.h"
HardwareSerial mmWaveSerial(0);   // UART0: GPIO17 RX / GPIO16 TX on the kit
SEEED_MR60BHA2 mmWave;
float br = 0, hr = 0, dist = 0, tot, brPh, hrPh;

void setup() {
  Serial.begin(115200);
  mmWave.begin(&mmWaveSerial);    // 115200 baud by default
}

void loop() {
  if (mmWave.update(100)) {
    bool present = mmWave.isHumanDetected();
    if (mmWave.getHeartBreathPhases(tot, brPh, hrPh)) checkBreath(brPh, present);
    if (mmWave.getBreathRate(br))  Serial.printf("BR %.1f\n", br);
    if (mmWave.getHeartRate(hr))   Serial.printf("HR %.1f\n", hr);
    if (mmWave.getDistance(dist))  Serial.printf("D %.2f m\n", dist);
  }
}

Snippet 2: apnea-style “no breathing for N seconds” check (example thresholds, not clinical; set D0/D2 as outputs):

const uint32_t NO_BREATH_MS = 20000;  // N = 20 s, tune for your study
const float    MIN_RMS      = 0.05f;  // set from your own recordings
float acc = 0; uint16_t n = 0; uint32_t lastBreath = millis();

void checkBreath(float ph, bool present) {
  acc += ph * ph;
  if (++n < 20) return;                         // evaluate every 20 frames
  float rms = sqrtf(acc / n); acc = 0; n = 0;
  if (!present || rms > MIN_RMS) lastBreath = millis();
  bool alarm = millis() - lastBreath > NO_BREATH_MS;
  digitalWrite(D2, alarm);                      // buzzer via Q1
  digitalWrite(D0, alarm);                      // red LED
}

Snippet 3: accuracy against the reference (Python, on the SD-card CSV logs):

import pandas as pd
r = pd.read_csv("radar.csv", parse_dates=["t"]).set_index("t")
m = pd.read_csv("max30102.csv", parse_dates=["t"]).set_index("t")
d = r["hr"].resample("10s").median().to_frame().join(
    m["hr"].resample("10s").median().rename("ref")).dropna()
e = d["hr"] - d["ref"]
print(f"MAE {e.abs().mean():.1f} bpm, bias {e.mean():.1f}, LoA ±{1.96*e.std():.1f}")

Want the complete firmware? The full production version includes the validated radar task, the NORMAL/WARNING/ALARM state machine with abnormal-rate limits and app acknowledgement, the threshold calibration routine, the OLED UI, SD-card CSV logging with SNTP time, MQTT and Home Assistant integration, Telegram alerts, the nightly sleep-summary generator, OTA updates, and the Python accuracy-analysis notebook (MAE and Bland-Altman). Message us on WhatsApp to get the full source code, circuit files and help building it.

Night logging and the sleep summary dashboard

Log one line every 10 s (time, presence, distance, BR, HR, breath-phase RMS, alarm state): about 3,000 lines per 8-hour night. The BH1750 lux value marks “lights off”. Each morning the firmware or Home Assistant builds a summary:

  • Time in bed and number of times the person left the bed (presence lost)
  • Average, minimum and maximum breath rate and heart rate
  • Number of “no-breathing” and “abnormal rate” events, with times
  • Percentage of the night with valid data

Send it by Telegram to the family or show it on a Home Assistant card. The ESP32-C6 also supports Matter and Thread: see our ESP32-C6 Matter tutorial.

How accurate is a mmWave heart rate sensor? Testing and results to expect

Do not claim accuracy, measure it. Use a MAX30102 finger sensor (heart-rate reference) and a manual breath count (count chest rises for 60 s with a stopwatch). Test lying still at 0.5, 1.0 and 1.5 m, at different angles and with and without blankets. Report MAE, bias and Bland-Altman limits of agreement.

In our experience with similar sensor projects, and in published radar studies, breathing rate is considerably more reliable than heart rate, which degrades quickly with movement, distance and posture (side or face-down). The datasheet lists about 1 minute to establish a reading, so discard the first minute or two. The MAX30102 is itself motion-sensitive, so keep the reference hand still.

Ethics and consent for testing on people

  • Test only on healthy adult volunteers with written consent; no patients or children.
  • Store data without names and delete it after the project.
  • If you plan to publish, ask your department or university ethics committee for approval first.
  • Never make or suggest a health decision based on the device’s output.

Common mistakes and troubleshooting

SymptomLikely causeFix
No data from radarSomething wired to D6/D7, or wrong UARTFree D6/D7; use HardwareSerial(0) at 115200
HR/BR jump around wildlyPerson moving, sitting up, or beyond 1.5 mMount per Seeed guide; gate readings on stable distance
Readings with nobody in bedFan, curtain or pet in beamRe-aim; ignore data without presence
OLED blank or I2C errorsWrong address, 5 V pull-ups, double pull-upsScan the bus (expect 0x23, 0x3C, 0x57); power modules from 3V3
SD card fails to mountCard not FAT32, CS floating, weak 3V3Format FAT32, keep 10 kΩ CS pull-up, add 10 µF at the module
False apnea alarmsThreshold too high, blanket, side-lyingRecalibrate MIN_RMS from real nights; lengthen N

Safety and medical disclaimer

This contactless breathing monitor is an educational, non-medical prototype. It can miss real events and raise false alarms. It must not replace a pulse oximeter, hospital monitor or caregiver, or be sold as a medical device without clinical trials and approval. Electrically it is low-risk: use a good-quality 5 V USB adapter, keep the PTC fuse, and never build a mains supply into the bedroom enclosure.

Future upgrades and real-world uses

  • Fall detection: add Seeed’s MR60FDA2 kit (ceiling-mounted at 2.2–3.0 m per Seeed) so one alert system covers night breathing and daytime falls.
  • Custom PCB: turn the perfboard hat into a neat carrier board. See KiCad 10 to JLCPCB.
  • Edge AI: classify nights (restless vs calm) or detect irregular breathing patterns on-device. Ideas in our Edge AI and TinyML project list.
  • Research paper: radar vs PPG error versus distance, angle and blanket type in real Bangladeshi rooms.
  • M.Sc. extension: move to a raw-data radar evaluation board and implement your own range-FFT, phase unwrapping and adaptive filtering. More topics in 12 MSc thesis topics.
  • Startup angle: a privacy-first “night check” for elderly parents of migrant workers and for old-age homes (medical claims need clinical validation first).

Frequently asked questions

Can mmWave radar detect heart rate?

Yes, under good conditions. A 60 GHz radar picks up the sub-millimetre chest movement of the heartbeat through phase measurement. It works best with one person lying still within about 1.5 m, and movement easily disturbs it.

How accurate is the MR60BHA2 heart rate and breathing sensor?

The MR60BHA2 module datasheet quotes 90% measurement accuracy for breathing and heartbeat under the maker’s own test conditions. That is not a clinical figure, and Seeed recommends the functions for sleep only. Measure accuracy yourself against a MAX30102 or a clinical pulse oximeter and report MAE and Bland-Altman limits.

Can mmWave radar detect breathing through a blanket?

Usually yes. Light cotton blankets pass 60 GHz reasonably well, but thick or wet bedding weakens the signal and metal blocks it. Include blanket type as a test variable.

Is 60 GHz mmWave radar safe for humans?

These are low-power, short-range radios like those in commercial presence sensors, and 60 GHz radiation is non-ionising.

Can this project detect sleep apnea?

No. It can flag periods where breathing motion looks absent, but sleep apnea is diagnosed by a doctor with a sleep study (polysomnography). Call your alarm an “apnea-style event”, not a diagnosis.

Can I use this contactless breathing monitor with ESP32 and Home Assistant?

Yes. The kit ships with ESPHome firmware, and ESPHome has an official seeed_mr60bha2 component exposing breath rate, heart rate, distance, target count and presence to Home Assistant.

Conclusion

A mmWave radar heart rate monitor built on the MR60BHA2 and XIAO ESP32-C6 is affordable, privacy-friendly and full of real engineering. It combines RF sensing, signal processing, embedded alarms, IoT dashboards and honest accuracy testing. Keep it labelled as an educational prototype, test ethically, and you have a final-year project that stands out in any viva. More ideas: final-year EEE project ideas and the Biomedical IoT trainer kit.

Want this radar vital-sign monitor as your final-year project, with a working kit, full code and viva support? We design custom PCBs, firmware and complete working prototypes for students and companies. Message us on WhatsApp or use the contact form. You can write in Bangla or English.


MKDas

Mithun K. Das. B.Sc. in Electrical and Electronic Engineering (EEE) from KUET. Senior Embedded Systems Designer at a leading international company. Welcome to my personal blog! I share articles on various electronics topics, breaking them down into simple and easy-to-understand explanations, especially for beginners. My goal is to make learning electronics accessible and enjoyable for everyone. If you have any questions or need further assistance, feel free to reach out through the Contact Us page. Thank you for visiting, and happy learning!