Design of an internet of things based real-time monitoring system for retired patients

Received Jul 28, 2020 Revised Oct 6, 2020 Accepted Apr 10, 2021 The main aim of this article is to design a monitoring center for collecting and evaluating the physiological function of retired patients in nursing homes. The system should be able to collect the information of body heat, heart rate, blood oxygen, orientation, and sleep time in the form of the little bracelet. The evaluating part of the system with the program can be placed into personal computer (PC) which can provide a user-friendly interface and easy managing. The program can display all needed information of the patient from previous days or months in the form of the graphs and the nursing person can have the view of the patient ́s physiological health. The evaluation and the collection of the data from each patient are done only on the card and the computer is only a device for live-view and managing. In case of the power failure, the monitoring system will be still operating normally due to the uninterruptible power supply (UPS) in the form of the battery. It means that the system will operate even if the PC is powered off. The system also has several external communication interfaces like wireless fidelity (Wi-Fi), ethernet, and general packet radio service (GPRS) which provides an external connection.


INTRODUCTION
Nowadays, the intrusion and hold-up alarm systems (I&HAS) are very often combined with all kinds of integrated systems to protect the life, health, and possession of humankind. The most common way is the technical security done by the electronic design which is more reliable and faster than a person. J. Landa, et al. [1] mentioned when a person stares at a screen for more than 20 minutes, his attention drops by 30%; and for periods over an hour, this drop can reach 70%. Due to this information, the I&HAS is much more suitable and also more cost-effective for the small project. The system consists of several devices that can detect the intruder in the protected area without any person involved [2].
The combination of the intrusion and hold-up system can be used as an integrated system in the facilities where only retired and infirm people are placed. This facility has a specialized person who can take care of the retired person [3], [4]. The nursing facilities can be categorized as a soft target like a normal hospital and it should have basic security equipment according to the standard [5], [6]. The physiological state of the person is very often monitored only by the nursing personnel in a given time and the person must physically visit the person in the room. This manner is very inefficient and time-consuming for the nursing person. However, this system can be extended by the autonomous wireless evaluating device which can automatically receive and process the physiological information of the person. The data from all persons can be evaluated and stored in a local device and the alarm can be triggered in case of the emergency. F. Aktas, et al. [7] stated that the most important physiological information is body heat, heart rate, blood oxygen, and the physical activity can be auxiliary. The body temperature and the blood pressure are very easy to evaluate by the simple software; However, the information about the movement is a tricky part focused on the acceleration which can be caused by the fall of the patient. The fall on the ground or down the stairs can be for the retired person lethal and it must be monitored. The evaluation program must be installed on suitable hardware. The main aim of this article is to design a monitoring center that can collect, evaluates, and store information from several patients in one place. At the same time, the program can be used for live monitoring displayed on the monitor. The program itself can be installed on several devices like tablets or mobile phones; However, the most suitable device for the nursing personal is the personal computer (PC). Due to this information, the monitoring system is designed in the form of the expansion card for the normal PC which provides easy and reliable managing and monitoring of the whole system.  Physiological functions of the patient As mentioned before, the system should be able to measure and transmit the fundamental function of the human body to the evaluating device which can proceed information. All information about the human physiological function is not very easy to measure without any special equipment. This work is focused only on the main physiological functions which can be used for the evaluation of the current state of the patient by a small electronic device inside of the bracelet. The main functions of the human body are the following: a. body temperature (MAX30205) b. heart rate (MAX30100) c. blood oxygen (MAX30100) d. activity and sleeping time (MPU6050) The average body temperature on the human surface ranges from 35.8°C to 37°C. This temperature guarantees the proper functioning of all body organs and the reactions that take place in them. From a medical point of view, hypothermia in humans is considered to be an unwanted drop in core body temperature below 35°C. If the human temperature measured at the surface exceeds 37°C, it may be an overheating of the organism or a defensive reaction of the immune system to an infection of the organism. The temperature can be measured on the wrist of the human hand by the chip called MAX30205 [8]. A pulse or heart rate is a pressure wave that is caused by the expulsion of blood from the left ventricle into the heart, from where it spreads through other arteries throughout the body. In medicine, a series of these waves corresponds to the heart rate and frequency. The average heart rate is about 75 beats per minute for men and about 82 for women, but it can be lower and may not be a sign of disease. This rate can be also measured by another chip called the MAX30100 [9].
Oxygen is distributed to the cells by the circulatory system. The lungs breathe air and oxygenate the blood, which is distributed throughout the body through the heart and arteries. When there is a lack of oxygen, the cells suffer from a lack of energy, their functions fail and gradually die. Normal values of blood saturation are 98-95%. When there is a lack of oxygen, the body triggers a compensatory reaction, which partially protects us from the consequences of hypoxia. This function can be measured by the MAX30100 as the heart rate [10]. Motion sensors are devices for measuring energy expenditure during physical activity, based on the rate between the intensity of sensor shocks and the patient's energy expenditure. Most studies show that the results of measurements using an accelerometer correspond to the values obtained from measurements by indirect and direct calorimetry, from monitoring physical activity. Sleep quality can be also evaluated by the movement during sleep time using the chip called the MPU-6050 [11].

