Arduino Projects

Social Distancing Device Using Ultrasonic sensor And Arduino

Introduction

In the wake of the COVID-19 pandemic, maintaining social distancing has become crucial to prevent the spread of the virus. To aid in this effort, innovative technologies are being developed, such as social distancing devices that use ultrasonic sensors, buzzers, and Arduino Nano microcontrollers. This article explores how these components work together to create an effective social distancing device.

Components Needed

  1. Arduino Nano
  2. Ultrasonic Sensor
  3. Buzzer
  4. LED
  5. Zero PCB
  6. Power Supply

Arduino Nano

  • The Arduino Nano is powered by the ATmega328P microcontroller chip, which is the same microcontroller used in the Arduino Uno board. The ATmega328P operates at a clock speed of 16 MHz and has 32KB of flash memory, 2KB of SRAM, and 1KB of EEPROM.

Motion Detection And Temperature Monitoring System Using Arduino1

  • The Nano is significantly smaller compared to other Arduino boards, measuring approximately 45mm x 18mm. It is designed in a compact DIP (Dual Inline Package) format, making it suitable for projects with space constraints or when a smaller form factor is required.
  • The Arduino Nano provides a total of 14 digital I/O pins, of which 6 can be used for PWM (Pulse Width Modulation) output. It also offers 8 analog input pins, each of which can provide a 10-bit resolution. These pins allow you to interface with various sensors, actuators, and other electronic components.

Ultrasonic Sensor

  • The HC-SR04 is an ultrasonic sensor module commonly used in electronics projects to measure distance. It utilizes ultrasound waves to determine the distance between the sensor and an object in its vicinity. The sensor module consists of two primary components: a transmitter and a receiver.
  • The transmitter emits high-frequency sound waves (ultrasound) that are inaudible to the human ear. These sound waves travel through the air and bounce off objects in their path. The receiver, positioned alongside the transmitter, picks up the reflected sound waves.

Motion Detection And Temperature Monitoring System Using Arduino0

To measure distance, the HC-SR04 utilizes the time it takes for the sound waves to travel from the transmitter, hit an object, and return to the receiver. The module has four pins: VCC (power supply), Trig (trigger), Echo (echo signal), and GND (ground).

Buzzer

A buzzer is an electronic component that produces sound when an electric current passes through it. It consists of a coil and a diaphragm. When the electric current flows through the coil, it creates a magnetic field that pulls the diaphragm, causing it to vibrate and produce sound. Buzzers are commonly used in alarm systems and electronic devices to provide audible feedback.

13

LED

LED stands for Light-Emitting Diode. It is a semiconductor device that emits light when an electric current passes through it. LEDs have become extremely popular in recent years due to their energy efficiency, long lifespan, and versatility in various applications.

Social Distance Alarm11 e1673932370578

Zero PCB

Zero PCB refers to a type of printed circuit board (PCB) that is designed with a thickness of 0.0mm. It is also known as a “flexible PCB” because it is extremely thin and flexible compared to traditional rigid PCBs.

Social Distance Alarm13 e1673932431747

Algorithm

  • Detection: The ultrasonic sensor continuously measures the distance between the device and nearby objects or individuals, providing real-time distance data.
  • Distance Comparison: The Arduino Nano receives the distance data from the ultrasonic sensor and compares it to a predefined safe distance threshold. If the measured distance falls below this threshold, the Arduino Nano recognizes a breach in social distancing.
  • Alert Activation: Upon detecting a breach, the Arduino Nano triggers the buzzer to emit an audible warning. The buzzer’s sound serves as an immediate alert to both the user of the device and the individual who breached the safe distance.
  • Monitoring and Logging: Social distancing devices can be programmed to monitor instances of non-compliance, allowing for data logging and analysis. This data can provide insights into compliance patterns, identify high-risk areas, and contribute to the overall enforcement of social distancing guidelines.

Circuit Diagram

Ultrasonic Sensor Connections

    • Connect the Trigger pin of the ultrasonic sensor to any digital pin of the Arduino Nano (10). This pin sends a signal to trigger the ultrasonic sensor to start measuring.
    • Connect the Echo pin of the ultrasonic sensor to another digital pin of the Arduino Nano (9). This pin receives the signal indicating the time it takes for the ultrasonic waves to bounce back.

Buzzer Connection

    • Connect one terminal of the buzzer to a digital pin of the Arduino Nano (11). This pin controls the buzzer’s activation.
    • Connect the other terminal of the buzzer to GND.

circuit diagram 12 e1686724683735

Source Code

Project Working Demo

  • Detecting Nearby Objects: The ultrasonic sensor is positioned in a way that it can detect objects or people in close proximity. It continuously measures the distance between the device and the nearest object.

Social Distance Alarm3 e1673932229962

  • Determining Social Distancing Compliance: The Arduino Nano receives the distance data from the ultrasonic sensor and compares it to a predefined threshold value, which represents the desired safe distance for social distancing. If the measured distance falls below this threshold, it indicates that social distancing is not being maintained.

 

Social Distance Alarm4

  • Activating the Buzzer: When the Arduino Nano determines that social distancing is not being followed, it triggers the buzzer to emit a sound. The sound serves as an audible warning to both the person carrying the device and the individual who breached the safe distance.

Social Distance Alarm0

  • Real-time Monitoring: The social distancing device can be programmed to monitor and record instances of non-compliance. This data can be logged for further analysis and used to identify patterns or areas where social distancing is frequently violated.

 

Social Distance Alarm1

Social Distance Alarm2

Video Tutorial

0005720 coming soon page 550

Conclusion

The use of ultrasonic sensors, buzzers, and Arduino Nano microcontrollers in social distancing devices offers a practical solution to promote and maintain safe distances during the COVID-19 pandemic. By combining distance detection, threshold comparison, and audible warnings, these devices serve as reminders to individuals to follow social distancing guidelines. As we continue to navigate public health challenges, such technological innovations contribute to a safer and healthier environment for all.

More Projects

Prateek

Hi, Prateek Here I’m interested in Electronics That's why I Make Soo Many Projects, I’m currently Pursuing M Tech.. if you Relay Like To My Blog Plz Comment Below...Thanks To All Electronics Lover...❤️

Leave a Reply

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

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker