Trybotics Logo

Home Automation Using ESP8266 Wi-Fi Module Without Internet

DESCRIPTION

hello friends, in this tutorial, we are going to make a home automation using espmodule without internet.

I hope lot of peoples used and heard about the home automation using bluetooth. as same like that, we are going to make a home automation using ESP8266 instead o bluetooth.

Step 1: Make a Esp Breakout Board of Your Own

I strongly recommend to buy a breakout board from the online market. that is quiet convenient for you. connect the TX to RX of the arduino pin. connect RX to the TX of the arduino pin

Step 2: Connect the Relay Module to A0, A1, A2, A3 of the Arduino Board

You can also use any digital pins from the arduino and make the suitable changes in the arduino code.

connect the ESP module to arduino as I said in the previous step

Step 3: Download the Code Which I Given in the Attachment.

make a suitable changes in the code like the WIFI name, password. then download the code. before download the code, make sure that you have removed the tx and rx pin from the esp to the arduino board. after downloading the program, reconnect it.

Step 4: Open Your Playstore and Download the Socket Control Widget and Install It

https://play.google.com/store/apps/details?id=com.froelix.homeautomation.socketcontrolwidget&hl=en

Step 5: Go to the Widgets From Your Mobile and Place Socket Widget in the Home Screen and Change the Settings Given Below

Place the Widget in the home screen.

open the widget

give a name as light ON and corresponding for 8 widget buttons as we need. (dont confused it, watch the video)

type the following line below command

192.168.4.1:80/ FA

for next widget button for light OFF

192.168.4.1:80/FB

similarly.. FC to FH you have to create

Step 6: Enable the WIFI on the Mobile, Scan the ESP Module and Connect It

Connect the esp module through wifi

give stay connect if the warning appear.

if it asked password, give your password given on the arduino code. then go to home menu

Step 7: Touch the Widget After Successful Connection, the Relay Will Be Switched ON/OFF

that the end. enjoy with the tech.

Description:

UTSOURCE esp8266
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
UTSOURCE 4 channel Relay
×1
UTSOURCE jumper wire
×1

Description:

hello friends, in this tutorial, we are going to make a home automation using espmodule without internet.

I hope lot of peoples used and heard about the home automation using bluetooth. as same like that, we are going to make a home automation using ESP8266 instead o bluetooth.

Step 1: Make a Esp Breakout Board of Your Own

I strongly recommend to buy a breakout board from the online market. that is quiet convenient for you. connect the TX to RX of the arduino pin. connect RX to the TX of the arduino pin

Step 2: Connect the Relay Module to A0, A1, A2, A3 of the Arduino Board

You can also use any digital pins from the arduino and make the suitable changes in the arduino code.

connect the ESP module to arduino as I said in the previous step

Step 3: Download the Code Which I Given in the Attachment.

make a suitable changes in the code like the WIFI name, password. then download the code. before download the code, make sure that you have removed the tx and rx pin from the esp to the arduino board. after downloading the program, reconnect it.

Step 4: Open Your Playstore and Download the Socket Control Widget and Install It

https://play.google.com/store/apps/details?id=com.froelix.homeautomation.socketcontrolwidget&hl=en

Step 5: Go to the Widgets From Your Mobile and Place Socket Widget in the Home Screen and Change the Settings Given Below

Place the Widget in the home screen.

open the widget

give a name as light ON and corresponding for 8 widget buttons as we need. (dont confused it, watch the video)

type the following line below command

192.168.4.1:80/ FA

for next widget button for light OFF

192.168.4.1:80/FB

similarly.. FC to FH you have to create

Step 6: Enable the WIFI on the Mobile, Scan the ESP Module and Connect It

Connect the esp module through wifi

give stay connect if the warning appear.

if it asked password, give your password given on the arduino code. then go to home menu

Step 7: Touch the Widget After Successful Connection, the Relay Will Be Switched ON/OFF

that the end. enjoy with the tech.

Description:

final_program.inoArduino
volatile char MY_DATA1[60];
volatile unsigned char k1 = 0,CC1=0,RX1 = 0,D = 0;
void setup()
{
// relay out put pin control.//
pinMode(A0,OUTPUT);
pinMode(A1,OUTPUT);
pinMode(A2,OUTPUT);
pinMode(A3,OUTPUT);
digitalWrite(A0,HIGH);
digitalWrite(A1,HIGH);
digitalWrite(A2,HIGH);
digitalWrite(A3,HIGH);
// Initial setup //
Serial.begin(115200);
// Initial ESP8266 //
ESP8266_INIT();
}
void loop()
{
// receive data from ESP8266 //
if(Serial.available())
{
MY_DATA1[k1] = Serial.read(); // read receive data from wi-fi module.
CC1 = MY_DATA1[k1];
if(CC1 == ':')D = k1;// check weather data scan start or not.
k1++;
if(CC1 == '\n'){k1=0;RX1 = 1;} // chaeck new line character are receive or not.
}
// Processing  data which are receiving  from ESP8266 //
if(RX1 == 1)
{
if(MY_DATA1[D] == ':')
{
MY_DATA1[D] = '0';
if(MY_DATA1[D+1] == 'F')
{
MY_DATA1[D+1] = '0';

if(MY_DATA1[D+2] == 'A')//switch 1 on
{
MY_DATA1[D+2] = '0';

digitalWrite(A0,LOW);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'B')//switch 1 off
{
MY_DATA1[D+2] = '0';
digitalWrite(A0,HIGH);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'C')//switch 2 on
{
MY_DATA1[D+2] = '0';
digitalWrite(A1,LOW);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'D')//switch 1 off
{
MY_DATA1[D+2] = '0';
digitalWrite(A1,HIGH);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'E')//switch 3 on
{
MY_DATA1[D+2] = '0';
digitalWrite(A2,LOW);
RX1 = 0;
          }
else if(MY_DATA1[D+2] == 'F')//switch 1 off
{
MY_DATA1[D+2] = '0';
digitalWrite(A2,HIGH);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'G')//switch 1 on
{
MY_DATA1[D+2] = '0';
digitalWrite(A3,LOW);
RX1 = 0;
}
else if(MY_DATA1[D+2] == 'H')//switch 1 off
{
MY_DATA1[D+2] = '0';
digitalWrite(A3,HIGH);
RX1 = 0;
}
     }
}
RX1 = 0;
}
}
void ESP8266_INIT()// initializing wi-fi module.
{
Serial.println("AT");// check AT mode.
delay(1000);
Serial.println("AT+RST");//RESET module.
delay(3000);
Serial.println("AT+CWSAP=\"Home Automation\",\"2231anto\",3,2");//set the ssid and password.
 delay(1500);
Serial.println("AT+CWMODE=3");// set ESP8266 in MODE 3 (Both mode AP+station).
delay(1400);
Serial.println("AT+CIPMUX=1");// set ESP8266 in MUX 1 (allow multiple connection).
delay(1400);
Serial.println("AT+CIPSERVER=1,80");// start communication ESP8266 on PORT80.
delay(1500);
}


YOU MIGHT ALSO LIKE