Development of IoT Based Clothesline using Microcontroller

: Sunlight has long been used in daily activities, especially drying clothes. The only concern is sudden rain and people are not aware that their clothes are still on the clothesline. Due to this, many opt to dry their clothes indoor, which takes longer to dry. With regard to the aforementioned issue


Introduction
In the current era of globalization, global changes have taken place all over the world.The paradigm shift from tradition to modernity is acquiring a practical and efficient approach.Today's modern age refers to technology that is increasingly sophisticated and accessible.In addition to technology, modern times are also associated with the discovery and renewal of science and education.To improve the quality of life, everyone must be able to adapt in various fields in order to adapt to todays increasingly dynamic sphere of life.
Human lives have become busier along with rapid modernization, thus the need for technology to help with housechores.Technological advances and innovations contribute to more effective houseworks, such as robotic vacuum cleaners, air fryers, rice cookers, microwaves, and washing machines.Novel household innovations have led to the concept of smart home, by integrating technologies and appliances to lighten human burden in managing daily housechores.Smart home technologies may include remote monitoring and controlling, enabling automation with or without user intervention, thus makes managing housechores safer, more convenient, efficient, and economical.
Traditional clothes drying relies on the heat of the sun.However, global warming has brought upon undesirable erratic weather.Due to erratic weather, sun-dried clothes get exposed to rain and become wet again if the person is not at home.Though clothes can be dried indoor and not exposed to direct sunlight, they may still be damp for longer period, which could affect the quality.
Adressing the aforementioned concerns, this study proposes a prototype of Internet of Things (IOT)-based automatic clothesline, driven by Arduino UNO.The prototype consists of a light Dependent Resistor sensor to detect light, a water sensor to detect water droplets, and an ESP8266 wifi module to send data to an app called Blynk to control the clothesline.[1][2][3][4]

Methods
The research method employed in this study is: to research the material, learn the ropes of work that needs to be done, and make work tools that can meet needs.The goal of the project is to build an automatic clothesline drive that could help retrieve or fetch clothes being dried outdoor.The stages of work are as follows :

System Design
System design is the process of defining the architecture, components, modules, interfaces, and information of a system to meet certain requirements.The system design at the draft stage includes system block diagrams and system diagrams.1. LDR sensor to detects light: If it is dark, the clothesline goes inside.If the light intensity is high (bright), then the clothesline is removed.[5]2. Raindrops sensor, which is the main sensor in the automatic drying feature, will detect any presence of water droplets.When the sensor is dripped with water, the clothes will be fetched straight in even though it is hot day.[6] 3. Arduino UNO R3, which is the main microcontroller and hardware actuator, will receive analog data from the sensors, and consequently give commands.Arduino UNO will communicate with another microcontroller, in this case the NodeMCU ESP8266, by receiving and sending data properly.[7-8]4. NodeMCU ESP8266, as a backup microcontroller, serves as actuator using software on the device.NodeMCU functions as a data receiver from the main microcontroller, whose results are displayed on the Blynk application as a form of monitoring.Figure 3 flowchart of automatic clothesline first, dc motor and relays are connected in series.After successful connection, data of detection by the LDR sensor and rain sensor will be sent to Arduino.If the Arduino receives data, it will be retransmitted.[12][13] When data is received from the Arduino, it is transmitted by the NODEMCU ESP8266.The driver can also be monitored and controlled via the Blynk application [14][15].If the LDR sensor detects light, the device sends the clothesline out, and if the LDR sensor does not detect sufficient light, the clothesline is retrieved.Similarly if the rain sensor is not covered with water, the clothes pole will come out, and if the rain sensor is covered with water, the clothes pole will be retrieved.[16][17]

Analysis
The automatic dryer test was conducted under different simulated conditions, namely sunny, cloudy, sunny but rainy, and rainy.When tested in sunny conditions, the light source (bulb) was set directly above the LDR photosensor at a predetermined distance.In cloudy conditions, the light source (bulb) was purposely dimmed or turned off.In sunny but rainy conditions, the light source was switched on, with simulated rain water.In the last test, which was totally in the rain, the light source (lamp) was turned off, water was sprayed onto the sensor.From the simulation results, it can be concluded that the microcontroller had worked effectively to manage the automatic clothesline system according to plan.The sensors, microcontrollers, and motor driver had functioned properly to decide whether to send out or retrive the clothesline.The finished clothesline design is 1200 mm in length, 500 mm in width, 1438.82mm in height (see Figure 4).This prototype using iron for its frame and acrylic for the motor mount.The micro controller is contained by using a box made out of plastic.

Sensor LDR Testing
The LDR sensor test was tested and monitored using the Blynk application using a light source (lamp) as a determinant of weather conditions.In this test, various conditions had been simulated to validate the expected result.These components are tested to produce data which can be seen in the table below:  1 testing on LDR sensor in the first test, the average value measured in bright light was 598.5, then the results shown in the Blynk application show that the weather was sunny.In the second test, the average value measured in dark light was 388.2, and then the results is overcast in the display .Blynk app showed that the weather was unclear if the average measured data is lower than 450.

Rain Sensor Testing
Tests on rain sensors were carried out to measure the response of rain sensors when exposed to water droplets.The rain sensor was installed on a roof at 130º slope.The purpose is that when the rain stops, the water that hits the sensor can flow straight down, so that the clothes will dry quickly after the rain stops; but in this test, the rain sensor was put on the roof of the house directly in parallel position to test how sensitive it would be to rain when water dripped.Here are the results of the rain sensor test.  2 testing on rain sensor this test was done several times to determine the response of the rain sensor.In the first test, the rain sensor received 1X drops of water.The average measured value was 409, and the clothes were not retrieved.In the second test, the rain sensor received 2X drops of water.The average measured value was 439 and it resulted on the clothesline not moving, and the clothes were still not retrieved.In the third test, the rain sensor received 3X drops of water.The average measured value was 613, and the clothes were retrieved into the house.In the fourth test, 4X drops of water were given to the rain sensor.The average measured value was 695, and the clothes were retrieved into the apartment.Therefore, if the rain sensor receives a rain intensity value >500, the motor automatically retracted the clothesline.

System-Wide Testing
The purpose of testing the entire system is to find out whether the automatic drying system that has been designed can work according to its function.This system was tested to produce information data or the status of our clothesline conditions which can be seen in the table below:  3 system wide testing in this part of the test, full system test was conducted under multiple conditions.The first condition was set with the rain sensor in dry conditions (not exposed to rain) and the LDR sensor was in bright conditions.The results obtained were: motor did not retrieve/retract the clothesline, thus the clothes were still outside the house.The second condition was set with the rain sensor in dry conditions (not exposed to rain) but the LDR sensor was put in the dark.The motor did not retrieve/retract the clothesline, so the clothes were still outside the house.In the third situation, the rain sensor was set in wet conditions (exposed to rainwater) and the LDR sensor was put in bright condition.The motor was activated, so the clothes were retrieved into the house.Finally, in the fourth condition, where the rain sensor was set in wet conditions and the LDR sensor in the dark, the motor was activated to retrieve the clothesline, bringing the clothes into the house.After tests under four different situations, the result of the testing system showed that the operating system of the automatic clothesline worked as desired.The automatic clothesline system can read the weather from its sensor when tested with rain not touching the sensors, the DC motor did not move the clothes inside but if the rain water wets the clothes, the DC motor moves the clothes inside the house.