RESEARCH METHOD
According to the mentioned information in the previous chapter, the critical physical functions which can obtain physiological data from the patients must be measured. M. Pospisilik, et al. [12] constructed a similar monitoring design with the Arduino which is used in this design. The design of the peripheral component interconnect-express (PCI-E) card should be designed with the proper dimensions and shape [13], proper electrical schematics [14], and proper communication interface [15]. The idea of the bracelet and the PCI-E card will be designed, manufactured, and tested. This method can be very easily evaluated at the end of this research and it can be also replicated. The last important part is programming which is done by using the Arduino libraries and the testing of the prototypes in the real-time environment. The program itself uses the libraries which are created by the manufacturers or other users.

REQUIREMENTS FOR THE MONITORING SYSTEM
The system is divided into two separate parts. The first is the bracelet which must be placed around the wrist of the monitored person all the time. The bracelet consists of all needed circuits mentioned in the previous chapter and other chips which are obtaining external communication via the Wi-Fi transmitter. The requirements for the bracelet are the following: a. obtaining information from the patient b. communication with the external card via the Wi-Fi c. having the charger and the battery.
The second part is the card that can be placed inside of the common PC case and it is communicating with the bracelet via the Wi-Fi interface and with the operating system through the PCI-E bus. The Wi-Fi access point is located on the card and the Ethernet port for external communication is also located on the board. The system must be able to operate even in case of power failure. Due to this problem, a simple UPS with battery is also placed on the board. The requirements for the card are the following: a. Wi-Fi access point for communication b. evaluation of incoming data from the bracelet c. external communication via ethernet and GPRS; 4) advanced power management (UPS).

PHYSICAL DESIGN
The physical design is divided into two independent devices which are communicating via the Wi-Fi interface. The bracelet consists of devices for continuous monitoring of the physiological functions of the patient. These data are transmitted to the expansion card and by the microcontroller are evaluated without any influence of the PC. The PC itself is only for graphical interpretation and managing. It means that after setting the card the PC is not used for any evaluation.

