Home Automation Using Arduino and ESP8266
Home Automation Using Arduino and ESP8266
University Institute of Technology, The University of Burdwan, Golapbag (North), Burdwan, West Bengal, India
Abstract— With the advent of technology, life has become In addition to these there are many more possibilities that
faster in pace and shorter in interactions, with others, as we can explore with Home Automation systems.
well as with the surroundings. In such a scenario, there is a We are using [2]Arduino Uno development board as the
need to have an endeavor to have everything at the push of brain or the microcontroller unit of the system, [3]ESP8266
a button away, and more importantly, automated. Home as the World Wide Web interface and IR sensors to count
Automation is such an endeavor, in which, all the electrical the number of people entering or leaving the room.
appliances present at home are connected to each other, 1.1Arduino Uno
having interactions with sensors placed at strategic According to the description given in the Arduino Website,
positions in a closed loop manner in order to perform “Arduino/Genuino Uno is a microcontroller board based on
meager tasks automatically, leaving less burden on the the ATmega328P. It has 14 digital input/output pins (of
humans. With this project we are promoting the fact that which 6 can be used as PWM outputs), 6 analog inputs, a 16
Home Automation can greatly contribute to energy MHz quartz crystal, a USB connection, a power jack, an
conservation too. ICSP header and a reset button.”
Keywords— Home Automation, ESP8266, sensors.
I. INTRODUCTION
A brief definition of Home Automation may be given in this
way as, “Home Automation is the technology, in which
every electrical appliance present inside a particular house
are connected to one another and to a set of “sensors”
placed at particular strategic positions, reading specific data
in a closed loop fashion to serve the purpose to automate all
the connected home appliances.”
The most important part in a fully automated system are the Fig.1.1: Arduino Uno Development Board
sensors, be it [1]IR motion sensors, heat sensors, smoke
detectors. The data they acquire are then sent to the Arduino is an open source project aiming at developing
microcontroller unit, which then processes the data and greater curiosity towards DIY projects among students and
performs specific switching of the Home Appliances in a enthusiasts. Along with the development board, comes the
real time fashion. Arduino IDE based on a programming language called
In this project we have set these specific objectives for our Processing for programming the microcontroller.
version of the automated system.
1. Turn ON all the appliances when a 1.2 ESP8266 Wi-Fi Module
person enters the room. The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP
2. He/They can then turn them ON or OFF stack and microcontroller capability produced by Espressif.
using an IR remote, or use a web This small module allows microcontrollers to connect to a
application for the purpose as Wi-Fi network and make simple TCP/IP connections
convenient. using AT commands.
3. Turn off everything whenever everyone The very low price and the fact that there were very little
leaves the room, in other words, when external components on the module which suggests that it
there are no one inside. could eventually be very inexpensive in volume make it the
4. A person can remotely access the home component of choice for our needs.
appliances if he feels the need be.
[4]
Some AT Commands used in our project with the ESP8266 and there functions
AT Command Response Description
AT OK
Description about the device To reset the module and refresh all
AT+RST
followed bt “OK” the settings.
Description about the device
AT+GMR
followed by “OK”
1. The module acts as a Wi-Fi
enabled device that must
AT+CWMODE=<1,2,3> OK be connected to a router.
2. Acts as a Wi-Fi Hotspot
3. Acts as both
Information about every Wi-
To get to know if any AP is present
Fi router present in the
AT+CWLAP so that to connect to it.
vicinity separated by
Note: Doesn’t work in Mode 1.
newlines.
WIFI CONNECTED To connect to a specific access
AT+CWJAP=<SSID>,<password> WIFI GOT IP point.
OK Note: Doesn’t work in Mode 1.
To set the Baud rate of the module
in accordance of the baud rate of the
AT+CIOBAUD=<baud rate> OK
microcontroller with which it is
used.
To use the module in multiplexed
AT+CIPMUX=1 OK
mode.
To get the message from port
AT+CIPSERVER=1,80 OK
number 80.
2.1.1Transmitter Part
}
if(A==0)
Fig.2.4: ESP Connected To Arduino Uno {
The ESP takes about 300mA current. So, we had to use a fa=1;
generic Breadboard Power supply, which has a 12V input if(fb==1){c--;}
and can provide 12V,5V and 1.3V needed for the ESP8266. }
2.3 Driving Electrical Appliances else
{
2.9 JS Code
var main = function() { });
$('.icon-close').click(function() {
$('.icon-menu').click(function() { $('.menu').animate({
$('.menu').animate({ left: "-285px"
left: "0px" }, 200);
}, 200);
REFERENCES
[1] Infra Red Sensor (IR), From the article “Passive
Infrared Sensor”, Wikipedia – The Free Encylopedia.
[2] Arduino, From Arduino Project’s Official Website.
[3] ESP8266, From ESP8266 official website.
[4] AT Commands table as provided in an article
published in itead.cc.
[5] The IR library was used as published in github
directory by username “z3t0”.