Arduino UNO Home Automation

Facebooktwitterredditpinterestlinkedinmailby feather

Build a Bluetooth controlled Home Automation Setup Using Arduino UNO board and Relay module

  1. Do you want to automate your home?
  2. Have you ever wanted to control your home appliances by swipe the screen of your phone?
  3. Do you want to learn how to build an automation device for yourself?

In this project, we will see how to control a light bulb, fan, or other electrical devices in your home with an Arduino board. At the end of the project, you can control the connected load from your Smartphone.

Requirements of hardware in this Project:

  1. Arduino UNO board
  2. Relay module (5V)
  3. Bluetooth Module HC-05
  4. Jumper wires male to female
  5. Light bulb
  6. A USB cable for connecter Arduino UNO board
  7. Android Phone
Arduino UNO Home Automation

Requirements of software in this Project:

  1. Arduino IDE software (To program the Arduino board, we need to download the Arduino software)
  2. Android (Arduino Bluetooth controller App)

The Working principle of this Project:

There are four main components used:

  1. Android Smartphone
  2. Bluetooth module 
  3. Arduino UNO board
  4. Relay module

The Android application sends the data in series to the connected Bluetooth module HC-05 by clicking “ON” button. The Bluetooth module receives the application data and sends it through the TX pin of the Bluetooth module to the Arduino RX pin. The Arduino board reads the input data, processes it according to the program loaded inside and generates the output to the Relay Module.

Write a program in the Arduino IDE. 

Arduino UNO Home Automation 1

Full code show in below:

Save your program and compile, as shown in the following figure

Arduino UNO Home Automation 2
Arduino UNO Home Automation 3

Connect your Arduino UNO board to your laptop or desktop computer through the Arduino UNO USB cable. Remove all other connections with the Arduino UNO board, such as the Bluetooth module and Relay module, and then “Upload the program to the Arduino UNO board”. The following figure shows the Arduino UNO board and the cables connected with that.

Arduino UNO Home Automation 4
Arduino UNO Home Automation 5
Arduino UNO Home Automation 6

Before uploading the code to the Arduino UNO board, make sure your Arduino serial port is selected. Otherwise, an error message “Serial port not selected” is shows on the screen.

To select your serial port in your laptop or desktop:

Open Device Manager -> Ports (COM & LPT) ->Arduino Uno, and then upload your program.

Arduino UNO Home Automation 7

After uploading the program in the Arduino UNO board. Connect all modules with the Arduino UNO board, such as the Bluetooth module and Relay module. The following image shows theDigital circuit diagram.”

Arduino UNO Home Automation 8

Connection between Relay Module, Bulb, and input power:

  1. Connect common-point (com) of Relay Module with home light.
  2. Connect normally-close (nc) of Relay Module with power.
  3. Connect remaining one home light wire with the power source.

Circuit Diagram Relay module with Light Bulb

Arduino UNO Home Automation 10

Connect all the modules with the Arduino UNO board, and light bulb with Relay.

Now, Connect Bluetooth modules HC-05 with the Android Smartphone. Consider the screenshots below:

Arduino UNO Home Automation 11

Note: Channel Relay module works only with PIN 6, PIN 7, PIN 8, and PIN 9.

When we click on the “ON” button of PIN 6, PIN 7, PIN 8, and PIN, the android application sends 1 to the Bluetooth module. The data is transmitted from the Bluetooth module to the Arduino board. As soon as the Arduino board gives permission to the Relay module for the power supply, the home appliance turns ON.

Arduino UNO Home Automation 12
Arduino UNO Home Automation 13
Arduino UNO Home Automation 14
Arduino UNO Home Automation 15

When we click on the OFF button of the PIN 6, PIN 7, PIN 8, and PIN 9, the Android application sends 0 to the Bluetooth module. The data is transmitted from the Bluetooth module to the Arduino device, and the home appliances turns OFF.

Arduino UNO Home Automation 16
Arduino UNO Home Automation 17
Facebooktwitterredditpinterestlinkedinmailby feather