Home Automation With Esp8266 Wifi Without Using Blynk!
Home Automation With Esp8266 Wifi Without Using Blynk!
by Yavnik
Firstly, I want to THANK everyone for making me a winner in Automation Contest 2016 for this INSTRUCTABLE.
So, as I promised you, here's the instructable for controlling home appliances with ESP8266 WiFi module.
In order to stay on the couch and control all electrical appliance with just a TV remote, I created an instructable for
that and now it's time to upgrade to WiFi. Now you'll be able to control everything with your smartphone. Sounds
complicated!!! But very easy to make!!!
Now you might be thinking why I'm using WiFi here? I would have used Bluetooth or RF but why just Wifi with the
• ESP8266 would be cheaper than Bluetooth module (on eBay, it's just around $2)
• By using the ESP8266, you can connect the module to internet and control it from any part of the world.
Now there is a new question raised here Which you better go for this. The module you should buy
ESP8266 module I should buy? depends on how many gpio (general-purpose-input-
output) pins you need. This will decide how many
Well by now there are many variations of this module. things you would be able to control through WiFi. For
Here in this instructable, I've used ESP-01 module. beginners I would recommend ESP-01 module.
This was the first module introduced and also the
cheapest one so if you are a beginner to IoT, then
WiFi is a technology that allows electronic devices to high-speed Internet and network connections. A
connect to a Wireless LAN (WLAN) network, mainly common misconception is that the term Wi-Fi is short
using the 2.4 gigahertz (12 cm) UHF and 5 gigahertz for "Wireless Fidelity", however this is not the case.
(6 cm) SHF ISM radio bands. Wi-Fi is simply a trademarked phrase that means
IEEE 802.11x.
Wi-Fi is the name of a popular wireless networking
technology that uses radio waves to provide wireless
Step 5: No Blynk!!!
In my system, I've created an android app which directly connects to your esp instead of connecting to a hotspot.
This also requires no internet connection or any external wifi hotspot as the two machines would connect directly
resulting into fast reaction of the ESP.
Here all the parts you would need in this Project are mentioned and the links from where you can buy them but I
recommend that you should first try to find the components locally because this way you could buy them faster and
maybe cheaper but if they are not available locally you can always buy them with the links provided. I always buy
everything from ebay 'cause it's the cheapest. For this project you will need:
By now, you may have noticed that the ESP-01 cannot fit on breadboard so we have to make it Breadboard
Friendly.
The steps are simple you just have to cut a 4 x 4 dots pcb, solder the male headers and female headers as shown
in the pictures above.
For controlling the ESP8266 directly from your mobile phone, I've created an app using MIT app inventor. You can
Home Automation With ESP8266 WiFi Without Using Blynk!: Page 6
find the app here.
First you need to connect your smartphone to esp8266 WiFi and then set ip address to your module's ip address in
the app. In my case, it was 192.168.4.1
Download
https://www.instructables.com/ORIG/F5S/N43X/IVO3IAJL/F5SN43XIVO3IAJL.apk
…
First we have to connect the ESP module to the computer to update the firmware as well as to program it.
The most importaqnat thing is that the esp8266 module works only with 3.3v and not 5v.
5v can kill it, so in order to convert 5v to 3.3v we have to create a voltage divider.
Just follow the schematic to connect your esp to an FTDI breakout. Make sure to use 3.3v only on your FTDI
breakout.
If in case you don't have an FTDI breakout just like me, you can also use your arduino to program the esp.
REMOVE THE ATMEGA 328 IC FROM THE ARDUINO BOARD BEFORE PROGRAMMING.
ARDUINO ESP8266
GROUND------------GROUND
3.3v ---------------- CHP_PWD(CHIP POWER DOWN)
TX --------------- TX
RX --------------- RX
Download
https://www.instructables.com/ORIG/FL2/CLGA/IVO3BZOP/FL2CLGAIVO3BZOP.zip
…
After flashing the ESP, it's time to check if everything's all right.
Go to Arduino IDE
Go to serial monitor
Select baud rate 115200
Now enter the following commands.
AT
After entering this command press SEND and if you recieve OK then you are all set to go.
You can play with the module with other AT Commands as shown in the pics above.
GO TO TOOLS >>>>> BOARDS >>>>> Select the module you have (If you have the esp-01 module like me,
select the GENERIC ESP8266 MODULE)
Now change the Properties according to your module in the tools menu.
Download
https://www.instructables.com/ORIG/FCX/SCY8/IR85H83Y/FCXSCY8IR85H83Y.ino
…
First try to make the circuit on breadboard and then make it permanent on pcb board.
But the biggest problem is that the ESP8266 needs 3.3v and not 5v.
Don't underestimate the power of 5v, it's enough to kill your ESP module. ***Hey! strucked somewhere???
I am always there to help you in the comments below!!!***
WARNING!!!
Incorrect or Improper use can lead to:
Let's say you want to control your light and fan of your you're done. Super Simple yet Efficient.
bedroom, you can install this circuit on the switch
board. Just open the switch board that controls your
lights and fans and you will find that two wires are
attached to the switch. Just remove those wires from ***Kids, stay away from live electric wires. Have an adult
beside to do the high voltage electric work***
switch and connect them to the PCB terminals and
Try this Trouble Shooting guide so you can make your project work like a charm!!
First check the code. Make sure that you have all the libraries installed correctly. If not then you
have to download them first.
Make sure that the Connections are correct. Using the continuity function of your multimeter check
for any wrong connections or short circuits!!!
Make sure you have working ESP and relays.
Make Sure you have placed the diode in correct polarity.
Make sure that you have connected your phone to esp through WiFi.
*** If you have any doubts regarding this you can always ask me in the comments below ***
Before testing the circuit, double check all connections with continuity function of multi meter for any
wrong connections or short circuits.
Install the diode between the coils in correct polarity as it will protect our circuit from any reverse
current.
I recommend that before testing the circuit with HIGH AC VOLTAGE, first try it with a simple LED.
Also never use such appliances that draws more current than your Relay's ratings.
When you press the button ON on the WiFi controller If you want more info check GreatScott's tutorial on
app, it sends a signal ON to the ESP. The module is this.
programmed in such a way that when it receives the
ON signal, it turns it's gpio state to HIGH. By doing
so, the relay gets activated and so the appliance turn
ON. In the same way when you press OFF, the esp *** If you still have some doubts, feel free to ask in the
comment section below***
turns it's gpio state to LOW, and so the relay turns off
Hey!!! Good Luck for creating this on your own. If you are strucked somewhere, feel free to ask me in the
comments sections below. I 'll always be there to help. If you have any suggestions tell it to me, and if you like the
project hit the like button, share the project as fas as you can and please VOTE in the contests.
YAVNIK SHARMA
builded everything and when sending commands blue led blinks but no output ..
solutions ???
Change the if loops as follows , it'll work perfectly fine:
if (req=="GET /?pin=OFF1 HTTP/1.1")
{
digitalWrite(LED1, HIGH);
}
Would it be possible to post the source code for the MIT app inventor app?
Thanks
I want app that work through internet
I logged in just to tell you thank you Mr.Yavnik Sharma, much regards from Saudi Arabia !
hi, can pls send me aia source code of smartphone Controlled Home Appliance to my email
popgirl2k7@gmail.com.. thanks..
hello sir!
during step 14 can i plug the the ATMEGHA IC?
i can not able to flash the esp!
Good afternoon i want to make these. can i use relay board?
Good night, can you help me, I downloaded the WifiWebServer code on my ESP8266-01 to use
the two GPIO's to control a double relay, so that's fine, but after some time my ESP8266 stops
communicating with my network, only going back to work when I take power from it, if you can help
me I'll be grateful, thank you
Can I do this project with a iphone? Thanks for sharing your project.
Hi, I am getting
"raise in device connect
chip sync error.
Home Automation With ESP8266 WiFi Without Using Blynk!: Page 17
baudrate sync fail"
this error while trying to flash at firmware through flash tool. Any idea how to solve this?
hi there,
I made it, and now I want to modify the android program, as a start I guess you used socket API,
but I don't know how to go on from there.
can you share some kind of source code for the android app, or point me in the right direction to
make my app (I don't want to use app inventor :D ).
thanks in advance
Hello Yavnik,
first of all, congratulations for very nice and useful instructable!
Are you willing to share your appinventor source file for this?
Thank you.
Hi there,
I just wanna know I've 3 ESP8266 boards connected to my router.
Each board can be accessed by putting their individual IP and thus the corresponding devices can
be controlled.
But if I wanna access all the boards simultaneously, what Have I to do for that??
I'm asking this question because the 3 ESPs are controlling each of my room. If I've to control the
appliances of my room-1, I need to connect to corresponding ESP8266. For room-2, need to
connect to corresponding ESP8266 and so on. But what if I wanna control all rooms
simultaneously.
Hi,
I think you should use other ESP8266 boards like the esp-12 or NODE MCU. By doing so, you'll
get access to more GPIO pins and thus you would be able to control more appliances with just 1
esp.
If you have any other doubts, you can always ask me by sending a private message or by writing
here at the comments section.
bro i really wanna make this project but m really confused about the coding part......as i am not very
good with ardiunos plzzz help mee.....nd explain it in detail
and also for using this for ac....do i need different relays or the same can be used
i use slack app to control my iot, look weird but its work..
https://www.instructables.com/id/Lumen-Histoire-IoT-App/
where is an app using MIT app inventor please give me the link
I attached the app that I made in step 9. If you want to make your own app then go to
http://ai2.appinventor.mit.edu
Great job, will definitely try this. Can't vote on mobile app, but will go on full site to do so. Another
winner for you I think. ..
Thanks and Good luck for your build!!!