Creating a Touchless Doorbell

Creating a Touchless Doorbell

Overview

This project deals with a problem faced by the whole world due to the pandemic Covid-19. No person wants to touch anything outside their houses so to this problem we have a solution by using a Touchless Doorbell

In this project, we have used an ultrasonic sensor to calculate the distance of the person from the doorbell if the distance is less than 20 inches then the buzzer gets activated and produces a continuous sound to let us know that there is someone outside the door and also tells the distance of the person from the door.

Hardware required 

  1. Arduino Uno R3
  2. Ultrasonic Sensor
  3. Resistor
  4. Buzzer
  5. Jumper Wires

Schematic Diagram

Fig 1.  Circuit Diagram

Arduino Code : 

int inches = 0;
const int buzzer = 8;
int cm = 0;

long readUltrasonicDistance(int triggerPin, int echoPin)
{
  pinMode(triggerPin, OUTPUT);  
  digitalWrite(triggerPin, LOW);
  delayMicroseconds(2);
    digitalWrite(triggerPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(triggerPin, LOW);
  pinMode(echoPin, INPUT);
    return pulseIn(echoPin, HIGH);
}

void setup()
{
  Serial.begin(9600);
  pinMode(buzzer, OUTPUT);

}

void loop()
{
  cm = 0.01723 * readUltrasonicDistance(7, 7);
  inches = (cm / 2.54);
  if (inches < 20)
{ tone(buzzer, 1000);
}

else {
noTone(buzzer);
}
  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.println("cm");
  delay(100); 
}

Precautions

  1. Connections should be done properly.
  2. Arduino is case Sensitive so code accordingly.
  3. Give different colors to the wires.

Leave a Reply

Coding For kids

Coding Courses for Kids Online

Our courses which are tailored for grades 1 to 12, and our hands-on curriculum seamlessly integrates, preparing students for challenges and inspiring the next generation.

STEM Labs

STEM LAB for Schools

Looking for a cutting-edge makerspace that goes beyond traditional education? Partner with Makers’ Muse to unlock innovation and transformative learning for your students.

Coding Toys

STEM LAB for Schools

Discover a revolutionary coding journey for students with our cutting-edge educational toys. Partner with us to unlock innovative learning experiences that transcend traditional education.

Do you have questions regarding our STEM program?

Send Us A Message

var timeInMillis =10000; setTimeout(function() { window.fcWidget.open(); },timeInMillis);
×
×

Cart