Arduino esp8266 wifi Home/Office Automation System

(Last Updated On: July 6, 2019)

ESP8266

Description:

In this tutorial, you will learn how to make your own ESP8266 wifi module based Home/ Office automation Project along with a feedback system using an application on your android cell phone. This project is based on the famous ESP8266 wifi module. With the help of this project the electrical loads AC/Dc can be controlled using your android cell phone.  All the commands are processed by the Arduino Uno.


As you know any program which is written for the Arduino Uno can also Run on the Mega. So the program written for this project will also work on the Arduino Mega.  To use this project you will need to connect your ESP8266 Wifi module and cell phone with the same WIFI network. This is actually an offline automation system. This project can be used at homes, offices, colleges, universities and so on.

 

This Tutorial covers.

esp8266 wifi module software/firmware update

use of at commands

complete project circuit diagram

interfacing

programming and finally

testing.

For the firmware update, you can watch a video given at the end of this Article.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
esp8266 wifi module: https://amzn.to/2u8rsk7
Mega 2560: https://amzn.to/2ze1kdu
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF
MFRC522 RFID module and tags: best deal: https://amzn.to/2PD9Ref
GSM sim900A: https://amzn.to/2Nv70TI


Circuit Diagram:

ESP8266

The ESP8266 WIFI module Tx pin is connected with the Arduino’s pin number 2. The ch_pd pin of the ESP8266 WIFI module is connected with the Arduino’s pin number 3.3 volt. The RST pin of the wifi module is left unconnected. The VCC pin of the ESP8266 WIFI module is connected with the 3.3-volt pin of the Arduino Uno. The Ground pin of the ESP8266 WIFI module is connected with the Arduino’s Ground. The Rx pin of the wifi module is connected with pin number 3 of the Arduino Uno, while the GPIO 1 and GPIO 0 are not connected.

4 relays are connected with the Arduino pins 9 to 13. If you want you can increase or decrease the number of relays. The relays used in this project are of the type SPDT “ these are 12V and 10A relays. As you can see in the circuit diagram a 10k resistor and 2n2222 NPN transistor is connected with each relay. The 10k resistor and 2n2222 makes the driver and is used to operate this relay. Due to the voltage difference, a 12v relay cannot be directly operated by the controller so that’s why we need a driver circuit to control a relay. The Selection of the Transistor entirely depends on the relay coil resistance.


To find the relay coil resistance you will need a multimeter. Set the multimeter on the resistance and connect both the test leads of the digital multimeter with the two legs of the relay which has the coil. After you find the Coil resistance, then the next step is to use ohm’s law

V = I R

Now after putting values in this formula, you can find the Current. now depending on the value of the current calculated, we select a transistor whose collector current is greater than the relay coil current. this is the current needed to energize the relay coil. Select a transistor whose collector is approximately 3 times greater than the calculated value. This way the transistor will never heat up.



I selected 2n2222 NPN transistor and if you check the datasheet of this transistor you will find that its collector current is much greater than the relay coil current, which is best. Moreover the 2n2222 transistors are really cheap and are easily available in every electronics shop.

If you want to control your home or office appliances from remote locations, then I highly recommend you should use Nodemcu ESP8266 wifi module and Blynk Application. I have so many tutorials on Blynk Application and Nodemcu esp8266 wifi module. The use of Nodemcu esp8266 wifi module is really easy as compared to the ESP8266 wifi module.

If you have any questions regarding this project, you can let me know in a comment.


Download:

Cell phone application apk file: Wifi

Programming:


Watch Video Tutorial:

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

4 Comments

  1. Hi, so thrilled by your tutorial as it helped my understanding things better. Which platform did you use to develop the android app please?

    1. This application is designed in Android studio. I am starting a complete series on how to make android cell phone applications for Arduino Bluetooth. Click the subscribe button and you will be notified. If you want the source code then you can get this for 25 dollars.

Leave a Reply