Close
0%
0%

Room Light Controller & Bidirectional Visitor Coun

The project describes an automatic room light controller with a bidirectional visitor counter with the help of Arduino Uno

Similar projects worth following
The project describes an automatic room light controller with a bidirectional visitor counter with the help of Arduino Uno

About Project

This project's Digital visitor counter relies on communicating few components likewise sensors, motors, etc. with Arduino microcontroller. This counter can calculate people in both directions. This circuit can be utilized to calculate the number of a person going in a home/office in the entry gate and it can calculate the number of persons leaving the hall by decreasing the count at the same gate or exit gate and it relies upon sensor placement in the hall. It can also be utilized at gates of parking areas and more public places.

This project is distributed into four parts such as sensors, controller, counter display as well as the gate. The sensor notices an interruption and gives input to the controller which would drive the counter increment or decrement depending on entering or exiting of the person. And the respective counting is displayed on a 16x2 LCD via the controller.

When any person enters the room, the IR sensor will get scattered by the object then another sensor will not operate due to we have added a delay.

  • 1 × Arduino UNO
  • 1 × Relay 5V
  • 1 × IR Sensor module
  • 1 × DFRobot I2C 16x2 Arduino LCD Display Module
  • 1 × Connecting Wires

View all 6 components

  • 1
    Run a Program

    #include
    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.print("nobody in room"); lcd.setcursor(0,1); lcd.print("light is off"); delay(200); } else high); < body></=0)>

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates