Automated Room Lightening System With Arduino

by | Mar 12, 2023 | Arduino, Basic Coding, Coding

Home » Coding » Automated Room Lightening System With Arduino

Introduction of the Project

Are you tired of constantly turning your room lights on and off? Do you want a smart and efficient way to control your room’s lighting? Look no further than building an Automated Room Lightening System with Arduino!

Using the power of Arduino, a microcontroller board that can be programmed to perform various tasks, you can easily create an automated lighting system that senses when you enter and exit the room. With a few simple components like a motion sensor and a relay module, you can set up the system to turn on the lights when you enter the room and turn them off when you leave.

Building an Automated Room Lightening System with Arduino is not only fun and educational, but it also provides a practical solution to a common problem. You’ll save energy and reduce your carbon footprint by ensuring that your lights are only on when you need them, all while enjoying the convenience of a smart and efficient lighting system. So what are you waiting for? Let’s get building!

To build this Arduino project, we will use multiple PIR Sensors to know the existence of any human in the room on the basis of which will turn ON or OFF the bulb. This will help to save electricity as well along with the comfort it will provide and will also save human time to switch on and off bulbs, especially at night time.

 

Supplies

In order to make an Automated Room Lightening System with Arduino, we will require the following components:

Components

We have used the TinkerCad website to build our project. For building physical projects, the components can be purchased online or from any electronics store.

Circuit Diagram

Steps To Make An Automated Room Lightening System With Arduino

Step 1: We have gathered all the required components on our TinkerCad Digital Board.

Bulb:

Step 2: Connect one of the bulb’s terminals to the GND pin of the Arduino.

Step 3: Connect the second terminal of the bulb to Pin number 13 of the Arduino.

PIR Sensor:

Step 4: Connect the Power terminal of each PIR sensor to the 5V pin of the Arduino.

Step 5: Connect the Ground terminal of all the PIR sensors to the GND pin of the Arduino.

Step 6: Connect the Signal terminal of the PIR sensors to the 5, 6, & 7 number pins of the Arduino, respectively.

Source Code

int input1 = 0;
int input2 = 0;
int input3 = 0;
void setup()
{
pinMode(5, INPUT);
pinMode(6, INPUT);
pinMode(7, INPUT);
pinMode(13, OUTPUT);
}
void loop()
{
input1 = digitalRead(5);
input2 = digitalRead(6);
input3 = digitalRead(7);
digitalWrite(13, LOW);


if(input1 == HIGH || input2 == HIGH || input3 == HIGH)
digitalWrite(13, HIGH);
}

Explanation of the Code

1. In the beginning, we have initialized three input variables to 0, in which we will be storing the input value from each sensor.

2. In the setup function, we have configured the pins of the Arduino for input and output purposes.

3. In the loop function, we are reading the input from each sensor and storing the value in the input variable, and then we use the if statement to glow the bulb if any of the input values is high.

Output

We will get the following output on successfully completing this DIY Arduino project.

Automated Room Lightening System With Arduino

On starting the simulation, the bulb will glow if any object or human is there in the range of any of the sensors. If no object is in the range of any sensor, the bulb will not glow. In this way, electricity will be saved.

Recommendation

We have successfully built our Automated Room Lightening System With Arduino, But that’s not all! With additional programming and components, you can customize the system to adjust the lighting intensity based on the time of day or even the level of natural light in the room. And if you want to take things to the next level, you can add voice control or connect the system to your smartphone for remote access and control.

 

More Arduino Projects>>>

You May Also Like To Create…