Bracelet
The bracelet should be quite a small device that can comfortably fit the patient wrist. It means that the most critical parameters are the weight and the dimensions of the bracelet. The design should consist of the mentioned devices in the previous chapter. The main component of the bracelet is the main microcontroller which collects data from connected devices and also communicates with the Wi-Fi module. In this case, the microcontroller ATmega328p was chosen due to the sufficient speed, low power consumption, and suitable communicating interfaces [16]. All active chips are communicating via the inter integrated circuit (I2C) interface which is very suitable for this design. The block design can be seen in Figure 1. battery must be installed inside. The data pins from the USB port can be used for the updating of the program. The other microcontroller ATmega8 is used as a converter between the USB and the universal asynchronous receiver-transmitter (UART) interface used for the updating [18]. Instead of the typical converter called FT232RL, the ATmega8 is smaller and provides a possibility for self-programming [19]. The schematic design of the converter and the charging design can be found in Figure 2. The main part of the bracelet is the main microcontroller called ATmega8 and the other chips which are collecting the information from the patient. The first chip is called the MPU-6050 for acceleration and the orientation measurements. This information can be used for the falling indication of the patient and it can also be used as a pedometer. The second one is called MAX30205 which is used for the temperature measurements. This device converts the temperature measurements to digital form by using a high-resolution analog-to-digital converter. The last chip is called MAX30100. This chip is integrated pulse oximetry and heart-rate monitor sensor solutions which is measuring contactless. The schematic part can be found in Figure 3.
The bracelet itself needs to have an independent interface that can handle Wi-Fi communication. The chip called EXP8266 with the flash memory AT90LS2343S was chosen due to the sufficient properties, small dimensions, connectivity, and easy communication [20]. The communication can be done using only the attention command (AT) where no additional library needs to be used. For the given application, the antenna is created by the copper layer on the printed circuit board (PCB) and the schematic can be seen in Figure 4.
The physical design can be divided into the top and the bottom parts. The bottom part is facing the human hand and it contains only components that have the same height and need to be in contact with the human skin. There is also placed an antenna for Wi-Fi communication. [21] The top part consists of the USB type C connector, header for the programming, and the terminal for the battery. The battery is placed over the PCB and connected by the additional wires to the board. The physical design of the bracelet can be found in Figure 5. The PCB itself with the battery is placed in the casing which has a firm part for the board and the flexible belt for comfortable wearing. The bottom part of the casing must have holes to ensure the visual contact with the human hand, and the PCB has very small dimensions 2,7x1,2 cm.

Extension card
The second important component of the monitoring system is the card itself which is used for data processing, storage, managing, and the live view. The live view and managing of all possible features of the system should be simple and user-friendly. This can be reached by the integration of the card to the standard PC in the form of the extension card. The card can be very easily connected to the PC and it can be manageable via the operating system. Nowadays, the PC is very widespread in many sectors and the majority of the personnel are familiar with this technology. This is the reason, why expansion card design integrated into the PC system is used in this research. The most important thing is the communication between the card   The main microcontroller on the board is called ATmega2560 and it is responsible for the communication and the evaluation. This chip was chosen due to its speed and the number of the hardware serial connection which is used as a communication interface between the (GPRS) and Wi-Fi chip. As mentioned before, the card communicates with the PC via the PCI-E interface and there must be a converter between the UART and the classic USB interface which can be connected directly to the PCI-E. [22] The schematic part of the converter is the same as for the bracelet and can be found in Figure 2. On the board, there are situated three communication parts, each responsible for one standardization. The first one is the GPRS communication which done by the chip called the SIM-900 which provides reliable communication [23]. This communication channel can be used for remote messages or emergency calls. The chip SIM-900 is directly connected to the ATmega2560 via the serial interface which uses so-called AT commands and the antenna for this interface is placed on the board. The second interface is the Wi-Fi standard which is using the same schematic as the bracelet and it can be found in Figure 4. The Wi-Fi is used for communication with all bracelets in the range which is provided by the antenna. In the case of an emergency, the Wi-Fi can be used for external communication as well. The last interface on the board is the Ethernet which is used for external communication. The interface is controlled by the chip called the ENC28J60 and the schematic part of the interface can be found in Figure 6. The schematic part of the extended board is very simple and also very compact. As mentioned before, it uses the PCI-E x1 which provides the one serial connection between the card and the PC, and the connector is also used for the power supply. The communication is done via another microcontroller called the ATmega8 and it is responsible for converting the signal from the UART to the USB.
The card is double-sided and all components are placed only on the top part of the board. The bottom part is reserved for the back-up battery which is powered by the same circuit as the bracelet. The battery is charged by the power from the PCI-E connector all the time and when the power failure occurs the circuit takes the power from the battery automatically. The battery has the 3,7 V with the capacity of the With the full load, the card itself can operate at least 48 hours using only the fully charged battery that is needed by the current standardization [24]. All external connectors such as the Ethernet, GPRS antenna, and the Wi-Fi antenna are placed on the edge of the card facing outside of the PC case [25]. The final physical design of the extension PCI-E card can be found in Figure 7.

