DT0073
Design tip
Optical heart rate monitoring – OHRM
based on X-NUCLEO-IKA01A1 expansion board
By Jiří HLADÍK

Main components
TSU104

Nanopower, rail-to-rail input and output, 5 V CMOS
operational amplifiers

BlueNRG-MS

Upgradable Bluetooth® Low Energy network processor

STM32L053R8

Ultra-low-power ARM Cortex-M0+ MCU with 64 Kbytes Flash,
32 MHz CPU, USB, LCD

Purpose and benefits
The X-NUCLEO-IKA01A1 is a multifunctional board based on ST operational amplifiers
and it embeds several configurations. In this design tip we will use two of them to build an
optical heart rate monitor (OHRM).
We will also show how to connect BLE expansion board X-NUCLEO-IDB05A01 to the heart
rate monitor and how to send data to your smartphone. This design tip will make it easier tobuild a prototype of your own wearable optical heart rate monitor.

Description
Introduction to OHRM

Optical heart rate monitoring is a simple method to determine one’s heart rate without using
electrodes. It uses the optical characteristics of hemoglobin, which attenuates light basedon the concentration of oxygen in the blood. Each time the heart beats, it brings fresh blood
with oxygen to the muscles. The muscles use the oxygen and decrease its concentration.
Therefore we are able to determine the heart rate from the time dependency of oxygen
concentration in the blood.
This simple principle can give us heart rate, but cannot measure the level of oxygen
directly. To measure the oxygen concentration we need to add a second light source with adifferent wavelength. Thanks to this method, it is possible to determine peripheral oxygen
saturation. This principle is called pulse oximetry and is commonly used in medical heart
rate monitoring.

October 2016

DT0073 Rev 1

1/10
www.st.com

The LEDs are used to emit light through the skin. Hemoglobin has the highest attenuation
for red light, so it is good to use it but green or infrared light can be used as well. The
sensing element is usually a photodiode.
Building the system

To build a complete optical heart rate monitor we need to know how to do signal
conditioning and which boards can be used. The overall block diagram of the system isshown in Figure 1.
Figure 1. Block diagram of the optical heart rate monitor

October 2016

DT0073 Rev 1

2/10
www.st.com

Hardware modifications

In order to build the optical heart rate monitor using the X-NUCLEO-IKA01A1 expansion
board stacked on the NUCLEO-L053R8 board, some modifications are required.
X-NUCLEO-IKA01A1 modifications
The X-NUCLEO-IKA01A1 expansion board doesn’t contain an infrared (IR) LED foremitting light, therefore it must be added. The recommended specifications of the LED are:
-3 mm or 5 mm through-hole type
Wavelength 𝜆 from 850 nm to 1000 nm
High forward currentSolder the IR LED to pins LED_A and LED_K on the X-NUCLEO-IKA01A1 expansion
board. Be aware of the polarity of the diode.
Figure 2. Pins to solder IR LED on X-NUCLEO-IKA01A1

X-NUCLEO-IDB05A1 modifications
If you want to use a BLE extension module to transfer heart rate data, you need to makesome modifications to this board as well.
-Remove resistors R1, R2 and R4
Put 0R resistors on R6, R7 and R8

Note that libraries for use with the X-NUCLEO-IDB05A1 cannot deal with this modification
automatically and the settings of the pins and its alternate function must also be changed.
When using the X-CUBE-BLE1, the SPI pin settings can be found in:
stm32l0xx_nucleo_bluenrg.h header file.

October 2016

DT0073 Rev 1

3/10
www.st.com

Signal conditioning

Driving the LED
The PWM current driver available on X-NUCLEO-IKA01A1 can be used to drive the LED. It
is not necessary to drive the LED by exact current in this application, and a simple
transistor driven from the MCU can be used.
Figure 3. Light of IR LED soldered to X-NUCLEO-IKA01A1 seen through digital camera

Analog amplifier
The photodiode generates very small current which needs to be amplified. This current is in
the range of tens of micro amps but the useful signal generated by heartbeats is only in therange of hundreds of nano amps. To amplify such a small currents we need to use atransimpedance amplifier (TIA) with the right operational amplifier. You can see thestructure of this amplifier below.
Figure 4. Transimpedance amplifier structure

October 2016

DT0073 Rev 1

4/10
www.st.com

