Introduction: Home Automation Using ESP8266 or NODEMCU

About: I am an engineer and a hobbist who love to do technical stuff and share them with others

Ever wanted to make your home automated via wifi? Wanted to control the lights, fan and every other appliances from your smartphone? Or ever wanted an instructable about connected devices and getting started with it? This Home Automation project will show you how to make your home automated using an android smartphone. This requires you to have no experience of programming or electronics at all, as a free application and code plus schematic as well as pcb layout is included for you to develop. Using this android application you will be able to control your lights, air conditioning, door locks ,etc all from your smartphone. This system uses Wifi to connect with your device and control the various appliances in your home. Enjoy this instructable hacking tutorial!

Step 1: Tools and Materials

Hardware :-

*Nodemcu or esp8266

*Four 5V SPDT relays

*4 Amp MT Connecttors

*4 BC547 Transistors

*4 660ohm resistor

*4 diodes

*Copper clad sheet

*Soldering Iron

*Soldering Wire

*Flux

*Wire cutter

*5V DC Supply

*Any AC Appliance(For testing)

*Etching Solution

Software :-

Arduino IDE

DIY smarthome Android App

Step 2: Hardware Assembly

Step 3: Schematics and Layout

Link to all the gerber files for this layout- https://github.com/mayank007007/AutomationLayoutGe...

Above is the link to the gerber files which you would be required to take a print on pcb and after pressing and etching the layout on pcb you can start soldering the components on pcb.

And after all this it's time for code

Step 4: Programming the Nodemcu

Nodemcu

If you are new to the Nodemcu , NodeMCU is an open-source Lua based firmware and development board specially targeted for IoT based Applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module.

Steps :-
1.Connect Your Nodemcu to Computer

2.Copy paste the home automation.ino file which i have attached or open with the Arduino IDE

3.Upload the code to Nodemcu.

Step 5: Install the App

Steps-

1.Install the app and enter the ip address of your nodemcu which you can see in the serial monitor when you run the code which i have provided

Attachments

Step 6: Controll Your Home Using Your Nodemcu

YOU CAN SEE THE WORKING OF PROJECT IN THE ABOVE VIDEO

BE CAREFULL WHEN WORK WITH RELAY ITS 240V AC .