Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

AAMIR MANSOOR EN#02-133162-002 BEE 8-C CEP 2

Embedded Systems And Design


CEP NO. 2
Q. A terrorist enters a building in disguise with weapons in his bag. Provide a solution for this scenario
which secures everyone in the building.

Solution:

Metal Detector is a security device which is used for detecting metals which can be harmful,
at various places like Airports, shopping malls, cinemas etc. Previously we have made a
very simple Metal detector without a microcontroller, now we are building the Metal
Detector using Arduino. we can measure the approximate inductance of Coil. After
getting the result we transfer the results to the LED and buzzer to detect the presence of
metal.
AAMIR MANSOOR EN#02-133162-002 BEE 8-C CEP 2

Code

#include<LiquidCrystal.h>
LiquidCrystal lcd(5, 6, 8, 9, 10, 11);
int a=12;
void setup()
{ lcd.begin(16, 2);
pinMode(3,INPUT);
pinMode(4,INPUT);
pinMode(7,OUTPUT);
pinMode(a,OUTPUT);
attachInterrupt(digitalPinToInterrupt(3),alarm,CHANGE);
AAMIR MANSOOR EN#02-133162-002 BEE 8-C CEP 2

attachInterrupt(digitalPinToInterrupt(4),alarm,CHANGE);}
void loop()
{ lcd.print("Welcome");
digitalWrite(7,HIGH);
delay(500);
digitalWrite(7,LOW);
delay(500);
lcd.clear();}
void alarm()
{lcd.clear();
lcd.setCursor(1,0);
lcd.print("Emergency Evacute");
digitalWrite(a,HIGH);
delay(500);
digitalWrite(a,LOW);
delay(500);}
AAMIR MANSOOR EN#02-133162-002 BEE 8-C CEP 2

SUMMARY
As soon as someone enters the building with a weapon the
metal detector will trigger an alarm and siren will blowing
everybody will get aleart. The LED screen near the door will
display metal detected then the guards will be alerted and they
will check if the metal is a weapon if so they will press a
emergency push button which is connected with the
wifi/bluetooth module and all the alarm in the building with be
activated and people will start evacuating the building and the
police will be informed immediately due to pressing of that
button a wifi signal will be sent to nearest police station. If the
terrorist bypasses the metal detector, there will be an
emergency lockdown and terrorist would not be able to enter
the building.

You might also like