Development of Prayer Rakaat Counter Using Piezoelectric Sensor

In this study, a rakaat counter tool was designed and implemented to reduce mistakes in calculating the number of rakaat during prayer. The piezoelectric is used as sensor which is placed on the top of the prayer mat. Rakaat is calculated when piezoelectric has detected twice prostration. There are four modes in this system, namely fardhu prayer with seven segment display, fardhu prayer with LED display, sunnah prayer with seven segment display, and sunnah prayer with LED display.. There is an LED indicator when the rakaat is done which should be in accordance with the prayer time using RTC. The first test of this tool was carried out with piezoelectric calibration when pressed by the load and forehead. This was accomplished to determine when piezoelectric counting proceeded as piezoelectric was connected directly to the ADC of Arduino Uno. The second test was carried out by testing the tool to be used for 3 days in 5 fardhu prayers and 1 sunnah prayer. From the results of the testing it is proven that this tool works properly, and piezoelectric can be used as a replacement button as a tool for rakaat counter.


INTRODUCTION
Prayer is an obligation for Muslims that must be done every time. Prayers can be categorized into fardhu prayers and sunnah prayers. There are five times that are fardhu prayers with a different number of rakaat. When praying, there is a possibility that someone will forget the number of rakaat that have been done.
The problem of forgetting the number of rakaat that have been done sometimes occurs in the community, causing the rakaat that is done to be less or more than it should be. To overcome this problem, it is designed a tool to calculate the rakaat at the time of prayer.
In 2010, Hammadi Al-Abyadh conducted research by designing prayer mats to calculate prayer mats. This tool uses a light sensor that can transmit optical signals when dredging and prostrate. The indicators used for this tool are optical and sound signals. (Alarabiya, 2010) Another research conducted by Didik Eko Saputro, Dewi Ratnasari, and Chrisbi Adi in 2016 on the design of rakaat counter prayer rugs with skin sensing-based touch sensing applications. This prayer mat is equipped with a counter and touch screen. The counter on the tool serves to calculate the amount of prostration that has been done. (Saputro, et al., 2016) Fawwaz Abu Ar-Raghib conducted a study in 2015 that produced a prayer mat that can help a prayer mat not to forget the number of rakaat. This tool uses an LCD screen right in the position where the face bows down, which can count the amount of prostration. This tool will count one prostration if prostration is done with a time of at least 3 seconds. (Sofwan, 2015) In 2016, three students of Senior High School Negeri 3 Cirebon designed a prayer mat. The sensor used is a pressure sensor mat that functions as a prayer mat. This tool will calculate each rakaat when the user's knee touches the prayer mat. The display used is an LCD that is placed around the prayer mat (Setiawati, 2016). In another study, the rakaat counter uses a pressure sensor which can produce output in the form of voltage levels so that it can identify each posture in the prayer movement and perform calculations (Kasman and Moshnyaga, 2017). Those previous research produced a rakaat counter using different sensors. However, these study only functions as a counter, so the number of rakaat is not determined by the system and there are no indicators that state the number of rakaat performed is complete, also could not determine whether the prayers performed were fard or sunnah prayers. In this research, the device uses a microcontroller as the control part of the system. This tool has an indicator that states the number of rakaat that have been done. In addition, the number of rakaat is also adjusted to the time of prayer being done. By designing this tool, it is hoped that it will reduce the problem of forgetting the number of rakaat in the community.

METHOD
The main function of this project is to develop a prayer rakaat counter tool in order to minimize errors when performing prayer. Figure 1 showed flowchart of the system creation. System design consists of 2 parts, namely hardware design and software design. Hardware design includes piezoelectric, RTC, microcontroller, seven segment and LED. The software design for the system is contained in the microcontroller programming as a control unit that will use the Arduino IDE software. The Arduino IDE software will program the microcontroller chip on the Arduino Uno. In this prayer rakaat counter tool, piezoelectric is used as a sensor. Piezoelectric is placed on the upper rhyme as shown in figure 3, which is where the forehead touches the rhyme when prostration is performed. When the piezoelectric is pressed, the program will begin to count the prostrations, then the rakaat is performed. By adjusting to the time on the RTC and the prayer time that is programmed, the microcontroller on the Arduino Uno will display the number of rakaat and provide an indicator when the number of rakaat is appropriate through seven segments and LEDs. The LED that serves as an indicator will be active after the rakaat performed is equal to the number of reference rakaat set. There are four modes in this system, namely fardhu prayer with seven segment display, fardhu prayer with LED display, sunnah prayer with seven segment display, and sunnah prayer with LED display.   The specifications of the prayer rakaat counter system can be seen in the explanation below. The specification consists of the specifications of the hardware and software used.

