Study On Implementation Of Watergate Control System From Manual To Automatic Based Arduino Nano ATmega328

The system for processing river water into clean water by operating sluice gates which are controlled manually by operators often causes problems (human error), so a system must be created that is capable of controlling sluice gates automatically. The turbidity sensor detects water turbidity which is then accepted by the Arduino nano as the basis for controlling the water gate. In this research, data collection techniques were carried out using interviews with resource persons (operators), observation and literature study. After the automatic sluice control system based on the Arduino nano ATmega328 was implemented, the results obtained were: When the water conditions are muddy and murky, relay one is "on", relay two is "off" (the sluice gate is closed), while when the water conditions are normal and clear then the relay two "on" relays and one "off" relay (open floodgate). In this way, we no longer just have to rely on the operator to control the sluice gate, so that the water treatment process can be more optimal and efficient.


Introduction
Water is an important compound for all forms of life known to date on Earth.Water covers almost 71% of the Earth's surface.There are 1.4 trillion cubic kilometers (330 million mi³) available on Earth.The chemical formula is H2O, meaning that each molecule contains one oxygen and two hydrogen atoms connected by covalent bonds.Water is mostly found in the sea (salt water) and in layers of ice (at the poles and mountain peaks), but can also be present as clouds, rain, rivers, freshwater surfaces, lakes, water vapor and sea ice. .Water is closely related to human life, water is the main means for improving the level of public health, because water is a medium for transmitting various diseases, especially stomach diseases.With rapid population growth, water sources have become one of the most important assets.Water is not only essential for human consumption and sanitation, but also for the production of industrial goods.Water is distributed unevenly over the earth, so its availability in one place will vary greatly.
Groundwater is water found in layers of soil or rocks below the surface of the soil in the water saturated zone/zone.Groundwater is one of the water resources whose existence is limited and its damage can have far-reaching impacts and recovery is difficult.Groundwater comes from rainwater and surface water, which seeps first into the unsaturated zone and then seeps deeper until it reaches the saturated zone and becomes groundwater.Ground water interacts with surface water and other components such as the type of rock cover, land use, and humans on the surface.
Groundwater is one of the water sources used to meet clean water needs.Ground water has various advantages over surface water as a source of clean water, including better quality.However, apart from that, groundwater is a limited water source, where its extraction must be limited, because with continuous extraction it is feared that the groundwater level will decrease.To overcome this, there are several alternatives that can be done, including distilling sea water, rain water, river water and others [2].
In the environment where researchers will conduct research, the need for clean water is very large, so to meet this water need, the company's efforts are made by utilizing river water to be processed into clean water.In this process, river water is channeled into settling ponds through sluice gates which are controlled manually by the operator, so that problems often occur when the river water is murky due to rain and there may also be other factors such as landslides and so on whose arrival cannot be predicted, so there is no system yet.effective and efficient control as a sluice gate controller because it only relies on operators who are not always on site.As a result of this incident, murky water, sometimes mixed with mud, will enter the settling pond.If this happens, it will result in many losses that will be borne by the company, including, the settling pond will quickly experience shallowing, which can speed up the replacement of water filters and result in less than optimal results from the process.filterization.So, based on the researcher's background and desire to provide solutions to the problems that arise, the researcher wishes to take the thesis title "Study of Implementation of Sluice Gate Control from Manual to Automatic Based on Arduino Nano Atmega 328" [1].

Method
This research was conducted at Yayasan Alih Teknologi Lampung..There were several informants that researchers interviewed in this study, namely: Water gate officers or operators who are responsible for the water filtering process, those responsible for electricity, and water distribution officers.Before conducting interviews with these sources, the researcher explained to them the purpose of the researcher in conducting the interview, namely to conduct research.Apart from that, the researcher also asked the resource person for permission to make observations.Researchers recorded each interview conducted using a cellphone.After conducting the interview, the researcher listened to the recording and made observations from the interview results and put them in written form.

Results and Discussion
A system is a combination of several components that work together and carry out certain targets, while control is defined as restraining and controlling.So a control system is a system for controlling the parameters of various processes.In this case, the researcher will build an automatic internal water control system using Arduino Nano.The design of the control system that will be built is shown below [7].

Figure 1. Control System Scheme
Arduino is an open-source electronics platform that is usually used for prototyping a system in the form of software [4].The Arduino program itself uses C.Although there are many high level programming languages such as Pascal, Basic, Cobol, and others.. Sensors that function to measure water quality by detecting the level of turbidity.This sensor detects suspended particles in water by measuring the transmittance and scattering of light which is directly proportional to the level of Total Suspended Solids (TTS).The higher the TTS level, the higher the level of water turbidity [8].
Liquid Cristal Display (LCD) is a type of electronic display made with CMOS logic technology which works by not producing light but reflecting light around it towards the front-lit or transmitting light from the back-lit.The LCD functions as a data display in the form of characters, letters, numbers or graphics.I2C (Inter-Integrated Circuit) communication is a connection made to provide communication between integrated devices, such as sensors, RTC, and also EEPROM.I2C is a synchronous communication system, what differentiates it from SPI communication is that this communication only uses two lines, synchronous clock (SCL) and synchronous data (SDA).Data will be sent from the master to the slave.After completion then from slave to master [9].
A relay is a switch that is operated electrically and is an electromechanical component which consists of two main parts, namely an electromagnet (coil) and a mechanical (a set of switch contacts).Relays use electromagnetic principles to move the switch contacts so that with a small voltage and current they can deliver higher voltages and currents [3].
To create a sketch program for this control system, you must first draw up a circuit scheme between the hardware, to make it easier to create the program and also to determine the use of pins for each piece of hardware that will be used to run the system.The following are the requirements that need to be prepared to build this system [11]  After the circuit between the hardware was completed, the author created a sketch program to run the system according to the program flowchart that had been created previously.
After the automatic control system has been tested and the results are in accordance with the program flowchart, the next step is to combine the automatic system with the manual system, the aim of which is to make it easier for the operator if a disturbance occurs in one of the system options [10].

Figure 3. Man/Auto Control Diagram
Basically, to change the direction of rotation of a 3 phase electric motor is by swapping one of the supply phases on the motor itself.The following is a wiring diagram for reversing the direction of rotation of an electric motor as seen in the picture, when contactor one is active, the phase sequence entering the electric motor is R, S and T, whereas if contactor two is active the phase sequence is R, T and S. Thus, the direction of rotation of the electric motor will be different when one or two contactors are active [6].This testing stage is carried out with the aim of testing whether the system being built is as expected, both from the relay work to the display on the LCD.Judging from the test results table, it that the system built is as expected and in accordance with the program flowchart.When the water conditions are muddy and murky then relay one is "on", relay two is "off" (the water gate is closed), whereas when the water conditions are normal and clear then relay two is "on" and relay one is "off" (the water gate is open).With the test results as in the table above, this system has actually functioned well so that it achieves the desired goal, namely, controlling the sluice gates automatically based on water turbidity to replace the role of humans (operators).

Conclusion
The system built is capable of detecting the level of air turbidity which is then used to control the sluice gates based on the level of air turbidity.Arduino was chosen because it is open source, can be used on various Windows, Linux, Max operating systems, and is affordable.Can be implemented in sluice gate control which works based on air turbidity, namely by means of a turbidity sensor which functions as a detector of air turbidity levels, the results of which will be sent to Arduino as ADC data.This data will be processed by the Arduino to determine which relay one or relay two will be activated.
. a. Arduino nano b.Turbidity sensors c. 2 channel relay module d.I2C converter e. Liquid crystal display (LCD) f.Power supply 5v DC g.Data cable h.Male to male jumper cable i.Female to male jumper cable

Figure 2 .
Figure 2. System Installation In the picture above you can see communication between Arduino pins where pin A0 is used as an analog signal input which receives analog signals from the pin out on the turbidity sensor, pins D and D8 are used as digital outputs to activate relay one and relay two which are connected to the IN pin. 1 and IN 2 on the relay module, then pins 4 and 5 are connected to the SDA & SCL pins on the I2C module, while the VCC pins are all connected to the 5v DC power supply [5].

Figure 4 .
Figure 4. Wiring Diagram for a 3 Phase Electric Motor