Design of Multisensor Automatic Fan Control System Using Sugeno Fuzzy Method

In the Decree of the Minister of Health number 1405, it is stated that a good temperature and humidity for the room is in the range 18 ° C-28 ° C and 40% -60% and if the temperature or humidity is above the stated range, a tool is needed to cool the room, one of which is is a fan and a device to humidify the room. Then there are also problems regarding frequently forgetting to turn off fans that are no longer used. With this problem, it is necessary to have a system that can control the air conditioner, a system that can make the fan work automatically, that is, it can turn on and off and adjust the motor speed according to room temperature requirements when the fan is on. PIR (Passive Infrared) sensors and DHT-22 sensors are sensors that will be applied to this system as well as the application of the Fuzzy Sugeno Logic method to regulate the work of the system so that it can work automatically. Keywords—Fuzzy Sugeno, Temperature, Humadity, Automatic


INTRODUCTION
Activities in a person's daily life require a comfortable environment in order to be able to concentrate on the activities that are being carried out. The condition of one's environment is one of the supporting factors that need to be considered so that a person can perform activities optimally. Things that need to be considered are the temperature and humidity in a place or room that is used for someone to do activities [1], [2]. The temperature and humidity of a place or room is very important because it greatly affects the body's performance when doing work. When the body is active at temperatures and humidity that are not optimal, it can experience a condition of decreased performance and can experience premature fatigue.
Based on the Decree of the Minister of Health of the Republic of Indonesia Number 1405 / Menkes / SK / XI / 2002 regarding the Health Requirements for Office and Industrial Work Environment, that the requirements for good room air have a temperature range ranging from 18 ° C -28 ° C and air humidity 40% -60% . If the air temperature in a room is above 28 ° C, it is necessary to have an air conditioning device such as a fan or Air Conditioner (AC) to maintain the air temperature at the recommended conditions [3], [4].
When the fan can only turn on or turn on and adjust the speed of the motorbike manually, that is, with the help of humans who are still not maximal in performance [5]. This is because conditions are often encountered when the temperature and humidity are too high or too low, the fan still needs to be turned on and adjust the fan motor speed manually with direct human assistance.
Reflecting on the problems described above, it is necessary to have a system that can solve this problem. A system that can make the fan work automatically and the fan can adjust its speed according to the input received to the surrounding environment. This system will use a PIR (Passive Infrared) [6]- [11] sensor where this sensor functions as a reader or identifier of the presence or absence of humans who carry out activities in the room where the fan is located and this system also uses the DHT-22 sensor where the sensor will later work for detects the temperature and humidity of a room where the fan will be.

A. Temperature and humidity
Environmental temperature and humidity are two things that are important to pay attention to because they greatly affect the effectiveness of one's work (Nainggolan, 2013). Both of these things need to be controlled in order to maintain a comfortable environment for activities. Temperature and humidity have values regulated in law, namely for temperatures ranging from 18 ° C -28 ° C while for humidity ranges from 40% -60% and if a temperature or humidity condition is found to have a greater or lesser value, a tool is needed. assisting air conditioning, namely such as a fan or Air Conditioner (AC) to assist in regulating the temperature and humidity [12]- [14][8], [15]- [17].

B. Microcontroller
A microcontroller is a mini-sized piece of hardware which has components like a computer equipped with input or output ports [8], [16]- [18] [14], [16], [19]- [21]. A microcontroller that will work to receive input or will send output to other devices from the system that will later be made. Microcontroller is a computer system that has one or many very specific tasks [2]. The system to be built will be embedded in the Arduino Uno which is based on the Atmega328P chip.

C. PIR (Passive Infrared) sensor
PIR (Passive InfraRed) sensor is a sensor that will be used as a reader for the existence of objects, namely humans [22], [23]. The working system of the infrared sensor is when the sensor receives stimuli in the form of reflections from objects that are not transparent to the infrared signal emission itself.
Journal of Robotics and Control (JRC) ISSN: 2715-5072 303 Willy Robson, Design of Multisensor Automatic Fan Control System Using Sugeno Fuzzy Method The working system of the PIR sensor itself is passive, meaning that the sensor can only receive a physical quantity (temperature of the human body) or can only capture radiation signals and do not emit infrared signals as in infrared sensors in general.

D. DHT22 sensor
The DHT22 sensor is a sensor that is used as a reader of the temperature and humidity conditions of the object and where the object is. The DHT22 sensor is connected to an 8bit computer chip which makes it easy to calibrate and has excellent stability [3]. The sensor calibration process is very accurate and the calibration data itself is stored in the OTP type memory program.
The DHT22 sensor will work after the PIR sensor has done its job. The DHT22 sensor is an option compared to the DHT11 sensor which has the same function because the DHT22 sensor has a high degree of accuracy and a more efficient calibration than DHT11.