RESULT AND ANALYSIS
The first input on the system is a push button to determine the prayers performed and the display used. The RTC program is only used if the system is in fardhu prayer mode so that from the running time it can be determined the number of rakaats that should be performed. In sunnah prayer mode, the RTC program is not used and rakaat has been set at 2 rakaat. The counter program serves to calculate the number of prostrations performed. The program will begin to calculate when the piezoelectric is pressed, then it will adjust the number of prostrations and the number of rakaats. The number of rakaat that has been calculated is displayed on the display in the form of seven segments or LEDs and compared to the rakaat that has been determined in the RTC program. If the calculated rakaat and rakaat on the RTC program are the same, then the LED indicating that the prayer rakaat is complete will be active.
The first stage of using the tool is the selection of the fardhu or sunnah prayer mode. Before the fardhu or sunnah push button is pressed or is in a stand by state, the indicator LED flashes at intervals. When the prayer mode has been selected then the LED will turn off.
There is an indicator that indicates the selected prayer mode. When fardhu prayer mode is active, seven segments will display the letter "u" as in Figure 6 or the input for seven segments is 1100, while when the seven segment sunnah prayer mode will display the letter "S" or the input for seven segments is 0101. In this system, piezoelectrics are used as sensors. Piezoelectric was chosen because of the greater cross-sectional area of other sensors. This is a consideration because the sensor will be placed on the top of the rhyme or around the place of the head when prostration is performed. Then Real time clock (RTC) is an integrated circuit (IC) that stores current time data. This information can be read by the microprocessor via serial communication to support time-dependent software performance. RTC is designed to be energy efficient because RTC remains functional when the main system is off. This causes the running time to be equal to the absolute time reference set by the microprocessor directly. RTC is used to provide time information so that microcontrollers can distinguish the time of fardhu prayers that are done. The time on the RTC DS3231 is determined at the time it is first used. This setting is done using the Arduino IDE, by specifying a date, month, year, day, and hour adapted to the current time. The number of rakaat referenced fardhu prayers is determined based on the time when the system was used. The prayer time used is the time for the Bandung area and its surroundings and there is a time limit for the beginning and end of each prayer time as shown in the system specifications. After determining the mode used, the program enters the counter section. The counter program serves to calculate the number of prostrations that have been performed. When the number of prostrations is an even number, the number of rakaat will increase by one and then display through the display according to the active mode. Testing of the tool was carried out for 3 days for fardhu and sunnah prayers. Piezoelectric is placed on the rhyme on the place where the forehead is attached when prostration. Figure 7 showed the testing condition of the rakaat counter.

Figure 7. Condition of the testing
The Arduino Uno board is connected to the computer and the serial monitor on the Arduino IDE displays the time, prostration, and rakaat data when the test is performed. The serial monitor displays the data that each piezoelectric receives pressure and the digital value that the Arduino reads is equal to 1023 according to the results of the piezoelectric calibration test. Table 1 shows the data of the results of testing the tool for 3 days. From testing for 3 days, it can be seen that the system runs according to the program. Testing of each prayer is carried out within the time span specified in the RTC program so that it is in accordance with the prayer time that has been set before. If the system is run outside the predetermined solat fardu time, the system will read it as solat sunah, which is 2 rakaat.

CONCLUSIONS
This project has succeeded in developing a solat rakaat counter tool in accordance with the time of prayer implementation, both fardhu and sunnah where it often happens to forget the number of rakaat prayer. Based on testing, this prayer rakaat functions according to the program that has been designed. Further developments that can be carried out include being able to add notifications for the time of Sunnah prayers because there are certain times that are not allowed to perform sunnah prayers. Then it can be added IoT as a prayer data logger and also can determine the prayer time according to the latest prayer schedule.