Application for Detecting Falls for Elderly Persons through Internet of Things Combined with Pulse Sensor

LINE Notify. Caregivers or family members can check the heart rate status of the elderly at home at any time through a mobile application after receiving the notification. Through this study, we effectively improved the function of smart care (e-Health) through the fall warning notification and heart rate monitoring for elderly persons.


Introduction
Falls are a fatal killer of the elderly and disabled persons. (1)The World Health Organization (WHO) predicts that by 2050, 400 million people will live to the age of 80 or older. (2)According to WHO statistics published in April 2021, falls are the second leading cause of unintentional injury deaths in the world, second only to traffic accident injuries.WHO estimates that about 684000 people die owing to falls every year, and fall accidents of most elderly persons occur in low-income and middle-income countries, and elderly persons aged over 60 have the highest rate of fatal falls.WHO defines a fall as an event that results in a person falling to the ground, floor, or any flat surface during an activity. (3)Therefore, a prerequisite for the elderly to ensure their safety at home is to always prevent the occurrence of falls.
The elderly living alone often die suddenly at home owing to lack of care, falls, injuries, and the inability to obtain immediate rescue.It is often reported in the news that many elderly persons living alone cannot seek medical treatment in time when they fall because they have no family members or caregivers to accompany them and take care of them, resulting in lifethreatening results.The occurrence of falls has a lot to do with the home environment, especially the living room, bathroom/toilet, stairs, and so forth.To prevent falls of older persons, it is crucial to have a safe home environment and appropriate activities.We believe that the living environment and activity time of the elderly are two risk factors for the elderly's falls.For example, (1) during the day, the elderly person mostly moves between the living room and the bedroom, and (2) the bathroom/toilet is also a field that causes the elderly person to fall.Therefore, there is a correlation between the environment and the activity time and falls of the elderly.
Owing to the development of information technology, wearable smart devices and smart phones have become popular.IoT sensors that can monitor human activity or obtain physiological data have been integrated into wearable devices, and these data are transferred to a cloud storage space, which can be monitored anytime and anywhere with a smartphone.These wearable smart applications have been commercially launched, but considering that they affect the convenience of daily life and personal privacy, even if the elderly receive medical treatment in the hospital, they are not willing to be monitored by cameras.It is not acceptable to wear such a sensing device all day long.Considering empathy and not having to change the living habits of the elderly person at home, the ability to collect daily activity and physiological data of the elderly through sensors is a design consideration that must gain user acceptance.Therefore, in this study, we attempted to embed this smart device into slippers.Mainly in Taiwan and Japan, there is a habit of wearing slippers indoors at home.Therefore, in this study, the pulse sensor was installed in the insole, which can be used to detect the heart rate of the elderly; in addition, to effectively detect falls during activities in the living room and bathroom/toilet, ultrasonic distance sensors can be used to collect activity data of an elderly person to further determine whether he has fallen.Once it is confirmed that an elderly person has fallen, in addition to sending out a warning message, the heart rate data will be uploaded and saved to a cloud storage space via the pulse sensor monitoring of the heart rate at the toes of the elderly person.If the elderly person falls into a coma after falling, a LINE warning message will appear on the mobile phone of the caregiver or family member, reminding him to immediately check the elderly person's current heart rate status.
With the rapid development of AI and IoT, wearable smart devices are booming in fields such as human body monitoring and wireless transmission. (4,5)For the elderly person living alone, monitoring the quality of daily life is an important use of wearable smart devices. (6)Nowadays, the technology of smart home applications is generally based on IoT, and the sensing functions of smart home systems are combined with smart system devices and sensors to provide management, monitoring, and other services. (6,7)The network is the most important medium for connecting smart devices, which have three main advantages: reducing environmental pollution, improving the quality of life, and automation.Its operation is as follows: (8) (1) smart devices control sensors and drive devices through microcontrollers; (2) microcontrollers read via the network and the data of the sensor is used to control the server; (3) the control server executes high-level control calculations or visual interfaces, and sends out relevant control commands; (4) the microcontroller receives the commands from the server and operates the driver according to the commands.
The development direction of smart applications is to use IoT technology in elderly care services, implement on-site care for the elderly, develop smart care systems to meet individual situations, and improve the quality of life of the elderly or those who are cared for at home. (6)(9) To realize remote care application services for the elderly, smart sensing devices can be connected through smart phones or other networks, allowing users to remotely monitor the smart home equipment and the current status (10) or to check the activities or health status of the elderly at any time.
The proportion of Taiwan's aging population is increasing yearly, and medical care for the elderly has become an important issue that needs to be discussed in government.The issues of home care for the elderly mainly focus on whether the elderly can take care of their daily liferelated activities in their environment, and there is a set of good care measures for the health and emotional care of the elderly living alone. (11)For the elderly, aging locally and maintaining social functions with the community are the Taiwan government's current care policy.If the elderly person can interact with family members or caregivers anytime and anywhere, (12) it will have health benefits.
Research studies on healthcare state that elderly healthcare has become an important application of IoT.15) IoT technology has become useful for smart healthcare to collect data and further disseminate, store, and share medical care data. (16)For example, for the medical care management of the elderly, the pulse sensor device monitors the vital heart rate signs of the elderly anytime and anywhere.Once an abnormal heart rate is detected, an emergency notification message can be sent to the relevant caregiver or medical staff through the IoT device in time to prevent accidents involving the elderly person.To know about accidental falls during the activities of the elderly, there are many technologies that can detect the way the elderly person falls, such as image recognition, three-axis acceleration sensors, and smart insoles.Shin et al. pointed out that smart insoles can be used to monitor the activities of the elderly at any time, (9) as well as their walking gait pattern, toe heart rate, and so forth. (5)ther related studies also revealed that wearable smart devices have advantages in detecting falls of the elderly, (17)(18)(19) and the requirements for the use of equipment for detecting falls of the elderly must include reducing the appearance of obtrusiveness, limiting the degree of energy consumption, accurate detection, and product usability. (1)At present, wearable smart devices are widely used in daily life, and these devices can be used to assist the elderly in their current life, medical care, and so forth. (20)Therefore, in this study, we used a combination of two IoT technologies, a pulse sensor and an ultrasonic sensor, to detect a fall warning situation for the elderly in the home space (living room and bathroom/toilet), so as to notify, via LINE message, the caregivers of the elderly who has fallen.

System analysis
In the analysis stage of this system, the researchers are thinking with sympathy.Generally, the elderly person does not like to wear any equipment for medical purposes.However, usually in Taiwan or Japan, most elderly persons wear slippers at home.Therefore, in this study, the pulse sensor was installed on the elderly's indoor slippers.When the pulse sensor is in contact with the elderly's feet, the pulse and heart rate data of the elderly can be continuously collected and uploaded (via IFTTT) to a cloud storage space (Google Sheet) in the system.If the device detects an abnormal heart rate (pulse rate), it may be caused by falling during activities, causing fainting or other life-threatening situations.According to a 'Syncope (Fainting)' article written by American Heart Association (AHA) editorial staff and reviewed by science and medicine advisors, when a person's heart rate is low, it may cause cardiac syncope, resulting in an increased risk of sudden cardiac death.AHA defines bradycardia as a resting heart rate below 60 beats per minute. (21)Bradycardia means that the heart rate is very low, resulting in insufficient blood flow to the brain, causing fainting symptoms.Moreover, the risk of syncope increases with age, leading to an increased risk of falls. (22)Falls of the elderly are one of the leading causes of injury and may lead to an increased risk of death. (23)From the above data, once it is detected that the heart rate of the elderly is lower than 60 beats per minute during an activity, an emergency notification will be sent through the mobile network (Wi-Fi), and LINE Notify will send an emergency notification to the care group of the elderly person.At the same time, family members or caregivers can view the latest detailed heart rate records of the elderly person through their smartphones, such as time and real-time heart rate.In this way, the injured can be effectively rescued within the golden rescue time and the survival rate can be improved.The system architecture is shown in Fig. 1.The system architecture is explained as follows.(1) We set up three sets of ultrasonic sensors in the activity space of the elderly, as shown in Fig. 2. When the elderly person walks normally in this space, the three sets of ultrasound will all send back values that indicate that the elderly person is in a normal state of activity.If the ultrasonic waves on the uppermost and middle layers do not detect the distance data from the elderly person's body, it means that there may be an abnormal situation.At this time, we need to further confirm the heart rate data of the elderly.
(2) The pulse sensor is connected to the open source embedded platform Arduino, incorporated into the design on the insole (as shown in Fig. 3), and it is convenient to collect the heart rate data of the elderly person during activities at any time.the Arduino IDE activates LINE Notify to send an emergency message to the LINE group of elderly care, so that caregivers or family members can call the emergency line after receiving the notification on te need for medical treatment.(4) To visualize the heart rate data of the elderly person, we used Unity to create the APP with UI that can continuously monitor the latest heart rate data of the elderly person, so that caregivers or family members can monitor heart rate changes at any time.

System development
In this study, three sets of ultrasonic distance sensors are installed in the living room and bathroom/toilet to detect whether a person has fallen (Fig. 2).ESP32S is responsible for transmitting data, and the IFTTT network service transmits heart rate data to Google Sheet.If an elderly person falls and this is detected, an emergency notification message will be transmitted to LINE APP through LINE Notify.The group of elderly care can know that the elderly person has fallen from LINE APP, and then they can check whether the elderly person's heart rate is abnormal from the heart rate monitoring APP to determine whether there is a need for emergency assistance or to notify a medical unit.The design of the pulse sensor and ESP32 (ModeMCU-32S) installed on the slippers is shown in Fig. 3, which also shows the design of the related IoT hardware combined with the insole.The above operating mode of the program can be understood from Fig. 4, which shows a flow chart of the processes in the elderly person's activity and heart rate monitoring system.

Hardware specifications and function description
In this study, the ultrasonic distance sensor (HC-SR04) is used to detect whether the elderly person has fallen.The hardware specifications are shown in Table 1.First, three sensors with different heights are used as a group to detect the original distance of the object.The three sensors are located at the positions of the chest, knees, and ankles of the human body.When the elderly person walks normally, all three sensors will detect the body distance values of the person.When the elderly person squats, the middle and lower layer sensors detect the distance data of the elderly person, and if the elderly person falls, the distance data of the elderly person is detected only by the bottom sensor.The distance value can be sensed; therefore, using this principle, we can use the ultrasonic distance sensor to judge whether someone has fallen.This study focuses on the indoor space where the elderly are active, such as the living room and bathroom/toilet where three ultrasonic distance sensors are placed in a group.In practice, the distance initialization settings can be adjusted for different spatial configurations.Especially in places with strict privacy, such as bathrooms and toilets, the ultrasonic distance sensor can detect all planes of the space without dead ends and detect falls of the elderly person in the most efficient way.The ultrasonic distance sensor can be used to detect the distance signal and return its value.The calculation formula is as follows: Distance (cm) = (detection period/29.1(speed of sound))/2(round trip time). ( In this study, the pulse sensor is used to detect whether the heart rate is abnormal.The hardware specifications are shown in Table 2.If the heart rate of an elderly person is lower than normal, it means that the elderly person has encountered a life-threatening problem and needs to be rescued in time.The sensor emits a red light to detect changes in the blood circulation of the The sensor is for detecting heart rate and biological pulse rate 2. The working voltage is 3.3 or 5 V 3. The sensor has low power consumption and plug-and-play functionality human body at the moment of detection, and the fingertips, toes or ears are the easiest to transmit light, so they are the most suitable places to place the sensor.
The ESP-32 development board has built-in Wi-Fi connection and signal transmission functions, the detailed specifications of which are shown in Table 3.The ESP-32 development board is connected to the ultrasonic distance and pulse heart rate sensors, as shown in Fig. 3.When the ultrasonic distance sensor detects that someone has fallen, the system synchronously collects the heart rate data detected by the pulse heart rate sensor placed on the shoe, uploads the data to the cloud, and activates LINE Notify at the same time to send an emergency notification message to LINE APP.

Experimental Results
In this study, we used the LINE Notify message sending function as the emergency notification method.The monitoring window of the Arduino IDE application program is shown in Fig. 5, which also shows the human heart rate detected by Arduino through the pulse sensor.When the heart rate is lower than 60 beats per minute during activities, the LINE Notify  notification is activated; when the heart rate detected is normal, no emergency message will be sent; status="200" in the Arduino IDE monitoring window means that the device has received an abnormal heart rate signal, and message="OK" means that the emergency notification message has been successfully sent to LINE Notify.[HTTP] GET… code: 200 indicates that the abnormal heart rate was successfully sent to Google Sheet through IFTTT.The monitoring window of Arduino IDE will also display abnormal heart rates, such as 47, 56, and 58.In this study, a heart rate sensor collected the wearer's heart rate, and the collected data was summed and averaged every 5 s.If the average of the five determinations is lower than the normal heart rate of 60 beats per minute, a warning notification of abnormal heart rate will occur, and it will be sent in accordance with the field where the elderly person was at that time.There are two types of emergency messages, "Fall Notification in Bathroom" and "Fall Notification in Living Room", as shown in Fig. 6.The setup steps of LINE Notify are shown in Fig. 7.The relevant code of the notification LINE APP is as follows:  void LINE _ Noitfy1(){ http.begin("https://notify-api.line.me/api/notify");http.addHeader("Content-Type","application/x-www-form-urlencoded");http.addHeader("Authorization","BearerToken ID"); http.POST("message="); reply = http.getString();Serial.println(reply);} In this study, the IFTTT communication service is used to send the data to the Google cloud space and record the heart rate detection results of the elderly person.Because the Arduino IDE needs to code the relevant connection program to call IFTTT every 15 min, this event is sent to Google Sheet through ESP32.The detailed experimental data is shown in Fig. 8, and the relevant code is as follows.To ensure the acquisition of the heart rate data of the elderly, we tested whether the pulse heart rate sensor can detect the heart rate data when the user wears socks, when there are no socks, and when there is no insole device.The heart rate data is displayed in the form of an electrocardiogram.(1) The detailed data without socks is shown in Fig. 9(a).It can be observed that the heart rate data is stable and regular.Since the anaZlog data of ESP32S ranges from 0 to 4095, the data measured without socks is located in the range from 2000 to 4000.(2) The detection data when wearing socks is shown in Fig. 9(b).It can be found that although the wavelength of the detection data is not as good as that of the data without socks, the heart rate of the human body can still be detected, the data are all located in the 1000 to 4200 range, and the wavelength of the detection data is relatively stable and regular, considering that most elderly persons wear socks at home.We take this element as a factor in this study, and although wearing socks slightly affects the heart rate detected, the results in Fig. 9(b) show that it will not affect its detection reliability.(3) When the pulse sensor detects the heart rate without an insole device, its detection data is as shown in Fig. 9(c).It can be found that the heart rate is very chaotic, and it is difficult to observe its regularity.Its data is in the range from 2400 to 3200, and there is no obvious sign of heart rate.
Another elderly activity test field in this study is the bathroom/toilet to determine whether the humidity in the bathroom affects the accuracy of distance detection of the ultrasonic sensor.Fog and humidity were taken into consideration in this study.We conducted an experiment for two weeks in a bathroom space with a length of 3 m and a width of 1.2 m.The experimental results showed that the effect of fog can be ruled out.Usually, owing to safety and hygiene considerations, most home bathrooms have exhaust devices to avoid carbon monoxide poisoning when bathing and to disperse the mist to increase the visibility of the bathroom.The mist will also float to high places owing to thermal convection, so it will not affect the accuracy of the ultrasonic sensor.In this study, we experimented many times in the bathroom field where the humidity is as high as 90%, and the ultrasonic sensor can still detect the distance of people.The experimental record is shown in Fig. 10.
In this study, the Arduino UNO board, ESP32 (NodeMCU-32S), and power supply were installed on indoor slippers, as shown in Fig. 3.When a fall is detected and the heart rate is 60% lower than normal, the fall notification message will be sent to caregivers of the elderly person through LINE APP.We have developed a heart rate monitoring APP (Fig. 11) for the elderly on the Android platform, which will allow the caregiver to check the events in the living room or bathroom.The UI displays the current heart rate of the elderly person.If the heart rate continues to be below 60, the caregiver should immediately seek medical assistance for first aid measures.The heart rate monitoring APP enables the remote monitoring of the heart rate condition of the elderly person.To verify the experimental results, we set the normal heart rate above 60 beats per minute and recorded the results in a continuous manner.The records include time, place, and heart rate.If the heart rate is lower than 60 beats per minute, it will be displayed in red, as shown in Fig. 11.

Conclusions
In this study, we explored the application of IoT technology to the instant notification of fall events and the heart rate monitoring system for the elderly.The heart rate monitoring system can also check the real-time heart rate status of the elderly at home at any time.We connected  Arduino and ESP32 to the insoles of slippers worn by the elderly and connected them to the mobile APP.Then, LINE Notify was used to send out emergency messages of falls and accidents and notify caregivers or family members of critical situations.
The system built in this study has the following characteristics.(1) The insole of slippers worn by the elderly person can achieve the function of identity recognition.(2) It is not necessary to install a monitor camera at home to check the fall event to protect personal privacy.(3) The real-time heart rate data of the elderly person stored in the cloud can be monitored anytime and anywhere, which is convenient for follow-up medical treatment.(4) The emergency situation message can be sent back to the caregiver or family members in a timely manner and can also be reported to the medical unit.Follow-up research can also analyze heart rate, as well as sleep quality, health status, and so forth, to check the physical and mental health of the elderly.
We used ultrasonic and pulse heart rate sensors combined with ESP32S modules to develop fall detection applications for the elderly.The technologies used include IoT sensors, Wi-Fi data transmission, cloud storage data, application notification systems, and heart rate monitoring APP design.The IoT hardware combined with the design of the insole and the weight of the overall insole still need to be improved, as shown in Fig. 3.At present, there are many research results in the literature regarding falls of the elderly.In this study, we integrated IoT technology and LINE APP to judge whether an elderly person has fallen.In the future, AI technology can be added to body recognition.This system can respond to a fall of the elderly and help protect their life and health during the golden time of medical treatment.Therefore, this system can be used for the smart care of the elderly at home or in long-term care centers.
(3) The developed and designed program uses the LINE Notify notification function combined with the Arduino device and IDE platform, and the pulse sensor connects ESP32 to Wi-Fi for data transmission to send the heart rate data of the elderly person to Google Sheet every minute.When an abnormality in the heart rate is detected,

Fig. 2 .
Fig. 2. (Color online) Design of ultrasonic sensors to detect whether there is a fall during activities.
Fig. 5. (Color online) Heart rate signal of elderly person on Arduino IDE console.

Fig. 6 .
Fig. 6. (Color online) Sending of alarm message by LINE Notify when an elderly person falls.

Fig. 8 .
Fig. 8. (Color online) Heart rate data of elderly person recorded on Google Sheet as sent by IFTTT service.

Fig. 10 .
Fig. 10.(Color online) Experimental data of the ultrasonic sensor collected in the bathroom/toilet field.

Fig. 11 .
Fig. 11.(Color online) Elderly heart rate monitoring APP on Android platform developed in this study.

Table 1
Ultrasonic distance sensor hardware specifications.