A Practical Activity Report Submitted For Engineering Design-Ii (Uta014)
A Practical Activity Report Submitted For Engineering Design-Ii (Uta014)
Assignment2 Report
Submitted by:
Branch:
Mechatronics
BE Second Year
Submitted to-
Designation: Teacher
TIET, Patiala
Jul-Dec 2020
1
LIST OF TABLES
LIST OF FIGURES
Assignment-1
1. OBJECTIVE: Arduino based program for a Social Distancing Detector and
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);
//Serial.println(distance1);
digitalWrite(11,LOW);
delayMicroseconds(2);
digitalWrite(11,HIGH);
delayMicroseconds(10);
digitalWrite(11,LOW);
duration2 = pulseIn(10,HIGH);
//Serial.println(distance2);
digitalWrite(9,LOW);
delayMicroseconds(2);
digitalWrite(9,HIGH);
delayMicroseconds(10);
digitalWrite(9,LOW);
duration3 = pulseIn(8,HIGH);
//Serial.println(distance);
digitalWrite(7,LOW);
delayMicroseconds(2);
digitalWrite(7,HIGH);
delayMicroseconds(10);
digitalWrite(7,LOW);
duration4 = pulseIn(6,HIGH);
//Serial.println(distance2);
digitalWrite(5,LOW);
if(distance1<200||distance2<200||distance3<200||distance4<200)
{
digitalWrite(5,HIGH);
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.