Automatic Garden Umbrella Prototype with Light and Rain Sensor Based on Arduino Uno Microcontroller

In recent times, the weather often changes erratically. This erratic changing weather can disrupt outdoor activities, especially in open spaces where there is little shelter, such as in parks. Even though it is very easy to get weather forecast information nowadays, sometimes people forget or even don't understand to see this information when they want to travel to do outdoor activities. So that makes them not aware of weather changes that will occur later. As a result, they do not bring umbrellas or raincoats, and when it rains or the sun is shining, it can interfere with ongoing outdoor activities. Lack of facilities or places to take shelter in the park will make it difficult for people to find shelter. If they don't take shelter immediately when it rains, it will soak their whole body, and then it can damage the non-waterproof gadgets they carry. And if the condition of the body that is not fit is exposed to rain, it can result in falling sick or fever. If the weather is sunny, people will feel hot when the sun is shining hot, especially during the day. In previous research, the Rain Sensor and LDR application are used for Automatic Car Lights to provide information to Arduino so that the lights on the car's front and rear will automatically turn on automatically [1]. Also, rain sensors and light sensors are used to make automatic drying tools based on Arduino Uno [2][3][6]. Therefore, the authors are interested in designing a similar sensor tool but applied it to make an automatic garden umbrella. Based on the background described above, the problem identified is how to make a garden umbrella that can open and close automatically when the weather changes. The limitation of the issue discussed in this study is the design, manufacture, and testing of automatic garden umbrellas. This tool uses the Arduino Uno microcontroller to control the various components that are connected. The sensor functions as input, while the sensors used are rain sensors and light sensors (LDR-Light Dependent Resistor) [7] [9][10]. Motor Driver L298N as a regulator of speed and direction of DC motor rotation. Meanwhile, the use of a DC motor as an umbrella drive to open and close. The objectives of this study are as follows to create a shelter for the general public when the weather is hot or when it rains, find out the operating system for the automatic garden umbrella based on Arduino Uno, and creating simple tools that can work automatically and have wide use in various levels of society.


I. INTRODUCTION
In recent times, the weather often changes erratically. This erratic changing weather can disrupt outdoor activities, especially in open spaces where there is little shelter, such as in parks. Even though it is very easy to get weather forecast information nowadays, sometimes people forget or even don't understand to see this information when they want to travel to do outdoor activities. So that makes them not aware of weather changes that will occur later. As a result, they do not bring umbrellas or raincoats, and when it rains or the sun is shining, it can interfere with ongoing outdoor activities.
Lack of facilities or places to take shelter in the park will make it difficult for people to find shelter. If they don't take shelter immediately when it rains, it will soak their whole body, and then it can damage the non-waterproof gadgets they carry. And if the condition of the body that is not fit is exposed to rain, it can result in falling sick or fever. If the weather is sunny, people will feel hot when the sun is shining hot, especially during the day.
In previous research, the Rain Sensor and LDR application are used for Automatic Car Lights to provide information to Arduino so that the lights on the car's front and rear will automatically turn on automatically [1]. Also, rain sensors and light sensors are used to make automatic drying tools based on Arduino Uno [2][3] [6]. Therefore, the authors are interested in designing a similar sensor tool but applied it to make an automatic garden umbrella. Based on the background described above, the problem identified is how to make a garden umbrella that can open and close automatically when the weather changes. The limitation of the issue discussed in this study is the design, manufacture, and testing of automatic garden umbrellas. This tool uses the Arduino Uno microcontroller to control the various components that are connected. The sensor functions as input, while the sensors used are rain sensors and light sensors (LDR-Light Dependent Resistor) [7] [9] [10]. Motor Driver L298N as a regulator of speed and direction of DC motor rotation. Meanwhile, the use of a DC motor as an umbrella drive to open and close.
The objectives of this study are as follows to create a shelter for the general public when the weather is hot or when it rains, find out the operating system for the automatic garden umbrella based on Arduino Uno, and creating simple tools that can work automatically and have wide use in various levels of society.

II. METHOD
The research flow in the discussion of this paper refers to Figure 1. Before compiling a program on the Arduino Uno microcontroller, the first step that must be done is to collect a flowchart that will be used as a reference for the Arduino Uno microcontroller program to be made. In the beginning, the program initializes the system, declares the variables used, and activates This automatic garden umbrella prototype will be active when given a 9VDC voltage from the adapter cable. After being given the appropriate voltage, this tool will work automatically. The input received by the LDR and also the rain sensor will be forwarded to the Arduino Uno to be further processed and produce output, which is then forwarded to the L298N Motor Driver and DC motor. The function of the L298N Motor Driver is to adjust the direction and speed of rotation of the DC motor. The DC motor's focus will be clockwise (CW-Clock Wise) or counterclockwise (CCW-Counter Clock Wise) depending on how the weather conditions are detected by the two sensors used in the following Figure 2.

III. RESULT AND DISCUSSION
The following is a whole series of components that are connected to form an Automatic Garden Umbrella prototype. This tool works based on input from the LDR module and rain sensor, then processed by the Arduino Uno microcontroller, which is then forwarded to the L298N Motor Driver so that it will produce output in the form of a DC motor rotation, which causes the umbrella to open or close [4] [11], can be seen in the following Figure 3. The design and manufacture of tools are grouped into several sections. Circuit block diagrams are used to describe the input, process, and output blocks of tools in general [13] [14] [15]. The design of circuits and components explains the tool's design stages, the components required, and the functions and the whole circuit. The working principle of a series contains a description of the work process in detail. The flow diagram illustrates the work steps of the tool program is made. The design of the microcontroller program contains the stages of software programming.
The components needed to manufacture the tool are Arduino Uno, LDR module, rain sensor, DC motor, L298N Motor Driver, 9VDC adapter cable, jumper cable, protoboard, and umbrella. All components are arranged into a series before becoming a fundamental tool. The following are the main components needed before installing the tool in Figure 4. Before installing all the components, make an umbrella together with the container's container to be assembled. The following is the shape of the umbrella and the container used in the following Figure 5.

. Umbrellas and Containers
The next step is installing the input component consisting of the LDR module and the rain sensor. These two sensors each have a different function. The LDR module is used to detect light intensity, while the rain sensor functions to catch water droplets or rain. These two conditions are used as a trigger for the direction of rotation of the DC motor in Figure 6. After that, make an umbrella motor using a DC motor connected to the L298N Motor Driver. This DC motor acts as the output of the tool to be made. The DC motor will rotate CW (Clockwise) so that the umbrella opens and rotate CCW (Counter Clockwise) so that the umbrella is closed. Weather changes around the sensor influence the direction of rotation of the DC motor in Figure 7.  Following are the components of the entire circuit after it is finished installing. Starting from the input, process, and also output in Figure 8. The design of the Arduino Uno microcontroller program is done by writing the program to the Arduino Uno microcontroller memory with the help of the Arduino IDE software [5] [8]. The first step is to open the Arduino IDE software. The next thing to do is to create a program. After the program is designed, the program is compiled first to check whether there is an error. The way to compile programs in the Arduino software is by clicking the check button on the Arduino IDE's upper left side. For a display of when the compiling sketch process is carried out in Figure 9. Suppose there are no errors in the sketch program that has been made. In that case, a notification "Done Uploading" will appear, indicating that the program can be used and is ready to be uploaded to the Arduino Uno microcontroller. First, to upload the program, connect the Arduino Uno microcontroller to the PC using a USB cable, then click the arrow button on the Arduino IDE's upper left side (next to the checkmark) in Figure 10. In technical testing, measurements are made for the amount of electricity that works on each component used. This test is carried out using a multimeter, which functions to determine the amount of voltage or voltage. Measurements are taken when the entire series of Automatic Garden Umbrellas are connected. This circuit consists of a series of LDR modules, rain sensors, and DC motors [12].
Tests are carried out to determine the amount of voltage acting on the LDR module when it detects the presence of light and when it detects the absence of light. In order for the multimeter to read the voltage on the LDR module, the VCC pin of the LDR module is connected to the 5V pin of the Arduino Uno microcontroller and also the red (+) multimeter probe, while for the ground pin of the LDR module it is connected to the ground pin of the Arduino Uno microcontroller and also the black probe (-) multimeter. From the experiments that have been done in Table I.   TABLE I  LDR MODULE TEST RESULTS From the tests that have been done, it can be concluded that if the LDR module detects light, the LDR module will become active, and the measured voltage is 5V. When the LDR module is active, the digital output that appears on the Arduino IDE monitor serial has logic 0 (LOW), indicating that this LDR module will be active if it has logic 0 (LOW) it can be called active low. If it does not detect light, the LDR module will be inactive, and the digital output will have logic 1 (HIGH) while the voltage will be 5.02V due to reduced resistance due to the absence of light in the following Figure 11.

Rain Sensor
Tests are carried out to determine the amount of voltage acting on the rain sensor when it detects water or the sensor surface is wet and when it detects the absence of water or the sensor surface is dry, from the experiments that have been carried out in Table II  Based on the rain sensor test results above, the rain sensor will become active when the sensor surface is exposed to water or is wet. The digital output from the rain sensor will have logic 0 (LOW), and the voltage is 5V. This indicates that the rain sensor will be active if the sensor has logic 0 (LOW), or it can be called active low. If the sensor does not detect water or the sensor surface is not wet, the sensor will be inactive, and the digital output will have logic 1 (HIGH). Simultaneously, the voltage will be 5.02V because the resistance is reduced due to the absence of water on the sensor surface in the following Figure 12.

DC motor
The test is carried out to determine the voltage acting on the DC motor when it rotates CW (Clockwise) and rotates CCW (Counter Clockwise) in Table III. Based on the test results that have been obtained. The amount of voltage that works when the DC motor rotates CW (Counter Clockwise) and also the CCW (Counter Clockwise) is the same, which is 5.04V. Meanwhile, when the DC motor is at a standstill, the voltage is 0V, or it can be said that there is no voltage.

Functional Test
This functional test is carried out to find out whether the set of tools can function and work properly or not. This test is carried out by providing input to the two sensors used, namely the LDR module and the rain sensor in Figure 13. This input is a simulation of changes in the weather around the sensor. Both sensors will have logic 0 (LOW) or have logic 1 (HIGH) depending on the simulation of changing weather conditions. If the weather conditions are bright/sunny and not raining, the DC motor will rotate CW (Clockwise) to open the umbrella. The following are some examples of simulations of weather and light conditions on the tools made. The next simulation is if the weather was sunny and not rainy, then suddenly it rains. The DC motor will remain idle, and the umbrella will remain open in the following Figure 14. After that, a simulation of changes in weather conditions is carried out again. This time, the simulation describes the bright weather conditions, and the rain becomes cloudy and rainy. Like before, the DC motor condition remains idle, and the umbrella is still open in the following Figure 15. Next is a simulation if the weather conditions are no longer rainy but still cloudy. The DC motor that was previously silent will rotate CCW (Counter Clockwise) to close the umbrella in Figure 16. Finally, if it is night time and it is raining, the umbrella will open if it was previously closed in Figure 17.

Implementation
At this stage, it can be concluded if, at first, the umbrella is closed, while the digital pin 10 is the LDR module with logic 0 (LOW) because it detects light. Digital pin 11 is the rain sensor with logic 1 (HIGH) because it detects no rain, then the only active sensor is the LDR module because the sensor uses active-low logic (active when it has low logic). The DC motor will rotate CW (Clockwise) to open the umbrella.
After that, if the digital pins 10 and 11, namely the LDR module and the rain sensor, both have logic 0 (LOW), then the DC motor remains silent. The umbrella will remain open because of its previous condition. The umbrella was already open. If digital pin 10 is the LDR module with logic 1 (HIGH), this indicates that the LDR module detects no light or lack of light intensity. While digital pin 11 is the rain sensor with logic 0 (LOW), which indicates that the rain sensor detects rain, the DC motor will remain idle. In the previous condition, the DC motor had opened the umbrella.
Finally, if the digital pins 10 and 11, namely the LDR module and the rain sensor, both have logic 1 (HIGH), these two sensors are inactive because each sensor does not detect light and rain. So, the DC motor that was previously in a standstill will rotate CCW (Counter Clockwise), making the umbrella closed in Table IV.

IV. CONCLUSION
Automatic Garden Umbrella Prototype, which is designed to work, but when testing the tool under certain conditions, an error occurs (in this case, a DC motor that does not open the umbrella correctly). When the two sensors are used to detect a change in weather, the input will be sent to the Arduino Uno microcontroller for processing, resulting in output in a DC motor rotation both clockwise (CW-Clockwise) and counterclockwise (CCW-Counter Clockwise). Both sensors used have active-low logic. That is, they will be active if they have logic 0 (LOW). Suppose the LDR module and the rain sensor detect light and rain. In that case, it will have a voltage of 5 V. In contrast, if each sensor does not detect light and rain, it will have a voltage of 5,02 V. In this series of tools, the DC motor will work if pin +12 Motor Driver L298N is connected to the VIN pin of the Arduino Uno microcontroller. In contrast, the Arduino Uno microcontroller is connected to a 9VDC voltage source. The umbrella will open in the following three conditions, namely when the weather is clear, or the surroundings are bright (morning/afternoon/evening), and it is not raining; it was clear, but it was raining; cloudy weather and rainy. Meanwhile, if the weather is cloudy or dark (night) and not raining, the umbrella will be closed. The manufacture and research of this Arduino Uno Microcontroller-Based Automatic Garden Umbrella prototype can be further developed. The following are suggestions for further development in terms of installing all components to make it tidier and also more thorough so that the tool can function properly, and there are no errors when testing the tool. The manufacture of umbrellas and places to put components should be measured carefully and use materials that are better and stronger. It is recommended to use a DC motor with a larger torque so that the umbrella can open optimally. For further tool development, components such as a buzzer, temperature sensor, and LCD can be added. When the umbrella is opening or closing, a warning sound will be heard and can display the ambient temperature measurement results.