Smart Touch-less Doorbell :
The first COVID-19 case was first reported in January and after months it is in Lakhs all over the country. The outbreak has been declared an epidemic. According to the World Health Organization maintaining social distancing and keep yourself hygiene are the only ways to prevent contamination.
But in this extreme situation, we can't avoid visiting anyone's place. In this scenario, we will use the doorbell but in this case, there is a high risk of contaminating the virus.
This problem can be solved by making a touch-less doorbell where you can put your hand in front of the sensor and a buzzer sound will be generated from inside.
Step 1: Components Needed1. HC-SR04
3.Buzzer
5. Wires
Step 2: HC-SR04 Obstacle avoidance sensorHC-SR04 is one of the popular ultrasonic sensors. It is commonly used to measure distance nearby ranges, but it was actually to detect the presence of nearby objects without any physical contact.
Check https://www.arduinoforbeginners.com/hc-sr04/ to know more about this sensor and how it works.
First, Connect GND to Arduino GND
Second, Connect Sensor Vcc+ to Arduino +5V
Third, Connect Echo to Arduino PIN 9
Then, Connect Trigger to Arduino PIN 10
Lastly, connect the buzzer to PIN 6
Step 4: Code/*
'DISTANCE SENSOR:
Vcc goes to 5V on arduino
Gnd goes to ground pin on arduino.
Trigger goes to pin 10 on the arduino.
Echo goes to pin 9 on the arduino.
BUZZER:
Positive leg goes to pin 6 on the arduino.
Negative leg goes to GND on arduino.
*/
int trigPin = 10;
int echoPin = 9;
int bell=6
void setup() {
digitalWrite(bell, LOW);
pinMode(trigPin, OUTPUT);
pinMode(bell,OUTPUT)
pinMode(echoPin, INPUT);
delay(100);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
int duration = pulseIn(echoPin, HIGH);
delay(50);
if (duration <= 600){
digitalWrite(bell, HIGH);
}
else{
digitalWrite(bell, LOW);
}
}
To know more about Arduino sensors
Comments