Home > Basics > Arduino Hands-on - XD-58C Heart Rate Sensor

Arduino Hands-on - XD-58C Heart Rate Sensor

Experiment: XD-58C pulsesensor optical heart rate pulse biometric analog sensor

The pulse sensor is a sensor used to measure the heart rate. Students, artists, athletes, creators, gamers, or mobile terminal developers can develop interactive works related to heart rate. The sensor can be worn on the finger or earlobe and connected to Arduino via an interface cable. It also comes with an open-source app that can display your heart rate in real time using a graphical interface. Essentially, it is an optical heart rate sensor that integrates amplification circuits and noise elimination circuits.

Pulse

A pulse, also known as arterial pulsation, refers to the palpable throbbing of arteries on the body surface. The human circulatory system consists of the heart, blood vessels, and blood, responsible for transporting oxygen, carbon dioxide, nutrients, and waste products in the body. Blood is squeezed into the aorta by the contraction of the left ventricle of the heart, then distributed through the entire arterial system. Arteries are elastic tubes made up of connective tissue and muscle. When a large amount of blood enters the arteries, it increases the pressure and causes the diameter of the vessels to expand, which can be felt on the superficial arteries as the pulse. In a normal individual, the pulse rate matches the heart rate. The normal range for adults is 60 to 100 beats per minute, often around 70-80 beats per minute, with an average of approximately 72 beats per minute. Elderly individuals have a slower pulse, typically between 55 to 60 beats per minute. The frequency of the pulse is influenced by age and gender, with fetal heart rates at 110-160 beats per minute, infants at 120-140 beats per minute, toddlers at 90-100 beats per minute, and school-age children at 80-90 beats per minute.

The pulse represents the arterial pulsation, and the pulse rate indicates the frequency of the pulse. In healthy individuals, the pulse rhythm is regular without variations in the intervals between pulses. The strength of the pulse is consistent without alternating strong and weak beats. Furthermore, physical activity and emotional excitement can accelerate the pulse rate, while rest and sleep can slow it down. A pulse rate exceeding 100 beats per minute in adults is termed tachycardia; below 60 beats per minute is called bradycardia. Various diseases, particularly heart conditions, can cause alterations in the pulse. Therefore, measuring the pulse is an essential clinical examination for patients. In traditional Chinese medicine, pulse diagnosis is a primary method for diagnosing and treating illnesses. Throughout the cardiac cycle, the arteries undergo periodic expansion and recoil due to the alternation of ventricular contraction and relaxation. In critical conditions, especially nearing death, significant changes occur in the number and rate of pulses. These fluctuations in the pulse serve as important diagnostic indicators for physicians when evaluating patients.

The principle of the photoelectric pulse sensor

The principle of the optical pulse wave sensor is to detect the variation in blood vessel volume by measuring the changes in light emitted by a green LED, which leads to changes in light absorption, thereby obtaining the pulse wave. According to Lambert-Beer's law, the absorbance of a substance at a certain wavelength is directly proportional to its concentration. When light of a constant wavelength is irradiated onto human tissues, the measured light intensity that has been absorbed, reflected, and attenuated by the body tissues to some extent reflects the structural characteristics of the irradiated area.

Pulses are mainly generated by the dilation and contraction of human arteries. In the human fingertip, the arterial component in the tissue is high, and the thickness of the fingertip is relatively thin compared to other body tissues. Consequently, the light intensity detected through the finger is relatively high. Therefore, the measurement site of the photoelectric pulse sensor is usually at the human fingertip. Finger tissues can be divided into non-blood tissues such as skin, muscles, bones, and blood tissues. The light absorption of non-blood tissues remains constant. In the blood, the pulsation of venous blood is very weak compared to arterial blood and can be ignored. Therefore, the changes in light transmitted through the finger can be considered to be caused solely by the filling of arterial blood. Thus, under the illumination of a constant-wavelength light source, the pulse signal of the human body can be indirectly measured by detecting the changes in light intensity transmitted through the finger.

The pulse sensor is used to detect pulse-related signals. The term "pulse" refers to arterial pulsation, and a pulse sensor is designed to detect the pressure changes generated during arterial pulsation and convert them into electrical signals that can be more easily observed and measured. There are two main types of output for pulse sensors: analog output and digital output. In terms of signal acquisition, pulse sensors can be classified into three main categories: piezoelectric, piezoresistive, and photoelectric. Piezoelectric and piezoresistive sensors utilize materials sensitive to micro-pressure (such as piezoelectric elements or strain gauges) to convert the pressure changes caused by pulse beats into output signals. Photoelectric pulse sensors, on the other hand, detect changes in light transmission through blood vessels during pulse beats using reflection or transmissive methods to generate output signals. Pulse sensors are commonly used in medical equipment, educational devices, and training scenarios, such as blood oxygen measurement, heart rate monitoring, and traditional Chinese pulse diagnosis. Furthermore, there are infrared pulse sensors that operate at specific wavelengths (typically 570nm and 870nm) to detect variations in blood volume caused by microcirculation changes in the bloodstream at the distal end of the vessels. By detecting fluctuations in blood oxygen protein content in the fingertip due to heartbeats, these sensors can amplify and process the signals to provide synchronized pulse signals, enabling the calculation of pulse rate and the generation of complete pulse waveforms reflecting changes in fingertip blood volume. These sensors are primarily used in clinical settings for measuring and monitoring pulse rates, analyzing pulse wave pathologies, and calculating blood oxygen saturation.

Green light is generally used as the light source for measurements. Initially, red light was commonly employed as the light source in wearable devices. However, through further research and comparison, it was found that green light provides better signals and a higher signal-to-noise ratio, hence most wearable devices now utilize green light. Nevertheless, high-end products may automatically switch between green, red, and infrared light sources based on skin conditions such as skin tone and perspiration. Several characteristics of green light as a light source are:

  •      l Melanin in the skin absorbs shorter wavelengths of light.
  •      l Water on the skin absorbs a significant amount of UV and IR light.
  •      l Green light (500nm) to yellow light (600nm) entering skin tissue is mostly absorbed by red blood cells.
  •      l Compared to other wavelengths, red light and light near infrared easily penetrate skin tissues.
  •      l Blood absorbs more light compared to other tissues.
  •      l Green (green-yellow) light is absorbed by both oxyhemoglobin and deoxyhemoglobin more effectively than red light.

The PulseSensor is a photoplethysmography analog sensor used for measuring pulse and heart rate. When worn on the finger or earlobe, it collects analog signals which can be transmitted to microcontrollers like Arduino via wires for conversion into digital signals. By performing simple calculations on the Arduino microcontroller, the heart rate value can be obtained. Additionally, the pulse waveform can be uploaded to a computer for display. PulseSensor is an open-source hardware, and corresponding Arduino programs and Processing programs for PC are available on its official website. It is suitable for scientific research and educational demonstrations in the field of heart rate, and it is also ideal for further development and customization.

Module Parameters

PCB Diameter: 16mm

PCB Thickness: 1.6mm (standard PCB thickness)

LED Peak Wavelength: 515nm

Supply Voltage: 3.3v or 5v both acceptable

Output Signal Type: Analog Signal

Output Signal Range: 0~3.3v (with 3.3v power supply) or 0~5v (with 5v power supply)

Experimental Wiring Diagram

Experimental Wiring Diagram

 

Open-source code for the experiment

Open-source code for the experiment

 

Status of Serial Port Return in the Experiment

Status of Serial Port Return in the Experiment

Experimental precautions

  •      l Ensure good contact between fingertips and sensors.
  •      l Do not press too hard, as it may impede blood circulation and affect measurement results.
  •      l Stay calm and avoid excessive body movement during measurements, as this can impact the results.
  •      l Avoid using cold fingers for testing, as poor blood circulation can lead to inaccurate measurements.
  •      l The 515nm wavelength of this module is suitable for collecting pulsatile signals from superficial microarteries in the skin (such as fingertips), while signals from the wrist arteries are very weak and less ideal. It is recommended to consider adjusting the amplification factor or using vibration-based sensors.

Prev:  Unikeyic has become an authorized distributor for Industrial Division of TE Connectivity
Next:  How Can Bulk Electronic Components Platform Work Magic For SMEs?
Would you like more details or pricing on the components mentioned above? Please complete the form below.
Submit Inquiry / Request Info