rohit270798
Published

Contactless Door opening system

This project will prevent further spread of COVID-19 Virus. This is a contactless door opening or switch pressing system.

IntermediateFull instructions provided2,050
Contactless Door opening system

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Buzzer
Buzzer
×1
Jumper wires (generic)
Jumper wires (generic)
×1
9V 1A Switching Wall Power Supply
9V 1A Switching Wall Power Supply
×1

Software apps and online services

Tinkercad
Autodesk Tinkercad

Hand tools and fabrication machines

Storage Box, 1 Compartment
Storage Box, 1 Compartment

Story

Read more

Schematics

123_xb0WJuJl7l.JPG

Code

Untitled file

Arduino
int cm;
int time;
int e;
#include<Servo.h>;
Servo krish;
void setup()
{
  pinMode(13, OUTPUT);
  pinMode(12, INPUT);
  krish.attach(10);
  Serial.begin(9600);
  pinMode(11, OUTPUT);
}
//this will help people to open doors without touch
// price 500 for the arduino uno r3
// price 300 for the servo motor
// price 200 for the ultrasonic sensor
// price 121 for the breadboard
// total 1121
void loop()
{
  long Distance;
  digitalWrite(13, LOW);
  delayMicroseconds(2);
  digitalWrite(13, HIGH);
  delayMicroseconds(5);
  digitalWrite(13, LOW);
  pinMode(12, INPUT);
  time = pulseIn(12, HIGH);
  cm = q (time);
    if(cm < 100)
    {
      while(e<1)
      {
    krish.write (90);
    analogWrite(11,255);
    delay(1000);
    krish.write (0);
    digitalWrite(11,LOW);
    delay(2000);
    e += 1 ;
      }
    }
      else
      {
        e = 0;
      } 
  Serial.println(cm);
  delay(10);
}
 long q (long w)
{
return w /2/29;
}

Credits

Krish Chauhan

Posted by rohit270798

Comments