Tuesday, August 11, 2020

Bidirectional Visitor Counter

The project of “bidirectional visitor counter "is based on the interfacing of some components such as sensors, motors etc. with Arduino micro controller. 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 When any one enters in the room,IR sensors will get interrupted by the object then other sensor will not work because we have added delay for a while

Circuit working :-

There are two ir sensors used in this circuit  

     Figure 1:- Black one is photo diode and the blue one is ir diode 


IR diode emits ultraviolet ray which human eyes cant see and photo diode is used to detect ir light after detection resistance of the photo diode decreased so which we feed to the non-inverting terminal of the  opamp 741 as show in fig 2 (opamp here is used as an comparator ) nd we provide reference voltage through the potentiometer  or variable resistor

Figure 2:-ir sensor using 741 

.To understand the basic working of this circuit lets take look at the example (this is what i faced while building this ) so when opamp is in comparator mode it compares both input values and give output according to the higher input present at opamp terminals. so if positive input is high compare to the negative the output will postive and if negative high output voltage is negative 

Figure 3:-applying Higher voltage to non-inverting terminal


As you can see in figure 3 i have applied an higher voltage to the non-inverting and getting positive output 

 

Figure 3:-applying Higher voltage to inverting terminal

As you can see its giving the -ve voltage which will do nothing but here is an problem and that problem is we are not going to use 2 batteries and also we dont need any negative voltages so here we will remove the battery and instead of providing negative voltage to pin  4 we connect this too the ground and now there will be no negative voltage also because we have removed the negative supply (but things never work as we expect specially in electronics first attempt ),hence we get some output about of 1.5v but its totally safe to not to count as the high input for arduino which is 2v.  

Circuit Diagram:-

                                                                                
                                                                         Working Video:-
        
        



In this link i have posted the circuit diagram and pcb which i designed by myself using circuit maker so anyone interested can email me.

code:-
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
#define in 8
#define out 9
#define fan 10
#define light 7
#define light0 6
int count=0;
void setup()
{
 lcd.begin(16,2);
 lcd.print("Visitor Counter");
 lcd.setCursor(1,1);
  lcd.print("Build by:- sKb"); 
  delay(2000);
  lcd.clear();
 lcd.print("Build date:-");
 lcd.setCursor(1,1);
  lcd.print("30/4/2020");
 delay(2000);
       
  pinMode(in, INPUT);
  pinMode(out, INPUT);
  pinMode(fan, OUTPUT);
   pinMode(light, OUTPUT);
    pinMode(light0,OUTPUT);
  lcd.clear();
  lcd.print("Person In Room:");
  lcd.setCursor(0,1);
  lcd.print(count);
}
void loop()
{  
  int in_value = digitalRead(in);
  int out_value = digitalRead(out);
  if(in_value == LOW)
  {
    count++;
    lcd.clear();
    lcd.print("Person In Room:");
    lcd.setCursor(0,1);
    lcd.print(count);
delay(1000);
  }

  if(out_value == LOW)
  {
    count--;
    lcd.clear();
    lcd.print("Person In Room:");
    lcd.setCursor(0,1);
    lcd.print(count);
    delay(1000);
  }


  if(count==0)
  {
    lcd.clear();
    digitalWrite(fan, LOW);
    digitalWrite(light, LOW);
    digitalWrite(light0, LOW);
    lcd.clear();
    lcd.print("Nobody In Room");
    lcd.setCursor(0,1);
    lcd.print("Fan is Off");
    delay(200);
  }

  else
  {
    digitalWrite(fan, HIGH);
    digitalWrite(light, HIGH);
    digitalWrite(light0, HIGH);
  }
}




Electronic Dice With 7 – Segment Display

Aim The Aim of this project is to learn, study and create different ICs in digital logic and designing and create a unique project. This pro...