SlideShare a Scribd company logo
1 of 12
GREEN UNIVERSITY OF BANGLADESH
Introduction
Farzana Akter Moli
ID:191001162
Presentation Context
"Ultrasonic Security System by Arduino."
Table Of Content
• Theory
• Required equipment
• Diagram
• Procedure
• Code
Theory
• Arduino UNO
Theory
Ultrasonic sensor-HC-SR04
Required Equipment
Arduino UNO Ultrasonic sensor-HC-SR04
Buzzer Resistor 220 ꭥ
Breadboard
Jumper wires LED
Diagram
Fig: Circuit diagram of Ultrasonic Security System by Arduino
AREF
GND
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Reset
3.3v
5v
GND
GND
Vin
A0
A1
A2
A3
A4
A5
USB
Power
Arduino UNO
Vcc
Triger
Echo
GND
+Vcc
+Vcc
220ꭥ
220ꭥ
220ꭥ
Red
Yellow
Green
Ultrasonic Sensor
• Assemble material
• Setup
• Assembly in Breadboard
Procedure
Code
#define trigPin 2
#define echoPin 3
#define LEDlampRed 4
#define LEDlampYellow 5
#define LEDlampGreen 6
#define soundbuzzer 7
int sound = 500;
void setup()
{
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(LEDlampRed, OUTPUT);
pinMode(LEDlampYellow, OUTPUT);
pinMode(LEDlampGreen, OUTPUT);
pinMode(soundbuzzer, OUTPUT);
}
void loop()
{
long durationindigit, distanceincm;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
durationindigit = pulseIn(echoPin, HIGH);
distanceincm = (durationindigit/2) / 29.1;
if (distanceincm < 50)
{digitalWrite(LEDlampGreen, HIGH);}
else {digitalWrite(LEDlampGreen, LOW);}
if (distanceincm < 20)
{digitalWrite(LEDlampYellow, HIGH);}
else {digitalWrite(LEDlampYellow,LOW);}
if (distanceincm < 5)
{digitalWrite(LEDlampRed, HIGH);
sound = 1000;}
else {digitalWrite(LEDlampRed,LOW);}
if (distanceincm > 5 || distanceincm <= 0)
{Serial.println("Outside the permissible
range of distances");
noTone(soundbuzzer);}
else
{Serial.print(distanceincm);
Serial.println(" cm");
tone(soundbuzzer, sound);}
delay(300);
}
Ultrasonic security system by arduino
Ultrasonic security system by arduino

More Related Content

What's hot

Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the ArduinoCharles A B Jr
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoEoin Brazil
 
Passive infrared sensor technology(pir)
Passive infrared sensor technology(pir)Passive infrared sensor technology(pir)
Passive infrared sensor technology(pir)Umar Shuaib
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoVishnu
 
Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Robomart India
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kitResearch Design Lab
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoRichard Rixham
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introductionMichal Sedlak
 
Industrial protocols for pentesters
Industrial protocols for pentestersIndustrial protocols for pentesters
Industrial protocols for pentestersPositive Hack Days
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATIONsoma saikiran
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoOmer Kilic
 
Distance Measurement by Ultrasonic Sensor
Distance Measurement by Ultrasonic SensorDistance Measurement by Ultrasonic Sensor
Distance Measurement by Ultrasonic SensorEdgefxkits & Solutions
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking systemArjun Singh
 
finger door lock.ppt g.m.r.pptx
finger door lock.ppt g.m.r.pptxfinger door lock.ppt g.m.r.pptx
finger door lock.ppt g.m.r.pptxKSanthosh14
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptxAkshat Bijronia
 
Arduino Interfacing LED
Arduino Interfacing LEDArduino Interfacing LED
Arduino Interfacing LEDMrunal Deshkar
 

What's hot (20)

Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
 
Passive infrared sensor technology(pir)
Passive infrared sensor technology(pir)Passive infrared sensor technology(pir)
Passive infrared sensor technology(pir)
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Arduino uno lcd display 16x2
Arduino uno lcd display 16x2
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kit
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Industrial protocols for pentesters
Industrial protocols for pentestersIndustrial protocols for pentesters
Industrial protocols for pentesters
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Final year Engineering project
Final year Engineering project Final year Engineering project
Final year Engineering project
 
Distance Measurement by Ultrasonic Sensor
Distance Measurement by Ultrasonic SensorDistance Measurement by Ultrasonic Sensor
Distance Measurement by Ultrasonic Sensor
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
Arduino lcd display
Arduino lcd displayArduino lcd display
Arduino lcd display
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking system
 
finger door lock.ppt g.m.r.pptx
finger door lock.ppt g.m.r.pptxfinger door lock.ppt g.m.r.pptx
finger door lock.ppt g.m.r.pptx
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
 
Arduino Interfacing LED
Arduino Interfacing LEDArduino Interfacing LED
Arduino Interfacing LED
 

Similar to Ultrasonic security system by arduino

Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseElaf A.Saeed
 
Arduino projects &amp; tutorials
Arduino projects &amp; tutorialsArduino projects &amp; tutorials
Arduino projects &amp; tutorialsAnshu Pandey
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using ArduinoBalajiK109
 
DTW EVEN SEM PROJECT.pptx
DTW EVEN SEM PROJECT.pptxDTW EVEN SEM PROJECT.pptx
DTW EVEN SEM PROJECT.pptxAkshay422454
 
Characteristics of Different Sensors used for Distance Measurement
Characteristics of Different Sensors used for Distance MeasurementCharacteristics of Different Sensors used for Distance Measurement
Characteristics of Different Sensors used for Distance MeasurementIRJET Journal
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfKadiriIbrahim2
 
Fire Fighting Robot
Fire Fighting RobotFire Fighting Robot
Fire Fighting RobotSaadullah74
 
IRJET- Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)
IRJET-  	  Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)IRJET-  	  Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)
IRJET- Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)IRJET Journal
 
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...CBO GmbH
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshopatuline
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labAnnamaria Lisotti
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Meifani Sumadijaya
 
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...CBO GmbH
 
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGE
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGEAUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGE
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGERizalNurjaman2
 

