Design and Construction of Fan and Bulb Automation System

The automation system described in this project leverages the power of Bluetooth wireless communication to control the bulb and fan. The system utilize readily available components such as Arduino Uno, HC-05 Bluetooth module, and 4-channel relay module, it provides a cost-effective solution for creating a smart environment. The Arduino Uno acts as the central controller, receiving commands wirelessly via the Bluetooth module and subsequently controlling the power supply to connect devices through the relay module. This allows users to remotely turn on or off devices such as bulbs and fans, providing convenience and energy efficiency. The measured response times for turning on/off the fan and bulb in the automation system were found to be 15.47 μs for turning on the fan, 15.20 μs for turning off the fan, and 16.27 μs for turning on/off the bulb. These results indicate that the system is highly efficient and reliable in controlling the devices. Future enhancements can include the implementation of security measures to protect against unauthorized access and integration with other smart devices. The Bluetooth automation system showcases the potential for creating affordable and customizable automation solutions using easily accessible components


Introduction
Since the introduction of electricity into homes and the advancement of information technology, it was only in the early 20th century that the concept of home automation became a reality [1].As innovative beings, we are always seeking ways to improve systems by reducing their complexity, speeding up, or improving their efficiency, which has resulted in home automation.Automation refers to the use of technological applications where human involvement is minimal.The use of technological applications in homes to monitor and control activities such as lighting, heating, IOP Publishing doi:10.1088/1755-1315/1342/1/012002 2 cooling, ventilation systems, electrical devices, sound systems, security cameras, door locks, and alarms can then be viewed as home automation, which minimizes the need for human involvement in tasks.Home Automation is the automatic control of anything in a household, from lighting, heating and cooling, electrical appliances, and security systems [2 -5].
There are two major types of home automation systems: wireless and wired systems.Wired systems operate using hard wiring that runs through home walls.However, open construction is almost always required for the wired systems to function.Wireless technology, on the other hand, does not require cables to operate; it uses radio frequency to operate, allowing you to control your home from a distance.Excellent examples of wireless systems include Wi-Fi and Bluetooth home automation.Convenience is the main benefit a wireless home automation system provides [6,7].Home automation systems have three main elements: sensors, controllers, and actuators [8 -10].The controllers send messages to the actuators, which are then programmed to activate automated features in the home.Home automation allows one to control one's home from mobile devices, including laptops, tablets, or Android devices.It can also help save energy bills by reducing the length of time that lights stay on or by lowering or increasing the intensity of the light.Home Automation systems can improve life in many ways, such as improving security, comfort, convenience, energy efficiency, money saving, and keeping loved ones safe from threats such as smoke, fire, and carbon monoxide [11].

Methodology 2.1 Hardware setup
In this stage, various hardware components are connected step by step to the Arduino UNO.The connection is also tested afterward.The hardware components are breadboard, Arduino Uno, HC-05 Bluetooth module, jumper wires, 4-channel relay module, bulb, fan, DC power adaptor, and plastic case.

Hardware connection
Setting up the hardware for this project required connecting the various components properly.The following steps are taken to ensure the correct setup: i. Arduino Uno to the breadboard connection In order to set up the connection, the Arduino Uno was placed on a stable surface.Then, one end of a jumper wire was connected to the GND (ground) pin on the Arduino Uno and the other end was inserted into the negative (-) rail of the breadboard.Next, another jumper wire will be used, and one end is connected to the 5 V pin on the Arduino Uno, and the other end of this wire is inserted into the positive (+) rail of the breadboard.
ii. HC-05 Bluetooth module to the Arduino Uno connection The HC-05 Bluetooth module has six pins: VCC, GND, TXD, RXD, EN, and STATE.In this project, the HC-05 Bluetooth module is connected as follows: -VCC pin: Connected to the positive (+) rail on the breadboard.
-GND pin: Connected to the negative (-) rail on the breadboard.
-TXD pin: Connected to the RX (receive) pin on the Arduino Uno.
-RXD pin: Connected the TX (transmit) pin on the Arduino Uno.
-EN (enable) pin: Connected to the 5 V rail on the breadboard.iii.Connecting the 4-channel relay module to the breadboard and Arduino Uno The 4-channel relay module consists of four relays, each with three pins: VCC, GND, and IN.The 4-channel relay is connected as follows: -VCC Pin: Connected to the positive (+) rail on the breadboard.
-GND Pin: Connected to the negative (-) rail on the breadboard.
- v. Connecting the components to a DC (direct current) power adapter The DC power adapter serves as the power source and can function as the primary power source or as a backup source in the absence of a functional battery.In this project, the D.C power adaptor is connected as follows: -The positive (red) wire is connected to the positive (+) rail on the breadboard.
-The negative (black) wire is connected to the negative (-) rail on the breadboard.

Implementation and testing
The implementation and testing stage of this project involves connecting the components of the system and testing its functionality.The components of the system include the Arduino Uno, HC-05 Bluetooth module, 4-channel relay module, loads (bulb and fan), jumper wires, breadboard, DC power adapter, and casing.During the implementation stage, the components are connected using jumper wires and a breadboard.The Arduino Uno is programmed using the Arduino IDE, and the circuit diagram is designed using Fritzing.The HC-05 Bluetooth module is paired with a Tablet using the Arduino Bluetooth Controller app.After connecting the components, the system is tested to ensure that it is functioning as expected.The Arduino IDE was used to upload the code to the Arduino Uno, and the Arduino Bluetooth Controller app was used to control the loads via Bluetooth.The response time of the system is visualized using Microsoft Excel.

Data collection
During the implementation of this project, data was collected regarding various aspects of the system's performance.This included the response time of the system when controlling the loads (bulb, fan) through the Arduino Uno and HC-05 Bluetooth module.The response time data was collected from the Arduino IDE serial monitor while running the system.The collected data was transferred from the Arduino Uno to the computer for further processing.The Arduino IDE was used to program the Arduino Uno, which facilitated the retrieval of data generated by the system.The Arduino IDE provided a serial communication interface to receive data from the Arduino 4 board.The extracted data was handwritten and then transferred to a Microsoft Excel sheet which was later analysed.

Automatic Fan Control
The system effectively controls the fan based on the received commands.When the command '1' was received, indicating the fan should be turned on, the Arduino set the fan pin to HIGH, activating the relay and turning on the fan.Similarly, when the command '0' was received, the fan was turned off by setting the fan pin to LOW.Table 1 showed the response when the fan was put ON and OFF condition.Figure 1 is the pictorial presentation of the fan in ON condition.The response time of the fan vary between 12 µs and 16 µs and the mean response time is 15.47 µs and 15.20 µs when the fan is in ON and OFF condition respectively.

Automatic Bulb Control
The system also controls the bulb based on the received commands.When the command '3' was received, indicating the bulb should be turned on, the Arduino set the bulb Pin to HIGH, activating the relay, and turning on the bulb.Conversely, when command '2' was received, the bulb was turned off by setting the bulb Pin to LOW.In Figure 2 it was discovered that the on and off response times of the device vary more than of fan.The response times ranging between 16 µs and 20 μs.The mean on-response time of the device was 16.27 μs, while the mean off-response time was 16.27 μs.
Comparing the two data sets, we can see that the mean response time of the fan is slightly faster (15.47 μs) compared to the bulb (16.27 μs).Similarly, the mean off-response time of the fan (15.20 μs) is faster compared to the value of the bulb (16.27 μs).It was observed that the fan and the bulb exhibited consistent response time, indicating that they are operating optimally.There are instances where the response times deviate from the average values, suggesting the presence of factors influencing the behavior of the device during those specific moments.The fan showed faster response times when turned off in a couple of instances, indicating a possible faster deactivation mechanism.The bulb demonstrates fluctuations in response time when turned on, with a longer response time observed at the 20-second mark, suggesting a potential delay or change in the activation mechanism at that specific moment.

Conclusion
The fan and bulb automation system was constructed using Bluetooth wireless communication and readily affordable components.The Arduino Uno serves as the central controller, receiving commands from an Android device via the HC-05 Bluetooth module.The relay module allows the Arduino to control the power supply to the connected devices, turning them on or off remotely.
From the results of the tests carried out, it can be concluded that the bulb and fans are functioning properly.In all, the system demonstrates the potential for creating a simple and cost-effective home automation solution using readily available components.
IN1 Pin: Connected to pin 2 on the Arduino Uno -IN2 Pin: Connected to pin 3 on the Arduino Uno iv.Connecting the bulb and fan to the relay module The relay module has three terminals on each relay which are the NO (normally open), COM (common), and the NC (normally closed).In this project, the Connect one terminal of the bulb to the COM (common) terminal of one relay.The COM of relays one and two are connected to the positive (+) rail on the breadboard.The Positive wires from the BULB and fan are connected to the NO (normally open) terminal on relays one and two while the negative wire from the bulb and fan is connected to the negative (-) rail on the breadboard.

Table 1 :
Response time of fan S/N Time (s) ON response time (μs) OFF response time (μs)

Table 2 :
Response time of bulb S/N Time (s) ON Response time (μs) OFF Response time (μs)