A low-cost Wi-Fi smart home socket using internet of things

ABSTRACT


INTRODUCTION
The impact of internet of things (IoT) applications in Malaysia is expected to grow and rise by 2025 [1].The rapid development and deployment of IoT technologies have created new opportunities for researchers and engineers in a variety of fields including healthcare [2], [3], transportation [4], industrial automation [5], agriculture [6], [7], and most interestingly smart homes [8]- [12].In the last few decades, smart home systems have become very popular because they make life more comfortable and enjoyable.A "smart home" is a house with electronics and lighting systems that are automated and controlled through IoT.It also enables remote monitoring and control of a variety of home systems and appliances, including those for lighting, heating, cooling, security, and entertainment.Intelligent technology is used in smart homes, such as smart sockets, which combine many technologies such as sensors, cameras, and wireless networks.
The goal is to provide households with a safer, more comfortable, and more efficient home life at a low cost and affordable for people.A smart socket is an electronic component that serves as a key component of IoT systems, allowing users to interact with their electrical appliances and also control/disconnect the power supply.A few significant papers from several research on smart socket studies were reviewed.

ISSN: 2302-9285 
A low-cost Wi-Fi smart home socket using internet of things (Ahmad Danish Suffian Ahmad Taufik)

931
According to study findings, the existing smart socket by the previous researcher has a complex design [13]- [15], a complicated installation process [16]- [18] and is costly [19]- [21].This project proposes developing a low-cost Wi-Fi smart home socket using the IoT which is expected to minimize energy consumption in the household and be simple to install, and friendly to use.A Wi-Fi smart home socket can be controlled remotely using an IoT network.The aim of this project is to allow users to turn on or off any device that is plugged into it, using a smartphone or any other internetconnected device.The IoT technology allows the socket to connect to the internet and communicate with other devices in the network.This enables the socket to receive commands and send feedback to the user about the status of the device that is plugged into it.For example, if the user forgets to turn off a device before leaving the house, they can use their smartphone to turn it off remotely.It provides greater convenience and energy efficiency.As a consequence, it also can help save energy and reduce electricity bills.Moreover, Wi-Fi smart home sockets can be integrated with other household electrical appliances such as cooling or heating, cooking, cleaning, or charging devices.Some examples are lamps, fans, chargers for smartphones, and clothes irons.This project's system architecture included the controlling unit, the actuating unit, and the visualizing unit.Firstly, this project uses a node microcontroller unit (NodeMCU) Wi-Fi module (ESP8266) as the main microcontroller unit to connect to a cloud platform.A 4-channel relay module as an actuating unit is used to transition DC current loads to AC current loads in order to activate switching processes.Lastly, the Blynk platform as the visualizing unit is used to monitor and control the switching mechanism.

BACKGROUND STUDY 2.1. System operation using Wi-Fi module
The Wi-Fi module has significant importance within the context of IoT applications.The Wi-Fi module used in this project is the ESP8266.The ESP8266 Wi-Fi module is a self-contained system-on-chip (SOC) that incorporates TCP/IP protocol stacks, enabling microcontrollers to connect to Wi-Fi networks.The ESP8266 Wi-Fi module has the capability to function independently as a self-contained system, hence minimizing the burden of communication stack operations on the primary application processor [22].The ESP8266 Wi-Fi-enabled devices have the capability to wirelessly acquire data from areas that are equipped with wireless connectivity.

Web interfacing
Blynk is the most widely used IoT platform for connecting devices to the cloud to create web-based interfaces.Blynk is a smartphone application that can be designed and installed for free by the user and allows remote control of electronic devices via iOS and Android apps [23].It is well-known for allowing users to create apps for controlling IoT devices, analyzing telemetry data, and managing deployed items at scale [24], [25].The platform offers a user interface that enables the creation of graphical interfaces via the use of diverse widgets.The three primary constituents of Blynk include applications, servers, and libraries.The application has the capability to facilitate the development of the user interface.The server assumes responsibility for facilitating all communication between the application and the physical infrastructure.Libraries provide the establishment of communication between hardware devices and the server via the use of commands.The Blynk project included the establishment of a connection between the Blynk app and the NodeMCU via the use of the project authentication ID.
In this project, the Blynk application serves as the platform for sending instructions to the microcontroller for turning on and off household appliances remotely through a socket.The signal delivered from the NodeMCU to the Blynk application may be analysed by users to determine if a socket has been switched on or off.As the local server, the Internet hotspot that can be accessed from a mobile device is used.In order for synchronization to happen, the project needs to connect to the local server.The use of a smartphone, which is linked to the Arduino Uno through the same local network server, enables the retrieval of data and information generated by the Arduino Uno.

METHOD 3.1. Block diagram
Figure 1 shows the entire system's architecture diagram for a Wi-Fi smart socket using IoT.The system has both hardware and software elements.The primary controller for the project is the NodeMCU ESP8266 Wi-Fi module.The switch input socket was remote-controlled via the Blynk.Moreover, a relay module that was attached to the socket acted as the actuator output.The Wi-Fi smart socket system proposed in this paper is divided into two parts which are controlling and monitoring systems.Control systems are primarily responsible in charge of turning on and off electrical appliances using socket switches that can be controlled via a smartphone.For the monitoring system, the user can observe whether a socket has been turned on or off via the Blynk app.The designed smart socket controlling and monitoring system may reduce the excessive use of electrical appliances and enhance the safety of electrical appliances.Table 1 shows a list of hardware components used in this research.Blynk is a platform that allows users to build applications for the IoT.Blynk provides a mobile app that allows you to control hardware remotely using various widgets.This app itself is free to download and install on your phone from the respective app stores (like the Apple app store or Google play store).This platform is made up of three main components: the Blynk app, the Blynk server, and the Blynk libraries.By merging different widgets, the Blynk app assists us in creating visually appealing user interfaces for our applications.The Blynk Server manages all data flows between the smartphone and the hardware.

Channel relay Module
The relay module is a compact board that may be used to manage high voltage and high current loads, including lights, solenoid valves, motors, and AC loads.This project is designed to interface with NodeMCU.A small and cost-efficient 4-channel relay module is used to transition DC current loads to AC current loads in order to activate switching processes.

Load
Represents small household electrical appliances.These electrical appliances are often compact electrical devices for the home that are also very practical and easy to set up.Small household electrical appliances accomplish some household functions, such as cooling or heating, cooking, cleaning, or charging devices.Some examples are lamps, fans, chargers for smartphones, and clothes irons.

Simulation part
The flowchart of the Wi-Fi smart socket working process is shown in Figure 2.This flowchart represents the sequence of steps taken in the process of developing and implementing the Wi-Fi smart socket system.The flow chart shows how the system for this project will operate.First, the Blynk app checks to verify that your phone is connected to the internet or Wi-Fi.Then, users may remotely control the smart socket by selecting the ON/OFF button on the Blynk app on a mobile device.This is the simple and easy procedure for this project, which will make using electrical appliances more effective and keep our houses safer while we aren't home.

RESULTS AND DISCUSSION
The implementation of the Wi-Fi smart socket hardware model is shown in Figures 3 and 4. The manual switch control for this smart socket is shown in Figure 3.This switch allows customers to control the socket manually.As we can see, there are four switches, which correspond to the four sockets utilized in this project.Switch 1 is on the left, followed by switch 2, switch 3, and switch 4. The socket layout for this smart socket project is shown in Figure 4.This is how the layout of the sockets will be displayed.It looks like an extension plug, and its purpose is to be used with electrical devices.The sockets are arranged in the following sequence, starting from the left: socket 4, socket 3, socket 2, and socket 1. Figure 5 shows the Blynk control and monitor display on the smartphone.Therefore, this is how the control panel will look on the smartphone screen.When the switch is manipulated via the Blynk application, it promptly responds to the socket's output and displays the current status of the socket, indicating whether it is in an active or inactive state.If the switch is opened manually, it will show up in this Blynk app, and its mobile can be turned off.Several tests were conducted on various household appliances to measure their power and functionality.The load for switch 4 was tested by charging a smartphone.Comparative studies for both remote and manual procedures were recorded in Table 2.The smart socket's efficiency was assessed by a pilot test performed manually on switch 4, as shown in Figure 6(a), and in mobile mode controlled by a smartphone while a smartphone was being charged as illustrated in Figure 6(b).Due to its compatibility with all electrical appliances, users may switch the load to any other home appliance.The microprocessor in this smart socket receives its power from a separate source, making it compatible with any electrical appliance.This is because multiple power supplies will be utilised for the Bulletin of Electr Eng & Inf ISSN: 2302-9285  A low-cost Wi-Fi smart home socket using internet of things (Ahmad Danish Suffian Ahmad Taufik) 935 circuit depending on the circuit's power needs, and electrical appliances will be directly connected to the AC power source.Having this smart socket will help people increase the security of their electrical equipment while also protecting it from risks like fire.This paper's main contribution is its emphasis on "low-cost" characteristics.To reflect the "low cost" features as a major focus contribution of this paper, it is feasible to conduct a comparative analysis between the prototype presented in this article and existing commercial devices.Table 3 presents the raw material costs related to the developed prototype, while Table 4 illustrates the comparison between the prototype and commercially available devices.It's clear that our prototype offers significant cost savings over commercially available alternatives.The prototype runs on open-source software (Blynk), which is free software and contributes to cost savings.

CONCLUSION
In conclusion, the Wi-Fi smart socket using IoT has fully functioned and accomplished its objectives those appliances can be monitored and controlled successfully.According to the study's findings, this smart socket helps users resolve the issues stated.Overall, the implemented system works according to the user's expectations, and it can be used in two ways: either by a smartphone user present at home by remotely switching ON and OFF the appliances or by physically switching on the socket outlet.Hence, the wastage of electricity consumption can be reduced.Overall, a Wi-Fi smart home socket using IoT technology provides a low-cost, convenient, energy-efficient, and versatile way to control home devices remotely.For future development, might be upgraded by adding a parameter widget to the Blanks app to track electricity consumption and current charge readings for electrical equipment.This may reduce the cost of electricity bills.

Figure 2 .
Figure 2. Working principle of the Wi-Fi smart socket process

Figure 5 .Figure 6 .
Figure 5. Blynk control and monitor display on a smartphones

Table 3 .
Total raw material cost for developing a low-cost Wi-Fi smart socket using IoT

Table 4 .
Market product comparison utilising Wi-Fi smart sockets and IoT In 1 Wifi dual smart plug outlet Us/EU smart socket remote voice control support Alexa Google home smartthings