Social Distancing Reminder

Students Projects

Electronics

Arduino

Social Distancing Reminder

Social Distancing Reminder

Created By

  • Rishab Jha-03

    Rishabh Jha

    I am Rishab. I’m a student of 10th class. I love spending my time in making new and optimized programs in Robotics. I love playing Badminton and I love to study Mathematics, Chemistry & Physics. My dream is to excel in Robotics and help my country improve in Bionic Engineering.

About This Project

https://drive.google.com/file/d/1hOoOQ9lyPxblGcBaxsr9-aZIsq9Z5J-w/view?usp=sharing

Hello everyone, this is my first project on Arduino Project Hub.

My name is Krishna Srikanth, I am 9 years old. I am a student of MECHATRON ROBOTICS, New Delhi. I have completed a full fledged course on Arduino and electronics in just 2 months. I have always desired to become a scientist in ISRO, Perhaps i’m also taking these small steps at an early age.

In these tough times of COVID-19 Virus, I have made this super easy project Social Distancing Reminder which will help you maintain a distance of 1 metre with another person. This virus spreads rapidly with physical contact and air transmission upto 1 metre. This piezo electric buzzer will create a sound whenever the other person comes as close as 1 metre.

Looking forward to contribute more to this world by more innovative ideas.

Thanks!!

Stay Safe and Happy !

Components Required

  • Arduino UNO
  • Ultrasonic Sensor
  • SG90 Micro-Servo Motor
  • Buzzer
  • Jumper Wires
  • 9V 1A switching Wall Supply

Schematics

In this image all the components with the connections are given

Social Distancing Reminder

Code Of Project

int pingPin = 9;
int buzzer = 11;

void setup() {
  
  Serial.begin(9600);
  pinMode(buzzer, 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);

  Serial.print("Distance: ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();

  if(cm < 100) {
    digitalWrite(buzzer, HIGH);
  }
  else {
    digitalWrite(buzzer, LOW);
  }
  
  delay(100);
}


long microsecondsToCentimeters(long microseconds) {
  return microseconds / 29 / 2;
}
Share