PPG Signal Heart Rate Calculator
Frequency at which the sensor captures data points per second.
The number of data points (samples) between two consecutive systolic peaks.
Heart Rate Result
Understanding PPG Heart Rate Calculation
Photoplethysmography (PPG) is an optical technique used to detect blood volume changes in the microvascular bed of tissue. To calculate the heart rate from a raw PPG signal, you must identify the rhythmic peaks caused by the cardiac cycle.
The Mathematical Formula
The core of heart rate estimation from digital signals relies on the relationship between the sampling frequency and the distance between detected peaks. The formula is:
BPM = (60 × Sampling Rate in Hz) / Number of Samples between Peaks
Step-by-Step Calculation Guide
- Identify the Sampling Rate ($f_s$): This is defined by your hardware (e.g., an Arduino or MAX30102 sensor). A common $f_s$ is 100Hz.
- Detect the Peaks: Process the PPG waveform and identify the "Systolic Peaks" (the highest points of the wave).
- Count Samples ($N$): Count how many data points exist between Peak A and Peak B.
- Convert to Time: Divide the samples ($N$) by the frequency ($f_s$) to get the Inter-beat Interval (IBI) in seconds.
- Final Calculation: Divide 60 by the IBI to get your Beats Per Minute.
Realistic Example
If your sensor is recording at 50Hz and you measure 40 samples between two pulses:
- Interval = 40 / 50 = 0.8 seconds.
- BPM = 60 / 0.8 = 75 BPM.
Pro Tip: In real-world applications, PPG signals are often "noisy" due to motion artifacts. Engineers typically apply a Bandpass Filter (0.5Hz to 4Hz) and a Moving Average Filter before attempting to count peaks to ensure accuracy.