Control System Automatic for Light and Air Conditioner at Living Room using Arduino Uno Controller

In Indonesia, the usage of electrical energy is still poorly handled. Few people realize how important it is to conserve electricity. Electricity waste, such as the usage of air conditioner (AC) and lighting, is more common in public buildings. Few People realize how important it is to conserve electricity. Electricity waste, such as the usage of air conditioners (AC) and lighting, is more common in public buildings. The goal of this study is to find a way to reduce electricity waste. The HCSR04 Ultrasonic sensor is used to detect things in this system, and the signal from the sensor is received by Arduino Uno and processed into data. Following the processing of the data, the Arduino Uno instructs the AC and lights to turn on, as well as the LCD to display the identified items. This system is put on a table near the room’s door for use. The system as a whole can function well after testing.


I. INTRODUCTION
In Indonesia, the usage of electrical energy is still poorly handled. Indonesia is the most inefficient country in ASEAN in terms of electricity use, according to Kompas, as stated by the Alpen Steel Forum (2012). Offices and public building are the most common places where electricity is wasted.
The most common example of waste in an office or public facility is the use of air conditioners and lights that are left on when they are not in use. In fact, the percentage of electricity consumed by air conditioners an lamps is relatively high, at around 45 percent for air conditioners and 30 percent for lamps.
Researchers discovered that the lights and air conditioner (AC) remained on even when the lecture hall was empty or there were no teaching and learning activition it, based on observations made by researchers in a number of lecture rooms at the engineering building, university of PGRI Adi Buana Surabaya. Factors that may be to blame for this include the conduct and awareness of human users of the space, who frequently ignore or disregard efforts to conserve electricity. As a result, the lights and air conditioner (AC) in the room will continue to operate until someone else switches them off.

II. METHODS
Block diagrams, product designs, electronic design schemes, and physical design of tools and system are all included in this study. The explanation of the object of this research can be seen in the simple block diagram above.

Necessary Components
Arduino Uno, 2 Ultrasonic HCSR04 sensors, 2 Relay Modules, 16x2 LCD, 1k Resistor, 100R Resistor, 4K7 Resistor, Lamp, Air Conditoner (AC), and 5V Power Adapter are the components needed to make an automatic lighting control system and AC in a lecture room based on Arduino Uno.

Variable Operational Definition
The HCSR04 Ultrasonic sensor is the independent variable in this study. It is a tool that detects items an, in theory, it works by sending an analog signal to the Arduino Uno whenever an object approaches or passes it.
LCD is the study's dependent variable. LCD is a system that displays the results of the HCSR04 ultrasonic sensor reader in the form of letters or numbers, as well as the number of persons in the room.

Data Analysis Method
The information gathered through research can be used to better understand, solve, and anticipate problems. The following stages are involved in data collection: 1. By measuring the maximum distance between the sensor and the object, the ultrasonic sensor HCSR04 is tested.
2. Determine how long the system takes to detect objects based on their disatance.
3. Familiarize yourself with the Arduino programming language.
4. Measure the height of the system to be designed's location.

Results of the HCSR04 Sensor Reading Test
The researcher utilizes a smack as an object whose distance will be measured by the sensor and a measuring tape to measure distance in this experiment. The following table shows the measurement results: Table 1 Test results for the HCSR04 sensor

Results of the HCSR04 Sensor Test on Distance Accuracy
The test is carried out at this stage by placing an object at a different distance that has been measured with a measuring tape. The measuring range begins at 10cm and ends at 90cm, with a 20cm difference. The goal is to figure out how accurate the sensor distance to the item is. The following table shows the measurement results:

Figure 8 Graph of Sensor Testing
Based on the accuracy of the distance that has been established from a distance of 10-90cm, as shown in table 2 and figure 8 of the HCSR04 sensor test. The sensor accuracy level decreases with a distance of 30cm and above, with an average error of 1.8 percent, according to the results obtained on sensor 1. The sensor is able to read the distance well at a distance of 10cm, but at a distance of 30cm and above, the sensor accuracy level decreases with an average error of 1.8 percent. The findings obtained in sensor 2 show that the sensor can read the distance well up to a distance of 30cm, but that the sensor's accuracy level declines with a distance of 50cm and above, with an average error of 1.8 percent. Because the quality of each sensor is not good, this discrepancy in accuracy can arise.

Results of a Distance-Based Time Test
Because the distance test in the The following time results are obtained based on the formula's calculation: Table 3 Results of Distance-Based Time Calculation

LCD Test Results
The LCD is tested by connecting it to an Arduino UNO for serial data transfer. The LCD in this control system displays the number of people detected by the sensor when they enter the room, and it decreases the number of people displayed on the LCD when someone is recognized by the sensor when they leave the room.

Figure 9
When no one is present, the LCD display is turned off.

Figure 10
When there are people around, turn on the LCD display.

Test Results for the Whole System
This test is performed by placing the ultrasonic sensor, which is housed in a black box, on a table near the room's door. As a result, the system will recognize when someone enters or exits the room . The table below shows the test results based on the distance that the sensor can detect: After ten experiments, the data revealed that the system was effective six times and failed four times. This error system means that it can only detect incoming items and not exiting objects, and vice versa.
It has the following working system in the Automatic Lighting Control System and AC (Air Conditioner): 1. An object traveling via the ultrasonic sensor HCSR04 is detected.
2. The Arduino then reads the signal from the HCSR04 Ultrasonic sensor and converts it to data.
3. Modul Relay In addition, the LCD relay module takes orders from Arduino Uno to show writing in the form of numbers or letters, and the Relay Module receives commands from Arduino Uno to conduct the ON/OFF function to the AC and lights.
The goal of developing this system is to reduce the amount of electricity used in daily life. The most commonly used electronic gadgets are air conditioners and lights, and users often forget to switch them off,

IV. CONCLUSION
Several conclusions can be derived from the findings of this study's analysis and debate, including: 1. This study was successful in developing a system that can turn on and off the lights and air conditioners in a room autonomously.
2. The HCSR04 Ultrasonic Sensor in this system can detect things up to 90cm away.
3. Sensors require time in order to detect items. The time required for the sensor is 0.05 seconds to 0.52 seconds, according to the data obtained after calculating the time based on distance with five times of testing.

ACKNOWLEDGMENT
The author wishes to offer his heartfelt appreciation to the following people: Study Program's friends for their assistance and cooperation. 7. Also, high school buddies for their advise and leisure time to help with the thesis preparation and completion.