Student Innovation - DEVELOPMENT OF A PORTABLE PATIENT MONITORING SYSTEM
1 × Raspberry Pi 3 Model A+
1 × Pimoroni MAX30105 Breakout - Heart Rate, Oximeter, Smoke Sensor
1 × HDMI Captive Touch Screen Monitor
1 × Crazepony-UK Lithium Battery Expansion Board
1 × Gravity: Analog Heart Rate Monitor Sensor
1 × High Temp Waterproof DS18B20 Digital temperature sensor
1 × Pi-EzConnect Terminal Block Breakout HAT
1 × MCP3008 - 8-Channel 10-Bit ADC With SPI Interface
- Add all products to basket
The project covers the development, production, testing and analysis of a vital signs patient monitoring system. Vital signs are essential in assisting medical professionals in making informed decisions on the condition of a patient. The monitor will be affordable and designed for use in less economically developed countries.
The body’s homeostasis is a dynamic control system that maintains certain levels of equilibrium throughout the body. It responds to stimuli in the environment to retain control by changing various vital signs such as heart rate, blood pressure, core body temperature, oxygen in the blood and respiration rate. Therefore, medical professionals must measure these parameters to gather an idea of a patient’s health.
As a result, this project aims to develop an affordable patient monitoring system aimed at less economically developed countries to help cope with natural disasters and mass illnesses where the facilities currently cannot manage. This problem is present in the news with the coronavirus pandemic affecting many poorer countries. A device like this would allow medical facilities to monitor a greater number of patients for a fraction of the cost of current monitoring systems which are bulky and expensive. The system will help detect patients who may have symptoms of virus’ and disease.
This report covers in-depth background research into the development of such a system. This report includes a literature review and research into the best-measuring methods. Further, the report covers the construction process of the system, covering both hardware and software. Finally, testing and analysis are covered in the final section.
The conclusion of this report analyses the findings from the tests carried out on the system. The final verdict is that the Raspberry Pi is a more than a suitable platform for a vital signs patient monitoring system. The PI managed to cope with the sensor’s programs and supported multiple peripherals at once. The system does need further development before it becomes a final product; however, the building blocks are now in place. The system measures multiple vital signs at a low cost; therefore, it is more than suitable for its intended purpose in less economically developed countries.
The block diagram simplifies the system’s circuit visually, which aids the development. Making it easy to represent complicated control systems in block form, which in turn makes the flow of signals and function of each block easy to understand. The block diagram includes all components and peripherals used in the patient monitoring system.
Raspberry Pi: The PI is used as the central operating platform for the patient monitoring system. The reason being, it has sufficient processing power to cope with the demands of displaying data in real-time. Further, the Pi's GPIO pins (Figure 2) allow for the control of multiple sensors and peripherals.
Power supply: The Raspberry Pi requires a minimum power supply of 5 volts and 1 Amp, which can be provided by a direct connection from the mains to the Raspberry Pi using a micro USB connection. However, it would not make the patient monitoring system portable. Therefore, a battery alongside a circuit board was used, enabling the battery to be charged and power the Raspberry Pi at the same time. The Lithium ION extension board was a suitable solution.
Terminal extension board: This board was introduced to the project to connect the sensor wires to the PI in a semi-permeant secure way. A benefit of the terminal is that it does not require any additional software to function; therefore, making the system simpler and easier to construct.
Display: A display is a vital part of the final product as it will convey the data measured by the sensors to the user. As the PI can support an HDMI; a 5-inch touch screen display has been used. This display will carry a clear, simple interactive user interface. The touchscreen display connects to the Raspberry Pi using an HDMI connection and a USB for power.
Temperature sensor: The thermistor used is a DS18B20 which connects to the PI with three wires. A 5V, ground and data wire. The data wire is connected to pin 7 (GPIO 4). Pin 7 has a ‘1-wire’ interface which provides low-speed data, signalling and power over a single conductor. The wire simplifies the connection of the DS18B20 temperature sensor, which reduces the cost as there is no need for additional chips and wires. However, a single 4.7KΩ pull-up resistor is needed to reduce noise in the circuit and to hold the input high when it is not in use. Figure 3 shows the circuit diagram of how the DS18B20 connects to the PI (Wiki.eprolabs.com. 2020).
Electrocardiography (ECG): An ECG was used to monitor Heart Rate. However, the fact that the ECG had to be compatible with the Raspberry PI caused some problems as there wasn’t a product available on the market. As a result, a Gravity Heart Rate sensor (ECG) (Wiki.dfrobot.com. 2020) is used, which is compatible with Arduino’s inbuilt analogue to digital converter. As the PI does not have an inbuilt ADC, an addition circuit was constructed. An Adafruits MCP3008 (DiCola, T. 2016) analogue to digital converter solved the problem. Figure 4 shows the circuit diagram of the Raspberry Pi ECG arrangement.
Pulse Oximetry: Prior research into patient monitoring highlighted the need to measure pulse and oxygen in the blood. These vital signs are measured by using a MAX30105 pulse oximeter (Cdn.sparkfun.com, 2020). This sensor is designed for use with Arduino in C language; however, it is compatible with Python and the Raspberry Pi. Therefore, it is suitable for this low-cost system. The MAX30105 includes three onboard LEDs, red, green and infrared. The board requires four connections, 5v, Ground and I2C (SDA and SCL). I2C is a serial communication protocol that allows data to be transferred bit by bit along a single wire (the SDA line). Figure 5 shows a visual representation of the I2C message used to transfer data between the sensor and the Pi.
As the MAX30105 sensor has an inbuilt pull-up resistor, there is no need for any additional circuits. Figure 6 shows the circuit diagram of the PI and MAX30105.
A brief description of the code shown in the appendix.
The ideal situation for the monitoring system will be to display a real-time filtered graph of the electrical voltages produced by the heart. However, it was no possible to have code that was real-time and filtered; therefore, two codes were written. One to show a real-time raw data graph of the voltages from the ADC against time and save that data in a text file. The second ECG code filters the data saved to the text file, which removes all of the unwanted interference to produce useful data. The bandpass filter used has a low pass of 0.5Hz and a high pass of 1KHz. From research, this is the ideal range frequency range to produce the most accurate results. Both codes produce graphs to display the data, that allows for a more user-friendly interface.
The code for Pulse Rate controls the MAX30105 chip by importing the Python library MAX3010 and TIME. The two libraries allow the code to read the data from the sensor to produce the current heart rate and an average, with one-second intervals.
To record the temperature, two similar codes were used. One measures the exact raw temperature of the sensor and the other displays that data against time in graph form. The graphical library used is matplotlib, which is a useful library that produced simple, clear graphs. The graph produced displays real-time temperature data with an updating time axis that allows large amounts of data to be recorded and displayed in the best possible way for the user. The temperature is shown in either Celsius or Fahrenheit.
ECG: The raw data from the resting heart rate data showed minimal resemblance to the ideal ECG wave. This is due to the sensors detecting signals from other muscles local to the heart, as well as localised interference. However, once filtered, the data produced waveforms which are close to the ideal shown in figure 7. The figure shows 12 clear peaks over the 40 second testing period, which produces a heart rate of 18 beats per minute. This result is an extremely low HR for a person; therefore, it indicates that there is a high degree of error in this data. Causes for this error may be due to the code instead of the sensor. The sensor has managed to detect clear pulses from the heart. The sample rate for ECG was 5000 Hz. The high sample rate was necessary to produce a clear waveform; however, such a high sample rate can cause problems as the python code cannot keep up. As a result, the time increments within the code lag behind the sample rate, causing the time component to be inaccurate.
Figure 8 shows the real-time data read straight from the output of the ADC. This data was not able to be actively filtered due to restrictions with the python code.
The graph has a living updating x and y-axis. This ensured that the graph produced the best viewing experience for the user. To improve the program, so that the graph displays real-time filtered data, an auxiliary hardware filter circuit could be built. This would reduce the strain of the processing power on the Raspberry Pi.
Pulse Rate: The pulse rate was measured using the MAX30105 chip attached to the author’s index finger. The results from the test were compared to the readings from a FITBIT pulse monitor on the wrist. Although final judgements on the sensors exact accuracy cannot be taken from this test, as there are too many varying variables, this test will produce a rough understanding of the MAX30105 chip is measuring the pulse rate correctly. Figures 9 and 10 show the results.
Temperature: The first test was to prove the accuracy of the temperature sensor by comparing it to a current market thermometer. The test shown in figure 11 proves the accuracy of the device. Both sensors were placed in the same volume of water, left to settle, then the temperature was measured. The readings from the Pi sensor are shown in figure 12.
This project aimed to develop a vital signs patient monitoring system using a single-board computer as the platform. The project has proved that the Raspberry Pi is a suitable platform to run this system. This system is intended to be used in less economically developed countries where funds are not available for expensive monitoring systems. This project has achieved its goal in creating a suitable platform for patient monitoring with some areas open for further development. Appropriate methods of measuring vital signs have been chosen throughout the development stage, with variables such as accuracy, cost and simplicity being considered. Problems faced throughout the development with compatibility with the Raspberry Pi have caused some time delays; however, these have been overcome with minor limitations. The final system measures heart rate with an ECG, pulse rate with a pulse oximeter and temperature with a thermistor. Extra hardware was needed with the ECG to enable it to communicate with the PI, which included a battery circuit, HDMI display and a terminal for solid connections. Linux Raspbian BUSTER was used for the operating system, and the sensors were coded in Python 3 language. The PI platform was successful in the operation test where all programs were running simultaneously, which meant that the Raspberry Pi has enough processing power to cope with the demands of a monitoring system. The HDMI display allows real-time data to be displayed to the user simply and clearly. Further, to finish off the system, a Solidworks model has been created to be 3D printed. The 3D design allows for the casing to be easily replaced if damaged, making this system more user friendly.
Overall, the system has been supported well by the Raspberry Pi platform as in testing it proved capable of fulfilling the requirements of a vital signs patient monitoring system. Further, the final system is an ideal starting point for developing a low-cost, reliable system for less economically developed countries in times of medical need.
The project aimed to prove that the Raspberry Pi is a suitable platform for a patient monitoring system, which has been achieved; however, the system can be improved by increasing the accuracy of the results.
One area for future development is the ECG circuit. This circuit included the ECG sensor and an ADC to communicate with the Raspberry Pi and a python coded bandpass filter. The Python code added limitations as it wasn’t possible to actively filter that signal and display it real-time on a graph. The signal had to be saved to a text file first and filtered second. Therefore, for future development, the bandpass would be created in hardware with op-amps and resistors. This would reduce the load on the Raspberry Pi’s processing power and allow for the signal to be filtered and be displayed in rea-time. Figure 13 shows the circuit diagram for the active bandpass filter hardware. By using an active bandpass filter, a gain can be added to the circuit to amplify the ECG signal.
- AL‐Khalidi, F. Q., Saatchi, R., Burke, D., Elphick, H., & Tan, S. (2011). Respiration rate monitoring methods: A review. Pediatric pulmonology, 46(6), 523-529.
- Arduino, S.A., 2015. Arduino. Arduino LLC.
- Bai, Y., Yao, L., Wei, T., Tian, F., Jin, D.Y., Chen, L. and Wang, M., 2020. Presumed asymptomatic carrier transmission of COVID-19. Jama, 323(14), pp.1406-1407.
- Balamurugan, S., Reddy, R., & Muthan, S. (2016, May). A noninvasive blood pressure monitoring system. In 2016 IEEE International Conference on Recent Trends in Electronics, Information & Communication Technology (RTEICT) (pp. 1999-2001). IEEE.
- sparkfun.com,2020,[online]Available at:
https://cdn.sparkfun.com/assets/learn_tutorials/5/7/7/MAX30105_3.pdf [Accessed 5 May 2020].
- Choonara, Y.E., du Toit, L.C., Kumar, P., Kondiah, P.P. and Pillay, V., 2016. 3D-printing and the effect on medical costs: a new era?. Expert review of pharmacoeconomics & outcomes research, 16(1), pp.23-32.
- Cross, J. D., Ficke, J. R., Hsu, J. R., Masini, B. D., & Wenke, J. C. (2011). Battlefield orthopaedic injuries cause the majority of long-term disabilities. JAAOS-Journal of the American Academy of Orthopaedic Surgeons, 19, S1-S7.
- De Jongste, J. C., Mons, H., Bonta, I. L., & Kerrebijn, K. F. (1987). In vitro responses of airways from an asthmatic patient. European journal of respiratory diseases, 71(1), 23-29.
- DiCola, T. (2016). Raspberry Pi Analog to Digital Converters. MCP3008.
- Driggin, E., Madhavan, M. V., Bikdeli, B., Chuich, T., Laracy, J., Bondi-Zoccai, G., ... & Brodie, D. (2020). Cardiovascular considerations for patients, health care workers, and health systems during the coronavirus disease 2019 (COVID-19) pandemic. Journal of the American College of Cardiology.
- Đuzel, A., Pavlov, M., & Babić, Z. (2018). Cardiac intensive care unit organisation in an economically less developed European country. Intensive care medicine, 44(3), 380-381.
- Esmon, C. T. (2001, April). The normal role of Activated Protein C in maintaining homeostasis and its relevance to critical illness. In Critical Care(Vol. 5, No. S2, p. S7). BioMed Central.
- Evans, D., Hodgkinson, B., & Berry, J. (2001). Vital signs in hospital patients: a systematic review. International journal of nursing studies, 38(6), 643-650.
- Frank, S. M., Tran, K. M., Fleisher, L. A., & Elrahmany, H. K. (2000). Clinical importance of body temperature in the surgical patient. Journal of Thermal Biology, 25(1-2), 151-155.
- Anuar and P. L. Leow, "Non-invasive Core Body Temperature Sensor for Continuous Monitoring," 2019 IEEE International Conference on Sensors and Nanotechnology, Penang, Malaysia, 2019, pp. 1-4
- Johnson, A.E., Pollard, T.J., Shen, L., Li-wei, H.L., Feng, M., Ghassemi, M., Moody, B., Szolovits, P., Celi, L.A. and Mark, R.G., (2016). MIMIC-III, a freely accessible critical care database. Scientific data, 3, p.160035.
- Phuoc Son, N. Thị Anh Thu and N. Trung Kien, "Design an IoT wrist-device for SpO2 measurement," 2017 International Conference on Advanced Technologies for Communications (ATC), Quy Nhon, 2017, pp. 144-149.
- Mortara, D.W., Mortara Instrument Inc, (1986). High resolution ECG waveform processor. U.S. Patent 4,630,204.
- , Baker, B. C., Grove, J. R., Hinks, R. P., Harrison, M. J., Sabra, J. P., ... & Rhee, P. (2003). Battlefield casualties treated at Camp Rhino, Afghanistan: lessons learned. Journal of Trauma and Acute Care Surgery, 54(5), 814-822.
- org.2020.[online] Available at:
https://www.raspberrypi.org/computemodule/datasheets/CM3plus_1p0.pdf [Accessed 5 May 2020].
- Soloman and Alan, (1999). Body temperature control system and method of temperature control. U.S. Patent 5,913,886.
- The Pi Hut. 2020. Pi-Ezconnect Terminal Block Breakout HAT. [online] Available at:
https://thepihut.com/products/pi-ezconnect-terminal-block-breakout-hat [Accessed 5 May 2020].
- Vurek, G., Us Health Education & Welfare, (1974). Oximeter for monitoring oxygen saturation in blood. U.S. Patent 3,799,672
- Wang, R., Jia, W., Mao, Z. H., Sclabassi, R. J., & Sun, M. (2014, October). Cuff-free blood pressure estimation using pulse transit time and heart rate. In 2014 12th international conference on signal processing (ICSP) (pp. 115-118). IEEE..
- dfrobot.com. 2020. Heart_Rate_Monitor_Sensor_SKU__SEN0213-Dfrobot. [online] Available at: https://wiki.dfrobot.com/Heart_Rate_Monitor_Sensor_SKU__SEN0213 [Accessed 5 May 2020].
- eprolabs.com. 2020. DS18B20 Temperature Sensor - Epro Labs Wiki. [online] Available at: https://wiki.eprolabs.com/index.php?title=DS18B20_Temperature_Sensor [Accessed 5 May 2020].
- Zarabzadeh, A., O’Donoghue, J., O’Connor, Y., O’Kane, T., Woodworth, S., Gallagher, J., & O’Connor, S. (2013). Variation in health care providers’ perceptions: decision making based on patient vital signs. Journal of decision systems, 22(3), 168-189.
- Zonios, G., Shankar, U., & Iyer, V. K. (2004). Pulse oximetry theory and calibration for low saturation. IEEE Transactions on biomedical engineering, 51(5), 818-822.