E. PWM (Pulse Width Modulation)
PWM is a combination of letters from the word Pulse Width Modulation. On the Arduino microcontroller board, the PWM signal itself is a signal that operates at a frequency of 500Hz. On the Arduino board, in this research the Arduino board used is the Uno type Arduino board, the pins that can be used as a PWM controller are pins marked with a tilde (~), namely pins 3, 5, 6, 9, 10, and pin 11.

F. Fuzzy logic
Fuzzy logic is logic based on natural language [24]- [26]. Fuzzy logic itself is often used in various problems because the concept of reasoning that is the basis of fuzzy itself is very simple and easy to understand, besides that fuzzy logic is often the method of choice because it is able to model very complex non-linear functions [27]- [29].
The formula used to determine the fuzzy set is based on the curves used when creating the membership function. In this study, the curve used is a triangular curve. So, the formula used to determine the fuzzy set according to is: Then in the defuzzification process the Weight Average method is used. Research conducted using the formula: A. System workflow The system starts when the first sensor (PIR sensor) detects human movement, then the PIR sensor will send a signal to turn on the system and send a signal for DHT22 to work and start detecting the current condition of ambient temperature and humidity shown in Figure 1.From this figure, it can be seen that after DHT 22 getting the ambient temperature and humidity values, then DHT 22 will send a signal to Arduino and start a fuzzy calculation starting with a rules-based classification then perform the defuzzification process and get a certain value. This particular value will be the output sent to the relay to turn on the fan dynamo according to the temperature and humidity requirements felt by DHT22 at that time.

III. IMPLEMENTATION
The design of the fuzzy logic control system has three stages in making the basic structure of the fuzzy control system, namely: fuzzyfication, rule base, and defuzzification. The control system is implemented as shown in Figure 2. From the figure, it can be seen that the system controls the fan

A. Schematic of Tool Sets
This automatic fan formation scheme is made as shown in the figure 3. From the figure, for the PIR sensor which is useful for detecting movement using PIN 3 on Arduino, then for the DHT22 sensor which functions to recognize temperature and humidity using PIN A2 and for Relay using PIN 8, PIN 9, PIN 10, PIN 11 as output for fan.

B. Fuzzyfication
This automatic fan system has three input inputs which are fuzzy to a fuzzy set and will function as fuzzy members to form the rules base. Figure 4 and Figure 5 are fuzzyfication of the value received by the DHT22 sensor is in the form of temperature and humidity values that have been detected in the room the fan is placed.

C. Rules Based
This automatic fan system has a rules based that is formed with the aim of becoming a decision-making rule for the system to determine the right output, here is a table of rules base that has been made scheme is made as shown in the table 1.

D. Defuzzyfication
In the defuzzification stage, the system from the automatically fan makes predetermined values to be used as rules that will be used to determine the appropriate output and will be executed by an automatic fan. This output value is made in the form of a PWM (Pulse Width Modulation) value to make it easier to apply. In the testing phase, a system experiment that has been built has been carried out in a predetermined room. Tests are carried out on sensors that become system inputs later. Testing is done by conditioning the conditions around the sensor in such a way from cold, medium, and hot to low, medium and high humidity to determine the accuracy of the sensor in reading the surrounding conditions. The results of system testing for certain conditions are shown in Figure 2. From the figure, it can be seen that there are two sensors tested, namely the PIR sensor and the DHT22 sensor. The DHT 22 sensor has two outputs, namely temperature and humidity. From the table, it can be seen that the largest mean square error is 2 percent and the smallest error is 0 percent.   In the testing process, several experiments have been carried out for the two variables by dividing them into each variable with 3 environmental conditions around the sensor.
After several experiments on this automatic fan, the value has been obtained which is processed by calculating the Square Error of each experiment and the average value will be calculated using the Mean Square Error (MSE). The calculation using the Mean Square Error (MSE) is carried out in order to determine the error rate in the calculation of output data that has been processed with fuzzy calculations.
The calculation of Mean Squared Error (MSE) is carried out using the following formula:

V. CONCLUSION
Based on the research results, it can be concluded that are a fan made with a schematic design that has been designed and programmed can work automatically using the Sugeno fuzzy method, then. automatic fans can be controlled using input from the PIR and DHT 22 sensors using Sugeno fuzzy logic. The application of the Sugeno fuzzy method is useful for adjusting the speed for automatic fans according to the correct value and last is the fan can automatically adjust the speed according to your needs using the Sugeno fuzzy method.