The amplification of small currents brings some constraints to the op-amp used. The input
bias current of the op-amp input should be much lower than the smallest signal we areinterested in. In this case it means that input bias current should be lower than hundreds ofpico amps.
The heartbeats are relatively slow. Considering the maximal human heartbeat being
180 bpm, the maximal frequency of interest is 3 Hz and therefore there are no constraints
on the bandwidth of the op-amp.
Last and possibly the most important is power consumption. Wearable devices are always
powered by batteries so we need to select an op-amp with the lowest possible power
consumption.
Taking into account all these constraints we find that the best op-amp is TSU104:-Submicro ampere current consumption: 580 nA typ per channel at
25 °C at VCC = 1.8 V
Low supply voltage: 1.5 V - 5.5 V
Gain bandwidth product: 8 kHz typ
Low input bias current: 5 pA max at 25 °C

Digital signal processing
Output from the trans-impedance amplifier can be directly used to drive the ADC.
Unfortunately, the sampled data is full of noise coming from movement and ambient light,and it contains a huge DC part which we are not interested in.
Figure 5. Block diagram of digital signal processing

To get rid of ambient light we can use the light modulation technique. Measurement is done
twice, first with the LED turned on, and a second time with it turned off. Subtracting thesevalues will give us only the contribution of the LED. Note that the time delay between thesamples must be as short as possible.
Another source of unwanted signals is indoor lights. Most of these lights flicker with afrequency of 100 Hz or 120 Hz in North America. It is not possible to avoid this signal but it
is possible to use the right sampling frequency to take the flickers out of the range ofinterest. The recommended sampling rate of the ADC is in range from 30 sps to 43 sps.
Note that the higher sampling frequency means more taps in the digital filter to obtain asimilar frequency response, and therefore more processing power may be needed.

October 2016

DT0073 Rev 1

5/10
www.st.com

To cancel the rest of the unwanted signals, we need to employ filtration. One of the easiest
ways is to use a FIR filter designed as a band pass filter in the range of 0.5 Hz to 3 Hz. The
measured signals can be seen in Figure 6.
Figure 6. Graph showing data during signal processing
300
45295

ADC value (-)

290

35285

TIAoutput

25280
275

15270
5265260

DC
partFIR
output-5012Time (s)345

In this graph, the heartbeats can be clearly recognized in the filtered signal. A simple peakdetection method can be used. To achieve better accuracy and more stable output it isrecommended to use another algorithm to determine if the measured bpm is valuable. Oneof these can be median filtration. It is also good to count with the dynamic of heart rate.

October 2016

DT0073 Rev 1

6/10
www.st.com

BLE extension

Measured heart rate data can be directly sent to your smart device. Bluetooth low energy
has a standard communication profile for heart rate monitoring. This profile is also
supported by ST BlueNRG-MS device.
Figure 7. Prototype of heart rate monitor

Conclusion

Optical heart rate monitoring is known as a part of medical pulse oximeters. As thewearable application segment grows, the simplified configuration of pulse oximeters will
gain popularity. By embedding optical heart rate monitoring into smart watches or fitness
trackers, health monitoring becomes easier.
The TSU104 nanopower quad 5 V CMOS op-amp with rail-to-rail input and output is used
for analog signal conditioning.

October 2016

DT0073 Rev 1

7/10
www.st.com

Figure 8. X-NUCLEO-IKA01A1 schematic 1/2

Figure 9. X-NUCLEO-IKA01A1 schematic 2/2

October 2016

DT0073 Rev 1

8/10
www.st.com

Support material
List of support materials and documents related to this design tip
Related design support material
Product / system evaluation board – X-NUCLEO-IKA01A1
Product / system evaluation board – X-NUCLEO-IDB05A1
Gerber files – X-NUCLEO-IKA01A1 gerber files
Bill of materials – X-NUCLEO-IKA01A1 BOM
Schematic – X-NUCLEO-IKA01A1 schematicDocumentation
Datasheet: TSU104, Nanopower, rail-to-rail input and output, 5 V CMOS operational amplifiers
User manual: UM1955, Getting started with the multifunctional expansion board based on
operational amplifiers for STM32 Nucleo

Revision history

October 2016DateVersion

Changes

04-Oct-2016

1

Initial release

DT0073 Rev 1

9/10
www.st.com

IMPORTANT NOTICE – PLEASE READ CAREFULLYSTMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements,modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should
obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms andconditions of sale in place at the time of order acknowledgement.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for
application assistance or the design of Purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST forsuch product.

ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.

© 2016 STMicroelectronics – All rights reserved

October 2016

DT0073 Rev 1

10/10
www.st.com