Introduction: Automatic Room Light Controller

This is a very advantageous yet easy to make project. We call it " Automatic Room Light Controller ".



Step 1: Story

This is a very advantageous yet easy to make project.

We call it " Automatic Room Light Controller ".

Benefits:-

In this project, we will see the Automatic Room Lights using Arduino and IR Sensor, where the lights in the room will automatically turn ON and OFF by detecting the presence of a human. Such Automatic Room Lights can be implemented in your garages, staircases, bathrooms, etc. where we do not need continuous light but only when we are present. Also, with the help of an automatic room light control system, you need not worry about electricity as the lights get automatically off when there is no person.

Applications

I’ve already mentioned a few applications of the Automatic Room Lights concept. Some of them are:

  • Garage Lights
  • Bathroom Lights
  • Hand Dryers
  • Toilet Flushers
  • Security Lights
By following this guide, you will be able to know and make your Automatic Room Light Controller. This project guide contains the files necessary to help you step by step produce your own Automatic Room Light Controller. Please follow the steps of the project to get a positive result.

Step 1:- Get your PCB ready!

Talking about electronics

After making the circuit diagram I transformed it into a PCB design to produce it, to produce the PCB, I have chosen JCLPCB the best PCB supplier and the cheapest PCB provider to order my circuit. with the reliable platform, all I need to do is some simple clicks to upload the Gerber file and set some parameters like the PCB thickness color and quantity. I’ve paid just 2 Dollars to get my PCB after five days only, what I have noticed about JCLPCB this time is the "out-of-charge PCB color" which means you will pay only 2 USD for any PCB color you choose.

Step 2: Get All the Components Listed Below Images.

Step 3: Place All the Components on PCB and Solder It Properly.

Step 4: Connect the IR Sensor With the Help of Jumper Wire.

Step 5: Then, Upload the Code in Arduino Nano and Connect It to the PCB.

Step 6: Stick the PCB to the Custom Designed PVC Box and Connect the 12 V Power Supply to the PCB for the Input in the Circuit.

Step 7: Connect the Screw Terminal to the PCB for the Relay Output From the Circuit.

Step 8: Connect the IR Sensor the Circuit With the Help of Jumper Wire.

Step 9: Cover the Box and Place All the Components on Their Respective Holes.

Step 10:

Now, your own Automatic Room Light Controller is ready to use.



Step 11: Connect the Appliances With the Your Automatic Room Light Controller.

Step 12: Working of This Project:-

The Automatic Room Light Controller using Arduino and IR Sensor is a simple project, where the lights in the room will automatically turn on upon detecting a human motion and stay turned on until the person has left or there is no motion. Working of this project is very simple and is explained here. Initially, when there is no human movement, the IR Sensor doesn’t detect any person and its OUT pin stays LOW. As the person enters the room, the change in infrared radiation in the room is detected by the IR Sensor. As a result, the output of the IR Sensor becomes HIGH. Since the Data OUT of the PIR Sensor is connected to Digital Pin 8 of Arduino, whenever it becomes HIGH, Arduino will activate the relay by making the relay pin LOW (as the relay module is an active LOW module). This will turn the Light ON. The light stays turned ON as long as there is movement in front of the sensor. If the person takes a nap or leaves the room, the IR Radiation will become stable (there will be no change) and hence, the Data OUT of the IR Sensor will become LOW. This in turn will make the Arduino to turn OFF the relay (make the relay pin HIGH) and the room light will be turned OFF.



New users will also get some coupons while registering at JCLPCB via this blue link.



Thank you for reading this guide, hopefully, this guide provides full steps to help you to create your own Automatic Room Light Controller. If you have any questions please post them in the comment section below.

Step 13: Arduino Code

/*
  code started
  #define ir pin = D2;
  #define led pin = D8;
  code created by technical ideas yt https://youtube.com/c/TechnicalidEas07
 */
int pbuttonpin=2;
int led=5;
int val=0;
int lighton=0;
int pushed=0;
void setup() {
  // put your setup code here, to run once:
pinMode(pbuttonpin,INPUT_PULLUP);
pinMode(led,OUTPUT);
}


void loop() {
  // put your main code here, to run repeatedly:
val=digitalRead(pbuttonpin);
if(val==HIGH && lighton==LOW)
{
pushed=1-pushed;
delay(100);
}
lighton=val;
if(pushed==HIGH)
{
  digitalWrite(led,LOW);
}else
{
  digitalWrite(led,HIGH);
}}