scieee AI-readable full text Open interactive document viewer

Multivariable measurement system based on a Blood Pressure measuring device

Comas Solans, Enric

Abstract

This Master's thesis describes the development of a multivariable acquisition system based in a sphygmomanometer format. The resulting device can acquire and plot an electrocardiogram with different configurations of electrodes. Moreover, the system is able to acquire the temperature of a person, its heart rate and their oxygen saturation. This information will be shown through a screen and the data will be shared to other devices via Bluetooth. The scope of the project includes the component selection of the system, hardware integration, development of the firmware in Python and the validation of all the functionalities.

Full text

Multivariable measurement system based on Blood Pressure measuring device A Master's Thesis Submitted to the Faculty of the Escola Tècnica d'Enginyeria de Telecomunicació de Barcelona Universitat Politècnica de Catalunya by Enric Comas Solans In partial fulfilment of the requirements for the degree of MASTER IN ELECTRONIC ENGINEERING Advisor: Pere Joan Riu Costa Barcelona, June 2022 1 Abstract This Master’s thesis describes the development of a multivariable acquisition system based in a sphygmomanometer format. The resulting device can acquire and plot an electrocardiogram with different configurations of electrodes. Moreover, the system is able to acquire the temperature of a person, its heart rate and their oxygen saturation. This information will be shown through a screen and the data will be shared to other devices via Bluetooth. The scope of the project includes the component selection of the system, hardware integration, development of the firmware in Python and the validation of all the functionalities. 2 Acknowledgements Throughout the development of the project many people have helped me in the configuration and conception of the device. Firstly, appreciate the help from my tutor Pere Riu for giving me the freedom but also the clear idea of the final device that had to be developed. Also acknowledge to my sister Júlia, the person at which all the tests have been done and all the debugging was possible thanks to her patience. Most of the development was possible due to the help of my father. Finally, thank Amaya for the help in the software domain and report organization. 3 Table of contents Abstract ............................................................................................................................ 1 Acknowledgements .......................................................................................................... 2 Table of contents .............................................................................................................. 3 List of Figures ................................................................................................................... 6 List of Tables .................................................................................................................. 10 1. Introduction .............................................................................................................. 11 1.1. Context ............................................................................................................. 11 1.2. Description ....................................................................................................... 12 1.3. Procedures ....................................................................................................... 13 1.4. Objectives ........................................................................................................ 13 1.5. GANTT ............................................................................................................. 14 2. Component selection and state-of-the-art ................................................................ 15 2.1. Microcontroller selection ................................................................................... 15 2.2. ADC front-end selection.................................................................................... 19 2.3. Body temperature sensor selection .................................................................. 21 2.4. Pulse oximeter selection ................................................................................... 21 2.5. Multivariable monitors state-of-the art ............................................................... 22 2.5.1. BITalino ..................................................................................................... 22 3. Methodology and description of the measurements ................................................. 24 3.1. Electrocardiography measurement basics ........................................................ 24 3.1.1. Theoretical principle of the electrocardiography ......................................... 24 3.1.2. Description of the ECG measurement ....................................................... 26 3.2. Body temperature measurement basics ........................................................... 30 3.2.1. Theoretical approach ................................................................................. 30 3.2.2. Description of the body temperature measurement ................................... 31 3.3. Heart rate measurement basics ........................................................................ 31 3.4. Pulse oximetry measurement basics ................................................................ 33 4. Hardware integration and development ................................................................... 36 4.1. Power management description ....................................................................... 36 4.2. Raspberry Pi 3B+ ............................................................................................. 37 4.3. ECG hardware description ................................................................................ 38 4.3.1. ADS1298 front-end description .................................................................. 38 4.3.2. ADS1298 connections ............................................................................... 41 4 4.4. NTC hardware description integration............................................................... 43 4.4.1. NTC behaviour description ........................................................................ 43 4.4.2. Hardware signal conditioning ..................................................................... 43 4.4.3. Body temperature hardware connections .................................................. 47 4.5. Heart rate and pulse oximeter hardware description ......................................... 48 4.5.1. MAX30105 description .............................................................................. 48 4.5.2. MAX30105 connections ............................................................................. 48 4.6. Display ............................................................................................................. 49 4.7. Device integration ............................................................................................. 50 4.7.1. Connection diagram of all the hardware components ................................ 51 4.7.2. Physical support ........................................................................................ 55 5. Software development ............................................................................................. 56 5.1. ADS1298 drivers .............................................................................................. 56 5.1.1. SPI communications .................................................................................. 56 5.1.2. ADS1298 drivers’ development ................................................................. 56 5.1.2.1. Configuration of ADS1298 ....................................................................... 57 5.1.2.2. Conversion of raw data into ECG signal .................................................. 59 5.1.2.3. Body temperature drivers ........................................................................ 60 5.2. MAX30105 drivers ............................................................................................ 60 5.2.1. I2C communications .................................................................................. 61 5.2.2. MAX30105 Drivers .................................................................................... 61 5.3. Layout of the results ......................................................................................... 63 5.3.1. Data representation in Python ................................................................... 64 5.4. Bluetooth driver development ........................................................................... 66 5.4.1. Description of Bluetooth protocol ............................................................... 66 5.4.2. Bluetooth drivers ....................................................................................... 67 5.4.3. MIT App Inventor development .................................................................. 67 5.4.3.1. Sphygmomanometer simulator screen .................................................... 68 5.4.3.2. Acquiring data screen .............................................................................. 69 5.5. CSV creation .................................................................................................... 70 5.6. Main program flow description .......................................................................... 71 6. Results .................................................................................................................... 76 6.1. ECG measurements ......................................................................................... 76 6.2. Body temperature measurements ..................................................................... 80 5 6.3. Heart rate and Sp02 measurements ................................................................. 81 6.3.1. Calibration process .................................................................................... 82 6.3.2. Heart rate and oxygen saturation finger results ......................................... 83 6.3.3. Arm results ................................................................................................ 84 6.4. Application results ............................................................................................ 85 6.5. Complete device results ................................................................................... 86 7. Budget ..................................................................................................................... 87 8. Conclusions ............................................................................................................. 90 9. Future developments ............................................................................................... 91 Bibliography .................................................................................................................... 92 Appendices ..................................................................................................................... 95 10. Bluetooth sequence ............................................................................................. 95 11. MIT App Inventor blocks. ..................................................................................... 96 12. Main program flow diagram .................................................................................. 99 13. Schematics ........................................................................................................ 101 14. Python code ....................................................................................................... 107 15. BOM list description ........................................................................................... 118 Glossary ....................................................................................................................... 122 6 List of Figures Figure 1. Block diagram of MAX30105 sensor. Source. [14] ........................................... 22 Figure 2. Bitalino Board. Source [15] .............................................................................. 23 Figure 3. Block diagram of the device. ............................................................................ 24 Figure 4. Voltage produced by the exchange of Na and K. Green line marks minimum energy for active potential to happen and red line is the resulting voltage. Source [16] ... 25 Figure 5. Description of the QRS signal. Source [17] ...................................................... 25 Figure 6. Top 10 causes of death worldwide. Source [18] ............................................... 26 Figure 7. Electrodes of AgClsolution that acquire ECG. ................................................ 26 Figure 8. Chest electrodes and representation of Lead signals. Source [19] ................... 27 Figure 9. Direction of measurement at chest leads and augmented leads signal. Source [20] ................................................................................................................................. 28 Figure 10. Five electrodes connection for ECG and Feedback RLD circuit. Source [21] . 29 Figure 11. Positioning of the other six electrodes close to the heart. ............................... 30 Figure 12. a) NTC resistor used in this project; b) Catheter application of a NTC resistor. Source [16] ..................................................................................................................... 30 Figure 13. Light emitted by LED and the reflected signal returning to the photodiode. .... 32 Figure 14. Representation of raw values from a pulse oximeter infrared light. ................ 32 Figure 15. Signal obtained through a PPG measurement. Source [26] ........................... 33 Figure 16. Beer-Lambert Law representation. Source [26] .............................................. 34 Figure 17. Absorption coefficient of the different haemoglobin in blood. Source [16] ...... 34 Figure 18. Ratio computation between infrared and red signals for Sp02. Source [17] ... 35 Figure 19. Block diagram of the system (II) ..................................................................... 36 Figure 20. ANKER 79AN7917 (left); AC/DC power converter from Raspberry (right) ...... 37 Figure 21. Measurement with one electrode in the pressure cuff and one electrode in the chest (left); Measurement with one electrode in a metallic bar and the other in the pressure cuff (right). ...................................................................................................................... 39 Figure 22. Programmable gain stage in ADS1298. Source [11] ...................................... 40 Figure 23. Front-end electrode connector. ...................................................................... 41 Figure 24. Connections between the ADS1298 evaluation board and Raspberry Pi 3B+ 42 Figure 25. Relationship between voltage and temperature in NTC 3950. Source [38]..... 43 Figure 26. Schematic of the linearizing circuit of the NTC. .............................................. 44 Figure 27. Output voltage versus temperature and the regression line resulting. ............ 45 Figure 28. Third segmented linearization of the temperature measurement. ................... 46 Figure 29. Fourth segmented linearization of the temperature measurement. ................ 46 7 Figure 30. Board used in the project that includes the optical sensor MAX30105. .......... 48 Figure 31. Connection between MAX30105 board and Raspberry Pi 3B+. ..................... 49 Figure 32. Connection between Raspberry Pi 3B+ and TFT display. Source [31]. .......... 50 Figure 33. Complete block diagram of the device (III) ..................................................... 51 Figure 34. Connection between the sensors and the Raspberry Pi connections. ............ 52 Figure 35. Different type of pins and connections ........................................................... 52 Figure 36. Diagram block of all the connections of the device (IV) .................................. 53 Figure 37. Physical support of the system (left). Metal piece used in measurements (right). ....................................................................................................................................... 55 Figure 38. Example of the SPI chronogram in ADS1298. Source [11] ............................ 56 Figure 39. Description of the signals included in the ADS1298 SPI bus. Source [11] ...... 57 Figure 40. Flow diagram of the ADS1298 configuration .................................................. 57 Figure 41. Sequence to configure registers in the ADS1298. .......................................... 58 Figure 42. Sequence to configure all the channels in ADS1298 ...................................... 58 Figure 43. Relationship between raw data and voltage from ADS1298. Source [11] ....... 59 Figure 44. read_spi function that acquires the voltage signal from ADS1298. ................. 59 Figure 45. Digital filters applied to the ECG signal acquired. ........................................... 60 Figure 46. Regression lines transforming voltage into temperature by intervals .............. 60 Figure 47. Interactions between master and slave .......................................................... 61 Figure 48. MAX30105 configuration steps. ..................................................................... 62 Figure 49. Average estimator for a set of MAX30105 samples. Source [34] ................... 63 Figure 50. Description of the layout included in the application ....................................... 64 Figure 51. Code to update the data in the screen. .......................................................... 64 Figure 52. Initialization of two processes simultaneously. ............................................... 64 Figure 53. Chronogram of output results entering and leaving a queue. ......................... 65 Figure 54. Glitches at the signal representation of the ECG. ........................................... 65 Figure 55. Bluetooth roles of the real and the simulated main loops. .............................. 66 Figure 56. Piece of code of the second part of the Bluetooth connection ........................ 67 Figure 57. Layout of screen 1 ......................................................................................... 68 Figure 58. Description of the temporal sequence of the Bluetooth connection ................ 68 Figure 59. Layout of screen 2 ......................................................................................... 69 Figure 60. Diagram that shows the temporal sequence of screen 2 and the Raspberry Pi. ....................................................................................................................................... 70 Figure 61. CSV format of the acquired results from a patient. ......................................... 70 Figure 62. First part of the flow diagram of the program. ................................................. 72 14 - Introduce analog and digital filters that help the acquisition of neat signals. - Obtain a communications channel with other devices. 1.5. GANTT The GANTT table included in Table 31 and Table 32 show the different phases of the project and the task management of the project. It can be seen as the main three different parts of the development described in procedure can be observed. There is a first part of hardware selection that is followed by two phases of programming. The first one tried to do a real-time acquisition of the system that didn’t work properly. Hence, the second part of the coding had better results and enabled achieving all the objectives and signals wanted to include in the system. Finally, up to the last day there were tests to ensure that the functionality of the system was correct. 15 2. Component selection and state-of-the-art The report starts with the component selection process and a small state-of-the-art analysis. This is an essential part of the project as it will determine the final solution and its development. To properly choose the components of the device, a preliminary study of the market has been made. Moreover, this will be the introduction to some of the features of the components that will form the final architecture of the system. 2.1. Microcontroller selection First of all, an appropriate microcontroller needs to be selected. This choice has some predefined requirements such as development time, limited resource or previous work inherited that narrows the decision to two different options and an STM32 custom based system or a Single Board Computer (Raspberry Pi). The first step is to describe advantages and disadvantages of choosing either the SBC or the STM32 option. STM32 microcontroller Advantages Disadvantages - Enables the introduction of real-time acquisition such as FreeRTOS. - Can be programmed in C, C++. - More control of the different functionalities of the sensors and the system. - Less power consumption. - Long development time of the entire project. - A hardware validation test must be done. - Longer periods of calibration for the sensors in the custom PCB. - Introduction of custom libraries to control the TFT screen. - Difficult integration of Python drivers already developed. - Shortage in the chip distribution Table 1. Decision table to choose a STM32 as a microcontroller. Single Board Computer Advantages Disadvantages - Shorter time of development than using STM32 microcontroller. - Can be programmed in C, C++ and Python - Easy to connect and integrate a HDMI screen. - Not all the features of the sensors can be developed as in depth as in the microcontroller. - Higher power consumption. 16 - Lower hours of hardware integration in the development process. - Support for real-time operating systems is not official and lacks of official performance reviews. - Shortage of components that form these types of boards. Table 2. Decision table to choose a SBC board. With all those key points that concern the architecture of the device, the option selected is an SBC like a Raspberry Pi. Strengths of this choice are the ease in the connection of a screen or the inclusion of pre-build sensors in their development boards. Furthermore, the ability to program the system with different code platforms like Python, C or C# is a big advantage in front of the shallower approach to the compiled code that uses the microcontroller. Other advantages of SBC boards are a higher reliability and a quicker development of the system, as the microcontroller may need design reworks and a longer introduction of the different sensors into the system. Some weak points in Table 1 make the viability of the project to be at risk if a STM32 microcontroller is used. For example, the usage of a microcontroller implies a longer development period to have full functionality of the device and pass longer validation processes than the ones passed with an SBC board. Another detrimental point of the STM32 is the interface of a HDMI connection to control a screen. Some custom libraries in C drive TFT screens but an adaptation to each screen is going to be needed. Instead of using C, this may be solved using Python in any SBC board. From this last point, and to reinforce the choice for this project of the SBC, some analysis to choose the software support has been done in the following tables. Embedded software platform Advantages Disadvantages - More control of the different functionalities of the sensors and the system. - Less power consumption. - Real-time acquisition is possible using a real-time operation system. - Long development time of the entire project. - Introduction of custom libraries to control the TFT screen. - Extra time will be needed to introduce the existing Python code into a C code. Table 3. Advantages and disadvantages of choosing C as programming platform. 17 Python Advantages Disadvantages - Easy to integrate all the components of the device. - Easy to enable the peripherals included in the board. - No need of drivers for the TFT screen. - Easy to plot results with Python libraries. - Less control in the driver performance. - Difficult to introduce real-time acquisition. - Requires more resources and power consumption is not optimized. Table 4. Advantages and disadvantages of choosing Python as programming platform. From Table 3 and Table 4 some comments can be done. On one hand, Python developed programs have drivers for easy representation of graphics that eases the visualization and interpretation of results. On the other hand, Python has other issues that must be dealt with, such as having multiprocessing signals at the same time or a limited custom configuration of the board. Finally, something that needs to be taken into account is that SBCs are prefabricated modules that in some aspects like power or unused peripherals may become over-dimensioned for the wanted application. All in all, some of the strong points of the SBC are crucial to have the project started and finished in a reasonable time with the introduction of all the elements into the system. Linking with the aforementioned point, Python is also the easiest way to complete the development in the deadline stablished. With those decisions made, it is time to select which SBC board is going to be the base of the device in question. Some of the alternatives of SBC in the market are summed up in Table 5. 18 Table 5. Benchmark table of the different SBC boards in the market. Sources. [2], [3], [4], [5], [6], [7], [8], [9], [10] Raspberry Pi 3B+ Raspberry Pi 4 Raspberry Pi Zero 2 W Rock Pi 4 Model C Pine64 RockPro 64 Banana Pi M5 Asus Tinker Board 2S Arduino Mega 2560 DragonBoard 410c Photo Processor Broadcom BCM2837B0, Cortex-A53 at 1,4 GHz Broadcom BCM2711, Cortex- A72 at 1,5 GHz Broadcom BCM2837B0, Cortex- A53 at 1,4 GHz ARM RK3399 A-53 1,4 GHz ARM RK3399 A-53 1,4 GHz Cortex A-55 ARM Rockchip RK3288 ATmega2560 ARM Cortex A53 at 1,2 GHz Peripherals HDMI, 40 pins (I2C, UART, 2 SPI, PWM) HDMI, 40 pins (I2C, UART, 2 SPI, PWM) HDMI, 40 pins (I2C, UART, 2 SPI, PWM) HDMI, 40 pins (2xI2C, UART, 2xSPI, ADC, PWM) HDMI, 40 pins (I2C, UART, 2xSPI, PWM) HDMI, 40 pins (I2C, UART, 2xSPI, PWM) HDMI, 40 pins (I2C, 4xUART, 2xSPI, PWM) 40 pins (I2C, SPI, UART, ADC, PWM) 40 pins (2xI2C, SPI, UART, I2S) Connectivity 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 4 USB ports 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 2 USB 3.0 and 2.0 USB ports 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 4 USB ports 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 4 USB ports 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 4 USB ports USB 3.0 and 2.0 ports 2,4G and 5G wireless, Bluetooth, BLE, Ethernet 4 USB ports USB connectivity 2,4G and 5G wireless, Bluetooth 4.2, BLE, Ethernet 4 USB ports Memory 1GB SRAM 1, 2, 4 or 8 GB SDRAM 512MB SRAM 1, 2, 4 GB SDRAM 1, 2, 4 GB SDRAM 4 GB SDRAM 2GB SRAM 256 kB flash memory 1 GB SRAM memory Power 5V/2,5 MicroUSB connector 5V/2,5 C USB connector 5V/2,5 microUSB connector 9V to 21V up to 2 A 12 V 3/5 A 5V 3A 5V 3A 7 - 12 V 8 - 18 V Operating system Debian, Linux in Micro SD Debian, Linux in Micro SD Debian, Linux in Micro SD Linux Linux Android and Linux Linux and Windows Arduino Code Android, Windows, Ubuntu, Debian Production lifetime January 2026 January 2026 January 2028 - - - - - - Price 47,95 € 48,28 € 19 € 109 € 55 € 109 € 129 € 38,50 € 165 € 19 In Table 5, are included the main solutions in SBC boards. Now, it is time to set the criteria to select one of those boards. Item Criteria Price As low as possible Peripherals and communication HDMI, I2C, SPI, Bluetooth, Wi-Fi Operating system Linux RAM Greater than 1 GB Power supply 5V Table 6. Criteria that define the Single Board Computer choice for the project. With the aforementioned requisites in mind, the best option is some kind of Raspberry Pi a 3B+ or 4 are good options with a similar price and full compatibility between them. Analysing the different alternatives included in Table 5, they can be divided in two groups compared to a Raspberry. The first group of boards have similar technical specifications as the Raspberry but also a higher price, about two or three times higher than the one of the Raspberry Pi. The second group are options that have lower specifications and lower price that are not suitable for this project, like the Arduino or the Raspberry Pi Zero. So, with this the SBC selected is a Raspberry Pi, the 3B+ or 4. Finally, one last remark has to be done. Even though all the process to define the basis of the device is done between a STM32 microcontroller or a single board computer, there is a drawback that affects at the same time both solutions. Due to the semiconductor crisis in the early part of 2022, the production of Raspberry Pi and STM32 has gone down. In the same line, Raspberry has stated that this situation will be transitory and that by the end of summer these issues have to be solved. 2.2. ADC front-end selection In this section, some of the options that are available to capture an ECG are going to be analysed. In this case, this analysis will describe three options from two different brands. The first one is the ADS129X type of ECG amplifiers that are provided by Texas Instruments. Analog Devices offers the AD8232 and the ADAS1000-3 and these options are compared in Table 7. 20 ADS129X ADAS1000-X AD8232 Number of ADC and characteristics ADS1294: 4 channels ADS1296: 6 channels ADS1298: 8 channels Resolution of 24 bits and up to 32 kSps ADAS1000-1: 5 channels ADAS1000-2: 5 channels ADAS1000-3: 3 channels ADAS1000-4: 3 channels Adapter for single lead detection. Gain Programmable from 1 to 12 BW = 150 Hz From 4,9 µV/LSB to 39,24 µV/LSB BW = 0,05 to 150 Hz Gain up to 100. BW = 2 kHz Input range From 0,3 to 2,3 V From 0,3 to 2,3 V From -0,3 V to 0,3 V CMRR and RLD CMRR = 115 dB RLD included CMRR = 110 dB RLD included CMRR = 80 dB Communicatio ns protocol SPI bus SPI, QSPI Voltage output. Need of communications interface Other functionalities Unipolar or bipolar supply up to 5,25 V. RLD, WCT and lead-off detection. Respiration detection and pace detection also included. Unipolar or bipolar supply up to 5,25 V. RLD lead-off detection. Respiration detection and pace detection also included. Single supply from 2V to 3,5 V. Front end conditioning for biopotential measurements. RLD included. Table 7. Benchmark between different ADC front-end. Sources. [11], [12], [13] From the specifications that are found in Table 7, all three chips are suitable candidates. Furthermore, from the three candidates, two different patterns in the acquisition process of the signal can be observed. The first two options, the ADS129X and the ADAS1000-X return the signal amplified and noiseless. In contrast, the AD8232 is just the first part of the front end, it is the initial part of the ADC that acquires the signal without filtering. As the characteristics of the three solutions are suitable for the application in question, the choice will be made by the availability of the chip. For that reason, the selected front-tend is the ADS1298, from Texas Instruments. Some of the key features of the ADS1298 are a high rejection to noise (high CMRR), programmable gain or SPI communications to send data to the microcontroller. All those reasons added to the availability of an evaluation board makes the ADS1298 the option to go for. Also, the ADS1298 includes up to 8 input ports with 8 ADCs that compensates the lack of ADCs that all SBC have. Therefore, the temperature measurement will be included in one of those differential ADC’s included in this chip. 21 2.3. Body temperature sensor selection As stated before, the device developed is intended to include a body temperature measurement into one of the ADS1298’s differential ADCs. With the support that will enable the measurement, the next step is to choose which sensor will be used. This is a wellknown measurement that can be done with a wide range of supports. However, the two solutions considered are included in Table 8. Performance item NTC Pt100 Response Non-linear Linear Package Small Big Velocity of the response Quick Slow Accuracy 5% 1% Cost Low High Table 8. Comparison between two sensors that measure temperature. Source [41] In Table 8 the two options are described, an NTC or a Pt100. From the table, the NTC option has more strengths than weaknesses, so the NTC will be the option to go for. The reasons to select it are: - Its response is quicker than the one of the Pt100. - The price of an NTC is much lower than the one of the Pt100. - This sensor is used in other applications in health monitoring in procedures thanks to its quick response and small size. - Although the NTC has weak linear response, some techniques to obtain a correct interpretation of the output of the sensor can be done easily. Because of the described points in Table 8 the drawbacks that the NTC present are less restrictive than the ones presented for the Pt100. For example, to obtain a linear response of the NTC some linearization techniques (see 4.4) can be applied. In addition, the lack of precision is something that should be solved as the variability of the NTC’s impedance value achieve up to a 5%. To deal with that, a previous measurement of each individual resistor should be obtained to calibrate the temperature conversion from voltage. With all that, in mind the chosen NTC is the Thermistor NTC 3950 of 100kΩ. 2.4. Pulse oximeter selection Finally, the last of the variables to monitor, the heart rate also known as beat per minute and the oxygen saturation in blood are monitored with a pulse oximeter. When talking 22 about this type of sensor, the reference supplier is Maxim. The main solution given to measure the wanted parameters is and optical sensor. This type of sensor looks for the reflection of light that occurs due to the media that is in front of the light (see 3.3). Maxim developed a sensor that has LEDs and photodiodes that are designed specifically to measure the heart rate and the oxygen saturation. The set of optical sensors from Maxim produce are the MAX3010X. Figure 1. Block diagram of MAX30105 sensor. Source. [14] These set of sensors consist of two or three LEDs and photodiodes of red, infra-red and green light. Those wavelengths can capture the changes in oxidation in the blood thanks to the reflection of these different lights into the blood inside the body. Those changes are obtained using an 18 bits ADC with an SNR of 80 dB. The acquired information is passed into an I2C driver. All the details will be included in the report (see 3.3 and 3.4). 2.5. Multivariable monitors state-of-the art After seeing all the sensors included in the system and the comparisons between the different options, there is a last state-of-the-art missing. After looking in specific parts of the final device, it is time to check for similar solutions as a concept, as a multivariable acquisition device. There are a few different products that try to emulate the multivariable acquisition system that is tried to be implemented in this thesis. But after some research, the most similar device is BITalino. 2.5.1. BITalino The BITalino (r)revolution with BLE connection is a board that includes different types of measurement interfacing different sensors to get biological signals from a person. It includes the ATMega328P, a microcontroller quite similar to the ones included in the basic Arduino models. 23 Figure 2. Bitalino Board. Source [15] As a result of including different ADCs in the board, this device acquires biological signals such as electrocardiogram (ECG), the electromyogram (EMG), the electrodermal activity (EDA) and the electroencephalogram (EEG). Just to have some performance number the ECG measurement is done through a biploar differential ADC, the AD8232 mentioned in the component selection (see 2.2). From the basic specifications included in Table 7, this front-end has a bandwidth that goes from 0,5 Hz to 40 Hz (all the range of heat rate frequencies) and has a CMRR of 86 dB. These specifications are the ones that will be found also in the ADS1298 explained in the following sections of the report. From these specification and the aforementioned signals that the BITalino can acquire, it can be seen that this board is a benchmark in which the development of the system can be referenced, in terms of cost and characteristics. What’s more, some of the key features of the BiTalino are going to be very similar to the ones of the device developed. Here are some examples: [40] - BITalino has developed a PC and smartphone application that shows the captured signals from the ADCs of the system. - It is going to be communication with an external device via Bluetooth to exchange information and check the different parameters. - ECG acquiring with three or two electrodes as it is wanted to implement in the device of this report. So, by having this device as a reference, the idea is to have a system capable of acquiring data as this device does. 30 Figure 11. Positioning of the other six electrodes close to the heart. One last signal to mention is the WCT terminal. This is a reference terminal for those 6 electrodes introduced. The Wilson Central Terminal is the mean value of the three limb nodes measurements. [22] [23] [14] 3.2. Body temperature measurement basics The next biological signal introduced is the body temperature. From the selection of components (see 2.3) the sensor that will be used is the NTC. 3.2.1. Theoretical approach Measuring the body temperature is one of the first easy and quick methods to find out if a patient has an infection or an autoimmune disease. A well-known technique to do that is with a variable resistor that changes its impedance due to temperature. In this case, the NTC decreases its resistance value when the temperature increases. Figure 12. a) NTC resistor used in this project; b) Catheter application of a NTC resistor. Source [16] 31 The NTC is a sensor which is already used in medicine. For example, their usage is extended when placed in the tip of the catheters introduced into the heart to monitor its temperature. Their small package and their speed make the NTC them ideal for this monitoring. Thus, some of those characteristics are wanted in the body measurement inside this project. After describing the advantages of the sensor, some drawbacks must be addressed. The lack of linearity that will be described in more detail in (see 4.4.2) and the sensitivity of the sensor with the skin surface (see 6.2) are the setbacks to overcome to use properly this sensor. [25] 3.2.2. Description of the body temperature measurement As briefly introduced in the section above, the body temperature is going to be taken by putting the sensor over the skin surface. This is relevant because depending on which place is the thermometer included, the reference of temperature taken may vary. For instance, the temperature measurements taken in the armpit go from 35,7 ºC to 40 ºC. This is the most common measurement of body temperature but taking it at other parts of the body may result in other temperature levels. Trying to minimize this difference, the location of the temperature sensor will be at the upper part of the arm, covered by the pressure cuff. The results obtained are explained later in the report (see 6.2). 3.3. Heart rate measurement basics The heart rate is one of the most important signals that can be extracted from a human. Just by looking at it any cardiac deficiency or malfunction such as an arrhythmia that provokes health problems can be detected. In this case, this is going to be measured with the pulse oximeter that uses optical methods. The heart rate measurement can be done from many different sources with very accurate results. The one chosen for the project is a technique called photoplethysmography (PPG). [27] Photoplethysmography uses light to see the variations in volume of blood flowing inside the body. In PPG measurements, it is commonly used light of wavelengths close to infrared. The emission of the light is done through a LED placed below the tissue to be analysed. With the reflected light affected by the media it is captured by a photodetector, and a relationship between the emitted light and the reflected light can be done. As a consequence of the positioning of the photodiode, the light acquired will carry information about the changes that happen inside the media at which the light is being reflected, in this case the change volume of blood happening in the tip of the finger. [27] 32 Figure 13. Light emitted by LED and the reflected signal returning to the photodiode. It is relevant to mention that not all the places of the body are valid to obtain clear signals. The light must be strong enough to get inside the tissue and obtain its reflection to complete the measurement. By monitoring the change in the intensity of the light reflected versus the emitted, the volume change in the veins and arteries is obtained. This signal results as a DC component and an AC component clearly represented in image 19. [28] [27] Figure 14. Representation of raw values from a pulse oximeter infrared light. In Figure 14 can be seen the DC and AC components. What is more interesting is the cause of the DC and the AC divisions of the signal. By knowing the source of the different parts of the signal some patterns in the pumping of the blood can be drawn. The DC part of the signal is caused by respiration, thermoregulation or nerve activity, something not of interest in this thesis. However, the AC part has the cardiac response of the heart and the evolution of the synchronous variations of the blood flow. [28] 309600 309700 309800 309900 310000 310100 310200 310300 310400 310500 310600 310700 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 Amplitude (number of counts) Number of sample Data from infrared signal 33 Figure 15. Signal obtained through a PPG measurement. Source [26] By obtaining the diastole and the systole points of the captured signal the heart rate can be obtained. 3.4. Pulse oximetry measurement basics Once the PPG technique has been presented, it is time to present another application of the measurement with light, the oxygen saturation in blood or Sp02. Pulse oximetry is the method to obtain the oxygen levels in the blood. The idea behind this it is to detect if the blood is well oxygenated and check whether the patient’s respiratory system is in good condition. This was a very useful measurement during COVID-19 pandemic where the pulse oximeter helped oxygen levels of patients. The idea behind the oxygen saturation is the monitoring of two types of haemoglobin. Haemoglobin is the protein that transports oxygen in the red cells of the blood. Haemoglobin’s absorption coefficient of light changes depending on the levels of oxygen contains. From the four different types of haemoglobin in the body, the oxygen saturation measurement monitors the oxygenated haemoglobin (HbO2) and the deoxygenated haemoglobin (RHb). This physical phenomenon makes feasible the introduction of Beer- Lambert law. This law claims that by knowing which is relation between the incident and transmitted light on a media it is possible to achieve different absorption coefficients even if the medias are one close to the other. [27] [28] 34 Figure 16. Beer-Lambert Law representation. Source [26] Once presented the method used to monitor the two types of haemoglobin it is time to understand how they are going to be distinguished. These two types of haemoglobin are in the same media, so there has to be a way of distinguishing one from the other. The way to do this is by having two emitting lights entering the tissue so that the absorption coefficient of both types of haemoglobin can be different enough to distinguish them both. The idea is to transmit in as many wavelengths as types of haemoglobin are monitored, in two in this case. Once this is clear, it is needed to find the adequate wavelengths to monitor them. [26] [27] [28] Figure 17. Absorption coefficient of the different haemoglobin in blood. Source [16] Here is where Figure 17 comes into play. From that figure it can be observed that in the 660 nm the difference between the absorption coefficients is pronounced, whereas in the 940 nm the absorption coefficients are very similar. Knowing that relationship and monitoring the division of the two coefficients, a relation between the readings of both 35 wavelengths can be done. Hence, the only thing that can be done is to enter two different wavelengths one of infrared light emitting diode (880 nm) and a red light (660 nm). [27] [28] Another paramount point to make before moving on, is to describe which kind of relationship must be applied between wavelengths. This is answered in Figure 15 where the signal that will be monitored is the same as the one in the heart rate measurement. Only that instead of having one signal, two signals will be involved. Figure 18. Ratio computation between infrared and red signals for Sp02. Source [17] In Figure 18 it can be seen as the AC and the DC components of the signal are related. As the absorption coefficient of the RHb in the red spectrum is higher than the HB02, when dividing the two signals there is going to be a relationship (R) between the AC values of the signals. With that difference in amplitude, a ratio between the different absorption coefficients or amplitudes (they are synonyms) can be obtained. [27] [28] After all this explanation, it must be said that the Beer-Lambert equation in the oxygen saturation measurement is not completely suitable for the oxygen saturation. Due to interferers such as bones, nervous terminations, or the skin there is a deviation in the absorption coefficients obtained from the acquisition of light. Hence, the evaluation of the Sp02 can use this ratio but also needs a calibration process that will vary on the sensor chosen and the place to make the measurement. [27] [28] 36 4. Hardware integration and development After seeing the theoretical approach of all the measurements, the block diagram in terms of hardware design will be described. The general view of the system is in Figure 19. Figure 19. Block diagram of the system (II) 4.1. Power management description Power management in this system must integrate a screen and a continuous operating system that is capturing data. This means that the power demand of the system is going to be quite high. Some of the main characteristics of the required battery needed for this system are in Table 9. Item Value Capacity 10000 mAh Input to charge the battery 5 V and max current of 2A Total Output 5V and maximum current of 3A Table 9. Main characteristics of the power supply needed for the device developed. After seeing the information summarized in the Table 10, stands out that the power supply is set to 5V. This is something very interesting that opens a wide range of battery packs that can power up the device. This is since most of the actual smartphones’ external 37 batteries work at that voltage. As a consequence of the worldwide spread of smartphones around the world, these battery packs are also widely spread around the world. Specifically, the power bank chosen is the ANKER 79AN7917. For the battery presented its capacity is 10000 mAh with a maximum output current of 3A. [29] Figure 20. ANKER 79AN7917 (left); AC/DC power converter from Raspberry (right) Another option would be to connect the system into the mains. This is commonly done with Raspberry SBC as AC/DC converters normally are included in the starter pack of the SBC board. The power up with an AC/DC power converter is a possibility but the system will see higher levels of noise in the ECG measurements making the reading of this signal quite difficult and, in addition, safety issues would arise. 4.2. Raspberry Pi 3B+ The Raspberry Pi is one of the most cost-affordable SBC boards and one of the most used computers for small projects. Its flexibility of usage going from a fully computerized application to a more GPIO-based application like Arduino applications. Table 10 includes some of the characteristics of the board. Item Raspberry Pi 3B+ Processor Broadcom BCM2837B0, Cortex-A53 64-bit SoC @ 1.4GHz Memory 1GB LPDDR2 SDRAM Connectivity 2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2, BLE Gigabit Ethernet over USB 2.0 (maximum throughput 300Mbps) 4 × USB 2.0 ports Pins Extended 40-pin GPIO header SD Card Micro SD format for loading operating system and data storage Input Power 5V/2.5A DC via microUSB connector 5V DC via GPIO header Table 10. Characteristics of the Raspberry Pi. Source [30] [2] 38 After describing the main characteristics in Table 10, some of them are interesting to be developed. One important aspect that reduced the selection of SBC boards is the RAM memory of the SBC. When creating code, to import files or download resources it needed a big enough RAM memory. So, the minimum capacity of this memory was set to 1 GB. Another significant aspect of the design of any device is how the connections between the different parts of the system are going to be made. 4.3. ECG hardware description From the selection of the components aforementioned (see 2.2), the chosen device that will acquire the ECG signal is the ADS1298. This chip has the capability of acquiring the 12 lead measurements with respiration monitoring. After the description of the main blocks of the chip the connections and the integration into the evaluation board will be explained. 4.3.1. ADS1298 front-end description The ADS1298 is a 24-bit low power analog front-end for biopotential measurements. Some of the main characteristics are summarized in Table 11. Item ADS1298 Description Eight Low Noise PGAs and eight high resolution ADCs Power consumption 0,75 mW/channel Input referred Noise and CMRR 4 µVpp with gain 6 and BW = 150 Hz and CMRR of -115 dB Data Rate Data rate from 250 samples per second to 32000 samples per second Power supply Analog VDD: 2,7 to 5,25 V Digital VDD: 1,65 V to 3,6 V Communications SPI interface Others Right Leg Drive Amplifier included, Lead-Off Detection, Wilson Terminal and Pace detection. Table 11. Main characteristics of the ADS1298. Source [11] Some important characteristics can be extracted from Table 11. In terms of power supplies, the ADS1298 works with different voltage levels. On one hand, the digital power supply is used in the SPI signals that will transfer all the data into the microcontroller. On the other hand, the analogic power supply can be set up to bipolar or unipolar. For most of the ECG signals obtained a bipolar power supply may be needed with ±2,5 V. The next step is the description of the block diagram given by Texas that shows the main functionality of the front-end. From [11] in page 25 a basic idea of the functionality of the chip is described. 39 The idea is that there are up to eight different biopotential signals entering eight a differential ADCs with programmable gain that return the acquired values through a SPI bus. With the selected front-end, the next step is to define which connections to the body are going to be done. This is summarized in Table 12. External components Decision Electrodes Use the less electrodes possible in the measurement. This means only using 3 electrodes. Leads Obtain a clear signal that may be equivalent or similar to a Lead. This means using 1 Lead Positioning Include at least one of the electrodes in the upper part of the arm Table 12. Connections included in ADS1298 in this project. As the electrodes are not going to be placed in the chest, unwanted effects like noise will appear (see 6.1), that must be rejected. In foresight of these possible problems the RL feedback connection is introduced. This will reduce the common mode noise (CMRR) entering in the measurements. With those requirements and the choice of the circuit to be implemented, the final possible connections are described in image 29. Figure 21. Measurement with one electrode in the pressure cuff and one electrode in the chest (left); Measurement with one electrode in a metallic bar and the other in the pressure cuff (right). Once the type of circuit has been selected, it is time to choose at which ADC channel of the ADS1298 the electrode will be connected to. The best way of understanding the ADC 46 The last column in Table 15 emphasizes the aforementioned problem. In an interval of temperatures from 35 to 37 ºC there is a difference of more than 0,5 ºC. To solve this, instead of having just one linearized expression, it is better to have segmented regression lines in smaller temperature intervals that will achieve a higher similarity with the real curve (R2 > 0,999). Figure 28. Third segmented linearization of the temperature measurement. Figure 29. Fourth segmented linearization of the temperature measurement. 47 Figure 28 and Figure 29 show two of the regression lines included in the NTC response. It can be observed that their R2 coefficient has improved from the total linear regression of Figure 27. Table 16 has different colours for the different regression lines that are defined in the code seen in Figure 46. Table 16. Summary of the temperatures with segmented regression lines. With this segmentation the error between the real and the linearized equation is much smaller, and the obtained sensor is much more precise in critical ranges between 35 ºC and 38 ºC as seen in the last column of Table 16. 4.4.3. Body temperature hardware connections After describing the resistors and the circuit included in the final design, it is time to understand how the circuit will be powered up and connected to the ADS1298. The power up of the circuit will come from the 5V from the Raspberry, the same voltage introduced to the ADS1298. The other part of the connection is the interface between the temperature sensor and the ADS1298. To have more measurement range at the input of the ADC, a gain of 1 is set and the signal output and GND have to be connected to one channel of the ADS1298. The negative ports of the differential ADCs are connected to the Value entered (ºC) NTC value (Ω) Temperature applying the liniear regression (ºC) Difference in temperature (ºC) 24 104541 24,04 0,04 25 100000 24,99 -0,01 26 95810 25,95 -0,05 27 91839 26,93 -0,07 28 88000 27,95 -0,05 29 84430 28,98 -0,02 30 81000 30,04 0,04 31 77620 30,96 -0,04 32 74400 31,94 -0,06 33 71340 32,93 -0,07 34 68430 33,96 -0,04 35 65650 34,98 -0,02 36 62980 35,97 -0,03 37 60440 36,98 -0,02 38 58000 38,00 0,00 39 55700 38,99 -0,01 40 53500 40,00 0,00 41 51370 40,99 -0,01 42 49330 41,96 -0,04 43 47390 42,95 -0,05 44 45540 43,96 -0,04 45 43780 44,99 -0,01 48 WCT terminal. To change that the JP 16 has to be removed as can be seen in [33] in page 6, to have access to the negative terminals of the ADCs negative inputs and connect the GND to have the correct signal sensed. 4.5. Heart rate and pulse oximeter hardware description As exposed before in component selection (see 2.4), these two measurements come from the same sensor. This sensor is included in a Pimoroni development board that will be connected to the Raspberry Pi through the I2C bus. 4.5.1. MAX30105 description The block diagram of the MAX3010X is included in Figure 1 is a very known design that incorporates three LEDs and three photodiodes that emit and capture the reflected light in the ambient. In this particular device there are three different wavelengths that can be emitted and received. The MAX30105 includes a third green LED that is used for other applications of the sensor like detecting air particles or smoke. The two used signals enter into an 18-bit ADC that measures the current coming from the photodiode. This signal passes through a digital filter to finally be sent into the I2C bus with the data wanted. [14] 4.5.2. MAX30105 connections In this case, the sensor is integrated into a small PCB from Pimoroni. This PCB has 5 pins that are connected into the I2C bus of the Raspberry. In the board there is a power level stage and the pull-up resistors adapting the I2C bus impedance. Then, the connections to the system are shown in the same evaluation board. The connections are in Figure 31. Figure 30. Board used in the project that includes the optical sensor MAX30105. The pinout of the connection between the Raspberry and the MAX30105 board is included in Figure 31 and the connections are detailed in Table 17. 49 Figure 31. Connection between MAX30105 board and Raspberry Pi 3B+. MAX30105 Raspberry Pi pin Functionality of the connection 3,3 V Pin 17 Power supply SDA Pin 3 Data in the I2C bus SCL Pin 5 Clock in the I2C bus INT Pin 7 Interrupt to obtain readings GND Pin 9 Ground Table 17. Description of the connections between MAX30105 and Raspberry Pi 3B+. 4.6. Display The display for this application must be a small and touch sensitive screen so that the system is portable and autonomous. The display used is the Midas MCT050HDMI. This display has a resolution of 800 x 400 and its logic also works at 5V. This particular model is assembled on a module that adapts the connections of the display into a Raspberry Pi. This is depicted in Figure 32. [31] 50 Figure 32. Connection between Raspberry Pi 3B+ and TFT display. Source [31]. The red section in Figure 32 is the connection between the Raspberry and the display. As it can be seen all the 40 pins of the Raspberry are connected to the display. Hence, this connection does not allow to connect any other external device into the Raspberry Pi itself. However, the connector in blue included in the aforementioned module reproduces the pinout of the Raspberry. This allows the connection of the other parts of the device into the Raspberry. Finally, in green the HDMI connector that controls the display with the Raspberry’s HDMI connector. [31] 4.7. Device integration With all the different parts of the device described, a block diagram summarizing all the blocks of the device is in Figure 33. 51 Figure 33. Complete block diagram of the device (III) 4.7.1. Connection diagram of all the hardware components The detail in the final physical connections can be found in Figure 34. Furthermore, the connections at architecture level are included in Figure 35 and the tables describing those connections are Table 18, 19, 20 and 21. 52 Figure 34. Connection between the sensors and the Raspberry Pi connections. After having described previously the name of the connectors and have this same block diagram with obscured parts, here is the complete physical connection between Raspberry and the sensors. The next diagram shows all the connections that are involved in the architecture level. The connections are differentiated between inputs, outputs, and input/output. Figure 35. Different type of pins and connections 53 Figure 36. Diagram block of all the connections of the device (IV) 54 The next few tables will describe all the connections using the connector definition in Figure 24. Connections between ADS1298 and Raspberry Pi 3B+ ADS1298 Pin ADS1298 Connector Raspberry Pi pin Functionality of the connection 5V J4 Pin 2 Power supply 3V3 J4 Pin 1 Power supply GND J4 Pin 6 Ground CS J3 Pin 24 Chip select for the SPI bus SCLK J3 Pin 23 Serial clock for the SPI bus DIN/MOSI J3 Pin 19 Input information for the SPI bus DOUT/MISO J3 Pin 21 Output information for the SPI bus DRDY J3 Pin 32 Signal that interrupts when a correct value is obtained from the ADC GND J3 Pin 20 Ground Start J3 Pin 14 Signal that allows the acquisition Table 18. List of connections between ADS1298 and Raspberry Pi 3B+. ECG measurement connections ADS connection ECG connector Functionality of the connection RL Pin 1 Right leg electrode RA Pin 2 Right arm electrode LA Pin 3 Left arm electrode Table 19. List of connections between electrode connector and ADS1298. MAX30105 connections to Raspberry Pi 3B+ MAX30105 Raspberry Pi pin Functionality of the connection 3,3 V Pin 17 Power supply SDA Pin 3 Data in the I2C bus SCL Pin 5 Clock in the I2C bus INT Pin 7 Interrupt to obtain readings GND Pin 9 Ground Table 20. List of connections between MAX30105 and Raspberry Pi 3B+. 55 Temperature connection to Raspberry Pi NTC sensor Raspberry Pi pin Functionality of the connection 5 V Pin 2 Power supply GND Pin 14 Ground reference Temperature connection to the ADS1298 NTC sensor ADS1298 Pin Functionality of the connection Output Channel 7 Clock in the I2C bus NTC connector to linearizing circuit NTC connector Connector Functionality of the connection NTC+ Pin 1 Positive pin of the NTC NTC- Pin 2 Negative pin of the NTC Linearizing circuit to ADS1298 NTC connector ADS1298 Pinout Functionality of the connection Temp Out CH7 positive Output positive pin from the circuit Table 21. List of connections between Temp sensor in the circuit. 4.7.2. Physical support In Figure 37 it is presented the final support that has been used during the development of the final system. A prototype board includes connections between the ADS1298 and the Raspberry Pi. The temperature sensor and the heart rate monitor are included in another prototype board, so that the device can be connected to many places of the body. Finally, as will be seen in the results section (see 6.1), one of the ways of acquiring ECG is by connecting a piece of metal into one of the ADC input ports. Figure 37. Physical support of the system (left). Metal piece used in measurements (right). 62 To mitigate the high noise effects in the signal, Maxim introduces a digital filter in the hardware and also a FIR filter in the code in Figure 107. This smoothness of the signal will help achieving clear slope changes in the signal, the basic methodology behind the acquisition of the heart rate. To acquire this signal properly, the sensor must pass along a configuration path. To do that, the Pimoroni code based in Python will help to ease the configuration of the sensor to finally develop the heart rate code that can be seen in Figure 109. Figure 48. MAX30105 configuration steps. The configuration of the sensor sets the number of bits of the ADC (17 in this case), the samples per second at 400 Hz and the current intensity of each one of the LEDs. Furthermore, thanks to the modification of the current intensity, the device can be calibrated allowing the acquisition of the Sp02 measurement. This LED control is done through a command that changes a PWM signal that modulates the current polarizing the LED with a maximum value of current is 50 mA. [14] The next step after configuring the LED’s intensity is to acquire the heart rate and the oxygen saturation. The working principle behind the acquisition of the heart rate and the Sp02 is to check the change in slope of the signal acquired. These changes in the slope can be obtained when the signal crosses its mean value. If the following sample after an acquired a sample equalling to the mean value is smaller, the sign of the slope is negative. However, if the following sample acquired after a sample equalling to the mean value is 63 greater, the slope is positive. Hence, the time between two DC crossings with the same slope can be translated as the period of the signal. With that period found the BPM value is obtained with (11). 𝐻𝑒𝑎𝑟𝑡 𝑅𝑎𝑡𝑒 (𝐵𝑃𝑀) = 60 𝑡𝑖𝑚𝑒 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑝𝑒𝑎𝑘𝑠 (11) Moving to the Sp02 measurement, if the ratio between wavelengths, R, alone is not exactly the wanted oxygen saturation in blood, a general equation is established as the one that outputs the Sp02 measure. This equation is included in (12). [32] 𝑆𝑝02 =110 −25 · 𝑅 (12) With the configuration and the equations that will obtain the final values, the code applied to the BPM and the Sp02 measurements can be found in Figure 103. Some highlights of this code are the DC estimator, the FIR filter aforementioned and the main function that acquires the beat detection and the computation of the Sp02 values. [34] Figure 49. Average estimator for a set of MAX30105 samples. Source [34] The DC estimator included in Figure 49 finds the mean value of the signal. Finally, the last parameter to be computed is the Sp02. It involves obtaining the amplitude and the mean value of the signal that is arriving from the ADC. Hitherto, the maximum value of the amplitude has not been mentioned but is also monitored. When the maximum value is reached, the Sp02 is computed and returned when a beat is detected. This can be seen in Figure 108. Once one process of acquisition and computation of BPM and Sp02 have been described, the way of sequentially acquiring those parameters can be found in Figure 103. In the mentioned figure, the lines of code included show that the acquisition of the BPM and Sp02 is done 25 times and the mean value of them is the value represented in the results display described in the next section. 5.3. Layout of the results One of the most relevant features of this device is the representation of the signals. In this case, Python has the Matplotlib library. The same library allows the graphic representation of the ECG and shows the other parameters in textboxes. 64 Figure 50. Description of the layout included in the application Figure 50 contains the layout of the application. It must be said that each one of them can be updated independently. This is a very flexible way of editing and changing values in the screen asynchronously with the code that is being repeated along the main code and exemplified in Figure 51. Figure 51. Code to update the data in the screen. 5.3.1. Data representation in Python Despite having a very friendly way of representing the signals, Matplotlib has not allowed the real-time acquisition and representation of the signals. Therefore, the acquisition of the signals is done sequentially. Theoretically, Python has libraries that allow having two different processes running at the same time. Python’s library multiprocessing allows the execution of two different processes at the same time, as sketched in Figure 52. [36] Figure 52. Initialization of two processes simultaneously. 65 This initialization of both processes works, but the result of the two processes does not exit simultaneously. Due to the need of managing two sources of data at the same time, a queue will also be needed to handle the transaction of information. [36] Figure 53. Chronogram of output results entering and leaving a queue. This multiprocessing sequence adds two delays. The first one is the time spent putting the output results inside the queue and the second delay is taking out information of the queue. Those two made impossible the real-time plotting and the computation of the heart rate. As the total delay due to the creation of this queue was higher than the acquisition of the ADS1298 (2 ms) the acquisition was decimated and full of glitches. Moreover, those delays affected the heart rate value, as those delays were added to the period of the signal acquired. As an example of this effect, Figure 54 shows how the glitches affected the acquisition even by entering a signal generated from the signal generator. [36] Figure 54. Glitches at the signal representation of the ECG. To solve this effect, the measurements are acquired sequentially as seen in Figure 102. 66 5.4. Bluetooth driver development The device developed in this project is intended to incorporate communications with other devices such as a Bluetooth sphygmomanometers or smartphones. With that in mind, the communications protocol developed is Bluetooth. In the main loop, Bluetooth appears at the start and at the end of any acquiring routine. The reason behind having Bluetooth at the start is to set the patient credentials but also intends to represent the connection with the sphygmomanometer. Therefore, this communications protocol will enable the acquisition of blood pressure value. As the sphygmomanometer is not included in the project, the Bluetooth app is not the final version that should be included to communicate with a commercial sphygmomanometer. Despite that fact, the developed code and app can transmit information using Bluetooth. 5.4.1. Description of Bluetooth protocol Bluetooth is a way of connecting two devices with an aerial serial transmission using a 2.4 GHz band. As all communications protocols, Bluetooth has two types of roles between its connected devices, server and client. The client is the receptor of information and the one that sets the channel for the communication whereas the server is the transmitter of information and the one connecting into the already set up client’s channel. The connection process in a Bluetooth device is done through pairing, which is an agreement between both devices to set up a communication. When paired once, there is a bond between the two devices which enables them to connect directly whenever they are close to each other. Moving on, there will be a change between the application created in this project and the final one in the role of client and server. Actually, the smartphone is a client and all the other devices pass information to it. So, in this project the Raspberry Pi will always be a server. However, if the final sphygmomanometer device is introduced, the Raspberry will have both roles a client role for the sphygmomanometer and a server role when connecting to the mobile phone. The differences between the real case and the simulated one in this project is represented in Figure 55. Figure 55. Bluetooth roles of the real and the simulated main loops. 67 5.4.2. Bluetooth drivers The main loop application will have two different parts in which Bluetooth will be used. The first one is the connection with the sphygmomanometer. In this phase, the idea is to synchronise the acquisition of data and the configuration of the system to start monitoring of the patient. This is included in Figure 106. This first Bluetooth connection configures the duration of the monitoring and the number of loops done in the acquisition. Once this configuration is done, the system starts acquiring data to send it to other compatible Bluetooth devices. This is a part of the system thought to develop a personal database by adding all the results into a bank of data. To transmit it two steps are needed. Firstly, the Raspberry needs to pass the length of the information transmitted to the device. Once this is done, the data will be transmitted and the Bluetooth channel will be closed. The code that does this final functionality is included in Figure 56. [39] Figure 56. Piece of code of the second part of the Bluetooth connection 5.4.3. MIT App Inventor development Now that the server part of the Bluetooth connection is explained, the Client device has to be described. In this case, the client will be always the application in the smartphone developed with MIT App Inventor 2. This tool is a useful and intuitive way of creating an Android App by using programmed blocks of code that create different functionalities. In this case, the application has two different screens. The first one emulates a sphygmomanometer and the other screen emulates another Bluetooth device that is able to represent the data received. [39] 68 5.4.3.1. Sphygmomanometer simulator screen This first screen of the application includes a button that displays the Bluetooth devices available to connect with the smartphone. Additionally, once there is a connection, the name of the patient can be introduced. Afterwards, the duration of the acquisition is set with three different buttons. The layout of the screen is in Figure 57 and the link between devices is described in Figure 58. [39] Figure 57. Layout of screen 1 Figure 58. Description of the temporal sequence of the Bluetooth connection The connection starts by opening the smartphone with the Raspberry. The next step is the introduction of the patient’s name and afterwards the application sends a 3, 4 or 5 that sets the acquisition loops of the system. Once this value is received by the Raspberry, the connection can be closed. The disconnection is done by sending a 0 and the acquisition starts. [39] 69 5.4.3.2. Acquiring data screen In the second screen of the app, the data is transmitted and collected in a table format. Figure 59 is the layout of the second screen. Figure 59. Layout of screen 2 In this screen there is the same picking selector as in screen 1. Now the sequence to get the information is shown in the diagram included in Figure 60. Once the connection is established, the smartphone claims for the length of the information. Once received and the Config button is red, by pressing Get data which sends a 1 into the Raspberry. This activates the transmission of the data acquired. Finally, the get data button becomes blue and Display Data is available and will plot all the information in a table format. The next section will explain how this data is also stored locally in the raspberry with a CSV file in case there is not a smartphone at which the data can be sent. 70 Figure 60. Diagram that shows the temporal sequence of screen 2 and the Raspberry Pi. 5.5. CSV creation The main loop is also able to produce a CSV with a resume of the monitored activity from the last acquisition done. This document is a summary of the different data that has been shown in the display during the acquisition process. The resulting data format is included in Figure 61. Figure 61. CSV format of the acquired results from a patient. 71 Included in Figure 61, in the data is found the acquisition time, two different temperatures, the date at which the acquisition is made, the heart rate and Sp02 values. This is done with the csv library of Python that creates a file and stores it locally. 5.6. Main program flow description After describing all the different functionalities of the device, it is time to check the sequential order of all the program. The idea is to present all the diagram flow of the main program at the additional part of the report and in this section get pieces of it to explain in detail the most important parts of the code. The total flux diagram of the system is in Figure 91 and 92. In this chapter, this total flow diagram will be explained in different sections. The first section is in Figure 62. This part of the flow diagram includes the configuration of the device and the duration of the monitoring to the patient. All this is done via Bluetooth. The first step of the program initiates the user interface and sets the channel of the Bluetooth connection to 22. This is a way of fixing the channel at which the connection will start and speed up the connection between the two devices. Once the channel is set with the server role in the connection, the device is waiting for a client to connect. Once the connection is established the third step of the program is the description of the messages that can be sent to the device. For the values 0, 3, 4, 5 and 6 there are different actions done to the device described in Table 23. [39] Value received Actions to the acquisition of the device 0 The Bluetooth is disconnected and the program continues 3 There are going to be 5 acquisitions of all the parameters 4 There are going to be 7 acquisitions of all the parameters 5 There are going to be 10 acquisitions of all the parameters 6 The device stops the program Table 23. Bluetooth messages exchanged between smartphone and Raspberry Pi. 78 After reviewing the results locating the electrodes with satisfactory results, the next step was to include one of the electrodes in the arm. This implied a change of cables that no longer were shielded and longer making noise rejection worse. [35] Figure 70. Positioning of the electrodes and results obtained. Figure 70 shows an undesired effect in the acquired signal. Firstly, the noise is worse, partially for the unshielded cables and partially because the location of the electrodes. The second undesired effect visible is that the signal has a drift. Depending on the patient’s movement, or any other involuntary movement such as respiration, one electrode acquires an offset value different from the acquired by the other electrode. This means that when the patient standstills without breathing the measurement is correct, otherwise drift appears. Figure 71. Second positioning of the electrodes and results obtained. 79 In Figure 71 the configuration of the measurement has changed again and now, instead of having the electrode in the chest, the electrode is connected to the metal bar from Figure 37. Added to the last undesired effects of the chest plus the arm configuration, there is another unwanted effect, the offset of the measurement is nearly 150 mV. This is caused by the usage of different electrodes with different impedances. Even another effect in that acquisition can be observed. The presence of an oscillation superposed to signal, called baseline wander. [35] This baseline wander is an effect that is seen in the acquisition of the ECG caused by movement and respiration. This effect was not seen earlier that abruptly because the electrodes were in surfaces that had the same movement. In those situations, this movement was minimized, but now one of the electrodes is not even in the body surface of the patient. [35] To eliminate the offset and the baseline wander two filters are included. The first one is a mean filter to eliminate the offset of the signal and the second effect is eliminated using a high-pass Butterworth digital filter. With that solution, the final processing of the ECG measurement is resumed in Figure 72, Figure 73 and Figure 74 show the final signal acquired. Figure 72. Path followed by the ECG signal Figure 73. Filtered results with the chest plus arm positioning of the electrodes. 80 Figure 74. Filtered results with the metal plus arm positioning of the electrodes. The results with the metal and arm configuration are improved in terms of drift and baseline wander but some more work can be done filtering noise. However, the recommended positioning of the electrodes is the chest plus arm configuration where the signal is clear and without any of the different effects described in this section. 6.2. Body temperature measurements The body temperature measurement is being introduced in the upper part of the arm. Figure 75. Location of the temperature sensor and thermometer’s results comparison. The body temperature measurement has always been realized with this configuration in Figure 75. This guarantees that the measurement is always done in similar conditions and has a reduced impact of the ambient conditions. Considering that last remark, the Armpit temperature Superficial temperature Thermometer 1 36,30 34,70 Thermometer 2 36,10 34,60 Thermometer 3 36,30 34,70 Difference Mean 36,23 34,67 1,57 81 behaviour of this sensor has been tested compared to other three commercial thermometers. It must be said that the location of the thermometer makes the measurement differ from the one obtained from the armpit. This body temperature measured will have a value smaller than the one expected (36 ºC to 40 ºC). In this case the measured values will be around 33 to 35 ºC. This effect has been compared with other three different thermometers with the results seen in Figure 75. From there, a relationship between the acquired temperature and the armpit temperature was made. It must be clearly remarked that this relationship is just an experimental relationship applicable to this project and the system developed. Hence, more testing and surrounding conditions may adjust this relationship between these temperatures. Figure 76. Acquisition of body temperature and armpit temperature That is why there are two different temperatures printed in the screen. Temp1 corresponds to the superficial temperature whereas Temp2 corresponds to the temperature equivalent to a measurement at the armpit. 6.3. Heart rate and Sp02 measurements The heartrate and Sp02 measurements have been tested comparing the obtained results of the MAX30105 with commercial pulse oximeters placed in the finger plus some more testing has been done placing the sensor inside the pressure cuff. Figure 77. Possible locations of the pulse oximeter. Initially, the measurements done with this sensor compared to the ones done with a commercial device were very different due to a lack of calibration. 82 6.3.1. Calibration process As explained in the theoretical approach, the heart rate is based only in infrared or green light. However, the Sp02 measurement is a relationship between two emitting lights with different wavelengths. Not only that, the Sp02 relates the DC and the AC components of the signal captured. [26] [28] This means that the calibration process has to take into account that the intensity of the light received of both wavelengths has to be as similar as possible. To do that, the intensity of the emitted light can be adjusted so that the reflected light has more or less the same DC value. This will minimize linearity distortion in the measurement as two signals at the same range of values are going to be compared. [28] Figure 78. Distorted results from the infrared and red signals It is important to obtain two signals that are more or less the same, but not identical. If the DC levels of both signals obtained are the same an oscillatory behaviour can appear. To avoid this, the highest value of one signal must never be higher than the lowest value of the other signal. The optimal situation can be seen in Figure 81. Once this calibration is done, the next step is to filter the signal. The filter used is a FIR filter that can take out the high frequency noise. The path of the signal can be seen in Figure 79. [28] [32] Figure 79. Filtering path of the pulse oximeter signal 0 50000 100000 150000 200000 250000 300000 350000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 Counts Number of sample Comparison between DC levels Infrared Red 83 Just to check which is the shape of the signal obtained before filtering it, Figure 80 shows how the signal of the heart is superposed to high frequency noise. This effect is caused by the application of excessive pressure over the sensor, one of the reasons why the pulse oximeter normally has a mechanical adjustment that helps in the positioning of the finger. Figure 80. High frequency noise in the pulse oximeter measurements. 6.3.2. Heart rate and oxygen saturation finger results The Sp02 and BPM measurements have been obtained from two different positions. The first of them is the tip of the finger, as other pulse oximeters. The results have varied during the development of the project, to finally achieve a stable and controlled measurement of both parameters through the calibration process aforementioned as seen in Figure 81. Figure 81. Calibrated red and infrared results of the pulse oximeter. 311000 312000 313000 314000 315000 316000 317000 318000 319000 320000 321000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 Counts Samples Raw data calibrated Infrared Red 84 Figure 81 show the two signals calibrated as the amplitude of one signal is always higher than the other but the offset values of both signals is more or less at the same level. The results of this signal are comparable to the ones resulting from a commercial device as can be seen in Figure 82. Figure 82. Correct results from the pulse oximeter The results in Figure 82 are an execution of the routine that is implemented in the final code of the application. The instantaneous acquired signal of the BPM has variations that are smoothed with a mean filter. The Sp02 results vary between 97 % to 100 %. These results are between the normal oxygen levels of a healthy patient and the most important aspect of this measurement is the consistency. Some of the 100 % values in reality may be higher than 100, but this is filtered in the acquisition sequence. This may happen because the relation used (12) is a general solution, not specific for this system. This is not a very critical issue of the sensor as the resulting Sp02 value is the mean of all the measurements obtained. However, more experimental measurements should be done to finally create an equation specific for this device. [32] [34] 6.3.3. Arm results The arm results are quite different in the Sp02 domain. The measurement of the infrared light is invariant from the one obtained in the finger. However, the measurement of the red light has changed. This makes that the results of the BPM measurement to be correct but the Sp02 measurements are not consistent. This can be seen in Figure 78 where the distance between the different offsets is far apart from the difference seen in Figure 81. This point is strengthened by the inconsistency of the measurements in Figure 83. The values obtained vary form a 100 % to a 50 % in just a beat, something impossible. This distortion in the measurement is due to the difference in the red and infrared measurements in the arm and the positioning of the sensor. 85 Figure 83. Erroneous acquisition of the Sp02 values. Positioning and pressure are effects that make the sensor have distorted measurements. This means that the inclusion of this sensor in the arm will require a fixed location and a more specific calibration. It must be added that this doesn’t disqualify this sensor to be introduced in the upper part of the arm, it is just a lack of time to calibrate the sensor. 6.4. Application results Just to finally check the end-to-end functionality of the device, a screenshot of the resume that is seen in the application is shown in the Figure 84. Figure 84. Table representation of the data gathered by the acquisition process. 86 6.5. Complete device results The connection configurations that can be done to acquire the different signals are multiple, so a little summary of the different possibilities of the connections is made. Connection 1: Electrodes in arm, metal piece, temperature at the arm and BPM and Sp02 measurements at the arm. Connection 2: Electrodes in arm, metal piece, temperature at the arm and BPM and Sp02 measurements at the finger. Connection 3: Electrodes in arm and chest, temperature at the arm and BPM and Sp02 measurements at the arm. Connection 4: Electrodes in chest and arm, temperature at the arm and BPM and Sp02 measurements at the finger. Connection 1 Connection 2 Connection 3 Connection 4 Figure 85. Different possible connections described along the project. From the four different configurations that are exposed, the most reliable is connection 4, which has a clear ECG signal, a calibrated BPM and Sp02 results and the body temperature signal. However, All the other combinations are possible with results also acceptable thanks to the filtering of the signals obtained. The results obtained with the final solution, and the chest plus arm configuration can be seen in Figure 86. 87 Figure 86. Results in the final display. 7. Budget The components list is going to be detailed in Table 29 and Table 30. The more reduced version of the costs of one prototype are described in Table 24. Table 24. One prototype material cost The total costs in material are going to be 207,691 € without IVA and 256,31 € including IVA. If the cost of fabricating and mounting the PCB are added to these costs for one prototype the price ranks up to the one included in Table 25. Table 25. One prototype materials and PCB production costs. The system will also need some special cables to connect the electrodes and a set of electrodes should be included. This ranks up the price to the one included in Table 26. Part of the protoytpe Cost without IVA Cost with IVA Microcontroller cost 33,320 € 40,317 € Pulse oximeter cost 12,310 € 14,895 € ADC front-end cost 69,179 € 83,707 € Temperature cost 3,241 € 3,922 € Power system cost 30,036 € 38,020 € Screen cost 59,606 € 75,450 € TOTAL 207,691 € 256,311 € One prototype material cost Total Material Cost 207,691 € 256,31 € PCB development and fabrication 79,00 € 100,00 € Placing components 39,50 € 50,00 € TOTAL 326,191 € 406,311 € For one prototype 94 https://www.ti.com/lit/ug/sbau171d/sbau171d.pdf [34] Pimoroni. Github libraries with python code. https://github.com/pimoroni/max30105- python [35] Gupta Praveen, Sharma Kamesh Kumar, Joshi Shiv Dutt. “Baseline wander removal of electrocardiogram signals using multivariate empirical mode decomposition”. Healthc Technol Lett, 2015 pp 164-166. DOI: 10.1049/htl.2015.0029. [Online] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4678436/ [36] Python. Multiprocessing. Process-based parallelism. [Online] https://docs.python.org/3/library/multiprocessing.html [37] Reprap Htend Thermistor. NTC 3950 100k. Datasheet. [Online] https://www.makeralot.com/download/Reprap-Hotend-Thermistor-NTC-3950- 100K.pdf [38] Marker Porta. Hrisko Joshua. “Arduino Thermistor Theory, Calibration and experiment”. [Online] https://makersportal.com/blog/2019/1/15/arduino-thermistor-theory-calibration-and- experiment [39] Villalpando, Juan Antonio. Raspberry Pi tutorial. [Online]. http://kio4.com/raspberry/31_bluetooth.htm [40] https://www.bitalino.com/storage/uploads/media/revolution-ecg-sensor-datasheet- revb-1.pdf [41] Riu J Pere, Bragós Ramon. Master in Electronic Engineering. Instrumentation and sensors. Cardiac Output 95 Appendices 10. Bluetooth sequence Figure 87. Total Bluetooth sequence 96 11. MIT App Inventor blocks. Screen 1 Figure 88. Screen 1 of the MIT App Inventor App 97 Screen 2 Figure 89. MIT App Inventor screen 2 (I) 98 Figure 90. Mit App Inventor screen 2 (II) 99 12. Main program flow diagram Figure 91. Main program diagram flow (I) 100 Figure 92. Man program flow diagram (II) 101 13. Schematics o Max 30105 Figure 93. MAX30105 schematics 102 o ADS1298 Schematics Figure 94. SPI and connector description of the ADS1298 evaluation board 103 Figure 95. Power supply schematics of ADS1298 evaluation board 110 Figure 102. Python main application code (IV) 111 Figure 103. Python main application code (V) 112 Figure 104. Python main application code (VI) 113 Figure 105. Python main application code (VII) 114 Figure 106. Python main application code (VIII) o Max30105 driver 115 Figure 107. MAX3015 code (I) 116 Figure 108. MAX3015 code (II) 117 Figure 109. MAX30105 code (III) 118 15. BOM list description Table 29. BOM list (I) Number Device Type Price (one prototype) IVA exluded Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 Raspberry Pi 3B+ SBC board 33,32 € 33,32 € 33,32 € 40,32 € 40,32 € 40,32 € https://es.farnell.com/raspberry-pi/rpi3-modbp/ordenador-monoplaca-raspberry/dp/2842228?src=raspberrypi SUBTOTAL Microcontroller 33,320 € 33,320 € 33,320 € 40,317 € 40,317 € 40,317 € Number Device Type Price (one prototype) IVA exluded Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 ADS1298PAG 24 bits 37,668 € 28,206 € 28,006 € 45,578 € 34,129 € 33,887 € https://www.arrow.com/en/products/ads1298ipag/texasinstruments?region=nac&utm_source=findchips&utm_medium=aggregator&utm_currency=&utm_campaign=arrow_findchips_2021_Americas&utm _content=inv_listing&utm_term=backorder 1 TPS60403DBVR Charge Pump 1,360 € 0,892 € 0,874 € 1,646 € 1,079 € 1,058 € https://es.farnell.com/texas-instruments/tps60403dbvt/convertidor-dc-dc-boost-buck-inv/dp/3050446?rpsku=rel3%3A2342564&st=2342564 1 TPS73230CBVT Regulator 250 mA 1,948 € 1,320 € 1,150 € 2,356 € 1,597 € 1,392 € https://www.mouser.es/ProductDetail/Texas-Instruments/TPS73230DBVT?qs=6zVL%252ByCp0mrSmSrlJFbp%252BA%3D%3D 1 TPS72301DVT LDO 3,580 € 2,500 € 2,500 € 4,332 € 3,025 € 3,025 € https://www.mouser.es/ProductDetail/Texas-Instruments/TPS72301DBVT?qs=6zVL%252ByCp0mqdGJVls4EJdw%3D%3D 1 TPS73201DBV LDO 1,600 € 1,070 € 0,890 € 1,936 € 1,295 € 1,077 € https://www.digikey.es/en/products/detail/texasinstruments/TPS73201DBVR/1672866?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buyno w 1 24AA256-I/ST SPI EEPROM 1,100 € 1,030 € 0,628 € 1,331 € 1,246 € 0,760 € https://www.avnet.com/shop/emea/products/microchip/24aa256-i-st-3074457345629605134?CMP=EMEA_FindChips_inventoryfeed_VSE 1 FXO-HC735-2.048MHZ OSCILLATOR 1,387 € 1,387 € 1,387 € 1,678 € 1,678 € 1,678 € https://www.digikey.es/en/products/detail/renesas-electronics-america-inc/XLH735002- 048000X/1868742?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 15 GRM188R61E105KA12D Capactior 1uF 25V 10% X5R 1,995 € 1,318 € 0,949 € 2,414 € 1,595 € 1,148 € https://www.questcomp.com/part/4/grm188r61e105ka12d/205599483?utm_source=findchips&utm_medium=industrycpc&utm_term=grm188r61e105ka12d&utm_content=standardpricing&utm_campaign=aktype0 1 JMK212BJ226KG-T Capactior 22uF 6,3V 10% X5R 0,760 € 0,394 € 0,394 € 0,920 € 0,477 € 0,477 € https://es.farnell.com/taiyo-yuden/jmk212bj226kg-t/conden-22-f-6-3v-10-x5r-0805/dp/2113069?CMP=GRHB-SF-FC 11 GRM219R61E106KE44D Capactior 10uF 10V 10% X5R 3,630 € 3,630 € 3,630 € 4,392 € 4,392 € 4,392 € https://www.avnet.com/shop/emea/products/murata/grm219r61e106ka12d-3074457345629159282?CMP=EMEA_FindChips_inventoryfeed_VSE 10 GRM188R71H104KA93D Capactior 0,1uF 10V 10% X5R 0,581 € 0,356 € 0,356 € 0,703 € 0,431 € 0,431 € https://www.questcomp.com/part/4/grm188r71h104ka93d/205600662?utm_source=findchips&utm_medium=industrycpc&utm_term=grm188r71h104ka93d&utm_content=standardpricing&utm_campaign=aktype0 1 GRM188R71H103KA01D Capactior 10nF 50V 10% X7R 0,004 € 0,004 € 0,004 € 0,005 € 0,005 € 0,005 € https://www.arrow.com/en/products/grm188r71h103ka01d/muratamanufacturing?region=europe&utm_source=findchips&utm_medium=aggregator&utm_currency=&utm_campaign=arrow_findchips_2021_EMEA&u tm_content=inv_listing&utm_term=instock 8 GRM1885C1H470JA01D Capactior 47pF 50V 5% C0G 0,357 € 0,357 € 0,357 € 0,432 € 0,432 € 0,432 € https://www.avnet.com/shop/emea/products/murata/grm1885c1h470ja01d-3074457345631179711?CMP=EMEA_FindChips_inventoryfeed_VSE 4 GRM185R60J225KE26D Capactior 2,2uF 6,3V 10% X5R 0,988 € 0,344 € 0,204 € 1,195 € 0,416 € 0,247 € https://www.mouser.es/ProductDetail/Murata- Electronics/GRM185R60J225KE26D?qs=NwqPE0KKkjFbMAjoSSw5eQ%3D%3D&utm_source=findchips&utm_medium=aggregator&utm_campaign=G RM185R60J225KE26D&utm_term=GRM185R60J225KE26D&utm_content=Murata 2 LMK325BJ107MM-T Capactior 100uF 10V 20% X5R 2,071 € 1,432 € 0,924 € 2,506 € 1,733 € 1,118 € https://www.mouser.es/ProductDetail/Taiyo-Yuden/LMK325BJ107MM- T?qs=PzICbMaShUff0cdXIX4Wwg%3D%3D&utm_source=findchips&utm_medium=aggregator&utm_campaign=LMK325BJ107MM- T&utm_term=LMK325BJ107MM-T&utm_content=Taiyo-Yuden 1 C1608X7R1H102J Capactior 1000pF 50V 5% X7R 0,048 € 0,048 € 0,029 € 0,057 € 0,057 € 0,034 € https://www.questcomp.com/part/4/c1608x7r1h102jt/122686215?utm_source=findchips&utm_medium=industrycpc&utm_term=c1608x7r1h102j&utm_content=standardpricing&utm_campaign=aktype1 4 RC0603JR-070RL Resistor 0Ω 1/10W 5% SMD 0,360 € 0,020 € 0,012 € 0,436 € 0,024 € 0,014 € https://www.digikey.es/en/products/detail/yageo/RC0603JR- 070RL/726675?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 9 RC0603FR-0710KL Resistor 10kΩ 1/10W 1% SMD 0,810 € 0,078 € 0,035 € 0,980 € 0,095 € 0,042 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0710KL/726880?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-07392KL Resistor 392kΩ 1/10W 1% SMD 0,047 € 0,008 € 0,004 € 0,057 € 0,009 € 0,005 € https://www.arrow.com/en/products/rc0603fr- 07392kl/yageo?region=nac&utm_source=findchips&utm_medium=aggregator&utm_currency=&utm_campaign=arrow_findchips_2021_Americas&u tm_content=inv_listing&utm_term=instock 4 RC0603FR-0722K1L Resistor 22,1kΩ 1/10W 1% SMD 0,342 € 0,035 € 0,016 € 0,414 € 0,042 € 0,019 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0722K1L/727058?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0747K5L Resistor 47,5kΩ 1/10W 1% SMD 0,900 € 0,009 € 0,004 € 1,089 € 0,011 € 0,005 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0747K5L/727255?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0743K2L Resistor 43,2kΩ 1/10W 1% SMD 0,900 € 0,009 € 0,004 € 1,089 € 0,011 € 0,005 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0743K2L/727235?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0749K9L Resistor 49,9kΩ 1/10W 1% SMD 0,900 € 0,009 € 0,004 € 1,089 € 0,011 € 0,005 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0749K9L/727265?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0746K4L Resistor 46,4kΩ 1/10W 1% SMD 0,900 € 0,007 € 0,004 € 1,089 € 0,008 € 0,005 € https://www.mouser.es/ProductDetail/YAGEO/RC0603FR- 0746K4L?qs=gt6vzsuosg2CN83EqRf6ng%3D%3D&utm_source=findchips&utm_medium=aggregator&utm_campaign=RC0603FR- 0746K4L&utm_term=RC0603FR-0746K4L&utm_content=YAGEO 2 22-27-2021 Connector 2xMale 0,536 € 0,312 € 0,248 € 0,649 € 0,378 € 0,300 € https://es.farnell.com/molex/22-27-2021/conector-macho-2pos-1-fila-2- 54mm/dp/9731148?cjevent=26c3374ff46d11ec809c024c0a180510&cjdata=MXxZfDB8WXww&CMP=AFC-CJ-ES- 8280252&gross_price=true&source=CJ 1 22-27-2031 Connector 3xMale 0,475 € 0,284 € 0,200 € 0,575 € 0,344 € 0,242 € https://es.farnell.com/molex/22-27-2031/conector-macho-3pos-1-fila-2- 54mm/dp/9731156?cjevent=4b9f32bdf46d11ec81b102160a18050d&cjdata=MXxZfDB8WXww&CMP=AFC-CJ-ES- 8280252&gross_price=true&source=CJ 2 SSW-105-21-FM-D Connector female 10x2x0,1 3,933 € 2,470 € 1,577 € 4,759 € 2,989 € 1,908 € https://www.sager.com/ssw-105-21-fm-d-1357245.html?utm_source=SupplyFrame&utm_medium=click&utm_campaign=sager-brand SUBTOTAL ADS1298 69,179 € 47,528 € 44,389 € 83,707 € 57,509 € 53,711 € Microcontroller ECG part list 119 Table 30 . BOM list (II) Number Device Type Price Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 NTZD3154NT5G Transistor MOSFET array Dual N-CH 20 V 540 mA 0,480 € 0,202 € 0,103 € 0,581 € 0,244 € 0,124 € https://www.digikey.es/en/products/detail/onsemi/NTZD3154NT5G/1484963?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_find chips_standard&utm_campaign=buynow 1 GRM188R61E105KA12D Capactior 1uF 25V 10% X5R 0,141 € 0,088 € 0,063 € 0,170 € 0,106 € 0,077 € https://www.questcomp.com/part/4/grm188r61e105ka12d/205599483?utm_source=findchips&utm_medium=industrycpc&utm_term=grm188r61e105ka12d&utm_content=standardpricing&utm_campaign=aktype0 3 GJM1555C1H4R7DB01D Capactior 4,7pF 50V 5% C0G 0,429 € 0,087 € 0,051 € 0,519 € 0,105 € 0,062 € https://www.mouser.es/ProductDetail/Murata-Electronics/GJM1555C1H4R7DB01D?qs=pwh76yelNxDAxi1MS7oR4Q%3D%3D 7 RC0603FR-0710KL Resistor 10kΩ 1/10W 1% SMD 0,630 € 0,061 € 0,027 € 0,762 € 0,074 € 0,033 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0710KL/726880?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 MAX30105EFD+/MAX301 02EFD+T Sensor Optic Air Quality 10,630 € 7,590 € 6,700 € 12,862 € 9,184 € 8,107 € https://www.digikey.es/en/products/detail/analog-devices-inc-maxim-integrated/MAX30102EFD-T/6188734 SUBTOTAL BPM and Sp02 12,310 € 8,028 € 6,944 € 14,895 € 9,714 € 8,402 € Number Device Type Price Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 3950-100k NTC 3950 100kΩ 1,700 € 1,700 € 1,700 € 2,057 € 2,057 € 2,057 € https://www.amazon.com/Quluxe-Thermistor-Temperature-100K3950-Thermistors/dp/B08DFM3DGC 1 RC0805FR-0712K1L Resistor 10kΩ 1/8W 1% SMD 0,900 € 0,015 € 0,007 € 1,089 € 0,018 € 0,008 € https://www.digikey.es/en/products/detail/yageo/RC0805FR- 0712K1L/727570?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0731K6L Resistor 10kΩ 1/10W 1% SMD 0,090 € 0,009 € 0,004 € 0,109 € 0,011 € 0,005 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0731K6L/727151?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 RC0603FR-0710KL Resistor 10kΩ 1/10W 1% SMD 0,090 € 0,009 € 0,004 € 0,109 € 0,011 € 0,005 € https://www.digikey.es/en/products/detail/yageo/RC0603FR- 0710KL/726880?utm_source=findchips&utm_medium=aggregator&WT.z_cid=ref_findchips_standard&utm_campaign=buynow 1 GRM188R71H103KA01D Capactior 10nF 50V 10% X7R 0,004 € 0,034 € 0,034 € 0,005 € 0,041 € 0,041 € https://www.questcomp.com/part/4/grm188r71h103ka01d/205600648?utm_source=findchips&utm_medium=industrycpc&utm_term=grm188r71h103ka01d&utm_content=standardpricing&utm_campaign=aktype0 1 BZX79C4V7-ND Zener 4,3 V 0,300 € 0,133 € 0,060 € 0,363 € 0,161 € 0,073 € https://www.mouser.es/ProductDetail/Nexperia/BZX8850S-C4V3-QYL?qs=7D1LtPJG0i2sKEg60Q47CQ%3D%3D 1 BZX79C4V7-ND Resistor 100Ω 1/8W 1% SMD 0,157 € 0,053 € 0,053 € 0,190 € 0,065 € 0,065 € https://es.farnell.com/vishay/crcw0603100rfkta/res-thick-film-100r-1-0-1w- 0603/dp/1673063?gclid=CjwKCAjw5NqVBhAjEiwAeCa97SVujB4phdMMpQ_-RcZBCV7_iZa79iCrLng8ZUMj- DybFcFTVKQZzhoCHDcQAvD_BwE&mckv=_dc|pcrid||plid||kword||match||slid||product|1673063|pgrid||ptaid|&CMP=KNC-GES-GEN-PMAX- SHOPPING-23-May-2022&gross_price=true SUBTOTAL Temp 3,241 € 1,953 € 1,862 € 3,922 € 2,363 € 2,253 € Number Device Type Price Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 ANKER Astro E3 Power bank 5V 3A 27,642 € 27,642 € 27,642 € 34,990 € 34,990 € 34,990 € https://www.amazon.es/Anker-PowerCore-Essential-tecnolog%C3%ADa-compatible/dp/B07S829LBX/ref=asc_df_B07S829LBX/?tag=googshopes- 21&linkCode=df0&hvadid=376057522077&hvpos=&hvnetw=g&hvrand=14929142437430600886&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl= &hvlocint=&hvlocphy=1005430&hvtargid=pla-823718220657&psc=1 1 Cable USB A to microUSB Cable USB A to micro USB 2,394 € 2,394 € 2,394 € 3,030 € 3,030 € 3,030 € https://www.mouser.es/ProductDetail/Qualtek/3025033- 01?qs=1mbolxNpo8c5JqM9YiGl1Q%3D%3D&mgh=1&vip=1&gclid=CjwKCAjw5NqVBhAjEiwAeCa97X8qvDMmWRiTFgOI5zQeWMYvBKPRHO8yIL1KVu OcpaxDBRYCVGob5BoCwYsQAvD_BwE SUBTOTAL Battery 30,036 € 30,036 € 30,036 € 38,020 € 38,020 € 38,020 € Number Device Type Price Price (250 units) IVA exluded Price (1000 units) IVA exluded Price (one prototype IVA included) Price (250 units IVA included) Price (1000 units IVA included) Part link 1 MCT050HDMI-A-CTP Midas TFT Screen Touchpad 5 '' 53,93 € 53,93 € 53,93 € 68,27 € 68,27 € 68,27 € https://es.farnell.com/midas/mct050hdmi-a-ctp/pantalla-lcd-tft-rva-horizontal/dp/2888569 1 Cable USB A to microUSB Cable USB A to micro USB 2,39 € 2,39 € 2,39 € 3,030 € 3,030 € 3,030 € https://www.mouser.es/ProductDetail/Qualtek/3025033- 01?qs=1mbolxNpo8c5JqM9YiGl1Q%3D%3D&mgh=1&vip=1&gclid=CjwKCAjw5NqVBhAjEiwAeCa97X8qvDMmWRiTFgOI5zQeWMYvBKPRHO8yIL1KVu OcpaxDBRYCVGob5BoCwYsQAvD_BwE 1 HDMI to HDMI connector HDMI Adaper 3,28 € 3,28 € 3,28 € 4,150 € 4,150 € 4,150 € https://www.digikey.com/es/products/detail/midas-displays/MCIB-HDMI-HDMI/13556991 SUBTOTAL Screen 59,606 € 59,606 € 59,606 € 75,450 € 75,450 € 75,450 € Screen BPM and Sp02 part list Temperature measurement Battery