Real Time Wireless PPG & Respiration Rate Measurement and Data Acquisition System

RWPRRDAS is a wireless Photoplethysmography (PPG) and respiration measurement system which allows user to monitor the measured heart rate, blood pressure wave, respiration cycle and any other kind abnormality related to heart and its corresponding system. It uses a battery powered transducer to collect biomedical data and an android application to visualize the data in a proper manner and in a graphical way. This is a non-invasive type measurement procedure. This is a truly a mobile system which is easy to carry and operate. Since this device is not connected to power lines of AC applications and totally battery operated so there is no possibility of any electrical hazard in any case. android mobile phone and every

RWPRRDAS is a wireless Photoplethysmography (PPG) and respiration measurement system which allows user to monitor the measured heart rate, blood pressure wave, respiration cycle and any other kind abnormality related to heart and its corresponding system. It uses a battery powered transducer to collect biomedical data and an android application to visualize the data in a proper manner and in a graphical way. This is a non-invasive type measurement procedure. This is a truly a mobile system which is easy to carry and operate. Since this device is not connected to power lines of AC applications and totally battery operated so there is no possibility of any electrical hazard in any case.
Nowadays, many biomedical transducers come with a custom-made processor with an inbuild display, which offers very low processing power to visualize the biomedical data properly and with an ease of access to almost every age. RWPRRDAS collects the data using transducer and uses the processing power of a modern android mobile phone so that visualization and determination of heart disease and abnormality in respiration mechanisms become easy and reliable. And the measurement of data through a wireless media provides hassle-free & user friendly usable limit to almost every person.

I. Introduction
Health monitoring technologies usually wearable have been the keen interest of many people around the globe over many years of evolving technology. Although the interest has been mainly due to the faster growing technology with rapid demand of wearable materials for continuous, pervasive and wieldy monitoring different vital signs of different organs. And since the demanding market of this wearable technology is blooming as the fastest growing segments due to the overwhelming need to monitor chronic diseases and other activities of the ageing population. Currently, the modern day wearable devices have not only focused on simple fitness tracking measurements such as number of steps taken, pulse but also to monitor the various physiological considerations Heart Rate Variability (HRV), glucose measures blood pressure readings, respiration, etc. For many years Electrocardiogram (ECG) has been the most regnant technique to identify certain cardiovascular disorders and the abnormalities in heart rhythms. But for instance, the operation of ECG to acquire data effectively, various bioelectrodes has to be placed at certain body locations, this procedure limits the mobility and moving flexibility of the patient. For this reason Photoplethysmography (PPG) has shown the alternative of this heart rate monitoring technique. PPG is a simple and low-cost optical technique that can be used to detect blood volume changes in the microvascular layer of tissue as shown in figure 2. It is basically used non-invasively to measure the changes taking place at the skin surface. PPG makes uses of low-intensity infrared (IR) light. When light travels through the skin tissues it is absorbed by bones, skin pigments and both venous and arterial blood. Since light is strongly absorbed by blood than the surrounding biological tissues, the changes in blood flow can be detected by PPG sensors as changes in the intensity of light. The voltage signal from PPG is proportional to the quantity of blood flowing through the blood vessels. Even the small changes in blood volume are detected in this method, though it cannot be used to quantify the amount of blood present. Though in a detailed signal analysis, it is demonstrated that the PPG signal offers decent replacement of ECG recordings without limitations for the extraction of HRV signals of all ages and thus making it user-friendly. In addition, we are preconceived about measuring respiration using 12 lead ECG by applying bioelectrodes on various parts of the body with several incognizant limitations like placing the bioelectrodes on spots where pulse is felt over the skin with low precision and the thermistor respiration sensor in which the patient has to wear a mask and the sensor needs to be placed under the nose for its reading which further provides a limitation, and obviously the procedure requires hands of a well-trained technician. On being savvy about the limitations, strain gauge based respiration mechanism is used as an alternative for measuring respiration with fidelity. Respiration is the interchange of gases between an organism and the medium in which it lives. Respiration is the earliest method to determine cardiac problems, failures of multiple organ systems and some chronic illness like Chronic Obstructive Pulmonary Disease (COPD and Congestive Heart Failure (CHF). There are basically two types of respiration, they are as follows: 1. External Respiration (Breathing Process) 2. Internal Respiration (Gas exchange between blood and body cells) External Respiration : In this method oxygen is obtained from air and carbon dioxide is transported to the opposite direction in a cyclic manner through breathing in and out respectively. The process of respiration involves following two steps:

Inspiration 2. Expiration
In case of inspiration, the diaphragm contracts and pulls downward and the muscles between the ribs contract and pull upward. While in case of expiration, the diaphragm relaxes, and the volume of the thoracic cavity decreases, while the pressure within it increases. So, air is forced out as lungs contract. The mechanical status of respiratory system is studied by changes of volume of the gas space in the lung during various breathing conditions. An example of the plot is shown in figure 3.
Internal Respiration : It is the metabolic process of respiring through the reaction of glucose that takes place in the biological cells or tissues. Also termed as Cellular Respiration. Gas exchange occurs in the alveoli so that oxygen is loaded into the bloodstream and carbon dioxide is unloaded from the bloodstream. Cellular respiration follows three major steps: 1. Glycolysis: The breakdown of glucose into pyruvate, ATP, H2O, and heat. 2. Krebs Cycle: Produces NADH from pyruvate. 3. Oxidative Phosphorylation: Produces ATP from NADH, oxygen, and H+. The oxygen plays the role of electron receptor in an electron transport chain to produce ATP.

II. Working Principle
In this analysis, our goal is to develop a system that takes data (PPG and Respiration) from stimulus, transmit the data via WiFi medium and plot real time data with respect to time to an android mobile phone. PPG Data Collection: To measure PPG, we used an Infrared (IR) LED and a photodiode pair as shown in the Figure 4. A photodiode is a type of photodetector which converts light into electricity. This semiconductor device, in which a P-type material and an N-type material is used to form a P-N junction. Photo diodes work on reverse bias mode. When an electric field is applied in reverse bias mode, a depletion region is formed and current is flown dew to minority careers only called dark current or leakage current. When light falls into this P-N junction some of the careers get energized and the leakage current also increased.
Respiration Data Collection: To measure respiratory volume change, we decided to use 'strain gauge method' in this project. Strain gauges are based on the principle that if a conductor is stretched then the resistance of the wire also changes and if the wire is compressed then resistance of the conductor increases, because of the change in length, crosssectional area and resistivity. The amount of change in resistivity is defined as Gauge Factor (Gf), which can be represented as   To develop android application Android Software Development Kit (SDK) is used which has pre-installed libraries, debugging tool and emulator to test the app. For making this particular application JAVA programming language is used as a core language and Extensible Markup Language (XML) is used to design the user interface.
Communication between microcontroller and mobile application is done by follows client-server model. The TCP/IP protocol is used to communicate between client and server. This is a network layer protocol as described by the Open System Interconnection (OSI) model. Transmission control protocol or internet protocol is a connection-oriented protocol. After connection is made it is not closed until each end completes whole process.
Once data is received by the android application the data is further processed to calculate respiration rate and heart beats per minute. Finally, these process data are presented in a graphical manner. Also, heart rate and respiration rate are shown.

III. Hardware Implementation:
To create our assumed model into real life, we used a number of equipment given below: 1. 390-ohm resistor (current limiting resistor for IR LED); 2. 1 1n4007 diode (to create voltage divider for Photodiode sensor); 3. 1 Infrared LED; 4. 2 LDR (to detect change of blood pressure in blood vessel); 5. 3 kg strain gauge load cell; 6. One, 24-bit high precision analog to digital converter (HX711) for strain gauge; Our goal is to develop a system that takes data (PPG, Respiration) from stimulus, transmit the data via WiFi medium and plot real time data with respect to time to an android mobile. For this purpose, the project is divided into two part: 1. Preparing Transducer 2. Programming microcontroller and android application 1. Preparing Transducer: PPG Transducer: IR LED is used to transmit infrared wave, which is passed through the tissues and reflected back to the photodetector. Infrared wave is passed through the fingertip, such that the intensity of the wave changes with respect to blood pressure at fingertip. This change in light intensity is detected by a photo detector. The photo detector, while connected to the microcontroller as a voltage divider configuration(as shown in figure 7 and 8), gives a change in voltage which is proportional to the change in blood pressure. Then using the microcontroller data is scaled to proper range.

Respiration Transducer:
There are several types of strain gauges and different materials are used. We choose metal foil type of strain gauge of 350 ohm connected as a full bridge configuration, because they are readily available in the market in the form of load cell, which is connected to a high precision 24 bit analog to digital converter. A belt like configuration is made around the chest(as shown in figure 5), on which a full bridge configuration of four strain gauge is attached. Belt is worn neither too tight nor too loose such that pressure around the belt is uniform while data collection. This output of bridge circuit, as shown in figure 9, is then connected to a 24-bit precision based analog to digital convertor circuit to amplify the voltage and further connected to the microcontroller.

Programming microcontroller and android application
We wish to develop an android application that uses WiFi client-server protocol to communicate with two biomedical transducers.
Transducers are connected to Node MCU (a ESP 8266 based micro controller) which uses an inbuilt WiFi shield that supports network protocols like IPV4, TCP/UDP/HTTP/FTP. It can be programmed by using Arduino SDK. This board is connected to the transducers, as given in the figure no.7 and 9, above in PPG and respiration transducer section, to collect data from stimulus and transmit the data via WiFi using TCP/IP protocol. For this purpose the beard is programmed such a way that acts as a WiFi client to perform the following program.
1. The hotspot SSID and password is previously written to the board such that it can easily connect to the mobile hotspot. 2. We also need IP address of the mobile phone and port number of the android application. 3. After the connection is made in physical level, client continuously check for socket to be available. 4. If socket connection is established by the server android app, then client read the analog data from stimulus and push the data via TCP socket and continues to do so until the process is complete. Where the android application acts as a server and the transducers acts as WiFi client and they transmit and receive data using TCP socket. To design the user interface Extensible Markup Language (XML) is used and JAVA is used, to make functions and to create TCP socket. Android Studio IDE is used to program and design the app.
1. The program in the android application acts as server that continuously listens to the socket specified for any request from client.

If any request is made and if socket number
is matched then the socket number is checked and connection is established. 3. To perform communication operation, data input stream a data output stream is created. 4. After communication is made the received data is stored in a variable and socket is closed. 5. Data stored in the variable then scaled and processed such that it can be plotted in a line graph using Android Graph View library. 6. Steps from 1 to 5 are done in a cyclic manner to plot the continuous data as shown in figure 11.
Calculating heart rate and respiration rate: To calculate heart rate and respiration rate difference plot is made such that base line wandering can be removed. Then the number of samples between two consecutive peak is derived and calculated by using the formula given below.
Heart Rate =

IV. Conclusion:
Real Time Wireless PPG & Respiration Rate Measurement and Data Acquisition System is a powerful tool for monitoring biomedical data. Not only PPG and respiration, this type of device can be used to monitor another biomedical signal. In a hospital, where WIFI facility is readily available, this kind of instruments can be used to monitor sensitive patients without even going into the respective wards. In future we are hoping to make similar instrument that can monitor biomedical data of the whole hospital by selecting the patients. That reduces the possibility to spread of communicable disease. Furthermore an alarm system or notifications can be used if the patient is in critical condition.