Project 1 - Design and Develop a IOT based Wireless Wearable Health Monitoring System or a Home Healthcare System to monitor the physiological parameters of ECG, Heart Rate, Pulse Oximetry, Cuffless Blood Pressure and Body Temperature.
PROJECT
Design of Mobile Healthcare Monitoring System Using IoT Technology and Cloud Computing:
- This project presents an implementation of wearable, portable, low power consumption, real-time remote bio-signals monitoring system based on the internet of thing technology.
- This implementation provides an improved step-in remote health monitoring field.
- Numbers of people, who require health care increase year by year and the conventional bio-signals monitoring systems require patients' attendance in person inside hospitals.
- This might cause an inefficient situation to take care of the patients, especially those who have critical and unstable health conditions.
- Therefore, internet technology along with modern electronic devices could offer promising solutions in this field.
- Based on that, this project utilizes a mobile application as an IoT platform to monitor remotely the live ECG signal, heart rate, SPO2, and the body temperature of patients.
- The signals are measured and processed by using a microcontroller-based device (Arduino).
- Four health parameters monitored in real-time continuous such as body temperature, ECG signal, heart rate, SPO2.
- These health parameters are monitored in the CCU (Coronary Care Unit) rooms in hospitals.
- This project is effective equipment for patients who are recovering from a heart attack or patients who suffer from chronic cardiovascular system issues.
- It follows up their case whenever and wherever they are in the world.
- Some chronic diseases such as the cardiovascular system and diabetic require continuous monitoring to prevent the situation get worse.
- Firstly, the body temperature is one of the vital signals that should be monitored for patients because it informs about patient’s metabolism situation, some medicines side-effects, and balance rate between heat generation and heat loss.
- Secondly, the ECG signal is important to be monitored to prevent cardiac arrhythmia cases such as Bradycardia, SVT (supraventricular tachycardia), AF (Arterial Fibrillation), VT (ventricular tachycardia), and VF (Ventricular Fibrillation) which are life-threatening conditions.
- While the heart rate monitoring can diagnose some cardiac diseases before it happens and making sure the case is stable.
- Finally, the SPO2 (Saturation of Peripheral Oxygen) parameter indicates the ratio of oxygenated hemoglobin amount to the whole hemoglobin amount.
- The oxygen is a vital element to make body cells work and perform their functions.
Design and implementations:
Sensors
Heart rate sensor:
- Heart pulse rate sensor that is utilized in this project (MAX30102) is a non-invasive optical device used for achieving two main functions, detecting the heartbeats and peripheral capillary oxygen saturation (Spo2).
- There are two non-invasive methods for calculating the heart rate and Spo2 values, transmitted mode and reflected mode.
- The sensor is used in this project uses reflected mode.
- For measuring the reflected light, this sensor utilizes two types of lights, red and infrared.
- The red light has a wavelength of 650 nm and the infrared light has a wavelength of 950 nm.
- Oxygen-saturated hemoglobin (oxygenated blood) and non-oxygen-saturated hemoglobin (deoxygenated blood) absorb different amounts of each light.
- So, the reflected light will be received by the sensor and through an algorithm, the final value for the Spo2 will be deducted.
- For calculating the heart beats per minute another approach is used.
- The blood needs high pressure to be pumped out of the heart to other body members.
- It occurs with the heartbeat and it causes the arteries to feel an amount of strain (blood pressure) when the blood flows in them.
- Arteries are responsible for carrying the blood out of the heart.
- So, the blood pressure leads to swelling and contracting of arteries, therefore the volume of the artery in the body parts (fingertip in this project) increases and reduces.
- When the volume increases, there will be more hemoglobin in the section area and consequently, the amount of absorbed infrared light will rise and the reflected signal back to the heart rate sensor will be reduced.
- These variations in the reflected light will result in a fluctuated signal called photoplethysmogram (PPG).
- It is important to note that there are also tissues, bones and venous blood surrounding the arteries and some amount of the applied light from the sensor is also absorbed by them.
- Nonetheless, these members do not produce an alternated reflective light and they just are DC elements of the signal (direct signal without fluctuations) and can be easily bypassed by the sensor circuit or in the signal processing stage.
- For achieving this task, the PPG wave is filtered by a low pass filter, so we can obtain noise reduced waves to measure the heart pulse rate.
- Then the maximum and minimum peaks of these waves are detected. By checking their peaks, the validity of an actual heart pulse is determined. In order to measure the interval between pulses, at least two consecutive heart pulses must be correctly detected.
- Then the last twelve intervals will be stored in an array and the median of these intervals is calculated. In this project instead of calculating the average, the median calculation is used, because the median function will result in more accurate final value if there are some anomalies in the results.
- Then the median value is converted to the heartbeats per minute (BPM) and along with the Spo2 value are sent to the Blynk cloud server.

ECG Sensor:
- The electrocardiogram (ECG signal) represents the electrical potential of the human heart.
- This signal is started from a specific spot which is called “S-A node (sinoatrial node)” which is located on the upper left side of the atrium.
- Then, the signal reaches to “A-V node (atrioventricular node)” which is located in the middle of the heart approximately.
- Next, the electricity goes “bundle of His”. The ECG signal consists of P: atrial depolarization, QRS complex: ventricular depolarization and atrial repolarization, and T: ventricular repolarization.
- The ECG amplitude is in the microvolts range and its frequency within 0.01 HZ to 100 HZ range.
- Therefore, to display it, a bandpass filter and an amplifier should be applied to the signal.
- The bandpass filter range is 0.5 HZ – 40 HZ. The most important things to diagnose via ECG signal are the intervals between the pulses, the shape of each pulse.
- The normal intervals are: R-R interval (0.6 - 1.2) seconds, P-R interval (0.12 – 0.2) seconds, QRS complex (0.08 - 0.12) seconds, Q-T interval (0.35 – 0.45)seconds.
- It includes three electrodes (RA, LA, and RL) which can be placed under clothes confidentially RA (Right Arm), LA (Left Arm), and RL (Right Leg).
- This sensor includes two analog filters, the first one is a high pass filter with a cut off frequency of 0.48Hz and the second one is a low pass filter with a cutoff frequency of 40Hz to achieve the required bandpass filter.
- Sensors’ pins are 3.3V, GND, Output, LO-, LO+, and SDN.
- The output pin gives the ECG signal. LO- and LO+ pins are connected to the microcontroller to inform it if one of the three electrodes loses its connection to the patient’s chest and they send a HIGH signal to the microcontroller if the disconnection occurs.
- Therefore, the microcontroller can send a warning message automatically based on that.
- Finally, the SDN pin is used to shut down the sensor to save battery.
- It is an active low pin and the microcontroller can shut down the sensor automatically.
- The main issue with this sensor which is very sensitive to motion. So, it requires a rest position to read perfectly.
- The ECG code partition is executed firstly by checking the electrodes attachment case.
- Then, the microcontroller reads the analog input signal and performs a smoothing process on the signal.
- After that, the samples buffered in an array before sending them periodically to the Blynk cloud server.

Body Temperature Sensor:
Maintaining the body temperature is essential to have a healthy condition, because catalyzing the chemical reactions is the responsibility of enzymes in body cells and these enzymes must have the appropriate temperature to be capable to do this task.- High body temperature can result in heat stroke, dehydration, and death if it is not treated.
- Also, low body temperature can lead to hypothermia and death if it is not dealt with.
- Therefore, obtaining instantaneous information about body temperature helps to avoid the mentioned problems. An LM35 analog temperature sensor is used to measure body temperature.
- This sensor is able to read temperatures from −55˚ to +150˚C and has a 0.5˚C tolerance.
- This sensor is put under the body arm (axilla) and is connected to the analog input of the Arduino UNO.
- The Arduino imports the analog data from the sensor to its analog pin and it converts the data to a digital value using an internal analog to digital (A/D).
- Then the digital value is converted to a Celsius temperature.
- Afterward, this temperature is transmitted to the NodeMCU to be sent to the Blynk Cloud Server using an ESP8266 WI-FI chip included in the NodeMCU module.

Communication between Arduino UNO and NodeMCU
- For sending the data to the Blynk cloud server, a chip with Wi-Fi technology is required.
- A NodeMCU module is chosen for satisfying this purpose.
- Nonetheless, some problems cannot be solved by using this chip alone.
- The first challenge is that the NodeMCU has only one analog input and in this project more than just one is required.
- The second issue is some libraries are just dedicated to just some specified microcontrollers not all of them.
- Thus, Arduino UNO is selected to connect to the NodeMCU to establish a communication of data between them and to approach the challenges which are mentioned.
Method of communication
- For ensuring that the NodeMCU serial communication is properly connected to the Arduino UNO, a very short message from the former device is sent to the latter one.
- Afterward, the Arduino verifies the incoming message and prepares the JSON document to be sent to the NodeMCU.
- JSON is a structured text-based format used for the exchange of data.
- Its structured design helps to be certain that the received data is in the appropriate format without losing or overlapping between data. In this paper, the values of heart BPM, Spo2 and the body temperature sensor are sent to the NodeMCU using the Json document while the ECG sensor is directly connected to the NodeMCU.
- After receiving data by this device, there is a function that ensures that all the data have been received, after that the received information is checked to confirm that data is an appropriate format.
- Consequently, the received data is sent to the Blynk cloud server.
Blynk
- For illustrating the patient’s information an IOT platform called Blynk is used.
- Blynk cloud service enables live monitoring of the patient’s condition in an elegant and professional environment.
- It also has the ability to be run on a local server for example inside or nearby a hospital and the cloud service secures a live stream of information about the patient’s condition outside the hospital.
Blynk app design layout
- At the top of the page a live graph for illustrating a live ECG signal is inserted, while below it there are three gauges for live visualization each of heart rate in BPM, Spo2 in percentage and the Celsius body temperature.
Reference:
https://iopscience.iop.org/article/10.1088/1757-899X/881/1/012113/pdf