0% found this document useful (0 votes)
628 views7 pages

Automatic Room Light Controller with Counter

This document describes an automatic room light controller project that uses sensors and an Arduino microcontroller. The system counts the number of people entering and leaving a room and controls the room lights based on occupancy. It uses infrared sensors to detect movement and increment or decrement a counter value, which is displayed on an LCD screen. When the counter reaches zero, indicating no one is in the room, a relay is used to cut power to the lights to save electricity. The system is divided into sensor, controller, display and lighting sections, and an overview of the circuit diagram and Arduino code is provided.

Uploaded by

hr.muzello
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
628 views7 pages

Automatic Room Light Controller with Counter

This document describes an automatic room light controller project that uses sensors and an Arduino microcontroller. The system counts the number of people entering and leaving a room and controls the room lights based on occupancy. It uses infrared sensors to detect movement and increment or decrement a counter value, which is displayed on an LCD screen. When the counter reaches zero, indicating no one is in the room, a relay is used to cut power to the lights to save electricity. The system is divided into sensor, controller, display and lighting sections, and an overview of the circuit diagram and Arduino code is provided.

Uploaded by

hr.muzello
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

[Link].

org © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882

Automatic Room Light Controller


1. Pradnya Prabhakar Powar. [Link] Arun Patkure.
3. Madhura Pramod Walvekar. 4. Vaishnavi Aravind Patil.
5. Tejaswini Ulhas Patil .(Department of Electronics and Telecommunication Engineering , KITCoEK).

Guidance By
Prof. Sameer Nagtilak

ABSTRACT :
The project of “Digital visitor counter” is based on the interfacing of some components such as sensors, motors etc. with
arduino microcontroller. This counter can count people in both directions. This circuit can be used to count the number of
persons entering a hall/mall/home/office in the entrance gate and it can count the number of persons leaving the hall by
decrementing the count at same gate or exit gate and it depends upon sensor placement in mall/hall. It can also be used at gates
of parking areas and other public places.

This project is divided in four parts: sensors, controller, counter display and gate. The sensor would observe an interruption and
provide an input to the controller which would run the counter increment or decrement depending on entering or exiting of the
person. And counting is displayed on a 16x2 LCD through the controller.

KEYWORDS :
Embedded Software, Fault Analysis, Side Channel Analysis, sensors, led, Arduino, Relay, Signal, Analog, Digital, Input, Output,
etc.

1. INTRODUCTION :
 Electricity is one of the most important resources in this century. We should conserve the electricity. But many times
we come outside the room/hall and forget to turn off the lights/fan, thus the electricity is wasted.
 To overcome this we are going to implement a project called “Automatic room light controller with visitor counter”.
This project has 2 modules. First module is “Visitor counter” and the other module is “Automatic room light
controller”. Main concept behind this project
is to measure and display the number of persons entering in any room like seminar hall, conference room.
And when number of persons inside the room is zero, power supply inside the room can be cut using a relay interface.
This will help to save electricity. LCD display placed outside the room displays number of person inside the room.

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c820


[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882
 Behind to make this project our main problem statement is:-
Wastage of electricity is one of the main problems which we are facing nowadays. In our home, school,
colleges or industry we see that fan/lights are kept on even if there is nobody in the room or area/passage. This happens due
to negligence or because we forgot to turn lights off or when we are in a hurry. To avoid all such situations we have designed
this project called “Automatic room light controller with visitor counter”.

2. COMPONENT LIST :
a. Relay (5v)
b. Arduino UNO
c. Resisters
d. IR Sensor module (2)
e. 16x2 LCD display
f. Bread Board
g. Connecting Wires
h. Led

3. BLOCK DIAGRAM :

Sensor 1 LCD
Arduino
UNO
Sensor 2 Relay

lights

3.1 Explanation of Block diagram :-

 There are we using two sensors which gives input output signal To the Arduino.
 In Arduino we insert program for processing on input signal.
 When input comes in Arduino, Arduino processes on it and gives output signal to LCD as well as Relay.

 When input signal is goes toward the relay that time relay well be open or close and passes or stop the output signal
towards the lights.

 When that signal is high that time relay will close the circuit and led will be glow, and when the output signal is low that
time led will off.

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c821


[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882
4. CIRCUIT DIAGRAM :

4.1 Circuit Diagram Explanation :

1. Sensor Section :-
In this section we have used two IR sensor modules which contain IR diodes, potentiometer, Comparator (Op-Amp)
and LED’s. Potentiometer is used for setting reference voltage at comparator’s one terminal and IR sensors sense the
object or person and provide a change in voltage at comparator’s second terminal. Then comparator compares both
voltages and generates a digital signal at output. Here in this circuit we have used two comparators for two sensors.
LM358 is used as comparator. LM358 has inbuilt two low noise Op-amp.
2. Control Section :-
Arduino UNO is used for controlling whole the process of this visitor counter project. The outputs of comparators are
connected to digital pin number 14 and 19 of Arduino. Arduino read these signals and send commands to relay driver
circuit to drive the relay for light bulb controlling. If you find any difficulty in working with relay, check out this tutorial
on arduino relay control to learn more about operating relay with Arduino.

3. Digital Section :-
Arduino UNO is used for controlling whole the process of this visitor counter project. The outputs of comparators are
connected to digital pin number 14 and 19 of Arduino. Arduino read these signals and send commands to relay driver
circuit to drive the relay for light bulb controlling. If you find any difficulty in working with relay, check out this tutorial
on arduino relay control to learn more about operating relay with Arduino.

4. Relay Driver section:


Relay driver section consist a BC547 transistor and a 5 volt relay for controlling the light bulb. Transistor is used to
drive the relay because Arduino does not supply enough voltage and current to drive relay. So we added a relay driver
circuit to get enough voltage and current for relay. Arduino sends commands to this relay driver transistor and then
light bulb will turn on/off accordingly.

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c822


[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882
5. PROJECT CODE:
i) Defining library :
First we have included library for LCD and defined pin for the same. And also defined input output pin for sensors
and ralay.
#include<LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);
#define in 14
#define out 19
#define relay 2

ii) Initialized LCD :


Then given direction to input output pin and initialized LCD in setup loop.
void setup()
{
[Link](16,2);
[Link]("Visitor Counter");
delay(2000);
pinMode(in, INPUT);
pinMode(out, INPUT);
pinMode(relay, OUTPUT);
[Link]();

[Link]("Person In Room:");
[Link](0,1);
[Link](count);
}
iii) Input output processing loop :
In loop function we read sensors input and increment or decrement the counting depending upon enter or exit
operation. And also check for zero condition. Zero condition means no one in the room. If zero condition is true then
arduino turn off the bulb by deactivating the relay through transistor.
void loop()
{
if(digitalRead(in))
IN();
if(digitalRead(out))
OUT();

if(count<=0)
{
[Link]();
digitalWrite(relay, LOW);
[Link]();
[Link]("Nobody In Room");

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c823


[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882
[Link](0,1);
[Link]("Light Is Off");
delay(200);
}

Output conditions :
And if zero condition is false then arduino turns on the light. Here is two functions for enter and exit.
void IN()
{
count++;
if(count>=10)
{
count=10;
}
[Link]();
[Link]("Person In Room:");
[Link](0,1);
[Link](count);
delay(1000);
}
void OUT()
{
count--;
if(count<=0)
{
count=0;
}
[Link]();
[Link]("Person In Room:");
[Link](0,1);
[Link](count);
delay(1000);
}

6. ADVANTAGES :

 The main advantage of this project is that it helps in energy conservation. Because when there is nobody inside the room
then lights are automatically turned off.
 The light will not glow if no person is present inside the room.
 The light will on only when the person enters the room.
 Displays the number of persons present inside the room.
 Human efforts to count the number of persons are eliminated. Since this project does the automatic person counting with
the help of two sensors installed on the door frame.
 It is low cost and Easy to use.
 Convenience - Turning on the lights will be as easy as walking inside the room. No need to search for the switch on the
wall. The lighting system will automatically turn off the lights when it does not sense any movement for a certain period
of time.
IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c824
[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882

7. DISADVANTAGES :
 The circuit requires different path for both entrance and exit way for the proper way of working.
 It is used only when one person cuts the rays of the sensor hence cannot be used when two or more persons cross the door
simultaneously.
 When anybody is inside the room and we need to switch off the power then we've to do it manually. So, in this case we
fail to automatically control the light.

8. APLLICATION :
 Digital Visitor Counter can be used in various rooms like seminar hall, conference hall where the capacity of the room is
limited and should not be exceeded. The project will display an actual number of persons inside the room.
 “Automatic Room light Controller with Visitor Counter” can be used in classrooms, study rooms in colleges.
 Automatic Room light Controller project can also be used in our home because many times we come out of our bedroom
or any other room and we forgot to turn off the room light.
 The Bidirectional person counter project can be used in Cinema halls, multiplex, malls as well as in temples to count the
number of a person entering inside. So that these places should not get overcrowded to avoid congestion

 It can also be used as home automation system to ensure energy saving by switching on the loads and fans only when
needed.

9. FUTURE SCOPE :
 By using this circuit and proper power supply we can implement various applications.
 By modifying this circuit and using two relays we can achieve a task of opening and closing the door.
 Voice alarm may be added to indelicate room is full and person can’t enter in the room.
 We can send this data to a remote location using a mobile or internet.

10. CONCLUSION :
 The theme of this project when merged with certain established technologies can be quite effective in number of
countries like Germany, France and Japan, etc. which control the train.
 Thus project helps us to control the lights of a room automatically , counts the number of persons or visitors entering and
leaving the room.

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c825


[Link] © 2022 IJCRT | Volume 10, Issue 2 February 2022 | ISSN: 2320-2882
11. REFERENCES :
 [Link]
using-arduino
 [Link]
 [Link]
 [Link]

 [Link]

IJCRT2202336 International Journal of Creative Research Thoughts (IJCRT) [Link] c826

Common questions

Powered by AI

The main components involved in this project include Arduino UNO, IR sensor modules, a 5V relay, a 16x2 LCD display, and a BC547 transistor. The IR sensors detect the entry and exit of people, sending signals to the Arduino. The Arduino processes these signals and controls the relay that turns the lights on or off based on room occupancy. The LCD display shows the number of people in the room. The BC547 transistor acts as a relay driver, providing sufficient current to operate the relay from the Arduino's signal, which by itself lacks adequate current to drive the relay directly .

The project optimizes energy usage by automatically turning off the lights when no one is present in the room. It uses IR sensors to detect the presence of individuals entering or exiting a room and processes this information using an Arduino microcontroller. When the count of people in the room drops to zero, the Arduino commands a relay to cut the power supply to the lights, preventing energy wastage. The system's real-time monitoring of human presence ensures that lights are only on when necessary, thereby conserving electricity .

The Arduino microcontroller serves as the central processing unit, orchestrating the interaction between the sensors, relay, and LED display. When one of the IR sensors detects motion, it sends a digital signal to the Arduino, which increments or decrements the visitor count. The microcontroller then assesses whether the room is occupied based on this count. If the count is non-zero, it activates the relay to power the lights; otherwise, it deactivates the relay to conserve energy. The Arduino also continuously updates the visitor count on the LCD display, ensuring real-time feedback .

The system provides significant user convenience by automating light control, thereby eliminating the need for manual switches. It ensures lights are only activated when needed, reducing energy wastage and associated costs. The automatic operation also minimizes user intervention, which is particularly advantageous when handling multiple locations or when users forget to switch off lights. Additionally, by displaying the number of occupants, the system offers real-time awareness of usage levels, enhancing operational efficiency in managing room capacities .

Future enhancements could include integrating additional sensors to differentiate between multiple entries and exits in quick succession to improve accuracy. Implementing wireless communication protocols can allow remote monitoring and control via smartphones or the Internet. Incorporating machine learning algorithms could predict and adjust to typical occupancy patterns for pre-emptive energy conservation. Voice alarm systems could alert when a room reaches capacity, or additional relays could automate door mechanisms. Each enhancement would extend functionality and offer more robust solutions for energy management and visitor tracking .

Human factors significantly influence the system's performance. Unintended interference, such as rapid consecutive entries and exits or blocking of sensors, can lead to miscounting. Additionally, cultural attitudes or habits might lead to manual adjustments, undermining automatic control benefits. For instance, incorrect sensor placement based on room architecture or usage patterns, such as high user traffic rooms, could compromise accuracy. Addressing these factors requires careful planning in sensor placement and may necessitate additional features like manual override options or advanced sensor algorithms to mitigate human-induced errors .

The comparator is integral to the IR sensor module's operation. It compares the reference voltage set by a potentiometer with the voltage change produced by the infrared sensor when it detects an object. The comparator's output is a digital signal indicating whether an object (i.e., a person) is present. This digital signal is then sent to the Arduino microcontroller, which uses the information to update the visitor count and control the relay for light operation. Accurate detection by the comparator is crucial for reliable system performance .

Automation in the room light controller significantly reduces unnecessary energy consumption by ensuring lights are active only when needed. At larger scales, such as in industries or universities where numerous rooms or facilities exist, automated systems can lead to substantial energy savings and operational efficiency gains. This can reduce electricity costs and contribute to environmental sustainability by lowering carbon footprints. Additionally, it can promote a culture of conscious energy usage, encouraging further innovations in resource management .

The project enhances safety and compliance by providing real-time data on room occupancy through its visitor counter feature. This functionality allows for monitoring adherence to maximum capacity limits, reducing risks of overcrowding, which is crucial for safety regulations in venues like conference halls, cinemas, or malls. By preventing overcapacity, the project helps in maintaining fire safety codes and ensures that evacuation procedures can be effectively executed if needed, thus supporting compliance with safety standards .

The primary limitations of the project include its inability to accurately function in environments where multiple individuals enter or exit simultaneously at the sensor's point of reference. The system requires distinct entry and exit paths to operate correctly, and if multiple people cross a sensor's path at once, it results in inaccurate counting. It also cannot automatically turn off the lights if someone remains in the room and manual control is desired. These constraints highlight challenges in crowded settings where accurate, real-time responses are required .

You might also like