Using the Apache-2.0 ultrasonic sensor module, you can make ANYTHING touchless.

SUPPLIES AND COMPONENTS

Arduino UNO
Ultrasonic Sensor – HC-SR04 (Generic)
Relay Module (Generic)
Jumper wires (generic)
Breadboard (generic)

INTRODUCTION TO THE PROJECT

How to build anything that is touchless/non-contact:

No-Touch Doorbell

One of the best ways to get away from COVID-19 is by social distance. Staying at home is highly recommended. However, certain emergency appointments to some households are unavoidable. We look for the doorbell/calling bell button first when we arrive in front of a residence. After that, push the button again. This doorbell button, however, might propagate the infection in this particular scenario. When an infected person hits the button, the virus attaches to it, and when a non-infected person presses it, the infection spreads to them. Using a touchless doorbell can help us avoid this risk. Touchless doorbells can be added to existing doorbells.

Sanitizer for your hands

It can also be used in public hand sanitizers. Simply connect a 12v or 6v pump to its output, and when you place your hand below the ultrasonic sensor, the pump activates, causing the sanitizer to fall into your palm, sanitising and protecting your hand from the COVID19.

Code :

const int pingPin = 7;
//adjust this to set the min speed of wave gesture
const int waveBackWait = 5000;
//Range of detection from the sensor in cm
const int range = 7;
void setup() {
  pinMode(10, OUTPUT);
}
void loop() {
  long duration, cm;
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);
pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);
  
  cm = microsecondsToCentimeters(duration);
if(cm < range && cm > 1){
    for(int i=waveBackWait; i>0; i--){
      long new_duration, new_cm;
      pinMode(pingPin, OUTPUT);
      digitalWrite(pingPin, LOW);
      delayMicroseconds(2);
      digitalWrite(pingPin, HIGH);
      delayMicroseconds(5);
      digitalWrite(pingPin, LOW);
      pinMode(pingPin, INPUT);
      new_duration = pulseIn(pingPin, HIGH);
  
      new_cm = microsecondsToCentimeters(new_duration);
      if(new_cm < range && new_cm > 1){
        //ring the doorbell
        digitalWrite(10,HIGH);
        delay(500);
        digitalWrite(10,LOW);
      }
    }
  }
}
long microsecondsToCentimeters(long microseconds) {
  return microseconds / 29 / 2;
}

About the author

pondabrothers

View all posts

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *