IoT project of controlling home light using WiFi Node MCU, and Relay moduleIn this project, we are going to build a home light controlling system using the Wi-Fi network or Internet (Mobile data). Using this project we are able to control our home light from anywhere in the world. In this project, we will use Wi-Fi Node MCU, 4 Channel Relay module, etc. Hardware Requirements
Software requirements
Working principle of this project (Node MCU, Relay Module)In this project, there are three main components used an Android Blynk app, Wi-Fi Node MCU and 4 Channel Relay module. The Android Blynk app sends the serial data to the Wi-Fi Node MCU by clicking ON button. The Wi-Fi Node read the input data and process it according to program uploaded inside it and generate the output to 4 Chanel Relay Module. When the Blynk app's button turns on, it turns ON the home light, and when the Blynk app's buttons turns OFF, it turns OFF the home light. Download the Blynk application from play store and install it on your device. A program written on Arduino IDE to control the home light using WiFi Node MCU, 4 Chanel Relay Module: Add the board type to your Arduino IDEAdd the board type to your Arduino IDE if not added earlier before compiling. Go to File > Preferences > Settings and add http://arduino.esp8266.com/stable/package_esp8266com_index.json in Additional Boards Manager URLs and click OK. Include the esp8266 board community before compiling the above code otherwise, it generates an error. To include library click Tools > Board > Board Manage... Search for esp8266 and install it. Select your board type Now, select your board type, go to Tools > Board: > NodeMCU 1.0. Add Libraries Download the latest Blynk library from https://github.com/blynkkk/blynk-library/releases/latest and add it to program If the Blynk libraries are not able to be added in your program then, extract it and paste all the directories in Arduino libraries C:\Program Files (x86)\Arduino\libraries. Now, connect Node MCU device with your personal computer using Standard USB cable to connect Node MCU and upload the program in it. Digital circuit diagram4 Channel Relay Module Node MCU GND --------------------------------> GND IN1 --------------------------------> D0 IN2 --------------------------------> D1 IN3 --------------------------------> D2 IN4 --------------------------------> D3 VCC --------------------------------> Vin Connection between Relay Module, Bulb, and input power:
This project has operated using both Wi-Fi as well as Mobile data. Output: |