IoT-based Integrated System Portable Prayer Mat and Daily Worship Monitoring System

Muslims have various difﬁculties in praying, such as difﬁculty memorizing the number of rak’ah they have been doing and determining the direction of the Qibla. In this research, we proposed a technological device for monitoring daily worship in Islam. We presented the IoT-based integrated system as a portable prayer mat serving as a rak’ah counter, Qibla direction ﬁnder


INTRODUCTION
Millions of devices are connected to the global network, causing the Internet to be inextricably interwoven with human life [1]. The Internet of Things (IoT) system merges numerous technologies into one, including sensors, internet connections, radio frequency identification (RFID), wireless sensor networks, and other technologies. The Internet of Things (IoT) idea was created to address these needs. The Internet of Things improves people's lives holistically by advancing the Internet to improve industrial processes and businesses [2]. The Internet of Things is a platform on which ordinary objects can become more innovative, processing can become more intelligent, and communication can become more informative so that daily activities become more accessible and more efficient [1], [3][4][5][6]. The Internet of Things enables things to be connected at any time and location through networks and Internet services [7].
The emergence of IoT technology has made many microcontrollers compatible with IoT technology, for example, Arduino. Arduino is an open-source microcontroller that can be used for flexible programming, customizable signal types, and easy adaptation to create interactive objects that stand alone or are connected to software on a computer [8][9][10]. Many kinds of Arduinos are on the market, including the Arduino Mega2560. The Arduino Mega2560 is a microcontroller board based on the ATmega2560 that can be used both online and offline and is programmed using the Arduino software. It is appropriate for applications that need a lot of input/output and memory since it has 54 digital I/O pins, 16 analog inputs, 4 UARTs, a USB connection, an ICSP header, a reset button, and a larger sketch area [11].
The IoT grows quickly and significantly influences many aspects of people's lives [12]. IoT innovations have been implemented in various fields, such as manufacturing, agriculture, telemedicine, and education [13][14][15][16][17][18][19][20][21]. IoT can also be used as supporting technology in the religious field. IoT can be a solution in the form of a device that helps Muslims worship. For Muslims, daily prayer (in Arabic: "salah") is an obligation for Muslims daily. Muslims performed prayer five times every day, at dawn (Fajr prayer), midday (Zhur prayer), late afternoon (Asr prayer), dusk (Maghrib prayer), and night (Isha prayer). Two rak'ah is performed at the Fajr prayer, four rak'ah at the Zhur prayer, Asr prayer, and Isha prayer, and three rak'ah at the Maghrib prayer.
Several things must be considered in performing prayers, such as the number of cycles of each prayer ("rak'ah"), and should face the direction of the Kaaba, which is the Qibla of Muslims [22]. Some Muslims face various difficulties, such as difficulty determining the direction of prayer, especially when traveling and memorizing the number of rak'ah they have done [23,24]. However, Forgetting the number of rak'ahs that one has prayed does not automatically invalidate one's prayer. The practice here is to perform two prostrations of forgetfulness (in Arabic: "Sujud Sahwi") before doing salam at the end of the prayer. One goes on the assumption that he has prayed the least number that he is certain of. For example, if a person is unsure whether he has prayed two or three rak'ahs, then he must assume that he has only prayed two rak'ahs, then complete the prayer based on the assumption and do two times of sujud sahwi. The incomplete number of rak'ah means they must repeat the prayer from the beginning. For most elders, these conditions are due to some problems with their cognition level (attention, working memory, and decision making) affected by age [25].
Regarding the difficulties in some Muslims, technological aid is needed to support their worship activity. Numerous Regarding the difficulties in some Muslims, technological aid is needed to support their worship activity. Numerous researchers have contributed to research about prayer mats. Ismail et al. (2015) produced a smart prayer mat that assisted prayer activities for the elderly who experience cognitive impairment [24]. This tool had a sensor-based textile to tap the signaling/sound to implement complete worship prayers. Another study by Kasman and Moshnyaga (2017) resulted in a new technique that uses press censorship to identify posture on a smart prayer mat. In his research, a smart prayer mat could recognize 100% posture in prayer activities [26]. Mansor, in (2021) researched smart prayer as an effective solution for elderly Muslims. This prayer mat uses an infrared distance sensor and pressure sensor to track the worshiper's movement to detect the prayers' cycles (rak'ah). It also can detect the direction of the Qibla [27]. Another device for the rak'ah counter was developed using a Piezoelectric sensor located in the upper part of the prayer mat. One prostration is counted if the forehead touches the button [28]. Like the intelligent prayer mat, Rishi Pal et al. (2023) studied about Intelligent IoT Yoga Mat. This Yoga Mat can recognize the yoga postures using a wearable device [29].
Another interesting research about Qibla Finder also has been conducted by Dunque (2021). Dunque designed a qibla finder device placed in Muslim headwear Peci. The device not only functioned as a qibla finder but also as an obstacle detection [30]. It has a switch for controlling the function. It claims can help visually impaired Muslims to perform prayers independently.
Earlier research on a portable smart prayer mat concentrated on the function of a counter to the number of rak'ah in prayer. As a result, equipment was created as a prayer mat. However, several instruments lacked Qibla orientation and were not connected to a daily worship monitoring program. A daily worship monitoring application can be helpful for children, youth, and older Muslim people in monitoring their daily worship.
Some researchers have developed religious mobile applications. UMMA is a religious application that provides information about daily prayer, Quran recitation, articles about Islamic studies, and community features [31]. This kind of application indeed made youth Muslims interested. Another Islamic mobile application, which was developed for fasting (Shiyam) reminders, focuses on fasting and can provide specific fasting-related information and warnings during the time of predawn (imsak), iftar, and sahur, which can assist Muslims in carrying out their prayers [32].
As a proposed solution to improve the functions of the smart prayer mat, in this research, we focused on developing and integrating IoT-based systems: a portable smart prayer mat and a daily worship monitoring system. The device comprises an Arduino AT Mega 2560 powered portable prayer mat through a force-sensitive resistor sensor and an HMC 5883L compass module. Some features completed this integrated system, namely the rak'ah prayer counter, Qibla direction, prayer guideline, Hijri calendar, prayer schedule, worship reporting, and recapitulation of worship that has been done. The smart prayer mat was designed to be a portable device, so the application can be used to conduct daily worship anywhere. The prayer mat can also be connected to daily worship mobile applications so that all worship activities can be recorded in a database so that it can be a supporting device for Muslims in their daily worship.
The contribution of this paper is to design and develop a smart prayer mat that functions as a rak'ah counter and as a Qibla direction, which is integrated into a daily worship monitoring system with many features that help people remember and monitor their worship. The IoT-based system is integrated using Bluetooth and can be accessed using a smartphone.
This paper is organized as follows. Section 2 is about the method used for the hardware and system design and the testing scenarios. Section 3 describes the result and discussion of this research, and finally, in section 4, the conclusions are described.

Data
In this research, we used questionnaires for initial research and user acceptance tests. For preliminary research, questionnaires were distributed to 100 respondents from the general Muslim population aged 17 to 50. It was found that 7% of respondents frequently needed to remember the number of rak'ah of prayer performed, and 70% needed a compass to determine the Qibla direction. We also learned that 61.6% of respondents experienced difficulties because no application combines several prayer tools to install smartphone applications. These facts became the motivation of this research that Muslims need a tool to assist them when praying, especially for counting the number of rak'ah and determining the Qibla.

System Development
We used the Bluetooth IEEE 802.15.1 protocol to merge a portable smart prayer mat and a mobile daily worship system. A prototyping approach was used to produce a portable smart prayer mat, and Rapid Application Development was used to establish a mobile daily worship system. Prototyping is an iterative approach to system development. Information systems acquisition generally strives to improve information storage convenience, lower costs, save time, increase control, stimulate growth, boost productivity, and raise organizational profitability. Computer technology, hardware, and software development have recently accelerated [33].
According to [33], the stages of system development using the prototype approach begin with the communication stage, which establishes the device's purpose.
Step two is a quick plan that identifies system needs. The following stage is a quick design involving a prototype design. Then, a prototype is constructed and evaluated (deployment delivery and feedback). If the system does not meet the requirements, the process will loop back to the first stage, communication, until all needs are met ( Figure 1). Figure 1. Prototype method [33] The communication stage of the prototype paradigm begins with gathering information on the research conducted through an analysis of related earlier studies and questionnaires presented to respondents. Through the questionnaires, we discovered that Muslims have a range of difficulties, including recalling how many rak'ah prayers they had offered and determining Qibla's position. Then we examined the system needs of today as well as the hardware, software, techniques, and algorithms. We used an Arduino AT Mega microcontroller and several sensors from the quick plan stage to build the smart prayer mat. We use Arduino because it is low-cost and highly scalable. It can be used for any sensor and is easily amplified [10]. We used a force-sensitive resistor to identify the rak'ah prayer and an HMC 5883L module to calculate the directions of the Qibla. Using low-cost but reliable hardware will make it easier for this tool to be mass-produced and used by many people.
We developed the Android application and system module to connect the portable smart prayer mat. These two components are designed to connect over Bluetooth. We developed the Android application and the system module for the smart prayer mat. The previous stage's modules are all now being programmed in C. After manufacturing the modules, the prototype was tested to ensure that every module worked as intended. After the prototype had been constructed, a few scenarios were utilized to evaluate the system.

Figure 2. Research flow
A daily worship monitoring system was integrated into a portable smart prayer mat. Rapid Application Development was used to create this system (RAD), consisting of three main phases: requirement planning, design workshop, and implementation. This monitoring application includes several elements, including worship guidelines, a Hijri calendar, prayer reminders, and a list of worship recapitulated. This system was developed for the Android smartphone.

Evaluation
We used some methods in the evaluation to ensure that all modules' functions fulfill all requirements. We used Blackbox testing to evaluate system and device functionality. The evaluations are conducted to modules below to find out whether it is worth their respective functions: 1) Counting the cycle of prayer (rak'ah), 2) Determining the Qibla direction, 3)Accessing the database of the obligatory prayer time, 4) Sending the user data to the smartphone (application) when the prayer is finished, 5) Displaying the obligatory prayer time, the number of cycles of pray and Qibla direction on the LCD TFT 2.8, 6) Choose the features that have been offered by the device 7) Integrating device and application, 8) Choose an activity from the application menu, 9) Worship recapitulation, 10) Displaying Hijr calendar.

