Smart Contactless DoorBell

 Smart Contactless DoorBell  

Introduction

Here we are showing how to make a Smart Contactless DoorBell  .Smart doorbell systems are available in market but they are really costly.But is very simple to make at very low cost .So lets get started.

 Components Needed

* Arduino x 1

* Ultrasonic Sensor x 1

* Buzzer x 1 (you can also use normal door bell which can be controlled with a relay. )

 Circuit and Connection

 

here we connected the ultrasonic sensor 

* VCC to 5V

* GND to GND

* Trig to  D13

* Echo to D12 

and we connected the buzzer 

* Positive to D11 and Negative to GND

 Arduino Code

First we want to install arduino ide app ,Then copy the below code and paste it in the software and then click on the upload button .

 

 //  full documentation in https://dreamprojectsnow.blogspot.com/
// also visit our youtube channel https://youtu.be/I6nCexr3RSI

#define trigPin 13
#define echoPin 12
#define led 11

void setup()
{ Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(led, OUTPUT);

}

void loop()

{ long duration, distance;

digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
if (distance < 10)
{ digitalWrite(led,HIGH);
}
else {
digitalWrite(led,LOW);
}
delay(500);

}

 


 

Comments