Social Distance Detector

Published Jul 18, 2025
 2 hours to build
 Beginner

A Social Distance Detector using Arduino Uno, HC-SR04 ultrasonic sensor, 16x2 LCD, and buzzer that monitors the gap between individuals in real-time and alerts with sound and display if they come too close. This smart, low-cost system promotes safe distancing in public spaces like offices, schools, and events.

display image

Components Used

LCD 16x2 Display Module
LCD16x2 has two lines with 16 character in each line. LCD16x2 is generally used for printing values and string in embedded application.
1
Arduino Uno R3
1
HCSR04
The HCSR04 is an ultrasonic distance sensor commonly used in robotics and automation projects. It utilizes ultrasonic waves to measure distances between objects and provides accurate distance measurements within a specified range.
1
Buzzer, Piezo
https://robu.in/product/5v-active-electromagnetic-buzzer-pack-of-5/?gad_source=4&gclid=CjwKCAjw7s20BhBFEiwABVIMrRuFMxtmyp1OxR3D57NF3N_JDJ1xE4fl8by4kvqPK55El3BUbfvxnBoCqA8QAvD_BwE
1
Description

In the wake of public health concerns like COVID-19, maintaining proper social distancing became a critical preventive measure. This project presents a Social Distance Detector that helps individuals keep a safe distance using simple embedded systems.

The system uses an HC-SR04 Ultrasonic Sensor to continuously measure the distance between people. If the detected distance is less than a predefined threshold (e.g., 1 meter), the system immediately triggers an alert through a buzzer and displays a warning on a 16x2 LCD display.

This low-cost, real-time solution can be used at entry gates, offices, public transport stations, and classrooms to promote safe social interactions.

🛠️ Components Used:

  • Arduino Uno – Brain of the system
  • HC-SR04 Ultrasonic Sensor – Measures the distance between people
  • 16x2 LCD Display (with I2C if needed) – Displays the measured distance and warning messages
  • Buzzer – Provides an audible alert when social distancing is violated
  • Breadboard and Jumper Wires – For connections
  • Power Source (USB or Battery)

💡 How It Works:

Distance Measurement: The ultrasonic sensor emits ultrasonic waves and receives the echo reflected from the nearby person.

Distance Calculation: Arduino calculates the time taken for the echo and converts it into distance (in cm).

Alert System:

If the distance ≥ 100 cm → "Safe Distance" is displayed.

If the distance < 100 cm → Buzzer beeps and "Too Close! Maintain Distance!" is shown on the LCD.

 

 

📺 Watch it in Action!

See the live demo of our Social Distance Detector project on YouTube:

👉https://youtube.com/shorts/2F97WHw5lDE?feature=shared

This video demonstrates how the system detects distances using the ultrasonic sensor and provides instant feedback through the buzzer and 16x2 LCD display. When someone comes closer than 100 cm, a warning is triggered — making it an ideal solution for social distancing in public areas.

Codes

Downloads

Circuit_diagram Download
Project_Image Download

Institute / Organization

LD College of Engineering
Comments
Ad