Automatic Door Opening System

Updated: May 2, 2020

Components Required:


  • microcontroller (AT89S52/AT89C51)

  • motor driver(L293D)

  • DC motor

  • push button

  • PIR sensors

  • BC547(NPN-Transistor)

  • LCD

  • 1N4007

  • resistors and capacitors



About the project:


this project proposes a system that allows for automatic door opening solution by sensing human presence near it. Our system achieves this functionality with the help of PIR sensors. PIR stands for passive infrared sensors. Every live body emits some infrared energy. This energy is sensed by a PIR sensor from a good distance. This signal is then processed and door is opened and closed based on this data.When a living being arrives within the sensor range,the PIR is amplified to a transistor BC547, the output of which at the collector terminal is connected to pin-1 of the microcontroller. While any moving human body is sensed by the PIR sensor, it develops logic high at its o/p which gets reversed by the transistor used to develop a logic low at pin-1 of microcontroller. The program is so returned that it delivers appropriate input to the driver IC L293D as explained above, to run the motor as it indicate if the motor rotates one direction and vice versa indicating door open and close. Instead of using the microcontroller separately, You can even use an arduino.


Code if using Arduino:

int in1 = 2;

int in2 = 3;

int sensor = 8;

int led = 13;

voidsetup()

{

pinMode(in1, OUTPUT);

pinMode(in2, OUTPUT);

pinMode(sensor, INPUT);

pinMode(led,OUTPUT);

digitalWrite(in1,LOW);

digitalWrite(in2,LOW);//digitalWrite(sensor,LOW);

digitalWrite(led,LOW);

while(millis()<13000)

{

digitalWrite(led,HIGH);

delay(50);

digitalWrite(led,LOW);

delay(50);

}

digitalWrite(led,LOW);

digitalWrite(in1,LOW);

digitalWrite(in2,HIGH);

}

voidloop()

{

if(digitalRead(sensor)==HIGH)

{

digitalWrite(in1,HIGH);

digitalWrite(in2,LOW);

digitalWrite(led,HIGH);

delay(2000);

digitalWrite(in1,LOW);

digitalWrite(in2,LOW);

digitalWrite(in1,LOW);

digitalWrite(in2,HIGH);

digitalWrite(led,LOW);

delay(2000);

digitalWrite(in1,LOW);

digitalWrite(in2,LOW);

}

}


Circuit diagrams:





16 views0 comments

Recent Posts

See All