Home Automation With Bidirectional people counter with light control Using Arduino

Published Jul 16, 2024
 8 hours to build
 Intermediate

Excited to introduce my latest Arduino project aimed at saving electricity while enhancing space efficiency - a Bidirectional People Counting Machine with Integrated Light Control . This innovative system utilizes Arduino technology to intelligently monitor the flow of individuals entering and exiting a space while dynamically adjusting lighting based on occupancy levels.

display image

Components Used

Arduino UNO
Arduino UNO
1
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
1
Breadboard
Breadboard
1
LCD 16x2 Display Module
LCD16x2 has two lines with 16 character in each line. LCD16x2 is generally used for printing values and string in embedded application.
1
5VDC Adapters Power Supply
Wall Mount AC Adapters ac-dc, 5 Vdc, 2 A, SW, wall-plug, EU, P5 center pos, level VI, black
1
ir module
An infrared (IR) sensor is an electronic device that measures and detects infrared radiation in its surrounding environment. When an object comes close to the sensor, the infrared light from the LED reflects off of the object and is detected by the receiver.
2
LED Lights
Simple colorful LED lights are selected due to their brightness, compactness and cost.
2
Description
//Visitors Counter and Automatic Room Light
#include<LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10,9,8);

#define in 14
#define out 19
#define relay 2

int count=0;

void IN ()
{
count++;
lcd.clear();
lcd.print ("Person In Room: ");
lcd.setCursor (0,1);
lcd.print (count);
delay(1000);
}
void OUT ()
{
count--;
lcd.clear();
lcd.print ("Person In Room: ");
lcd.setCursor(0,1);
lcd.print (count);
delay(1000);

}
void setup()
{
lcd.begin(16,2);
lcd.print("Visitor Counter");
delay(2000);
pinMode (in, INPUT);
pinMode (out, INPUT);
pinMode (relay, OUTPUT);
lcd.clear();

lcd.print("Person In Room: ");
lcd.setCursor (0,1);
lcd.print (count);
}
void loop()
{
if (digitalRead(in))

IN();

if (digitalRead(out))

OUT();


if (count<=0)
{
lcd.clear();
digitalWrite(relay, LOW);
lcd.clear();
lcd.print ("Nobody In Room");
lcd.setCursor(0,1);
lcd.print ("Light Is Off");
delay(200);

}
else

digitalWrite(relay, HIGH);
}

Steps :

  1. The objective of this project is to make a controller based model to count number of persons visiting particular room and accordingly light up the room. Here we can use sensor and can know present number of persons. 
  2. The total number of person inside the room also displayed on the seven segment displays. 
  3. The microcontroller  receives the signals from the sencers, and this signal is operated under the control of software which is stored in rom.

This Project ―Automatic Room Light Controller with Visitor Counter using Microcontroller is a reliable circuit that takes over the task of controlling the room lights as well us counting number of persons/ visitors in the room very accurately. When somebody enters into the room then the counter is incremented by one and the light in the room will be switched ON and when any one leaves the room then the counter is decremented by one. The light will be only switched OFF until all the persons in the room go out. The total number of persons inside the room is also displayed on the seven segment displays.

The microcontroller does the above job.

 It receives the signals from the sensors, and this signal is operated under the control of software which is stored in ROM. Microcontroller (Arduino) continuously monitor the Infrared Receivers, When any object pass through the IR Receiver's then the IR Rays falling on the receiver are obstructed , this obstruction is sensed by the Microcontroller.

1. Optimized Energy Consumption : By automatically adjusting lighting based on real-time occupancy data, this system significantly reduces energy waste, leading to substantial electricity savings.
2. Efficient Space Utilization : Accurate bidirectional counting ensures efficient space utilization, allowing for better resource allocation and improved user experience.
 

Codes

Downloads

Automatic Light Control Using Arduino Download
Screenshot 2024-07-15 224631 Download

Institute / Organization

Bajaj Institute of Technology , Wardha
Comments
Ad