Introduction: Low Cost 4 Channel Wifi Switch (IOT Application).

Picture of Low Cost 4 Channel Wifi Switch (IOT Application).

Hello everyone, this is my first intractable and I am going
to share my project of low cost 4 channel WiFi switch.

My requirements:

It should incur low cost as far as hardware is concerned.

The device should be reliable as I would be using it to control lights at my home while I am on a vacation.

I should get an update on my mobile device once the switch changes state.

Step 1: Selecting the Hardware

Picture of Selecting the Hardware

Opted Solution:

For the hardware I chose ESP8266-01 as the wifi and control module from Aliexpress with few other discreet low cost components.

A four channel relay board from NSK electronics India.

A 12-0-12, 500 milliamps transformer that was lying around with me.

For 3.3 volt supply required for the module I used a LM317 three terminal regulator.

The setup:

ESP 8266-01 is a wifi module with a small foot print with accessible pin count of 8.

Step 2:

Picture of

In this project I am going to use pins GPIO0, GPIO1 (RX pin), GPIO2, GPIO3
(TX pin) pins of the ESP8266-01 module to control a four channel relay board.

Step 3: Hurdles Faced

Picture of Hurdles Faced

Problems Faced:

During power up if the pins of the ESP8266-01 remain connected to relay board the module hangs and becomes useless, photo coupler on the IO pins even failed to be fruitful but if the unit is powered on without the relay module initially connected everything works nice as expected.

Solution:

To overcome this situation I used a strange but effective low cost idea. A small analogue delay circuit using 555 timer IC was used to power up the relay module that puts a 10-15 second delay so that the wifi module gets access to network before the relay board gets powered on.

Step 4: The Hardware & Schematic

Picture of The Hardware & Schematic

In the schematic the ESP module shows as ESP8266-07 as I was not finding the 01 version in the Fritzing library please consider the same as type 01.

Step 5: Enclosure

Picture of Enclosure

For the enclosure I used a Plastic box measuring 3.5 inch by 9 inch this will provide some extra space for future modifications. the side of the box is cut for getting access to the relay terminals. This box in turn will remain inside a wooden beam type structure in my drawing room.

Step 6:

Flashing the ESP is really easy just copy the code from the
attachment and open in Arduino (I used version 1.6.8) have the necessary files copied in the libraries folder, select upload speed as 115200 and program the ESP. Regarding procedure to program the module there are lots of tutorials on the internet.

Step 7: The Blynk App

Picture of The Blynk App

Now for a few screen shots of Blynk app from My phone.. As can be seen the real time status change that happens on the ESP port gets updated in the LCD, suppose by chance due to some network error the relay does not activate, if the LCD is absent we do not know if the status change has actually happened, the LCD shall state the actual condition of the device. In my setup SW2 is connected to the gate light which has to remain on from 5:20P.M. till 8:00 P.M. in the evening, rest are all normal switch. Blynk provides the flexibility to modify any normal switch to a timer switch, push switch, or a dimmer without interfering with the hardware and can be done on the go. Instead of LCD one can use four LEDs also as the status change indicator

Step 8: Device in Action

So now a small video shall show the device in action.

Any comments are welcome, if you liked it share your feedback or any improvements that may be done. Thanks everyone and see you soon with my next instructable.

Comments

SimonC5 (author)2017-01-11

Great job. I have a doubt. It would be posible use it with a lamp that has its own manual switch? Is to use it in some rooms of my house and can use the lights with the wall-switch or with the Smartphone.

Thanks

ProteekB (author)SimonC52017-01-11

Yes it can be used in that way, In my house also I am using it in that way only, all the four devices have mechanical switches for normal operation too side by side, you can operate with wall switch as well as through smartphone.

Soumojit (author)2016-12-11

How you buy through alibaba ? Is it accept indian debit cards?

ProteekB (author)Soumojit2016-12-11

purchased through the Aliexpress mobile app, price is USD1.7 free shipping, they accept payment through Indian debit or credit cards, the only pain area is shipping takes a bit more than a month.

Soumojit (author)ProteekB2016-12-25

do you need to pay additional charge?? and any problems to buy from china

Swansong (author)2016-12-07

This would be great if you've got kids, they can have their wifi channel and if they're not getting their work done you can turn it off. :)

ProteekB (author)Swansong2016-12-07

Yes you can modify it in endless ways, next I am planning to use it to give my pump controller a touch of IOT with this.

About This Instructable

2,200views

22favorites

License:

More by ProteekB:Low Cost 4 channel Wifi switch (IOT Application).
Add instructable to: