Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Project Name: New Social Distance Indicator and Alarming system.

Methodology
Millions of people are dying throughout the world as a result of the Covid-19 pandemic. It has
been claimed that keeping a distance of around 2 meters between yourself and another person
reduces the transmission of most flu virus strains, including COVID-19. In reality, this implies
that staying away from other people can help to halt the spread of contagious illnesses. One of
the non-pharmaceutical infection control strategies that can stop or limit the spread of a highly
infectious disease is social distance.
Our idea is based on a New Social Distance Indicator and Alarming System that may be
extremely useful in preserving social distance in the face of a pandemic. As a result, we decided
to use Arduino to create a social distance alert. It's also known as a "social distancing warning."
Most of us have been unable to acquire the necessary equipment for the project due to the
lockdown that has lasted for the most of the semester. This is owing to the equipment being
unavailable in other places other than Dhaka. In addition, owing to the shutdown, internet
services were inaccessible, and we were unable to obtain the necessary equipment. As a result,
we used simulation software to complete the project. As a final project for our university course
(CSe212lab), we had to implement this idea. We divided into three groups to do this project,
and we gathered data and information for it both online and through our general knowledge, as
well as by discussing it with one another. The system is implemented using an Arduino UNO,
Ultrasonic sensor, NeoPixel 12 RGB LEDs Ring, and Buzzer in this project. It is implemented
using the Tinkercad text programming environment.

Findings/results
Here's an Arduino-based social distance alert sensor that may be used in the event of a Covid-
19 pandemic or other illness epidemic. It's not always possible to maintain the appropriate
social or physical distance. When we're outside, we forget to keep our distance as soon as we
get caught up in our everyday activities.
This mechanism warns us if you approach someone too closely from the front, rear, right, or
left. It detects the minimum safe distance using four ultrasonic distance sensors linked to an
Arduino Uno and warns you with a siren. Figure 1 shows a TinkerCad representation of this
project.
Figure 1: Social Distance Indicator and Alarming system in TinkerCad

The circuit diagram of the social distancing alarm system is shown in Fig. 2. It is built around
Arduino Uno, four HC-SR04 ultrasonic sensors, and a few other components.
Sonar is used by the HC-SR04 ultrasonic sensor to calculate distance from an
item (or humans as in this case). In a simple-to-use design, it provides
outstanding non-contact range detection with high accuracy and consistent
readings. It has a range of 2cm to 400cm and a 5mm accuracy. An ultrasonic
transmitter, receiver, and control circuit make up the module. Figure 3
depicts the HC-SR04 ultrasonic sensor.It has the following four pins, namely:

1. VCC: +5V DC
2. Trig: Trigger (input)
3. Echo: Output
4. GND: Ground
It can be easily interfaced with Arduino Uno.

The HC-SR04 has a straightforward operation. The transmitter delivers a high-frequency sound
signal at 40kHz when the sensor is activated (a brief 10s pulse to the trigger input pin 2 on the
Arduino Uno board). The broadcast signal is picked up by the receiver when it bounces back off
a nearby object.

The output of the HC-SR04 (echo-pin 3) is a pulse whose width is proportionate to the object's
distance. The pulseIn( ) function in the code may be used to compute the pulse width. The
Arduino software estimates the object's distance in all four directions.

Four ultrasonic sensors are positioned in four directions and linked to an Arduino Uno in this
project. Each sensor measures the object's distance in all four directions and compares it to the
program's distance safety value. An alert sound is created when the user gets too close to
another person in any of the directions.
Pin connections of Arduino with components are shown in the Table.

Arduino Uno pins Connected to sensors


5V pin Connected to Vcc pins of HC-SR04
Pin 2 HC-SR04-1 Trigger pin Ultrasonic Sensor (US1)
Pin 3 HC-SR04-1 Echo pin Ultrasonic Sensor (US1)
Pin 4 HC-SR04-2 Trigger pin Ultrasonic Sensor (US2)
Pin 5 HC-SR04-2 Echo pin Ultrasonic Sensor (US2)
Pin 6 HC-SR04-3 Trigger pin Ultrasonic Sensor (US3)
Pin 7 HC-SR04-3 Echo pin Ultrasonic Sensor (US3)
Pin 8 HC-SR04-4 Trigger pin Ultrasonic Sensor (US4)
Pin 9 HC-SR04-5 Echo pin Ultrasonic Sensor (US2)
Pin 13 +Ve pin of PZ1 Piezo Buzzer (PZ1)
GND -Ve pin of PZ1 and GND pin of HC-SR04

Table: Arduino Uno Pin Connections with Components

The pin numbers are defined first in the code. Each sensor requires trigger and echo pins. To
connect to the Arduino board, we'll need a total of eight pins. Because the buzzer is utilized, the
buzzer pin must be defined in the code. For each sensor, two variables are required: the
sensor's received duration and the distance to be computed from the pulse duration.

Set the four sensors' input and output pins, as well as the buzzer's. Set the serial
communication to monitor the HC-SR04 sensors' operation. Start the loop by setting the
sensor's trigger pin to high for ten microseconds, then reading the sensor's output using the
PulseIn( ) function and calculating the distance in centimetres.
Perform logical ‘or’ operation. Next, use an ‘if’ statement to compare with the safe distance and
turn on the buzzer if the distance crosses the threshold limit.
Make that the source code is uploaded to the Arduino board using the Arduino IDE before
constructing the circuit.

HC-SR04 sensor, as well as the Arduino, is in the directions, as indicated in the prototype (Fig.
1). A 9V PP3 battery is attached to the Arduino's DC connector to power the circuit.
The software uses a safe distance of 30cm for testing reasons. It can be altered according to the
rules.
We may utilize smaller ultrasonic sensor modules and replace the Arduino Uno with an Arduino
Nano board to make the circuit less bulky.

You might also like