Bidirectional Visitor Counter using Arduino

Bi-Direction Visitor Counter using Arduino

A bidirectional visitor counter using Arduino is a reliable circuit that takes over the task of counting a number of Persons/ Visitors in the Room very accurately. if somebody enters into the Room then the Counter is incremented by one and also leaves it would be incremented.

The total number of persons inside the Room is Shows on the 16X2 LCD module. The microcontroller does the job it receives the signals from the sensors, and this signals operated under the control of software which is stored in EPROM of Arduino.

There are two IR Modules are used. first, one can be used to count the number of persons entering a hall in the up mode at the entrance gate. And the second one can count the number of persons leaving the hall by decrementing the count at the exit gate.

In this Project will helps to Wastage of electricity. In our home, school, colleges or industry we see that fan and lighting point are kept on even if there is nobody in the room. This happens due to negligence or because we forgot to turn lights off or we are in a hurry.

To avoid all such situations this project called “Automatic room light controller with visitor counter” is designed. This project has two functions, the first one is known as “ Visitor counter” and the second one is known as “Automatic room light controller”.

The main concept behind this project is known as “Visitor counter System” which measures the number of persons entering any room like a conference room, hotel rooms, seminar hall. This project is implemented using the IR sensor module with Arduino. Whereas Arduino receives the signals from the sensors, and this signal is operated under the control of software which is stored in the EPROM of the Microcontroller.

Bidirectional Visitor Counter using Arduino is a simple hobby project which can do any of them without an Electronics or Programming Knowledge

MATERIALS REQUIRED:

                         1. ATMEGA328P-PU Microcontroller or Arduino Uno
                         2. IR Module
                         3. 16X2 LCD
                         4. 5V RELAY 
                         5. BC547 Transistor
                         6. 1k ohm ,220 ohm  Resistor
                         7. Solder Less bread board 
                         8. jumper wire kit

Program

#include<LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);

#define in 14 // Analog pin A0 has a IR Module attached to it.
#define out 15 // Analog pin A1 has a IR Module attached to it.
#define relay 2 // Digital pin D2 has a Relay attached to it.

int count=0;

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

void OUT()
{
  count--; // increment the value
    lcd.clear(); // Clear the LCD Value
    lcd.print("Person In Room:");
    lcd.setCursor(0,1); // set the cursor positon
    lcd.print(count); // Display count value
    delay(1000);
}

void setup()
{
  lcd.begin(16,2);
  lcd.print("Visitor Counter");
  delay(2000);
  pinMode(in, INPUT); // Assign the IR is Input
  pinMode(out, INPUT);Assign the IR is Input
  pinMode(relay, OUTPUT); Assign the Relay is 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); // relay is in ON conditon
    lcd.clear();
    lcd.print("Nobody In Room");
    lcd.setCursor(0,1);
    lcd.print("Light Is Off");
    delay(200);
  }
  
  else
    digitalWrite(relay, HIGH); // relay is OFF condition
  
}

You may also like...

2 Responses

  1. ucretsiz says:

    I really liked your article post. Thanks Again. Really Great. Ronnie Brett High

  2. download says:

    I used to be able to find good information from your blog posts. Sonnnie Curtice Stav

Leave a Reply

Your email address will not be published. Required fields are marked *

മലയാളം