Hands Free Room Lights Control

by ryan141298 in Circuits > Arduino

268 Views, 0 Favorites, 0 Comments

Hands Free Room Lights Control

PSX_20200913_194132.jpg
20200913_213309.jpg
20200913_205322.jpg
Hands Free Room Lights Control

As in the movie "Mission Impossible" says " Desperate times calls for desperate measures " my brother who is in class 10th got an idea to control the lights of the kitchen using the phone instead of using switches and the reason being our kitchen is shared with other Airbnb guests, and switches are the most vulnerable area to spread COVID 19.

After getting the idea we planned how to make it into reality. I with the knowledge of Engineering and my brother with the knowledge of Class 10th level Creativity sprung into action. Our parents helped us with the connections to get our components and other miscellaneous tasks.

Components

IMG_20200913_192615.jpg

  • Smps mini -5v
  • MOC3041
  • MOC3021
  • Rectifier
  • Triac-BT136
  • Resistors
  • Header Pins
  • 4N35
  • NodeMCU
  • Resistors

How It Works

  • It includes a NodeMCU module which gets connected to the Wifi from where it gets connected to the Blynk server.
  • It has Triac to control ON and Off of the lights. I have used Triac instead of relays because they are cheaper and more reliable.
  • It has Smps to convert AC current into DC current.

Circuit Diagram for the Main PCB

Circuit.jpg
Schematic.PNG

The PCB was custom made and was Printed from pcbway. I have included the Circuit Diagram

PCB Making Using Eagle CAD

Board.PNG
Gerber.PNG

One can go to my profile where I have explained how to design custom PCB using Eagle CAD. The Pictures showed the board file and the Gerber View of the Project.

Getting the PCB

IMG_20200913_192355.jpg
IMG_20200913_192957.jpg

  • The PCB was delivered within 2 weeks

Covering

IMG_20200610_195514.jpg
IMG_20200610_103931.jpg

  • As I already told you my brother is very creative, he used old sweet box and old Sunmica to make the covering
  • It was painted black
  • The Sunmica gave a good wooden finishing

Coding

#define BLYNK_PRINT Serial

#include #include

char auth[] ="Your Auth. Key"; // You should get Auth Token in the Blynk App.

const int R1 = 5; // Output Relay 1

const int R2 = 4; // Output Relay 2

char ssid[] = "Your Wifi Network name"; // Your WiFi credentials.

char pass[] = "Password of your network"; // Set password to "" for open networks.

void setup() {

Serial.begin(9600); // Debug console

Blynk.begin(auth, ssid, pass);

pinMode(R1,OUTPUT);

pinMode(R2,OUTPUT); }

void loop() { Blynk.run(); }

Blynk

IMG_20200913_210055.jpg
IMG_20200913_210030.jpg

  • Create a New Project in BLYNK app.
  • Write Project name "Hands-Free Lights Control" and Select NodeMCU from drop-down
  • AUTH token will be sent to your registered email
  • Add 2 relay buttons from right dropdown
  • D1 for relay 1 and D2 for relay 2 or as you wish

Assemble

IMG_20200610_233258.jpg
  • All the parts were assembled as per the circuit diagram given
  • And the covering was safely placed over the circuit by using screws.

Conclusion

  • This project was very successful and the Airbnb guests Liked it a lot!
  • This project was also very beneficial for my younger brother because he learnt a lot of electronics knowledge used in Engineering.