Skip to main content

In And Out Automatic Door Sensor

Automatic Door Controller


About the project :-

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

When you tread on the mat, the sensors send a sign to the automated 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 automated doors to open 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 automated gate which opens without touch and therefore the refore the first PIR sensor is for counting the amount of individuals 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 entire gate system.

Materials:-

  • PIR sensor, 2 pics,
  • Servo, 2 pics,
  • Lcd display16*2, 1pics,
  • Potential meter, 1 pics,
  • Arduino uno, 1pics,
  • 220 ohm resistor, 3 pics,
  • LED(any colour), 2 pics


Necessary Tools:-
  • Solder Iron
  • Solder Wire
  • Soldering Flux
CODE:-
In and out automatic door sensor code
The servos are the automated gate which opens without touch and therefore the refore the first PIR sensor is for counting the amount of individuals 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 entire 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);  
}              //Code end here

Hope You enjoyed this blog see you in the next one!!!

Comments

amazon banner

Popular posts from this blog

Motion Detector Camera

Motion Detector With Photo Capture Camera   Hello friends!! Welcome to This Blog. In this Blog, we will make a motion sensor detector with photo capture using ESP32CAM and the PIR module. The logic behind is when the PIR sensor detects any motion, the ESP32CAM will start taking the pictures. So you can use this project as a security camera. In thisblog, I will share the circuitdiagram, Arduino sketch, and the component list, so after reading the complete article you can easily make this project. Now ESP32 CAM is a small camera module that has ESP32S chip on the back and some GPIO pins to connect peripherals and it also has a micro-SD card slot, where you can insert the micro-SD card and store the pictures. Now before going to the circuit diagram and Arduino sketch, let me give you a quick overview of this project.  Components Required ESP32-CAM  PIR Motion Sensor Module BC547 NPN Transistor 220ohm, 1k, 10k Resistor. LED 5-mm FTDI 232 USB to Serial Interface board 5 volt DC supply  The

Bidirectional Visitor Counter

Bidirectional Visitor Counter using Arduino A bidirectional visitor counter using Arduino may be a reliable circuit that takes over the task of counting variety of Persons/Visitors within the Room very accurately. if somebody enters into the space then the Counter is incremented by one and also leaves it might be incremented. MATERIALS REQUIRED: Arduino IR Module 16*2 LED 5V Relay Resistor(1K,220 ohm) Breadboard Jumper Wires The total number of persons inside the space is Shows on the 16X2 LCD module. The microcontroller does the work 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 are often wont to count the amount of persons entering a hall within the up mode at the doorway gate. and therefore the other can count the amount of persons leaving the hall by decrementing the count at the exit gate. In this Project will helps to Wastage of electricity. In ou

Obstacle Avoiding Robot

Obstacle Avoiding Robot using Arduino and Ultrasonic Sensor A simple project on Obstacle Avoiding Robot is meant here. Robotics is a stimulating and fast growing field. Being a branch of engineering, the applications of robotics are increasing with the advancement of technology.The concept of Mobile Robot is fast evolving and therefore the number of mobile robots and their complexities are increasing with different applications. There are many kind of mobile robot navigation techniques like path planning, self – localization and map interpreting. An Obstacle Avoiding Robot may be a sort of autonomous mobile robot that avoids collision with unexpected obstacles. In this project, an Obstacle Avoiding Robot is supposed. It's an Arduino based robot that uses Ultrasonic range finder sensors to avoid collisions.  Components Required Arduino NANO or Uno  🛒 HC-SR04 Ultrasonic Sensor  🛒 LM298N Motor Driver Module  🛒 5V DC Motors  🛒 Battery  🛒 Wheels 🛒 Chassis  🛒 Jumper Wires  🛒 Circ