Similar to Ultrasonic security system by arduino (20)

Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Smart Blind stick by using arduino uno and sensor
 Smart Blind stick  by using arduino  uno  and sensor Smart Blind stick  by using arduino  uno  and sensor
Smart Blind stick by using arduino uno and sensor
 
Embedded system course projects - Arduino Course
Embedded system course projects - Arduino CourseEmbedded system course projects - Arduino Course
Embedded system course projects - Arduino Course
 
Arduino projects &amp; tutorials
Arduino projects &amp; tutorialsArduino projects &amp; tutorials
Arduino projects &amp; tutorials
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using Arduino
 
DTW EVEN SEM PROJECT.pptx
DTW EVEN SEM PROJECT.pptxDTW EVEN SEM PROJECT.pptx
DTW EVEN SEM PROJECT.pptx
 
RADAR
RADARRADAR
RADAR
 
Simply arduino
Simply arduinoSimply arduino
Simply arduino
 
Characteristics of Different Sensors used for Distance Measurement
Characteristics of Different Sensors used for Distance MeasurementCharacteristics of Different Sensors used for Distance Measurement
Characteristics of Different Sensors used for Distance Measurement
 
SKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdfSKAD Electronics Training Manual.pdf
SKAD Electronics Training Manual.pdf
 
Fire Fighting Robot
Fire Fighting RobotFire Fighting Robot
Fire Fighting Robot
 
IRJET- Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)
IRJET-  	  Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)IRJET-  	  Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)
IRJET- Obstacle Detection using Ultrasonic Sensor in MAV (Micro Air Vehicle)
 
Arduino
ArduinoArduino
Arduino
 
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...
BlueOptics Bo87jxx240d 10gbase-dwdm xenpak transceiver c-band 40 kilometer si...
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics lab
 
Radar Detector
Radar Detector Radar Detector
Radar Detector
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3
 
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...
BlueOptics Bo87jxx280d 10gbase-dwdm xenpak transceiver c-band 80 kilometer si...
 
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGE
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGEAUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGE
AUTOMATIC GATE WITH PHOTOCELL SENSOR AND SAFETY ULTRASONIC SENSOR FOR BRIDGE
 

Recently uploaded

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 

Recently uploaded (20)

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 

Ultrasonic security system by arduino

  • 1. GREEN UNIVERSITY OF BANGLADESH
  • 4. Table Of Content • Theory • Required equipment • Diagram • Procedure • Code
  • 7. Required Equipment Arduino UNO Ultrasonic sensor-HC-SR04 Buzzer Resistor 220 ꭥ Breadboard Jumper wires LED
  • 8. Diagram Fig: Circuit diagram of Ultrasonic Security System by Arduino AREF GND 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Reset 3.3v 5v GND GND Vin A0 A1 A2 A3 A4 A5 USB Power Arduino UNO Vcc Triger Echo GND +Vcc +Vcc 220ꭥ 220ꭥ 220ꭥ Red Yellow Green Ultrasonic Sensor
  • 9. • Assemble material • Setup • Assembly in Breadboard Procedure
  • 10. Code #define trigPin 2 #define echoPin 3 #define LEDlampRed 4 #define LEDlampYellow 5 #define LEDlampGreen 6 #define soundbuzzer 7 int sound = 500; void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(LEDlampRed, OUTPUT); pinMode(LEDlampYellow, OUTPUT); pinMode(LEDlampGreen, OUTPUT); pinMode(soundbuzzer, OUTPUT); } void loop() { long durationindigit, distanceincm; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); durationindigit = pulseIn(echoPin, HIGH); distanceincm = (durationindigit/2) / 29.1; if (distanceincm < 50) {digitalWrite(LEDlampGreen, HIGH);} else {digitalWrite(LEDlampGreen, LOW);} if (distanceincm < 20) {digitalWrite(LEDlampYellow, HIGH);} else {digitalWrite(LEDlampYellow,LOW);} if (distanceincm < 5) {digitalWrite(LEDlampRed, HIGH); sound = 1000;} else {digitalWrite(LEDlampRed,LOW);} if (distanceincm > 5 || distanceincm <= 0) {Serial.println("Outside the permissible range of distances"); noTone(soundbuzzer);} else {Serial.print(distanceincm); Serial.println(" cm"); tone(soundbuzzer, sound);} delay(300); }