/**/
IOT Project – Proximity Relay Control using esp8266 Reviewed by Momizat on . This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(Tur This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(Tur Rating:
You Are Here: Home » IOT » IOT Project – Proximity Relay Control using esp8266

IOT Project – Proximity Relay Control using esp8266






This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(Turn on/Turn off) light bulb over wifi hostpot using nodeMCU(esp8266-12e).


 

In Our previous  tutorials we built an android app to control GPIO of nodeMCU using button press or electric switch only,Objective of this project is, we can turn on electrical application using push button, or android phone, and when somebody far away from the device, it will turn off device automatically.

Hardware Needed:

1. Node MCU V1.0 or ESP8166-12E
2. OLED
3. Mobile(Android)
4. USB Data Cable
5. Bell
6. Push switch
7. Light Bulb
8. LED
9. Resistor 1,000 Ohm x 2 piece

Section 1: Android Application

step 1: We have created the android application using MIT App Inventor.
web1

Section 2:

Android Application Code:
you must change IP from “http://192.168.43.237/node/1″ to your IP of nodeMCU.
1. Turn on Portable WLAN hotspot of your mobile.
2. See IP address at nodeMCU.

web2

Arduino Sketch for NodeMCU:

# received signal strength indicator (RSSI) is measurement of the power present in a receives radio signal (from mobile) to be set value in Arduino Sketch(nodeMCU).

For example

rssi > -1 notification on OLED is “Leave”  = Turn off Light Bulb.

rssi < -60 && rssi > -70 notification on OLED is  “Far”  = Turn on LED .

rssi <= -70 notification on OLED is “so Far”  = Turn on LED.

others  We can turn on/off  Light Bulb from Application or Electrical Switch.

Section 3: Circuit

Circuit Diagram For our Project is like below . We have used one light bulb and bell.

Schematic Diagram V1.1

 

# Circuit Diagram For our Project is like below. We have used one light bulb and bell.

Step 1 connect nodeMCU with OLED by

D1 (GPIO05) >> SCL

D2 (GPIO04) >> SDA

Step 2 connect nodeMCU with Electrical switch by

D0 (GPIO16) >> Electrical switch (with resistor 1,000 ohm like below diagram)

Step 3 connect nodeMCU with ledPin(LED turn on when mobile is far) by

D5 (GPIO14) >> ledPin(with resistor 1,000 ohm)

Step 4 connect nodeMCU with Light Bulb circuit by

D6 (GPIO12) >> Coil pin relay 1

D7 (GPIO13) >> Coil pin relay 2

NO(relay1) >> NC(relay2)

NC(relay1) >> NO(relay2)

Step 5 connect Relay with Light Bulb by

Pin COM(relay1) >> Line 220 VAC

Pin COM(relay2) >> Light Bulb

Step 6 connect nodeMCU with bell by

D5 (GPIO15) >> BELL

 

You Can download the CompleteSource Code from below.

download-now-button

DOWNLOAD

 

 

Have a good time, follow your mind.
Mr.Jukrapun Chitpong

 




About The Author

I am Technical Instructor at faculty Of Engineering and Technology Panyapiwat Institute of Mangement in Thailand. I had graduated in B.Eng(Electrical engineering). I love to work in new technology and write articles to teach others.

Number of Entries : 5
Scroll to top