Till now you have seen only 2ch automation project using generic ESP8266 module. But actually you can easily control upto 4 appliances using that. In this article we will learn how to make a 4ch system using ESP8266 01 and not only that, this time the design of the hardware is made in such a way that you can control the appliances using Internet as well as by using Manual Switches.
Components Required
- Generic ESP8266 Module
- HiLink 5V power supply
- AMS1117 IC
- 5V Relays (4 pcs)
- Mct2e IC (4 pcs)
- 1n4007 diode (4 pcs)
- 3pin Terminal connector (4 pcs)
- BC547 transistor (4 pcs)
- 10 resistors (8 pcs)
Circuit Diagram
The connections of all the components used in this project is something like this.
Theory
This project looks a simple 4ch home automation at first look, but if we look at the connections of this project with the switches then you’ll realise that the appliances attached to this project can be controlled with both relay and switches at the same time.
In this I have used the logic of stair lightning. You must be having stairs lighting at your home where we can turn on and off the lights from any of the two switches attached. Now if you think of the connection used in stairs lighting then its something like this.
If you observe it carefully then you’ll realise that the switches used in this system are two ways switches. Two way switch has 3 terminals while the regular switch has only two terminals. Now in this system we can remove one switch and can add relay instead of that as our relay itself act as a two way switch.
With this type of connections we can control the light using relay via internet and using manual switches as well. This same concept is applied for our project as well. Hence the wiring between relay, two way switch and the appliances looks something like this.
With this type of connection you can control your lights with the switches as well in case you internet is not working. Isn’t it really cool????
PCB Design
For this project I designed a 6 layer PCB to make it very compact. I designed that PCB on Easyeda.com That PCB design file is open for all. You can view edit or download that PCB file from here.
Code
I have written the code in Arduino IDE for this project. For using this code you need to have Ubidots library installed whose link is attached in the code itself.
You can download the code from my GitHub account by clicking here.
Tutorial Video
I have also made a full tutorial video for this project which will clear all your doubts.