Have a smartphone in your hand? How about controlling your home appliances by using it? Awesome right? All you need is a Smartphone with ‘Arduino Remote LITE’ installed, and a basic Bluetooth Arduino kit with a relay board. This will enable you to control all the devices in your home using a few taps. This article will guide you through all the steps in detail. By the end of this video, you should be able to make a home automation system that can control all the devices in your home, simply by tapping a button on your smartphone.

Sponsor Link

This Project is Sponsored by UTSource. UTSource is a professional electronic components supplier.

Arduino Remote LITE Home Automation – DEMO VIDEO

Check out the video demo below. Here I am using an 8 Relay board connected to an Arduino board which is in turn connected to a Bluetooth module. This Bluetooth module will receive commands from the mobile phone app – “Arduino Remote LITE” and is sent to Arduino. The Arduino then control the relays depending upon the command is received from the Bluetooth module. Thus we can control the devices connected to the relay using the mobile phone. A Smart and Simple Home Automation System using Arduino and Bluetooth.
<span id=”selection-marker-1″ class=”redactor-selection-marker”></span><span id=”selection-marker-1″ class=”redactor-selection-marker”></span>
Check Out My Youtube Channel

PREPARE

What do you need to build your Home Automation system using Arduino Remote Lite?

To control the devices in your home using this Android App,
  • Android smartphone
  • Arduino board
  • Bluetooth module (HC-05 or HC-06)
  • Relay module (4 or 8 channels)

Arduino Remote LITE Home Automation – Tutorial

Step 1. Download the app Arduino Remote LITE

The first thing to do is installing the APP. For those who have not installed Arduino Remote LITE: Download the latest version from here: [AdSense-A]Download

Step 2. Connect Arduino Remote LITE to the Bluetooth module

The connections are pretty easy. Follow the below schematics to set this up.

Connections

Arduino HC-05 or HC-06
TXD RXD
RXD TXD
5V VCC
GND GND
Arduino 8 Relays module
2 IN 1
3 IN 2
4 IN 3
5 IN 4
6 IN 5
7 IN 6
8 IN 7
9 IN 8
5V VCC
GND GND
Fig 1 – Connection Diagram
Fig 2 – In BreadBoard
Once it is done, you can go to the next step.

Step 3. Upload the code

After wiring, supply the power to the Arduino and then upload the code as below
/*
* Controls home devices with Arduino Remote LITE in Relay Control Mode via Bluetooth 
* Author: Top Hot Apps
* Website: https://hotapps.top
* Email: support@hotapps.top
* This sketch runs with Arduino Remote LITE. Download: https://play.google.com/store/apps/details?id=it.hieund.arduino_remote_lite
*/

// Ports
const char PORT_RELAY1 = 2;
const char PORT_RELAY2 = 3;
const char PORT_RELAY3 = 4;
const char PORT_RELAY4 = 5;
const char PORT_RELAY5 = 6;
const char PORT_RELAY6 = 7;
const char PORT_RELAY7 = 8;
const char PORT_RELAY8 = 9;

// Commands
const String CMD_RL1_ON = "1:1";
const String CMD_RL1_OFF = "1:0";
const String CMD_RL2_ON = "2:1";
const String CMD_RL2_OFF = "2:0";
const String CMD_RL3_ON = "3:1";
const String CMD_RL3_OFF = "3:0";
const String CMD_RL4_ON = "4:1";
const String CMD_RL4_OFF = "4:0";
const String CMD_RL5_ON = "5:1";
const String CMD_RL5_OFF = "5:0";
const String CMD_RL6_ON = "6:1";
const String CMD_RL6_OFF = "6:0";
const String CMD_RL7_ON = "7:1";
const String CMD_RL7_OFF = "7:0";
const String CMD_RL8_ON = "8:1";
const String CMD_RL8_OFF = "8:0";

// Constants
const char RELAY_ON = 0;   // Relay on
const char RELAY_OFF = 1;  // Relay off

String cmd = "";

// Setup when Arduino boots
void setup() {
  Serial.begin(9600);

  // Sets all ports as OUTPUT
  pinMode(PORT_RELAY1, OUTPUT);
  pinMode(PORT_RELAY2, OUTPUT);
  pinMode(PORT_RELAY3, OUTPUT);
  pinMode(PORT_RELAY4, OUTPUT);
  pinMode(PORT_RELAY5, OUTPUT);
  pinMode(PORT_RELAY6, OUTPUT);
  pinMode(PORT_RELAY7, OUTPUT);
  pinMode(PORT_RELAY8, OUTPUT);

  // Sets default state as OFF
  digitalWrite(PORT_RELAY1, RELAY_OFF);
  digitalWrite(PORT_RELAY2, RELAY_OFF);
  digitalWrite(PORT_RELAY3, RELAY_OFF);
  digitalWrite(PORT_RELAY4, RELAY_OFF);
  digitalWrite(PORT_RELAY5, RELAY_OFF);
  digitalWrite(PORT_RELAY6, RELAY_OFF);
  digitalWrite(PORT_RELAY7, RELAY_OFF);
  digitalWrite(PORT_RELAY8, RELAY_OFF);
}

// Repeats continuously after boot
void loop() {
  if (Serial.available()) {
    cmd = Serial.readString();
    Serial.println("Command: " + cmd);

    // Control Relay 1
    if (cmd == CMD_RL1_ON) {
      digitalWrite(PORT_RELAY1, RELAY_ON);
    }

    if (cmd == CMD_RL1_OFF) {
      digitalWrite(PORT_RELAY1, RELAY_OFF);
    }

    // Control Relay 2
    if (cmd == CMD_RL2_ON) {
      digitalWrite(PORT_RELAY2, RELAY_ON);
    }

    if (cmd == CMD_RL2_OFF) {
      digitalWrite(PORT_RELAY2, RELAY_OFF);
    }

    // Control Relay 3
    if (cmd == CMD_RL3_ON) {
      digitalWrite(PORT_RELAY3, RELAY_ON);
    }

    if (cmd == CMD_RL3_OFF) {
      digitalWrite(PORT_RELAY3, RELAY_OFF);
    }

    // Control Relay 4
    if (cmd == CMD_RL4_ON) {
      digitalWrite(PORT_RELAY4, RELAY_ON);
    }

    if (cmd == CMD_RL4_OFF) {
      digitalWrite(PORT_RELAY4, RELAY_OFF);
    }

    // Control Relay 5
    if (cmd == CMD_RL5_ON) {
      digitalWrite(PORT_RELAY5, RELAY_ON);
    }

    if (cmd == CMD_RL5_OFF) {
      digitalWrite(PORT_RELAY5, RELAY_OFF);
    }

    // Control Relay 6
    if (cmd == CMD_RL6_ON) {
      digitalWrite(PORT_RELAY6, RELAY_ON);
    }

    if (cmd == CMD_RL6_OFF) {
      digitalWrite(PORT_RELAY6, RELAY_OFF);
    }

    // Control Relay 7
    if (cmd == CMD_RL7_ON) {
      digitalWrite(PORT_RELAY7, RELAY_ON);
    }

    if (cmd == CMD_RL7_OFF) {
      digitalWrite(PORT_RELAY7, RELAY_OFF);
    }

    // Control Relay 8
    if (cmd == CMD_RL8_ON) {
      digitalWrite(PORT_RELAY8, RELAY_ON);
    }

    if (cmd == CMD_RL8_OFF) {
      digitalWrite(PORT_RELAY8, RELAY_OFF);
    }
  }
}
Note: There are two types of Relay module is low-level trigger and high-level trigger. In my tutorial, I’m using a low-level trigger module. If you have a high-level trigger module, then edit the following part: const char RELAY_ON = 1; // Relay on const char RELAY_OFF = 0; // Relay off

Step 4 – Configuring

On your smartphone, turn on Bluetooth and Pair with your Bluetooth module (the PIN to connect will be 0000 or 1234)[AdSense-C] Now open the Arduino Remote LITE app. You will see a list of Bluetooth modules available to connect. From that list, select the module you want to connect. After the connection is successful, the app will display the Bluetooth icon next to the connected device. Now go to the Relay Control Mode and tap on each relay. You should be able to control the status of each relay using the app. Note: If you press the Relay button to turn off, press the Relay to turn on, then the control signal is reversed, you only need to correct the RELAY_ON and RELAY_OFF parameters and reload code.

CONCLUSION

Controlling 8 Relay is really easy with Arduino Remote LITE application, you do not have to build a mobile application which may be complex for you. All you need to do is just wiring as instructed then upload the program and finally connect to use. More Information about this project can be found here. Good luck!
[AdSense-B]
Rate the Project Did you find this useful? Help us to improve by rating this page.
[RICH_REVIEWS_FORM]
[RICH_REVIEWS_SNIPPET stars_only=”true”]

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *