Heart rate monitoring


Advancement in technology made it possible to automate the monitoring of fitness activities and to integrate into easily worn devices [1]. Earlier these devices were used for athletes and patients only, while now these are available as consumer products and got a huge response in the market.



We are passionate to work on new technology and know the amount of dedication required to prove the best for our customers. Taking this into consideration, we accepted the challenge to design a smart band for our overseas client who are in wearable industry.

It’s the trigger point for us and we started working on it, we have decided the timeline and working with our best capabilities to complete the hardware and firmware design of the fitness band, A new integration came into consideration from the client side with the idea of having a heart rate monitor (HRM) in the band. As they want to showcase this product in a well-known international Expo.



The main challenge was to complete the task in a very short period of time. Very soon the hardware team finalized the heart rate sensor and software team integrated code libraries to make it work. But during the testing of the band, accuracy and resolution were observed unsatisfactory. Therefore, to find out a solution we took a quick decision to develop an algorithm with better results and that also within the given time period.



The principle of the algorithm is to calculate the rate at which blood is being pumped because the heart rate is directly proportional to this rate. Every time a heart beats, blood is being pumped. Now if the finger is kept on the sensor, then only it should run the algorithm and calculate the heart rate as it should be in an idle state.




In the algorithm, the threshold is set in such a way that if any finger is kept on the sensor, IR samples are sent as input to the algorithm and if the finger is not kept on the sensor then those IR samples are ignored and not considered as valid input data.


Figure 1: IR sensor samples given as input



Figure 1 shows the raw data of IR sensor and it is seen that IR samples are noisy. In this waveform, each peak represents the sample when blood is pumped, so heart rate is calculated by detecting the number of peaks in the waveform. To detect a peak correctly is very difficult in noisy signal & therefore noise needs to be removed to measure the heart rate accurately. A digital filter is designed to filter out the noise and for this, these mentioned parameters plays a key role. De-rated value of max heart rate of a human is 240 bpm (beats per minute) [2], so filter cut off frequency should be such that it filters only noise and heart rate data does not get affected. Also to detect the peak correctly, it is important that data curve is smooth enough that it has only one peak per cycle. Keeping all parameters in mind, we designed 32 taps low pass FIR filter.


After passing IR samples through the filter, noise with higher frequency is filtered out and data curve gets smoothen as shown in figure 2. Now the number of peaks is identified and its algorithm should be accurate enough to identify the correct number of peaks to calculate the bpm. Peaks identified by the algorithm are also marked in figure 2 which shows that all peaks are identified correctly. As the number of IR samples increases, accuracy and resolution of bpm calculation also get better. The Algorithm is designed such that it remembers previous data and therefore we are able to achieve resolution of ±1 bpm after the settling time.


Figure 2: Filtered IR sensor samples & detected peaks




Before implementing algorithm in fitness band, all the results were verified by simulation and then it was implemented using embedded C.



In spite of facing many challenges, implementation and testing of the product was completed well and done before time. We give full credit to our technical team and got a huge response at product exhibition with number of new opportunities in the wearable technology.




(1) https://en.wikipedia.org/wiki/Activity_tracker
(2) https://en.wikipedia.org/wiki/Heart_rate



About The Author