USER INTERFACE
The program uses only information that is stored or provided by the memory installed in the card and no data is stored in the PC. The communication between the card and the PC is provided through the PCI-E via the standard USB interface. It means that the card appears in the operating system like an external USB device. The chip ATmega8 has a built-in USB interface that provides reliable and universal connection and it acts like a convertor between the UART and the USB. Moreover, the microcontroller does not need any special set of drivers for the operating system.
According to the fact that the system will be used mainly by the nursing personal who has basic computer skills, the program itself should be very simple and intuitive. The system is mainly designed for small and up to 32 independent bracelets that can be connected to the card at the same time. The user interface is limited to that number of monitoring patients. Each patient is listed on the left side program interface and after clicking on the specific person, the more information is listed on the screen. The program displays information from the chip which is located inside of each bracelet in the graphical form for better and quicker orientation.
The default window of each patient is divided into several sub-windows where information from the chips is shown. These sub-windows provide the only preview for a quick orientation and after clicking on the window, the new one pops up. The program can show all data stored inside of the memory several days or months retrospectively depending on the settings. As mentioned before, all data are stored inside of the memory in the form of the number which means that all these data can be easily exported into the PC. This can be done using a button and all data can be exported into Microsoft Excel or Notepad.
All mentioned physiological functions like body temperature, heart rate, blood oxygen, activity, and sleeping time must be evaluated and presented in the form of understandable information for the nursing personal. This is done by creating threshold values for all mentioned physiological functions for example the 1655 body temperature has set range mentioned before, and when this threshold is exceeded the system will trigger the attention. The sleep and physical activity do not have any triggering function, and these functions are redundant for the nursing personal. The visual appearance of the program is done by using the templates of the Java script. The program itself only saves the numerical information from the sensors, and it can project the data on the screen using the graph function. The concept and the first version of the program can be found in Figure 8.

RESULTS AND DISCUSSION
The outcome of this research is a design of the unique monitoring system which can be used for continuous monitoring of retired people in nursing facilities. Nowadays, there are a lot of manufacturers on the market which are focused on the designing of smart bracelet for monitoring of the physiological function of people. However, these designs are closed and no one provides any external connection protocol for communication. This research tries to bring an idea in an open-source solution with the possibility of managing the data on the standard PC.
As mentioned, the system was tested on 32 independent devices with a successful outcome. The amount of the data which is periodically received by the card is quite small and the traffic is not jamming. The first problem comes with the range of the signal. The default scenario deals with the facility in the form of the bigger house where each patient has its own room. This arrangement can get a lot of space and the signal must be able to reach all the patients. The range of the standard Wi-Fi signal is from 30 to 40 m in closed spaces. This information must be considered and placing of the Wi-Fi repeaters can be the solution for larger facilities.
Further modification of the model can be focused on the design of the special bracelet for the nursing personal for instant information about a possible alarm situation. The bracelet for the patients can be also extended by the small display providing additional information about the time or other. The card design can be also extended by another potential source of the power source via the power over Ethernet which can be used for the charging of the battery when the PC is shut down.

CONCLUSION
The aim of the article was to design an open-source platform of the online monitoring system for the nursing facilities. The system is composed of the bracelet which is periodically monitoring the physiological functions of the person and the card which is evaluating and visualizing the data via the standard PC. The system can operate without the PC which is used only for visualization and managing and in case of the power failure, the system is operating normally. The main and critical physiological functions of retired people monitoring by the bracelet are body heat, heart rate, blood oxygen, orientation, and sleep time. All this information is measured by specific chips integrated inside of the bracelet and the information is sent via the Wi-Fi interface to the expansion PCI-E card. Every part of the bracelet and the PCI-E card is described in details with the actual schematic. The whole system was tested with 32 bracelets connected to the card at the same time and the system seems to operate normally. The program for the visualization is very intuitive, easy to work on and it can display saved data in organized graphs several days or months retrospectively. The system also has an external communication interface such as ethernet or GPRS.