A
Practical Activity Report
              Submitted for
 ENGINEERING DESIGN-II (UTA014)
               Assignment2 Report
                   Submitted by:
         (101909014) Ayush Bhattacharya
                     Branch:
                   Mechatronics
                 BE Second Year
                   Submitted to-
     Name of Faculty Mentor: Dr. Hem Dutt Joshi
                Designation: Teacher
Computer Science and Engineering Department
                  TIET, Patiala
                   Jul-Dec 2020
                         1
                                                   LIST OF TABLES
Table No.                                Caption           Page No.
 Table 1     List of Components used                          3
                                                   LIST OF FIGURES
Figure No.                               Caption           Page No.
 Figure 1    Logic Diagram                                    4
 Figure 2    PCB Top View                                     4
 Figure 3    PCB Bottom View                                  4
 Figure 4    Schematic circuit Diagram                        5
                                   Assignment-1
1. OBJECTIVE: Arduino based program for a Social Distancing Detector and
execute the program through the simulator.
2. HARDWARE USED: Arduino Uno R3, Breadboard, Piezo Buzzer, 4x
Ultrasonic Distance Sensor, LED, Resistor, Wires.
3. SOFTWARE USED: Tinkercad
4. THEORY: Ultrasonic sensor measures the time difference between the trigger
signal sent to the object and the echo received. This time difference helps us
calculate the distance between the user of and a passer-by. Four sensors are used
so that the blind-spot of the device is reduced. When the device detects a person
within 200m of the user the buzzer is triggered and the LED glows along with it.
Both switch off when it detects there is no-one within 200m of the user.
Table of Components:
Sno.        Component                                   No. of components used
1           Arduino Uno R3                              1
2           Breadboard                                  1
3           Ultrasonic Sensor                           4
4           Piezo Buzzer                                1
5           LED                                         1
6           Resistor 1kΩ                                1
7           Connecting wires                            21
                                         Table 1
CODE:
        int distance1,distance2,distance3,distance4;
        long duration1,duration2,duration3,duration4;
        void setup()
            pinMode(13, OUTPUT);
            pinMode(12, INPUT);
            pinMode(11, OUTPUT);
            pinMode(10, INPUT);
            pinMode( 9, OUTPUT);
            pinMode( 8, INPUT);
            pinMode( 7, OUTPUT);
            pinMode( 6, INPUT);
            pinMode( 5, OUTPUT);
            Serial.begin(9600);
}
void loop()
    digitalWrite(13,LOW);
    delayMicroseconds(2);
    digitalWrite(13,HIGH);
    delayMicroseconds(10);
    digitalWrite(13,LOW);
    duration1 = pulseIn(12,HIGH);
    distance1 = duration1 * 0.034 / 2;
    //Serial.println(distance1);
    digitalWrite(11,LOW);
    delayMicroseconds(2);
    digitalWrite(11,HIGH);
    delayMicroseconds(10);
    digitalWrite(11,LOW);
    duration2 = pulseIn(10,HIGH);
    distance2= duration2 * 0.034 / 2;
    //Serial.println(distance2);
digitalWrite(9,LOW);
delayMicroseconds(2);
digitalWrite(9,HIGH);
delayMicroseconds(10);
digitalWrite(9,LOW);
duration3 = pulseIn(8,HIGH);
distance3 = duration3 * 0.034 / 2;
//Serial.println(distance);
digitalWrite(7,LOW);
delayMicroseconds(2);
digitalWrite(7,HIGH);
delayMicroseconds(10);
digitalWrite(7,LOW);
duration4 = pulseIn(6,HIGH);
distance4= duration4 * 0.034 / 2;
//Serial.println(distance2);
digitalWrite(5,LOW);
if(distance1<200||distance2<200||distance3<200||distance4<200)
              {
                  digitalWrite(5,HIGH);
5. LOGIC & CIRCUIT DIAGRAM:
                                          Figure 1
                                            Figure 2
Links:
Tinkercad: https://www.tinkercad.com/things/3YmriLv13pK-glorious-vihelmo/editel
Video: https://drive.google.com/drive/u/0/folders/1qZj3rA9Uud_sagj8NOu1mcCQ7p2CtvzP
6. RESULT ANALYSIS:
The circuit is responsive and alerts the user if another person comes within the COVID Social
distance, i.e. 200 cm or 2m thereby reducing the risk of contact from a potential carrier of the
virus.
                                                       Signature of Faculty member