Introduction: Covid19 Project Contactless Doorbell With Arduino

About: pursuing Bachelors in Electronics and Communication at Chandigarh University

In this project, aiming at present crisis of Covid19 nobody wants to touch foreign objects. Keeping that in mind, I found this project, contact less doorbell using arduino.

I have used an ultrasonic sensor in this project which will calculate the distance of the object from the doorbell and a buzzer as doorbell when hand of the visitor is 7 or less than 7 cm away from the doorbell.

You can check my project : - Doorbell using pushbutton also.

Formula for calulating distance using ultrasonic sensor is: -

d = (s*t )/2

d= distance

s= speed of sound in air 340 m/s

t= time

Step 1: Components Required

In this project we require:-

1. Arduino -

2. Ultrasonic sensor -

3. buzzer -

4. Jumper wires -

Step 2: Circuit Schematic

Pin 13 --> Buzzer positive

Pin 7 --> trigger

Pin6 --> echo

5V --> Vcc of ultrasonic sensor

GND --> negative of buzzer, GND of ultrasonic senor

Step 3: Arduino Code

In this code we will take speed of light unit as 0.034cm/us because distance measured by ultrasonic sensor is in cm and wave sent by trigger is sent in us . at first, we will low trigger for 2 us to clear the trigger. If we take wave length greater than 3 mins then we will not get accurate measurement. We prefer wave time in us.

const int trigPin = 10;

const int echoPin = 9;

float duration, distance;

void setup() {

pinMode(13, OUTPUT);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);



void loop() {

digitalWrite(trigPin, LOW);


digitalWrite(trigPin, HIGH);


digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration*.0343)/2;

Serial.print("Distance: ");



digitalWrite(13, HIGH);