<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    cn
   </journal-id>
   <journal-title-group>
    <journal-title>
     Communications and Network
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    1949-2421
   </issn>
   <issn publication-format="print">
    1947-3826
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/cn.2024.162002
   </article-id>
   <article-id pub-id-type="publisher-id">
    cn-134173
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Alert Device for Social Distancing
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Amer Nizar
      </surname>
      <given-names>
       AbuAli
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aCollege of Computer Science and Engineering, Taibah University, Medina, Saudi Arabia
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     31
    </day> 
    <month>
     05
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    16
   </volume> 
   <issue>
    02
   </issue>
   <fpage>
    31
   </fpage>
   <lpage>
    50
   </lpage>
   <history>
    <date date-type="received">
     <day>
      11,
     </day>
     <month>
      May
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      28,
     </day>
     <month>
      May
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      28,
     </day>
     <month>
      May
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <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.”
   </abstract>
   <kwd-group> 
    <kwd>
     Social Distancing
    </kwd> 
    <kwd>
      COVID-19 Pandemic
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. General Introduction</title>
   <sec id="s1_1">
    <title>1.1. Introduction</title>
    <p>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.</p>
    <p>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.</p>
    <p>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.</p>
   </sec>
   <sec id="s1_2">
    <title>1.2. Literature Review</title>
    <p>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 <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>.</p>
    <p>Using a proximity sensor ultrasonic HC-SR04 (<xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>) 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 <xref ref-type="bibr" rid="scirp.134173-1">
      [1]
     </xref>.</p>
    <p>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.</p>
    <p>Disadvantage: The system cannot detect human only</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. System testing mechanism (a) in front of the sensor; (b) at an angle with the sensor.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId13.jpeg?20240628114427" />
    </fig>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. Sensor ultrasonic HC-SR04.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId14.jpeg?20240628114427" />
    </fig>
    <p>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 <xref ref-type="bibr" rid="scirp.134173-2">
      [2]
     </xref>.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Social distancing alarm device.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId15.jpeg?20240628114427" />
    </fig>
    <p>Disadvantage</p>
    <p>It is big and unsuitable for wearing and the system cannot detect human only.</p>
    <p>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 <xref ref-type="bibr" rid="scirp.134173-3">
      [3]
     </xref>.</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Social distancing wearable device.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId16.jpeg?20240628114427" />
    </fig>
    <p>Advantage</p>
    <p>Disadvantage</p>
    <p>To use it, it must be everybody has the same watch.</p>
    <sec id="s1">
     <title>2. System Design</title>
    </sec>
    <sec id="s2_3">
     <title>2.1. A Passive Infrared Sensor HC-SR501</title>
     <p>An electronic sensor <xref ref-type="fig" rid="fig5">
       Figure 5
      </xref> 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 (<xref ref-type="fig" rid="fig2">
       Figure 2
      </xref>. 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 <xref ref-type="bibr" rid="scirp.134173-4">
       [4]
      </xref>.</p>
     <fig id="fig5" position="float">
      <label>Figure 5</label>
      <caption>
       <title>Figure 5. Passive infrared sensor HC-SR501.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId17.jpeg?20240628114429" />
     </fig>
     <p>HC-SR501 Specifications (<xref ref-type="table" rid="table1">
       Table 1
      </xref> &amp; <xref ref-type="fig" rid="fig6">
       Figure 6
      </xref>)</p>
     <table-wrap id="table1">
      <label>
       <xref ref-type="table" rid="table1">
        Table 1
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.134173-"></xref>Table 1. HC-SR5-1 specifications.</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td acenter" width="68.24%"><p style="text-align:center">Operating voltage</p></td> 
        <td class="custom-bottom-td acenter" width="68.24%"><p style="text-align:center">4.5 - 20 V</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td acenter" width="68.24%"><p style="text-align:center">Quiescent current</p></td> 
        <td class="custom-top-td acenter" width="68.24%"><p style="text-align:center">50 μA</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Level output</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">HIGH 3.3 V/LOW 0 V</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Trigger</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">L single trigger/H repeating trigger</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Delay time</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">3 - 300 s</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Blocking time</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">1.5 s (default)</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Measuring range</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">7 m maximum</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Measuring angle</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">&lt;110˚ cone angle</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Fresnel lens dimensions</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">15 mm × 23 mm diameter</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Operating temperature</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">−15 - 70˚C</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="68.24%"><p style="text-align:center">Cost</p></td> 
        <td class="acenter" width="68.24%"><p style="text-align:center">3 JD</p></td> 
       </tr> 
      </table>
     </table-wrap>
     <fig id="fig6" position="float">
      <label>Figure 6</label>
      <caption>
       <title>Figure 6. HC-SR501.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId18.jpeg?20240628114429" />
     </fig>
     <p>Adjusting the HC-SR501</p>
     <p>On the back of the board, you will and two potentiometers and a jumper which you can use to adjust several parameters:</p>
     <p>Sensitivity (range) adjustment</p>
     <p>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.</p>
     <p>Time-delay adjustment (Tx)</p>
     <p>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.</p>
     <p>Trigger selection jumper</p>
     <p>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):</p>
     <p>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.</p>
     <p>Repeating trigger—Every time motion is detected, the delay timer is restarted.</p>
     <p>Connecting HC-SR501 PIR motion sensor to Arduino UNO as per <xref ref-type="table" rid="table2">
       Table 2
      </xref>.</p>
     <table-wrap id="table2">
      <label>
       <xref ref-type="table" rid="table2">
        Table 2
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.134173-"></xref>Table 2. Input and output of HC-SR501 PIR motion sensor.</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td acenter" width="57.69%"><p style="text-align:center">HC-SR501 PIR Motion Sensor</p></td> 
        <td class="custom-bottom-td acenter" width="57.69%"><p style="text-align:center">Arduino</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td acenter" width="57.69%"><p style="text-align:center">VCC</p></td> 
        <td class="custom-top-td acenter" width="57.69%"><p style="text-align:center">5 V</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="57.69%"><p style="text-align:center">OUT</p></td> 
        <td class="acenter" width="57.69%"><p style="text-align:center">Pin 2</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="57.69%"><p style="text-align:center">GND</p></td> 
        <td class="acenter" width="57.69%"><p style="text-align:center">GND</p></td> 
       </tr> 
      </table>
     </table-wrap>
    </sec>
    <sec id="s2_4">
     <title>2.2. The HC-SR04 Ultrasonic (US) Sensor</title>
     <p>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 <xref ref-type="fig" rid="fig7">
       Figure 7
      </xref> <xref ref-type="bibr" rid="scirp.134173-5">
       [5]
      </xref>.</p>
     <fig id="fig7" position="float">
      <label>Figure 7</label>
      <caption>
       <title>Figure 7. HC-SR04 ultrasonic (US) sensor.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId19.jpeg?20240628114430" />
     </fig>
     <p>HC-SR04 Ultrasonic Sensor-Working (<xref ref-type="table" rid="table3">
       Table 3
      </xref> &amp; <xref ref-type="fig" rid="fig8">
       Figure 8
      </xref>)</p>
     <p>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</p>
     <p>Distance = Speed × Time</p>
     <p>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</p>
     <table-wrap id="table3">
      <label>
       <xref ref-type="table" rid="table3">
        Table 3
       </xref></label>
      <caption>
       <title>
        <xref ref-type="bibr" rid="scirp.134173-"></xref>Table 3. HC-SR04 ultrasonic sensor guide.</title>
      </caption>
      <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td class="custom-bottom-td acenter" width="23.36%"><p style="text-align:center">Pin Number</p></td> 
        <td class="custom-bottom-td acenter" width="20.65%"><p style="text-align:center">Pin Name</p></td> 
        <td class="custom-bottom-td acenter" width="92.46%"><p style="text-align:center">Description</p></td> 
       </tr> 
       <tr> 
        <td class="custom-top-td acenter" width="23.36%"><p style="text-align:center">1</p></td> 
        <td class="custom-top-td acenter" width="20.65%"><p style="text-align:center">Vcc</p></td> 
        <td class="custom-top-td acenter" width="92.46%"><p style="text-align:center">The Vcc pin powers the sensor, typically with +5 V</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="23.36%"><p style="text-align:center">2</p></td> 
        <td class="acenter" width="20.65%"><p style="text-align:center">Trigger</p></td> 
        <td class="acenter" width="92.46%"><p style="text-align:center">Trigger pin is an Input pin. This pin has to be kept high for 10us to initialize measurement by sending US wave.</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="23.36%"><p style="text-align:center">3</p></td> 
        <td class="acenter" width="20.65%"><p style="text-align:center">Echo</p></td> 
        <td class="acenter" width="92.46%"><p style="text-align:center">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.</p></td> 
       </tr> 
       <tr> 
        <td class="acenter" width="23.36%"><p style="text-align:center">4</p></td> 
        <td class="acenter" width="20.65%"><p style="text-align:center">Ground</p></td> 
        <td class="acenter" width="92.46%"><p style="text-align:center">This pin is connected to the Ground of the system.</p></td> 
       </tr> 
      </table>
     </table-wrap>
     <fig id="fig8" position="float">
      <label>Figure 8</label>
      <caption>
       <title>Figure 8. HC-SR04 ultrasonic sensor.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId20.jpeg?20240628114430" />
     </fig>
    </sec>
    <sec id="s2_5">
     <title>2.3. HC-SR04 Sensor Features</title>
     <p>Operating voltage: +5 V</p>
     <p>Theoretical Measuring Distance: 2 cm to 450 cm</p>
     <p>Practical Measuring Distance: 2 cm to 80 cm</p>
     <p>Accuracy: 3 mm</p>
     <p>Measuring angle covered: &lt;15˚</p>
     <p>Operating Current: &lt;15 mA</p>
     <p>Operating Frequency: 40 Hz</p>
     <p>How to use the HC-SR04 Ultrasonic Sensor (<xref ref-type="fig" rid="fig9">
       Figure 9
      </xref>)</p>
     <p>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.</p>
     <p>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 <xref ref-type="bibr" rid="scirp.134173-6">
       [6]
      </xref>.</p>
     <fig id="fig9" position="float">
      <label>Figure 9</label>
      <caption>
       <title>Figure 9. HC-SR04 ultrasonic sensor (Timing Diagram).</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId21.jpeg?20240628114431" />
     </fig>
     <p>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.</p>
     <p>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 <xref ref-type="fig" rid="fig10">
       Figure 10
      </xref>. 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.</p>
     <fig id="fig10" position="float">
      <label>Figure 10</label>
      <caption>
       <title>Figure 10. Example.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId22.jpeg?20240628114431" />
     </fig>
     <p>Application:</p>
     <p>- Used to avoid and detect obstacles with robots like biped robot, obstacle avoider robot, path finding robot etc.</p>
     <p>- Used to measure the distance within a wide range of 2 cm to 400 cm</p>
     <p>- Can be used to map the objects surrounding the sensor by rotating it</p>
     <p>- Depth of certain places like wells, pits etc.</p>
     <p>- Can be measured since the waves can penetrate through water</p>
    </sec>
    <sec id="s2_6">
     <title>2.4. Arduino Nano (<xref ref-type="fig" rid="fig11">
       Figure 11
      </xref>)</title>
     <p>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 <xref ref-type="bibr" rid="scirp.134173-7">
       [7]
      </xref>.</p>
     <fig id="fig11" position="float">
      <label>Figure 11</label>
      <caption>
       <title>Figure 11. Arduino nano.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId23.jpeg?20240628114432" />
     </fig>
    </sec>
    <sec id="s2_7">
     <title>2.5. 186,505 V 2200 mAh Lithium Battery Pack (<xref ref-type="fig" rid="fig12">
       Figure 12
      </xref>)</title>
     <p>Safety and cost-effectiveness</p>
     <p>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.</p>
     <p>Long cycle life</p>
     <p>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</p>
     <p>Applications</p>
     <p>Electric toy, power tool, electric back-up.</p>
     <fig id="fig12" position="float">
      <label>Figure 12</label>
      <caption>
       <title>Figure 12. 186,505 V 2200 mAh Lithium battery pack.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId24.jpeg?20240628114432" />
     </fig>
    </sec>
    <sec id="s2_8">
     <title>2.6. 433 mHz RF Wireless Transmitter and Receiver</title>
     <p>This is FS1000A 433 mHz Tx RF Radio Module. This RF module comprises an RF Transmitter <xref ref-type="fig" rid="fig13">
       Figure 13
      </xref> and an RF Receiver <xref ref-type="fig" rid="fig14">
       Figure 14
      </xref>. 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.</p>
     <p>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.</p>
     <fig id="fig13" position="float">
      <label>Figure 13</label>
      <caption>
       <title>Figure 13. RF wireless transmitter.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId25.jpeg?20240628114433" />
     </fig>
     <p>Features:</p>
     <p>1) Wide input supply (2.5 V to 12 V)</p>
     <p>2) Easy to integrate (V+, GND, and Data)</p>
     <p>3) The device in deep sleep mode when Data pin is grounded</p>
     <p>4) Very small dimension.</p>
     <fig id="fig14" position="float">
      <label>Figure 14</label>
      <caption>
       <title>Figure 14. RF wireless receiver.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId26.jpeg?20240628114433" />
     </fig>
     <p>
      <xref ref-type="fig" rid="fig15">
       Figure 15
      </xref> &amp; <xref ref-type="fig" rid="fig16">
       Figure 16
      </xref> show the block diagram and flow chart of the system.</p>
     <fig id="fig15" position="float">
      <label>Figure 15</label>
      <caption>
       <title>Figure 15. It shows the block diagram.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId27.jpeg?20240628114433" />
     </fig>
    </sec>
   </sec>
   <sec id="s3">
    <title>3. Implementation</title>
    <sec id="s3_1">
     <title>3.1. How It Works</title>
     <p>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.</p>
     <fig id="fig16" position="float">
      <label>Figure 16</label>
      <caption>
       <title>Figure 16. System flow chart.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId28.jpeg?20240628114435" />
     </fig>
     <p>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.</p>
     <p>Specifications</p>
     <p>IC Chip: WS2812B</p>
     <p>Supply Voltage: 5 (V)</p>
     <p>Color: RGB</p>
     <p>No of Light: 12</p>
     <p>Features</p>
     <p>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.</p>
     <p>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 <xref ref-type="bibr" rid="scirp.134173-8">
       [8]
      </xref>.</p>
     <p>For any two points, the distance is more than 5 m transmission signal without any increase circuit.</p>
     <p>When the refresh rate is 30 fps (frames per second), the cascade number is not less than 1024 points.</p>
     <p>Send data at speeds of 800 Kbps.</p>
     <p>The color of the light was highly consistent</p>
     <p>Full-color module, Full-color soft lights a lamp strip.</p>
     <p>LED decorative lighting, Indoor/outdoor LED video irregular screen.</p>
     <p>Package includes</p>
     <p>1*12 Bit ws2812 5050 RGB LED Small Ring with Fashion Light &amp; Buzzer as shown in <xref ref-type="fig" rid="fig17">
       Figure 17
      </xref>.</p>
     <fig id="fig17" position="float">
      <label>Figure 17</label>
      <caption>
       <title>Figure 17. 12 Bit ws2812 5050 RGB LED small ring.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId29.jpeg?20240628114435" />
     </fig>
    </sec>
    <sec id="s3_2">
     <title>3.2. Connect between Component (<xref ref-type="fig" rid="fig18">
       Figure 18
      </xref> &amp; <xref ref-type="fig" rid="fig19">
       Figure 19
      </xref>)</title>
     <fig id="fig18" position="float">
      <label>Figure 18</label>
      <caption>
       <title>Figure 18. Components connection.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId30.jpeg?20240628114436" />
     </fig>
     <fig id="fig19" position="float">
      <label>Figure 19</label>
      <caption>
       <title>Figure 19. Components connection.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId31.jpeg?20240628114436" />
     </fig>
    </sec>
    <sec id="s3_3">
     <title>3.3. IOT Construction</title>
     <p>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.</p>
     <p>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, <xref ref-type="fig" rid="fig20">
       Figure 20
      </xref>.</p>
     <fig id="fig20" position="float">
      <label>Figure 20</label>
      <caption>
       <title>Figure 20. ESP8266 WiFi module.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId32.jpeg?20240628114437" />
     </fig>
     <p>Purpose: using the Ultrasonic Sensor to sense distance and ESP8266-01 to send the data over WiFi.</p>
     <p>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 (<xref ref-type="fig" rid="fig21">
       Figure 21
      </xref>).</p>
     <fig id="fig21" position="float">
      <label>Figure 21</label>
      <caption>
       <title>Figure 21. ESP8266 WiFi module connection.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId33.jpeg?20240628114437" />
     </fig>
     <p>Blynk (<xref ref-type="fig" rid="fig22">
       Figure 22
      </xref>) 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.</p>
     <fig id="fig22" position="float">
      <label>Figure 22</label>
      <caption>
       <title>Figure 22. Blynk.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId34.jpeg?20240628114437" />
     </fig>
     <p>Step 1: Setting up the Blynk app (<xref ref-type="fig" rid="fig23">
       Figure 23
      </xref>):</p>
     <fig id="fig23" position="float">
      <label>Figure 23</label>
      <caption>
       <title>Figure 23. Setting of Blynk.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId35.jpeg?20240628114437" />
     </fig>
     <p>Step 2: Select name and Board then Press Create as per <xref ref-type="fig" rid="fig24">
       Figure 24
      </xref>.</p>
     <fig id="fig24" position="float">
      <label>Figure 24</label>
      <caption>
       <title>Figure 24. Selection of name and board.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId36.jpeg?20240628114437" />
     </fig>
     <p>Step 3: This is a very important step. Hear you got your AUTH TOKEN it sends to your email address. Press OK</p>
     <p>Step 4: Now go to Widget Box and select Notification as per <xref ref-type="fig" rid="fig25">
       Figure 25
      </xref>.</p>
     <fig id="fig25" position="float">
      <label>Figure 25</label>
      <caption>
       <title>Figure 25. Notification.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId37.jpeg?20240628114437" />
     </fig>
     <p>Step 5: Will look like that <xref ref-type="fig" rid="fig26">
       Figure 26
      </xref>.</p>
     <fig id="fig26" position="float">
      <label>Figure 26</label>
      <caption>
       <title>Figure 26. Final after activation of notification.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId38.jpeg?20240628114437" />
     </fig>
    </sec>
    <sec id="s3_4">
     <title>3.4. Result (<xref ref-type="fig" rid="fig27">
       Figure 27
      </xref>)</title>
     <p>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.</p>
     <fig id="fig27" position="float">
      <label>Figure 27</label>
      <caption>
       <title>Figure 27. User notification.</title>
      </caption>
      <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/6101993-rId39.jpeg?20240628114438" />
     </fig>
    </sec>
   </sec>
   <sec id="s4">
    <title>4. Conclusion and Future Work</title>
    <sec id="s4_1">
     <title>4.1. Conclusion</title>
     <p>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 <xref ref-type="bibr" rid="scirp.134173-9">
       [9]
      </xref>.</p>
    </sec>
    <sec id="s4_2">
     <title>4.2. Suggested Future Work</title>
     <p>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.</p>
     <p>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.</p>
    </sec>
   </sec>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.134173-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yuliza, E., et al. (2021) Physical Distancing Alarm System Based on Proximity Sensor and Microcontroller. Indonesian Physical Review, 4, 79-85.&gt;https://ipr.unram.ac.id/index.php/ipr/article/view/85/47Elfi &gt;https://doi.org/10.29303/ipr.v4i2.85
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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.&gt;https://www.ukm.my/jkukm/wp-content/uploads/2023/3504/07.pdf &gt;https://doi.org/10.17576/jkukm-2023-35(4)-07
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     https://www.amazon.com/Electronic-Social-Distancing-Wristband-Proximity/dp/B08BKYGXFV 
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jin, X., et al. (20) Target Detection and Classification Using Seismic and PIR Sensors. IEEE Sensors Journal, 12, 1709-1718. &gt;https://doi.org/10.1109/JSEN.2011.2177257
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Schmerr Jr., L.W. and Song, S.-J. (2007) Ultrasonic Nondestructive Evaluation Systems. Springer Science + Business Media. &gt;https://doi.org/10.1007/978-0-387-49063-2
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     https://components101.com/sensors/ultrasonic-sensor-working-pinout-datasheet 
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     https://repo.undiksha.ac.id/1980/9/1705031010-LAMPIRAN.pdf 
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     https://www.flyrobo.in/12bit-ws2812-5050-rgb-led-built-full-color-driving-lights-circular-development-board 
    </mixed-citation>
   </ref>
   <ref id="scirp.134173-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     https://www.amazon.in/Generic-Social-Distancing-Alarm-Device/dp/B08TTK31J3
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>