Project in progress
In and out automatic door sensor

In and out automatic door sensor © CERN-OHL

PIR Sensor and Arduino, which automatically opens and closes the door by detecting a person or object.

  • 1,744 views
  • 4 comments
  • 11 respects

Components and supplies

Necessary tools and machines

About this project

About the project :-

In the Automatic Door Opening System, the main component or hardware is the sensor which detects the persons (well, the motion of the person in our case). For this purpose, we will be using the PIR Motion Detector Sensor.

When you step on the mat, the sensors send a signal to the automatic doors that tells them to open. Other automatic doors operate on optic or motion sensors.... When these optic or motion sensors sense motion nearby, they trigger the automatic doors to open and then close.

All project managers need to make decisions, but good decisions usually come from the use of a logical and rational process. I make this project to enhance my knowledge.

working :-

The servos are the automatic gate which opens without touch and the first PIR sensor is for counting the number of people who entered and the second PIR sensor is for counting the number of people who left the room, at a time only 5 people can enter the room, the lcd display is for displaying the number of people in the room and arduino uno controls the whole gate system.

Materials:

PIR sensor, 2pics,

Servo, 2pics,

Lcd display, 1pics,

Potential meter, 1pics,

Arduino uno, 1pics,

220 ohm resistor, 3pics,

LED(any colour), 2pics,

https://www.tinkercad.com/things/017IFDwnJY8-corona-fighter-project/editel

Code

In and out automatic door sensor codeC/C++
The servos are the automatic gate which opens without touch and the first PIR sensor is for counting the number of people who entered and the second PIR sensor is for counting the number of people who left the room, at a time only 5 people can enter the room, the lcd display is for displaying the number of people in the room and arduino uno controls the whole gate system.
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#include <Servo.h>
Servo rservo;
int a=0;
int b=0;
int c=9;
int d=0;
int e=11;
int f=0;
void setup() 
{
  lcd.begin(16, 2);
  Serial.begin(9600);
  rservo.attach(8);
  pinMode(13, OUTPUT);
  pinMode(9, INPUT);
  pinMode(12, OUTPUT);
  pinMode(11, INPUT);
}

void loop() 
{ 
 d=digitalRead(c);
 f=digitalRead(e);  
if(d==1)
{
 f==0;
 delay(2000);

}
 else if(f==1)
{
 d==0;
 delay(2000);
 
}  
  if(a==0)
{
 lcd.setCursor(1,0);
 lcd.print("0 Person"); 
 rservo.write(0);   
 a=1;
 b=0;    
}
 else if((d==1)&&(a==1))
{
 lcd.setCursor(1,0);
 lcd.print("1 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);   
 a=2; 
 b=4;  
}
 else if((d==1)&&(a==2))
{  
 lcd.setCursor(1,0);
 lcd.print("2 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0);
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);   
 a=3; 
 b=3;
}
else if((d==1)&&(a==3))
{ 
 lcd.setCursor(1,0);
 lcd.print("3 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);      
 a=4;    
 b=2;  
}  
 else if((d==1)&&(a==4))
{
 lcd.setCursor(1,0);
 lcd.print("4 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0);   
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);      
 a=5; 
 b=1;  
} 
 else if((d==1)&&(a==5))
{
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);       
 lcd.setCursor(1,0);
 lcd.print("5 Person");
 delay(2500);   
 rservo.write(45);   
 delay(2500);   
 rservo.write(0);  
 lcd.setCursor(1,0);
 a=6;
 b=0;  
}  
else if((d==1)&&(a==6))
{
 rservo.write(0);
 lcd.setCursor(1,0);
 lcd.print("Full Capacity");
 delay(2500);   
 lcd.setCursor(1,0);
 lcd.print("                 "); 
 delay(2500);     
 digitalWrite(12, HIGH);
 delay(1000);
 digitalWrite(12, LOW);
  lcd.print("Full Capacity");
 delay(2500);   
 lcd.setCursor(1,0);
 lcd.print("                 "); 
 delay(2500);    
}    
 else if((f==1)&&(b==0))
{ 
 lcd.setCursor(1,0);
 lcd.print("                 "); 
 lcd.setCursor(1,0);
 lcd.print("4 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);     
 b=1; 
 a=4;  
}
 else if((f==1)&&(b==1))
{  
 lcd.setCursor(1,0);
 lcd.print("3 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);      
 b=2; 
 a=3;  
}
else if((f==1)&&(b==2))
{ 
 lcd.setCursor(1,0);
 lcd.print("2 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0);
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);     
 b=3; 
 a=2; 
}  
 else if((f==1)&&(b==3))
{
 lcd.setCursor(1,0);
 lcd.print("1 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);  
 b=4;
 a=1;  
} 
 else if((f==1)&&(b==4))
{
 lcd.setCursor(1,0);
 lcd.print("0 Person");  
 rservo.write(45);   
 delay(2500);   
 rservo.write(0); 
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);  
 b=5;  
 a=0;  
}
else if((f==1)&&(b==5))
{
 rservo.write(0);
 digitalWrite(13, HIGH);    
} 
  digitalWrite(12, LOW);
  digitalWrite(13, LOW);   
  //Serial.print(a);
  //Serial.print(b);
  //Serial.print(c);
  //Serial.print(d);
  //Serial.print(e);
  //Serial.print(f);
  
  lcd.setCursor(1,1);
  lcd.print("                ");
  delay(100);
  lcd.setCursor(1,1);
  lcd.print("Limit 5 Person");
  delay(1000);
  lcd.setCursor(1,1);
  lcd.print("                ");
  delay(100);
  lcd.setCursor(1,1);
  lcd.print("Stay Home");
  delay(1000);  
  lcd.setCursor(1,1);
  lcd.print("                ");
  delay(100);
  lcd.setCursor(1,1);
  lcd.print("Stay Safe");
  delay(1000);  
}

Comments

Author

Mechatron robotics
info
  • 2 projects
  • 0 followers

Additional contributors

Published on

July 15, 2020

Members who respect this project

DefaultDefaultDefaultAoh14giyy r gju2i7ivnxhknhucpsjgzegbsg6ahstmDefault

and 6 others

See similar projects
you might like

Similar projects you might like

LED Matrix + Motion Sensor Door Display [Arduino Holiday]

Project tutorial by HeathenHacks

  • 7,372 views
  • 5 comments
  • 25 respects

Smart Lock Door with Voice Activation Using Arduino Uno

Project showcase by bangkitwahyu

  • 3,516 views
  • 2 comments
  • 20 respects

The Sorcerer's Door

Project showcase by Varun walimbe

  • 492 views
  • 0 comments
  • 2 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 63,040 views
  • 31 comments
  • 150 respects

Arduino-Based Automatic Water Tap Using IR Sensor

Project tutorial by Creatjet3D R&D Team

  • 18,224 views
  • 8 comments
  • 25 respects
Add projectSign up / Login