Measure Your Heart Rate with Wi-Fi! (DIY Project) — Transcript

DIY project to measure heart rate remotely using Wi-Fi CSI data and ESP32 boards with a machine learning model.

Key Takeaways

  • Wi-Fi CSI data can be used to measure heart rate remotely without physical contact.
  • ESP32 boards provide an accessible hardware platform for building Pulse-Fi-like systems.
  • Machine learning, specifically LSTM networks, effectively interprets subtle heartbeat signals from noisy Wi-Fi data.
  • The system works in real time and produces reasonably accurate heart rate estimates.
  • This DIY implementation is educational and should not replace medical-grade devices.

Summary

  • Pulse-Fi is a system that measures heart rate remotely without contact using Channel State Information (CSI) from Wi-Fi signals.
  • The project uses inexpensive ESP32 microcontrollers to transmit and receive CSI packets.
  • Heartbeats cause subtle motion that alters Wi-Fi signals, which can be detected and processed.
  • A multi-step data processing pipeline amplifies heartbeat signals and removes noise.
  • A multi-layer LSTM neural network predicts heart rate from processed CSI data.
  • The creator implemented the system using Adafruit Huzzah32 and ESP32 DevKitC boards.
  • The LSTM model was trained using synchronized CSI data and traditional heart rate sensor readings.
  • The system produces real-time heart rate predictions that generally match traditional sensor measurements within a few BPM.
  • The project is intended for educational purposes and is not guaranteed to be medically accurate.
  • A live demo shows the system in operation with simultaneous comparison to a conventional heart rate sensor.

Full Transcript — Download SRT & Markdown

00:00
Speaker A
A really interesting paper was recently published that introduces a system called Pulse-Fi. It describes how to measure a person's heart rate remotely without any contact using Channel State Information, or CSI, from Wi-Fi transmissions.
00:15
Speaker A
A Pulse-Fi setup can be built with common and inexpensive hardware components, like these ESP32 boards, so I wanted to try it out for myself.
00:27
Speaker A
And I suspect a lot of other people would as well, but the paper is behind a paywall, and even if you do get access, it's difficult for most people to understand.
00:36
Speaker A
So I decided to give it a shot and try to come up with something that any technically inclined person could build.
00:42
Speaker A
I want to point out up front that every last detail wasn't perfectly spelled out in the paper, and the source code and data have not been released.
00:55
Speaker A
So I cannot guarantee that this is 100% identical to Pulse-Fi, but it does work, and I think that is the most important thing for most people.
01:02
Speaker A
Also, one disclaimer: this project is intended for educational purposes only.
01:10
Speaker A
It can produce incorrect results, so don't use it for medical purposes.
01:51
Speaker A
First, I'm going to give a brief overview of how Pulse-Fi works, then I'll talk about my implementation, and finally, I'll do a live demo of that system in operation.
02:02
Speaker A
To measure heart rate without contact, a person must be positioned between two ESP32 microcontrollers; one of the devices transmits a steady stream of CSI packets, while the other receives the packets.
02:16
Speaker A
The CSI packets provide detailed information that describes how the signal propagates from the transmitter to the receiver. Anything that interrupts that signal, like the movements of a person, alters the signal in measurable ways.
02:36
Speaker A
This fact has been leveraged for applications like activity recognition in the past. Heartbeats also involve motion, although it is very subtle compared to what is seen in the types of activities like walking that activity recognition systems typically target.
03:16
Speaker A
So to focus in on heartbeats, the researchers came up with a multi-step data processing pipeline that looks like this. It is designed to amplify the signal associated with heartbeats while removing other sources of noise.
03:48
Speaker A
The processed data is then fed into a multi-layer LSTM network that predicts heart rate. For my implementation, I used an Adafruit Huzzah32 and an ESP32 DevKitC version 4, both with an ESP32 WROOM-32E microcontroller.
04:06
Speaker A
These are what I had on hand, but other ESP32 boards should work just fine.
04:11
Speaker A
They are placed several feet apart, and the measurement area is between them. One was flashed with code from Espressif that continually transmits CSI data, while the other was programmed to receive the CSI data.
05:00
Speaker A
I then wrote a script that captures and processes data produced by the receiving unit. It runs my version of the Pulse-Fi data processing steps, then forwards it into an LSTM that matches the architecture specified in the paper.
05:20
Speaker A
The model generates a continuous stream of heart rate predictions in real time.
05:25
Speaker A
Before I could use this script, I had to train the LSTM model. To do that, I generated a set of processed CSI data. Here's a chart showing processed CSI data for one subcarrier that was collected in this way.
05:41
Speaker A
The heartbeat signal is clearly visible, so the machine learning model shouldn't have too much trouble figuring it out. I also used a heart rate sensor to capture real measurements at the same time.
05:55
Speaker A
Both of these sets of data were used to train the LSTM to translate CSI data into heart rate measurements.
05:59
Speaker A
Make sense?
06:00
Speaker A
All right, let's take a look at my system in action.
06:45
Speaker A
Here is the receiving ESP32 unit.
06:50
Speaker A
And over here, we have the transmitting unit and also the heart rate sensor hooked up to an Arduino.
07:04
Speaker A
Now I'm going to have a seat between the transmitter and the receiver.
07:13
Speaker A
To validate the system, I'm also going to put my finger on a traditional heart rate sensor.
07:19
Speaker A
On the left, we have measurements from the heart rate sensor. On the right, we have predictions from the machine learning model. As you can see, they're not identical, but they are generally within a few beats per minute.
Topics:Pulse-Fiheart rate measurementWi-Fi CSIESP32machine learningLSTMDIY projectremote health monitoringwireless sensingnon-contact heart rate

Frequently Asked Questions

What hardware is needed to build the Pulse-Fi heart rate measurement system?

The system requires two ESP32 microcontroller boards, such as the Adafruit Huzzah32 and ESP32 DevKitC, placed several feet apart to transmit and receive Wi-Fi CSI packets.

How does the system detect heart rate without physical contact?

The system measures changes in Wi-Fi signal propagation caused by subtle body movements from heartbeats, using Channel State Information (CSI) data processed through a machine learning model.

Is the Pulse-Fi DIY project suitable for medical use?

No, the project is intended for educational purposes only and can produce incorrect results, so it should not be used for any medical diagnosis or treatment.

Get More with the Söz AI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries, speaker detection, and unlimited transcriptions.

Or transcribe another YouTube video here →