Blynk App Testing Figure 6. Blynk app (above) in to control the clothesline automatically
Figure 6 shows the Blynk application, in which the clothesline was in automatic condition.The application indicates that the clothesline is inside, and the day is raining in sunny weather.In this situation, when the rain sensor detects the presence of water, the clothesline will be automatically retrieved into the house.Figure 7 shows the Blynk application, in which the clothesline is in manual condition.The application indicates that the clothesline is outside in sunny weather (not raining).In this situation, the water sensor surely does not detect the presence of rain, while the LDR sensor signals the microcontroller to activate the motor to push the clothesline with the clothes out of the house.

Figure 8. Blynk application indicating cloudy weather
In the Blynk application shown in Figure 8, the clothesline is in manual state.The application indicates the weather is cloudy without rain, thus the outdoor clothesline is in a state where the LDR sensor detects a lack of light.Therefore, the LDR sensor notifies the Blynk application that it is cloudy outside.Other than that, if the rain sensor does not detect water, the motor will not pull the clothes into the house.

Figure 9. Blynk Application in the Rain
As shown in Figure 9, the Blynk app indicates that the clothesline is in manual mode.The application will indicate if the day is cloudy or rainy.If the LDR sensor detects insufficient light and the rain sensor detects rain, the motor will pull the clothesline and clothes inside.

Time Test On Clothesline Retrieval
Time test on clothesline pulling was carried out to measure the time of motor to bring out the clothesline to dry the clothes, and retrieving the clothes.This test was carried out with various amounts of clothes dried in the sun, in order to find out how long it would take to move the clothes from under the sun to its shade box.In table 4 the time test for pulling the clothesline was carried out with various amounts of partial load clothes.In the first test carried out with 4 clothes as a load, the result of the pulling time for 4 clothes was 14.51 seconds.In the second test, it was carried out with 6 clothes as loads, so the time obtained was 12.82 seconds.In the third test carried out with 8 clothes as loads, the results obtained were 14.51 seconds.In the fourth test, it was carried out with 10 clothes as a load, the result obtained was 15.55 seconds.In the fifth test carried out with 12 packs as a load, the results obtained were 16.51 seconds.In the sixth test carried out with 14 clothes as a load, the results obtained were 17.96 seconds.The final test was carried out with the maximum number of clothes on this automatic clothesline, namely 16 clothes.So the result obtained is 19.59 seconds.

Internet Connectivity Testing
In this project, NodeMCU8266 functioned to connect the device and the cellphone by using a hotspot connection.The purpose of this test was to determine the maximum distance a hotspot connection can connect to the Node MCU ESP8266.The test distances for Internet Connection test are listed in the table below.

Conclusion
Based on the results of this study, several conclusions can be drawn, namely: 1.The automatic clothesline can work independently, owing to the sensors assigned to the device, therefore it can decide to bring out or retrieve the clothesline automatically.2. The automatic laundry button can be operated manually using the Blynk app.By pressing the input button, the clothes can be moved into the house, and by pressing the exit button, the clothes move out of the house.3. The data read by the sensors on the device can be sent to the IoT platform, namely the Blynk app, so that users can see the status of the cord when the user is not near the clothesline.4. In this study, remote control testing had been carried out via the Blynk application 10 times, with different distances.At a distance of 25 meters, the Blynk app could no longer connect with the device.5.In the time test on the withdrawal of clotheslines with a maximum number of clothes, it took 19.59 seconds; it can be concluded that when there is sudden rain, the driving motor can minimize wetness of clothes.

Figure 1 .
Figure 1.Flowchart of Project Activities

Figure 2
Figure2above displays the diagram of general idea how the system works.More detailed explanation is as follows:

Figure 7 .
Figure 7. Blynk app (above) in to control the clothesline manually

Table 1 .
Test Results data table from LDR sensors

Table 2 .
Table of test result data from rain sensor

Table 3 .
System-wide Test Results Data Table

Table 4 .
Data table of time test results of clothesline retrieval

Table 5 .
Distance test for stable on internet connection 6.The results of the automatic clothesline test indicate that the clothesline can indeed function automatically, thanks to the sensors.(MSU) Shah Alam, and Politeknik Negeri Sriwijaya for the