Project tutorial
GSM Controlled Home Automation Using SIM800 With Arduino

GSM Controlled Home Automation Using SIM800 With Arduino

Gsm based Home Automation are used to control Home devices Like TV, Lights, AC etc.

  • 3,219 views
  • 1 comment
  • 2 respects

Components and supplies

Apps and online services

About this project


Please SUBSCRIBEto my channel for more projects..................

Gsm based Home Automation are used to control Home devices Like TV, Lights, AC etc.

just take an example, if there are sunny day and you want to Turn on your AC Before you Even Walk In the Door.

So for this you have to send a SMS then AC will be turn on.

It is simple way to save electricity and make our home smart.

Advantage :-

If we uses this idea and implement to it in our society it will be helpful in saving enough amount of electricity and off-course money and it is the way to make our home as smart home.Teacher Notes


Step 1: Components Required

3 More Images

  • Arduino uno
  • GSM sim800
  • 4 LED
  • LCD (2X16)
  • 10K potentiometer
  • Some male and female connector
  • 12v relay for ac load (or 5v relay as you like)
  • ULN2003 ic for relay
  • connection wire
  • zero pcb

Step 2: Upload the Program

Download the zip file and extract it, here in the folder you will get codes that we have to upload in arduino and two circuits.

Attachments

https://github.com/vishalsoniindia/GSM-Controlled-Home-Automation-Using-SIM800-With-Arduino/archive/master.zip

📷gsm sim800 control automation.zip

Download

  • 📷gsm sim800 control automation.zipDownload


Step 3: Connect the Circuit

Now connect the LCD as shown in diagram and gsm module also.

you can solder LCD on zero pcb.

In gsm module the 5v and the GND will provided from arduino or external adopter.

GSM conections:-

RX of gsm -------------------> TX of arduino

TX of gsm ---------------------> RX of arduino

OUTPUT:-

leds positive pin will be connect to arduino and all ground are common and connect to arduino's ground.

7 --------------> LED1

8 --------------> LED2

9 --------------> LED3


Step 4: Setup for GSM Module

Now, insert the sim card in the GSM module and hold the power button of GSM module to turn on.

GSM SIM800 are require 5v external supply, If you have different GSM module then you have to conform the external voltage requirement for your module.


Step 5: Done, Let's Try

Send some commands to your sim that are inserted in GSM module.

That is................

#A.all on*

#A.all off*

#A.fan on*

#A.fan off*

#A.light on*

#A.light off*

#A.tv on*

#A.tv off*


Step 6: Connect Ac Load

Setup these circuit on zero pcb.......

If you want to connect AC load or Home devices like lamp, fan etc.

Then you have to connect ULN2003 ic with relay, the circuit diagram is given.

In the circuit diagram there are 12v relay but you can use 5v relay at place of 12v relay.

if you are using 5v relay then pin 9 of ULN2003 will be connected to 5v.

Now, the output pins 7, 8, 9 are connect to ULN2003's 1, 2, 3 pins and relay will be connected on ULN2003's 14, 15, 16 pins.

after that now you can connect lamp as shown in diagram.

be careful with AC supply


Code

Gsm codeArduino
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

#define Fan 7
#define Light 9
#define TV 10
int temp=0,i=0;
int led=13;
char str[15];
void setup()
{
  lcd.begin(16,2);
  Serial.begin(9600);
  pinMode(led, OUTPUT);
   pinMode(Fan, OUTPUT);
    pinMode(Light, OUTPUT);
     pinMode(TV, OUTPUT);
  
  lcd.setCursor(0,0);
  lcd.print("GSM Control Home");
  lcd.setCursor(0,1);
  lcd.print("   Automaton    ");
  delay(2000);
  lcd.clear();
  lcd.print("Circuit Digest");
  delay(1000);
  lcd.setCursor(0,1);
  lcd.print("System Ready");
  Serial.println("AT+CNMI=2,2,0,0,0");
  delay(500);
  Serial.println("AT+CMGF=1");
  delay(1000);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Fan   Light  TV ");
  lcd.setCursor(0,1);
  lcd.print("OFF    OFF   OFF "); 
}
void loop()
{
  lcd.setCursor(0,0);
  lcd.print("Fan   Light  TV");
  if(temp==1)
  {
    check();
    temp=0;
    i=0;
    delay(1000);
  }
}
 void serialEvent() 
 {
  while(Serial.available()) 
  {
    if(Serial.find("#A."))
    {
      digitalWrite(led, HIGH);
      delay(1000);
      digitalWrite(led, LOW);
      while (Serial.available()) 
      {
      char inChar=Serial.read();
      str[i++]=inChar;
      if(inChar=='*')
      {
        temp=1;
        return;
      } 
      } 
    }
   }
 }
void check()
{
   if(!(strncmp(str,"tv on",5)))
    {
      digitalWrite(TV, HIGH);
      lcd.setCursor(13,1); 
      lcd.print("ON    ");
      delay(200);
    }  
   
   else if(!(strncmp(str,"tv off",6)))
    {
      digitalWrite(TV, LOW);
      lcd.setCursor(13,1); 
      lcd.print("OFF    ");
      delay(200);
    }
  
    else if(!(strncmp(str,"fan on",6)))
    {
      digitalWrite(Fan, HIGH);
      lcd.setCursor(0,1); 
      lcd.print("ON     ");
      delay(200);
    }
 
    else if(!(strncmp(str,"fan off",7)))
    {
      digitalWrite(Fan, LOW);
      lcd.setCursor(0,1);
      lcd.print("OFF   ");
      delay(200);
    }     
 
    else if(!(strncmp(str,"light on",8)))
    {
      digitalWrite(Light, HIGH);
      lcd.setCursor(7,1); 
      lcd.print("ON    ");
      delay(200);
    }
 
    else if(!(strncmp(str,"light off",9)))
    {
      digitalWrite(Light, LOW);
      lcd.setCursor(7,1); 
      lcd.print("OFF    ");
      delay(200);
    } 
    
    else if(!(strncmp(str,"all on",6)))
    {
      digitalWrite(Light, HIGH);
      digitalWrite(Fan, HIGH);
      digitalWrite(TV, HIGH);
      lcd.setCursor(0,1); 
      lcd.print("ON     ON    ON  ");
      delay(200);
    }
 
    else if(!(strncmp(str,"all off",7)))
    {
      digitalWrite(Light, LOW);
      digitalWrite(Fan, LOW);
      digitalWrite(TV, LOW);
      lcd.setCursor(0,1);
      lcd.print("OFF   OFF    OFF  ");
      delay(200);
    }     
}

Schematics

Gsm circuit
Img 20170315 101526 ytu2gstwcl

Comments

Similar projects you might like

GSM based Home Automation

Project tutorial by Team Brink.IO

  • 47,436 views
  • 56 comments
  • 81 respects

Infinity Gauntlet Controlled Home Automation

Project showcase by Barqunics

  • 2,379 views
  • 1 comment
  • 8 respects

IR Remote Controlled Home Automation

Project tutorial by suhail jr

  • 15,179 views
  • 7 comments
  • 22 respects

Voice Controlled Full Home Automation - Without Wires

Project tutorial by Gyula Ősi

  • 6,576 views
  • 4 comments
  • 38 respects

Voice Controlled Home Automation Prototype

Project showcase by Bharath Rao M

  • 2,799 views
  • 0 comments
  • 4 respects
Add projectSign up / Login