Design of control and monitoring tools for electricity use loads, and home security systems with internet of things system based on Arduino Mega 2560

High economic growth makes the demand for comfortable and safe houses increasingly increase and the most obvious application of technology is technology with automated systems. With this technology, the use of electricity in homes can be monitored remotely. With the aim of optimizing and time efficiency, this research created a control system based on IoT system. The control system with the function of providing security and comfort for the homeowner and the people who live in it, because it can facilitate the work to be faster, effective and efficient. In this regard, in this research the title “Design of Controls and Monitoring of Electricity Loads, and Home Safety with IoT-based Arduino Mega 2560 Systems” is adopted. This application is used as consideration for someone applying the concept of smart homes and the Internet of Things in real life. The results of this research are testing the camera to process the results of taking pictures until the upload process is completed in storage on a computer that is made as a client server is 30 seconds and the entire system works properly and normally.


Introduction
Along with the times, technology is growing very fast, even things that were considered impossible or impossible can now be realized with the help of technology. High economic growth makes the demand for comfortable and safe houses increasingly increase and the most obvious application of technology is technology with automated systems. With this technology, the use of electricity in the home can be monitored and offers convenience in controlling the house remotely. Sometimes we forget to turn off the lights when we are outside so we have to go back and do a very inefficient check both in terms of time and financially such as the cost of gasoline to return home. With the goal of efficiency, an idea emerged to create an iot-based control system. Control system with various functions, will provide security and comfort for homeowners and the people who live in it, because it can facilitate the work to be faster, effective and efficient [1][2][3][4][5][6][7][8].
In this regard, the author will try to compile the final project with the title "Design of Controls and Monitoring of Electricity Loads, and Home Safety with IoT System based on Arduino Mega 2560". This application is used as consideration for someone applying the concept of smart home and the Internet of Things in real life.
The purpose of this research is to implement control of home appliances using Arduino with a web server, introducing smart homes more interactively, minimizing the use of home electricity with control applications via the web and becoming recommendations for implementing smart homes with control via the internet in the real world.

Literature Review
Literature review conducted by comparing research of the same type with the same literature is used to be made into consideration and is expected to help in making a new system [9][10][11][12][13].

Method
In this chapter describes the system requirements needed in the design of the connecting system design, circuit breaker, and monitoring of the flow of electrical equipment, discussing the design of the system to be made that has been adapted to user needs.
Basically this system will work to adjust the desires of consumers, which equipment will be arranged and connected with Arduino so that it can be controlled and monitored remotely. However, this research will take some basic electrical equipment commonly used in the home. The working principle of this system is to connect the server network and the electrical terminal to Arduino so that any electronic device connected to the terminal can be controlled and monitored using applications that have been made and connected to the server network.
Here is a block diagram of "Design of Electric Load Control and Monitoring Devices, and Home Safety with an IoT system based on Arduino Mega 2560".  Figure 1, it can be seen that the circuit design is block diagram consisting of a voltage source block, input block, process block and output block. the input block describes the input for the microcontroller and the input media, the process block describes the process after input comes in and the components that act as input processors, while the output block explains the output produced and the output media.
Based on Figure 1, the working principle of each block is explained in

Design
The design of the input block can be seen in Figure 2. The output block design can be seen in Figure 3.

Prototype Result
The manufacture of mechanical parts includes the process of working boxes (boxes) where this process must support electronic parts so that the desired tool is realized. This process includes drilling, wearing, and mounting the box and the results of the design can be seen in Figure 5.

Network Connection Testing
In testing the network connection it is necessary to find out the ip address of the client computer connected to the access point on the server using the command prompt. Type "ipconfig" at the command prompt as can be seen in Figure 6.   The test results in Figure 9 get that when the switch button 1 is "OFF" and orange on the web server when pressed it will change to "ON" and the symbol changes to green, indicating that the webserver ordered coil relay 1 to be connected to load no. 1. The test results in Figure 10 get that when the switch button 2 is "OFF" and orange on the web server when pressed it will change to "ON" and the symbol changes to green, indicating that the webserver ordered coil relay 2 to be connected to load no. 2. Figure 11. Switch testing no. 3 The test results in Figure 11 get that when the switch button 3 which is "OFF" and orange on the web server when pressed will change to "ON" and the symbol changes to green, indicating that the webserver ordered coil relay 3 to be connected to load no. 3. Relay is on, for spare load Matching The results of the data in table 3 of the load usage on the socket in realtime can be seen in the Arduino serial monitor and also in the server application in Figure 12. The test results in Figure 12 shows a serial monitor image that shows the value of the voltage that is read, the value of the current connected, the value of the power used, and "connected" which means that the webserver is connected to the client server. For testing the use of the load can be seen in Figure 13.  Figure 13 shows the power outlet is connected to the installed load, in the form of a rice cooker and an electric iron, as well as 3 LED lights, so that the sensor reads the load power that will be displayed on the webserver which can be seen in Figure 14. On the results of the power meter report in Figure 14 shows the load data that is read in the form of the connected voltage, the current connected, and the power used in realtime. And the data will be stored in the database server.

Manual System Testing
Testing is done to find out whether the system manual is running well to anticipate if the IoT system has a problem. In the manual system there are switches "OFF" and "ON" on the switch, which indicates that the "OFF" switch will disconnect the relay from being connected to the load, and the "ON" switch will connect the relay to the load so that the entire load can be used.

Figure 15. Switch testing OFF
The test results in Figure 15 show that when the switch in the panel box is in the middle position, the switch will instruct the relay to disconnect from the load, so that all loads cannot be used. The test results in Figure 16 show that when the switch in the panel box is in the down position, the switch will instruct all relays to connect to the load, so that all loads can be used.

Security System Testing
Testing is done to find out the security system that is designed automatically or manually control on the camera running well.

Figure 17. Camera button manual testing
The test results in Figure 17 show that when the "OFF" and orange capture button on the webserver when pressed will change to "ON" and the symbol turns green then turns orange again, indicating that the webserver commands the camera to take pictures. The test results in Figure 18 show that when the door is open, the magnetic sensor will instruct the camera to take pictures in real time so that someone who has entered the room can be identified. To find out the camera taking pictures can be done by looking at the serial monitor on Arduino, and the results of the image will be stored on the client computer server storage. Figure 19. Arduino serial monitor security system Figure 19 shows that the camera has succeeded in taking pictures and storing images on the server storage with a processing time of 30 seconds until the upload process is complete which is shown on the Arduino serial monitor.

Figure 20. Camera results storage server
In picture 20 shows the results of taking a camera that has been stored on server storage, so users can see someone who has entered the room.

Application Testing
Testing is done to find out whether the application can connect to the web server when running. Test results can be seen in table 6  Table 6 shows the application can be connected directly to the server display so that users can quickly access the webserver through the application.

Conclusion
From the results of the design and testing of electrical load control and monitoring devices, as well as home security with the IoT based Arduino Mega 2560 system that has been done, it can be concluded that: