Alert Device for Social Distancing

Abstract

Social distancing among people is vital in minimizing spread of COVID-19 within community and can be effective in flattening the outbreak. This research work focuses on developing a close contact proximity detection system among smartphone users, particularly of COVID-19 patient, using Bluetooth signal to identify and analyze close contact proximity and social distancing from other anonymous smartphone users in their surroundings. Covering a physical space of six feet, a mandatory safety measure in shopping centers, schools, and other crowded areas, is a social solution advocated by World Health Organization (WHO) officials in this COVID-19. Everyone is concerned about their safety in the COVID-19 environment, so we came up with the concept of producing this new equipment. Most of the time, our attention is drawn to those in front of us and to our sides, but we are unable to keep track of those behind us. The major goal of this project is to keep individuals at a safe distance from one another. PIR sensor is used in this proposed work. Why did the World Health Organization (WHO) put 6 feet as a social distancing? When someone coughs or sneezes, small droplets are spread from the cough or sneeze. If you are in close proximity, you can breathe in those droplets, which may contain the COVID-19 virus, according to the World Health Organization. Vanderbilt University infectious disease expert Dr. William Schaffner said the “6 feet distance” rule comes from studies of respiratory physiology. Schaffner explains that even “without a cough or sneeze, the exhaled air mixes with the surrounding air within a distance of 3 to 6 feet, which is known as the breathing zone.” Schaffner continues: “If you are standing 3 to 6 feet away from me, you may inhale droplets that spread through coughing or sneezing. Of course, if I am infected with the virus, these droplets will contain the virus.”

Share and Cite:

AbuAli, A. (2024) Alert Device for Social Distancing. Communications and Network, 16, 31-50. doi: 10.4236/cn.2024.162002.

1. General Introduction

1.1. Introduction

Social distancing is one of the best ways to reduce and avoid COVID-19. It is better to stay at home but we can’t avoid some emergencies. This project is to overcome from COVID-19 pandemic. When PIR sensor detects the motion, the ultrasonic sensor is used to check the pulses to compute the distance between the obstacle and a person. This is terminated by converting the pulse back to the distance it takes. After measuring the distance, the information is coded and sent, and the LED turns on if the distance is less than six feet and turns off when it is more than six feet, social distancing is a relatively non-invasive measure that seeks to prevent transmission of the airborne virus by maintaining a set distance between and among people. While using guesswork to maintain social distancing is possible in informal situations, employing technology to implement strict social distancing is the preferred method in a busy workplace. It provides an automated “always-on” system that protects all workers while remaining as unobtrusive as possible to the user.

The phrase “new normal” is now used to describe the precautions that society needs to consider to limit or prevent the threat of communicable diseases like COVID-19. Many scientists believe the outbreak of another virus is inevitable at some point in the future; nobody can say with any certainty how severe or prevalent it may be. The new normal, therefore, is to have precautionary measures ready for deployment. For viruses that attack the respiratory system, such as COVID-19, maintaining a physical distance is an effective way of preventing its spread, and contact tracing is an effective way of containing the spread after identifying an outbreak.

In many offices, factories, and other workplaces, where people need to be mobile to carry out their work activities, maintaining a safe physical distance becomes a dynamic issue because the proximity between workers is constantly changing. Some workers will move faster than others, and natural traffic bottlenecks will occur within workplaces that lead to closer levels of physical proximity than others. Even the time of day will become more relevant in the context of maintaining recommended distances between co-workers and visitors and tracking those contacts that do happen.

1.2. Literature Review

During the COVID-19 pandemic, one of the health guidelines is to keep an interaction distance of 1 to 2 meters. This was done in an attempt to stop the Coronavirus from spreading. On the other hand, whether consciously or not, this health routine practice is frequently omitted. Maintaining distance, according to the mechanism of the Coronavirus propagating in the form of droplets that come out while communicating, sneezing, or coughing, can be the best attempt to minimize the virus’s transmission. As a result, the availability of a simple, accurate, and user-friendly physical distance alert system could be a solution for putting this health plan into action. A physical distancing warning prototype based on a distance sensor and a microprocessor in the form were decided to create an identity card. The development of this system involves several processes, including creating the instrumentation system and testing the system’s performance. Variations in the distance and angle of the objects are used to test the system’s performance. The measurements reveal that the system can detect objects up to a distance of 2.8 m and an angle of a distance of 1 m in front of the sensor. For objects on the left and right sides of the sensor, measurements were made utilizing different angles of objects. In addition, when the object’s distance exceeds the permissible distance, a warning alarm will sound as per Figure 1.

Using a proximity sensor ultrasonic HC-SR04 (Figure 2) and a microcontroller Arduino Nano, a physical distancing automatic alert system has been constructed. As a proximity sensor, an ultrasonic sensor with a receiver and transmitter was used. The transmitter would send out high-frequency sound waves at a speed of roughly 340 meters per second. When a wave collides with an object, it is reflected and received by the receiver. As stated in the equation, the distance between the sensor and the object is computed based on the required time for the wave to travel between transmission and reception by the receiver [1].

Advantage: The physical distance alarm system was created using an ultrasonic sensor. This system has a decent response time in identifying things up to 2.8 meters in front of it. If the object’s position is less than the usual distance of 1 m, the system can issue a warning.

Disadvantage: The system cannot detect human only

Figure 1. System testing mechanism (a) in front of the sensor; (b) at an angle with the sensor.

Figure 2. Sensor ultrasonic HC-SR04.

COVID-19’s Social Distancing Alarm Device (A Device That Assists Us in Maintaining Social Distancing/Social Distancing Helper/Social Distance Detector) One of the most effective methods for escaping COVID-19 is social separation. We are all following social distancing and keeping ourselves safe throughout this pandemic. they created a ‘Social Distancing Alarm Device for COVID-19’ with Ultrasonic Sensor HC-SR04 (Generic), Node MCU Microcontroller Board, Buzzer, 5 V DC SMPS, 4 V Rechargeable Battery, IN4007 Diode, Female/Female Jumper Wires, Male/Female Socket,2 Pin Plug, Switch Box, Mini Switch, C++ Programming to control Microcontroller. It will come in handy throughout the difficult time of coronavirus infection in this Device when the distance between you and another person is less than or equal to 1 meter the Buzzer and LED will indicate you have to maintain social distancing. If the space is greater than 1 meter then the Buzzer and LED will automatically turn off [2].

Figure 3. Social distancing alarm device.

Disadvantage

It is big and unsuitable for wearing and the system cannot detect human only.

When the devices are within 6 feet of each other, the Social Distancing Wearable Device vibrates and emits an LED notification. Wear it as a wristband, a pendant, or just keep it in your pocket. This Social Distancing Reminder Is a Fantastic Solution for Practicing Social Distancing At Work, Home, School, Gatherings, and Public Places. Wearable Bluetooth Low Energy (BLE) and RFID devices are designed to control the distance between people and prevent people from Getting Too Close to Each Other. When another device gets too close, the product will generate a vibration/red LED alert [3].

Figure 4. Social distancing wearable device.

Advantage

  • Social distancing wearable device alerts you with vibrate and LED notification when the devices come within 6 feet of each other

  • Rechargeable with a 7-day battery life.

  • Whether you use it with or without the app, easily turn on and off, and customize functions and data using the app.

Disadvantage

To use it, it must be everybody has the same watch.

2. System Design

2.1. A Passive Infrared Sensor HC-SR501

An electronic sensor Figure 5 that measures the infrared light radiations from the object in the field. It was mostly used in the PIR-based motion detector. This sensor is commonly used in the security alarms and automated lighting applications. The PIR Sensor allows you to realize motion, and this sensor is used to detect the human motion and whether the person is moved out of range. For this reason, the main appliances and equipment are LED in homes or for businesses. They are mostly referred to as “Passive infrared”, “pyroelectric”, or the “IR motion” sensors. The PIR Sensor is made up of pyroelectric sensor (which you can see in (Figure 2. PIR Sensor) it is a round metal with a rectangular crystal in the center, which is used to detect the level of infrared radiation. Everything in it emits the low level of radiation, and the warmer it is, and it more radiation is emitted. And this sensor is the motion detector and it was divided into the two parts. The reason for this is we have to finalize the speed change and not the average IR level. In these two halves are removed so it easily cancels each other. If one halves is more or less than the IR radiation then the other output will swing higher or lower [4].

Figure 5. Passive infrared sensor HC-SR501.

HC-SR501 Specifications (Table 1 & Figure 6)

Table 1. HC-SR5-1 specifications.

Operating voltage

4.5 - 20 V

Quiescent current

50 μA

Level output

HIGH 3.3 V/LOW 0 V

Trigger

L single trigger/H repeating trigger

Delay time

3 - 300 s

Blocking time

1.5 s (default)

Measuring range

7 m maximum

Measuring angle

<110˚ cone angle

Fresnel lens dimensions

15 mm × 23 mm diameter

Operating temperature

−15 - 70˚C

Cost

3 JD

Figure 6. HC-SR501.

Adjusting the HC-SR501

On the back of the board, you will and two potentiometers and a jumper which you can use to adjust several parameters:

Sensitivity (range) adjustment

The HC-SR501 has a maximum sensing distance (detection range) of 7 meters. You can adjust the sensing distance by rotating the sensitivity potentiometer CW or CCW (see picture above). Rotating the potentiometer clockwise increases the sensing distance to a maximum of 7 meters. Rotating it counterclockwise decreases the sensing distance to a minimum of 3 meters.

Time-delay adjustment (Tx)

This potentiometer can be used to adjust the time that the output stays high after motion is detected. At a minimum, the delay is 3 seconds and at a maximum, it is 300 seconds or 5 minutes. Turn the potentiometer clockwise to increase the delay and counterclockwise to decrease the delay.

Trigger selection jumper

The (yellow) jumper can be used to select one of the two trigger modes. It can be set to either L (single trigger) or H (repeating trigger):

Single trigger—The output will turn HIGH as soon as motion is detected. It will stay HIGH for the time set by the potentiometer. Any movement during this period is not processed and does not restart the timer.

Repeating trigger—Every time motion is detected, the delay timer is restarted.

Connecting HC-SR501 PIR motion sensor to Arduino UNO as per Table 2.

Table 2. Input and output of HC-SR501 PIR motion sensor.

HC-SR501 PIR Motion Sensor

Arduino

VCC

5 V

OUT

Pin 2

GND

GND

2.2. The HC-SR04 Ultrasonic (US) Sensor

The Ultrasonic transmitter sends out an ultrasonic wave, which travels through the air and is reflected back toward the sensor when it encounters any material. The Ultrasonic receiver module detects this reflected wave, as illustrated in the diagram below Figure 7 [5].

Figure 7. HC-SR04 ultrasonic (US) sensor.

HC-SR04 Ultrasonic Sensor-Working (Table 3 & Figure 8)

The HC-SR04 Ultrasonic (US) sensor is a 4-pin module, whose pin names are Vcc, Trigger, Echo and Ground respectively. This sensor is a very popular sensor used in many applications where measuring distance or sensing objects are required. The module has two eyes like projects in the front which form the Ultrasonic transmitter and Receiver. The sensor works with the simple high school formula that

Distance = Speed × Time

Now, to calculate the distance using the above formulae, we should know the Speed and time. Since we are using the Ultrasonic wave we know the universal speed of US wave at room conditions which is 330 m/s. The circuitry built on the module will calculate the time taken for the US wave to come back and turn on the echo pin high for that same particular amount of time, this way we can also know the time taken. Now simply calculate the distance using a microcontroller or microprocessor

Table 3. HC-SR04 ultrasonic sensor guide.

Pin Number

Pin Name

Description

1

Vcc

The Vcc pin powers the sensor, typically with +5 V

2

Trigger

Trigger pin is an Input pin. This pin has to be kept high for 10us to initialize measurement by sending US wave.

3

Echo

Echo pin is an Output pin. This pin goes high for a period of time which will be equal to the time taken for the US wave to return back to the sensor.

4

Ground

This pin is connected to the Ground of the system.

Figure 8. HC-SR04 ultrasonic sensor.

2.3. HC-SR04 Sensor Features

Operating voltage: +5 V

Theoretical Measuring Distance: 2 cm to 450 cm

Practical Measuring Distance: 2 cm to 80 cm

Accuracy: 3 mm

Measuring angle covered: <15˚

Operating Current: <15 mA

Operating Frequency: 40 Hz

How to use the HC-SR04 Ultrasonic Sensor (Figure 9)

HC-SR04 distance sensor is commonly used with both microcontroller and microprocessor platforms like Arduino, ARM, PIC, Raspberry Pie etc. The following guide is universal since it has to be followed irrespective of the type of computational device used.

Power the Sensor using a regulated +5 V through the Vcc and Ground pins of the sensor. The current consumed by the sensor is less than 15 mA and hence can be directly powered by the onboard 5 V pins (If available). The Trigger and the Echo pins are both I/O pins and hence they can be connected to I/O pins of the microcontroller. To start the measurement, the trigger pin has to be made high for 10uS and then turned off. This action will trigger an ultrasonic wave at frequency of 40 Hz from the transmitter and the receiver will wait for the wave to return. Once the wave is returned after it gets reflected by any object the Echo pin goes high for a particular amount of time which will be equal to the time taken for the wave to return back to the sensor [6].

Figure 9. HC-SR04 ultrasonic sensor (Timing Diagram).

The amount of time during which the Echo pin stays high is measured by the MCU/MPU as it gives the information about the time taken for the wave to return back to the Sensor. Using this information, the distance is measured as explained in the above heading.

For example, if the item is 20 cm away from the sensor and the sound speed is 340 m/s (0.034 cm/s), the sound wave must travel for approximately 588 microseconds as per Figure 10. The number you’ll obtain from the Echo pin, though, will be double that because the sound wave must travel forward and backward. To calculate the distance in cm, multiply the received travel time value from the echo pin by 0.034 and divide by two.

Figure 10. Example.

Application:

- Used to avoid and detect obstacles with robots like biped robot, obstacle avoider robot, path finding robot etc.

- Used to measure the distance within a wide range of 2 cm to 400 cm

- Can be used to map the objects surrounding the sensor by rotating it

- Depth of certain places like wells, pits etc.

- Can be measured since the waves can penetrate through water

2.4. Arduino Nano (Figure 11)

The Arduino Nano is a small microcontroller, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.x). It lacks only a DC power jack, and works with a Mini-B USB cable instead of a standard one [7].

Figure 11. Arduino nano.

2.5. 186,505 V 2200 mAh Lithium Battery Pack (Figure 12)

Safety and cost-effectiveness

More than 500 charge and discharge cycles are possible with this battery cell. This makes it very cost-effective, and it has a life expectancy that is comparable to that of the device in which it is utilized.

Long cycle life

Provide a lengthy storage life with little constraints. It provides trouble-free charging after extended storage, allowing it to be used in a variety of applications

Applications

Electric toy, power tool, electric back-up.

Figure 12. 186,505 V 2200 mAh Lithium battery pack.

2.6. 433 mHz RF Wireless Transmitter and Receiver

This is FS1000A 433 mHz Tx RF Radio Module. This RF module comprises an RF Transmitter Figure 13 and an RF Receiver Figure 14. The transmitter/receiver (Tx/Rx) pair operates at a frequency of 433 MHz. An RF transmitter receives serial data and transmits it wirelessly through RF through its antenna connected at pin4.

The transmission occurs at the rate of 1 Kbps - 10 Kbps. The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter. This low-cost RF transmitter can be used to transmit signals up to 100 meters (the antenna design, working environment, and supply voltage will seriously impact the effective distance). It’s good for a short distance, battery power device development. 433 MHz is the operating frequency for transmitter and receiver pair.

Figure 13. RF wireless transmitter.

Features:

1) Wide input supply (2.5 V to 12 V)

2) Easy to integrate (V+, GND, and Data)

3) The device in deep sleep mode when Data pin is grounded

4) Very small dimension.

Figure 14. RF wireless receiver.

Figure 15 & Figure 16 show the block diagram and flow chart of the system.

Figure 15. It shows the block diagram.

3. Implementation

3.1. How It Works

Utilized the HC-SR501 human body infrared sensor module for this project. Two triggering techniques are available for the HC-SR501 human body infrared sensor module. The first is non-repeatable triggering, which means that after the sensor has output a high level and the wait time has passed, the output will automatically change from high to low. Simply put, it will produce a high level when it detects human movement, but it will stop sensing after the timer on its delay adjustment button has expired, even if a person moves in front of it. The HC-SR501 features a 0.2-second lockout period during which it will not work. After the lockout period is complete, it will If a human body is moving within the sensor’s sensing range during the delay period, the sensor’s output will remain high until the person leaves. Reduce the high level to a low one (the sensing module will automatically extend a delay time period after detecting every activity of the human body, and take the time of the last activity as the starting point of the delay time). Simply said, the HC-SR501 will always produce a high level if you keep moving in front of the human infrared sensor module continue to sense. A repeating trigger mode is also available.

Figure 16. System flow chart.

This is the 12 LED ring, a small chainable 85 mm outer diameter board equipped with 5050 WS2812 RGB LEDs. The WS2812s are each addressable. The driver chip is located inside the LED. Each Stick has ~18 mA constant current drive so the color will be very consistent even if the voltage varies, and requires 5 V. Every ring is equipped with a single data line with a very timing-specific protocol requiring a real-time microcontroller with an 8 MHz or faster processor such as an AVR, Arduino, PIC, embed, etc. There are solder pads on the back for connecting wires or breadboard pins and two mounting holes for securing this board to many different surfaces.

Specifications

IC Chip: WS2812B

Supply Voltage: 5 (V)

Color: RGB

No of Light: 12

Features

The control circuit and the LED share the only power source. The control circuit and RGB chip are integrated into a package of 5050 components, forming a complete control of pixel points. Built-in signal reshaping circuit, after wave reshaping to the next driver, ensures wave-form distortion does not accumulate. Built-in electric reset circuit and power lost reset circuit.

Each pixel of the three primary colors can achieve 256 brightness levels, or 16 M colors full-color display, and scan frequency not less than 400 Hz/s Cascading port transmission signal by a single line [8].

For any two points, the distance is more than 5 m transmission signal without any increase circuit.

When the refresh rate is 30 fps (frames per second), the cascade number is not less than 1024 points.

Send data at speeds of 800 Kbps.

The color of the light was highly consistent

Full-color module, Full-color soft lights a lamp strip.

LED decorative lighting, Indoor/outdoor LED video irregular screen.

Package includes

1*12 Bit ws2812 5050 RGB LED Small Ring with Fashion Light & Buzzer as shown in Figure 17.

Figure 17. 12 Bit ws2812 5050 RGB LED small ring.

3.2. Connect between Component (Figure 18 & Figure 19)

Figure 18. Components connection.

Figure 19. Components connection.

3.3. IOT Construction

The ESP8266 WiFi Module is a self-contained SOC with integrated TCP/IP protocol stack that can give any microcontroller access to your WiFi network. The ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor.

The module has a wireless WiFi transceiver operating in an unlicensed frequency range of 2400 - 2484 MHz in the IEEE 802.11 b/g/n standard, with support for TCP/IP communication protocol stack and WiFi security including WAP3, Figure 20.

Figure 20. ESP8266 WiFi module.

Purpose: using the Ultrasonic Sensor to sense distance and ESP8266-01 to send the data over WiFi.

For transmission over WiFi, ESP8266-01 is used. It is configured by the AT Commands. The ESP connects with the Access point and becomes Web Server, when the specified IP of the ESP module is browsed (Figure 21).

Figure 21. ESP8266 WiFi module connection.

Blynk (Figure 22) is a new platform that allows you to quickly build interfaces for controlling and monitoring your hardware projects from your iOS and Android device. After downloading the Blynk app, you can create a project dashboard and arrange buttons, sliders, graphs, and other widgets onto the screen.

Figure 22. Blynk.

Step 1: Setting up the Blynk app (Figure 23):

Figure 23. Setting of Blynk.

Step 2: Select name and Board then Press Create as per Figure 24.

Figure 24. Selection of name and board.

Step 3: This is a very important step. Hear you got your AUTH TOKEN it sends to your email address. Press OK

Step 4: Now go to Widget Box and select Notification as per Figure 25.

Figure 25. Notification.

Step 5: Will look like that Figure 26.

Figure 26. Final after activation of notification.

3.4. Result (Figure 27)

After all the connections are done and the code is uploaded, the Red LED on Pin D0 should light up whenever a human comes within the detectable range in front of the PIR Sensor. Also, User is notified through Blynk app.

Figure 27. User notification.

4. Conclusion and Future Work

4.1. Conclusion

The main objective of this project is to keep individuals at a safe distance from one another. PIR sensor is used in this proposed work we protect people as much as possible from the effects of this epidemic virus and reduce people’s exposure to it as much as possible by alerting people with a sound alarm (beep) When PIR sensor detects the motion, the ultrasonic sensor used to check the pulses to compute the distance in between the obstacle or a person. This is terminated by converting the pulse back to the distance it takes. After measuring the distance, the information is coded and sent, the LED turns on if the distance is less than six feet and turns off if it is more than six feet [9].

4.2. Suggested Future Work

1) It is possible to add a developed camera to the sensor used in the project and make special programming to simulate the camera with the sensor so as to improve the principle of the sensor’s work so that it becomes able to distinguish the human element compared to anything inanimate by seeing it with the camera.

2) The device can be connected to the Internet by placing an internet chip inside the device and linking it to the databases of the Ministry of Health and the Civil Status Department so that when the device sees a person through the camera, it can send it to the databases of civil status records and match the image that the device takes with the images in the civil ID and know the name of the person And then it is sent to the databases of the Ministry of Health and to know whether the person is infected or not.

Conflicts of Interest

The author declares no conflicts of interest regarding the publication of this paper.

References

[1] Yuliza, E., et al. (2021) Physical Distancing Alarm System Based on Proximity Sensor and Microcontroller. Indonesian Physical Review, 4, 79-85.
https://ipr.unram.ac.id/index.php/ipr/article/view/85/47Elfi
https://doi.org/10.29303/ipr.v4i2.85
[2] Noor, N.A.M., et al. (2023) Public Health and Safety on Close Contact Proximity Detection for COVID-19 and Alert via IoT. Jurnal Kejuruteraan, 35, 849-855.
https://www.ukm.my/jkukm/wp-content/uploads/2023/3504/07.pdf
https://doi.org/10.17576/jkukm-2023-35(4)-07
[3] https://www.amazon.com/Electronic-Social-Distancing-Wristband-Proximity/dp/B08BKYGXFV
[4] Jin, X., et al. (20) Target Detection and Classification Using Seismic and PIR Sensors. IEEE Sensors Journal, 12, 1709-1718.
https://doi.org/10.1109/JSEN.2011.2177257
[5] Schmerr Jr., L.W. and Song, S.-J. (2007) Ultrasonic Nondestructive Evaluation Systems. Springer Science + Business Media.
https://doi.org/10.1007/978-0-387-49063-2
[6] https://components101.com/sensors/ultrasonic-sensor-working-pinout-datasheet
[7] https://repo.undiksha.ac.id/1980/9/1705031010-LAMPIRAN.pdf
[8] https://www.flyrobo.in/12bit-ws2812-5050-rgb-led-built-full-color-driving-lights-circular-development-board
[9] https://www.amazon.in/Generic-Social-Distancing-Alarm-Device/dp/B08TTK31J3

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.