RESULT AND ANALYSIS 3.1. Result
The scope of the proposed device was a smart prayer mat integrated into the daily worship monitoring system. The device functions are counting the rak'ah of prayer and determining Qibla's direction. Before using the smart prayer mat, the user identifies the Qibla direction using the HMC 5883L connected to Arduino. A force-sensitive resistor is used as a sensor to determine the prostration pressure. When two prostrations are detected as one cycle or rak'ah, the number of cycles will be displayed on the 2. TFT LCD. When the user completes the prayer and the number of rak'ah is correct, this system will send the data to the smartphone for recapitulation. If the number of rak'ah is more than it should be, a notification will sound in the form of a beep sound.
The proposed prayer mat consists of a series of components, namely Arduino Mega 2560, HMC 5883L, The Force-Sensitive Resistor (FSR) module, Real Time Clock, an HC-05 module, a Push Button and LCD TFT. Arduino Mega is the brain of a smart prayer mat, which is functioned to give instructions to all components. HMC 5883L, connected to Arduino, was used to determine the Qibla direction. The Force-Sensitive Resistor (FSR) is used to identify the rak'ah of prayer. FSR determines the pressure exerted when a person performs prostration. The data from the FSR is displayed on the 1.8 TFT LCD. After the user has finished praying, the HC-05 Bluetooth module will send data to the smartphone, which is the type of prayer and the time the user has finished praying. The architecture of the proposed portable smart prayer mat is in Figure 3. After designing the architecture, we continued to design the circuit. The device circuit design Figure 4 shows the structure of the schematic connection between Arduino and all components in the system circuit. Figure 4. The design of the system schematic Each module was connected to Arduino as the brain of the device through its pins. We summarize the pin configuration between Arduino and other components in Table 1 The circuit design was finally implemented into a portable smart prayer mat. A prayer mat with FSR inside serves as a place for prostration and is connected to a machine as a controller ( Figure 5). Because of its small size, it is easy to use as rak'ah counter and qibla finder. It also connected to the daily worship monitoring application by connecting the application to the ESP2886 module using Bluetooth HC-05. In the daily worship monitoring application, some activities are available, as seen in Figure 6. These activities were built to show the interaction between the user and the application.  The smart prayer mat prototype design was evaluated to see if it met the requirements. Several key points have been assessed, the counter of rak'ah of prayer, Qibla's direction, compulsory prayer time scheduling, data transmission to the smartphone, compulsory-prayer time display, and the number of prayers. All these points have been evaluated using Black Box testing and fulfill all requirements. We also assessed the smart prayer mat's features, including the sensor's sensitivity, the accuracy of the qibla indicator, Bluetooth connection delay, and user acceptance testing for evaluating daily worship monitoring applications.
The smart prayer mat used FSR to identify the prostrations of the user. The system will count two prostrations as a rak'ah. To be recognized as a prostration, the value of prostration was set above 10. shows that the FSR will identify a prostration with an average value of 81,36 kilo Ohm. Table 2 shows that the FSR will identify a prostration with an average value of 81,36 kilo Ohm.  1  76  78  84  80  79  75  2  User 2  78  75  81  83  83  87  3  User 3  79  81  82  78  83  80  4  User 4  80  82  86  79  82  88  5  User 5  79  82  84  78  81  84  6  User 6  82  85  79  83  85  88 The HMC 5883L compass module is used as a Qibla direction indicator on the smart prayer mat. HMC 5883L is able to read the coordinates where the module is placed. The calculation of Qibla direction is based on calculations provided on https://www.alhabib.info/arah-kiblat/ with an area of South Tangerang city. The results obtained are latitude: -6.28352, Longitude: 106.71129, and Qibla Direction: 295.2 degrees from the north of the map. The Qibla direction is determined from 280 to 310 because the HMC 5883L module reads coordinates very quickly and fluctuates. Then we decided to use 280 to 310 values as the Qibla direction displayed on the 1.8 TFT LCD. Smart prayer mats and daily worship monitoring systems are integrated through Bluetooth. Testing on the HC-05 module aims to test data delivery from the smart prayer mat to the smartphone. The smart prayer mat transmits the number of rak'ah of prayers done to a smartphone using Bluetooth module HC-05 by pressing the send button on the prayer mat. The results display on the ISSN: 2476-9843 smartphone screen. If the smart prayer-mat data are read correctly on the smartphone, the Bluetooth communication system between smartphones and the smart-prayer-mat runs perfectly. From 10 times evaluations, we had two failed (Table 4).  Table 4 is the result of the measurement delay-testing of data transmission. This testing is counted when the start command is given to the smart prayer mat until the microcontroller executes the instructions and then sent to the smartphone.
To evaluate software development, we carried out user acceptance testing (UAT), also known as beta, application, or end-user testing. In contrast, the program is evaluated in the context in which consumers want to use it. Six persons participated in the test. The study focuses on a number of features, including transferring data to a smartphone and displaying prayer times and directions for the Qibla.

Evaluation
This study was conducted in response to the Muslim community's daily worship issues. According to preliminary research, we found information that most people have experienced forgetting the number of rak'ah while performing the prayer. Some of the people also need a tool for Qibla's direction. A device for rak'ah of the prayer counter and Qibla's orientation was built as a solution. This device was integrated into a monitoring system, which can recapitulate daily worship that a person carried out in terms of type, status, prayer time, and the number of rak'ah of compulsory prayer, and can remind the user of non-compulsory (sunnah) worship, for example, sunnah fasting. Integrating a smart prayer mat and a daily worship monitoring system differs from similar research.
Force Sensitive Sensor (FSR) is a device for identifying pressure when a person does prostration and an HMC 5883L module for Qibla direction. A rak'ah is two prostrations performed in an adjacent period. The system calculated the validity of the rak'ah prayer. If a person forgets the number of rak'ah, the system responds and gives a "beep" sound. FSR is sensitive enough to identify a prostration. It has varied resistance according to the pressure applied to the sensor. It is thin and suitable for implementing a smart prayer mat. Moreover, this sensor is relatively cheaper, easy to use, and reliable [34]. To be identified as prostration, FSR's value must be in the range of 75 to 88. From 6 tests, it has an average of 81.46.
For Qibla's direction, the HML 5883L module used success to read the coordinate where this device took place. Calculating the Qibla direction based on the center of the google maps map provides an estimate from the website https://www.al-habib.info/arahkiblat/ Tangerang Selatan area. The value of the Qibla direction was determined by an initial setting, from 280 to 310, because this module scans coordinates, and the result is very fluctuating. In the range of 280-310, it was a success in identifying Qibla's direction. After reading the coordinate, this module sends it to LCD TFT 1.8 for display.
Another device that is important for integration between these two systems is Bluetooth. We use the Bluetooth HC-05 module, which consists of 6 connector pins with each different functions. Bluetooth HC-05 module is easy for wireless serial communication because it uses radio frequency 2,4 GHz without any particular driver. It has 30 meters of maximum signal distance [5]. For those reasons, the Bluetooth HC-05 module is the right choice for integrating the two systems.
Although data transfer well between two systems, it is necessary to check the transmission delay. Knowing the data transmission delay makes it possible to develop this system using better data communication. Table 4 shows the result of the test. From Table 4, we had 20% of the tests failed, meaning the connections between the smart prayer mat and the daily worship monitoring application may have failed. Some causes for this failure are the signal transmission and uncovering distance between the Bluetooth module and smartphone (application).

CONCLUSION
The portable smart prayer mat, integrated into daily worship monitoring application, can be an alternative solution to the Muslims' problem of memorizing the rak'ah prayer and determining Qibla direction. The smart prayer mat can help people know the number of rak'ah they have done and can perform the prayer without any doubts. People can also determine the Qibla direction using this smart prayer mat because it has HMC 5883l as a compass. Users can also see the recapitulation of the prayer in the daily worship monitoring application. This application is connected through Bluetooth and receives information from the device when the pray is accomplished. This application also has many features, so people can use it to monitor their daily non-compulsory worship, such as a reminder for prayer time and recapitulation of their non-compulsory prayer,It will be fascinating to conduct further research to enhance the capabilities of the smart prayer mat so that it can function not only as a rak'ah counter and a qibla direction finder but also as a tool that can determine whether the number of rak'ah is incorrect and recognize the proper prostration.