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

WILD ANIMAL INTRUSION

DETECTION SYSTEM

A MINI PROJECT REPORT

Submitted by

DHIREN B 727622BCS038
GOKILA MANI S 727622BCS066
KRISHNA PRIYA M 727622BCS106

in partial fulfilment for the award of the degree of

BACHELOR OF ENGINEERING
in

COMPUTER SCIENCE AND ENGINEERING

Dr. MAHALINGAM COLLEGE OF ENGINEERING AND


TECHNOLOFY, POLLACHI – 642 003
(An Autonomous Institution Affiliated to Anna University Chennai)

May 2024

i
Dr. MAHALINGAM COLLEGE OF ENGINEERING AND
TECHNOLOGY, POLLACHI -642 003

(An Autonomous Institution Affiliated to Anna University, Chennai - 600 025)

BONAFIDE CERTIFICATE

Certified that this Mini project report titled “WILD ANIMAL

INTRUSION DETECTION SYSTEM ” is the bonafide work of

DHIREN B 727622BCS038
GOKILA MANI S 727622BCS066
KRISHNA PRIYA M 727622BCS106

1 who carried out the mini project under my supervision.

Ms. G. Deepa Dr. G. Anupriya


Assistant Professor Professor
SUPERVISOR HEAD OF THE DEPARTMENT
Dept. of Computer Science and Dept. of Computer Science and
Engineering, Dr. Mahalingam College Engineering, Dr. Mahalingam
of Engineering and Technology, College of Engineering and
Pollachi- 642003 Technology, Pollachi- 642003

Submitted for the Autonomous End Semester Mini Project


Examination held on _____________

INTERNAL EXAMINER 1 INTERNAL EXAMINER 2

ii
ACKNOWLEDGEMENT

First and foremost, we wish to express our deep unfathomable feeling, gratitude to our
institution and our department for providing us a chance to fulfil our long- cherished dreams
of becoming Computer Science Engineers.

We express our sincere thanks to our honourable Secretary Dr . C. Ramaswamy for


providing us with required amenities.

We wish to express our hearty thanks to Dr. P. Govindasamy, Principal of our college,
for his constant motivation and continual encouragement regarding our project work.

We are grateful to Dr. G. Anupriya, Head of the Department, Computer Science and
Engineering, for her direction delivered at all times required. We also thank her for her tireless
and meticulous efforts in bringing out this project to its logical conclusion.

Our hearty thanks to our guide Ms. G. Deepa, Assistant Professor (CSE) for her
constant support and guidance offered to us during the course of our project by being one
among us and all the noble hearts that gave us immense encouragement towards the completion
of our project.

We are deeply grateful to our mini project coordinators cum review panel members, Dr.
J. Bhavithra, Professor and Ms. S. C. Lavanya, Assistant Professor (SS) for their constant
guidance, patience, and support.

iii
WILD ANIMAL INTRUSION DETECTION SYSTEM

ABSTRACT

The conflict that occurs between people and wildlife is when animals leave and enter
the protected areas and raiding cops is one of the largest problems around the world. This is
particularly in mountain and hill regions where there are still many mammals such as elephants
which not only eat large amount of crops but also dangerous for humans. The main abstract of
this paper is to provide assistance in controlling disasters caused by wild animals from
destroying farmland with the help of sensor detection to monitor real time situations via
ultrasonic sensors and PIR sensors along with the Arduino that send a notification to the farmer
that the wild animals are being entering into the farmland. One of the advantages of using this
combination of sensors is its adaptability to various environments. Whether in dense forests,
open savannas near water bodies, PIR and Ultrasonic sensors can be strategically placed to
cover a wide range of ecosystems. This versatility makes the system suitable for monitoring
diverse wildlife species and their behaviours. In terms of conservation, the abstraction of wild
animal detection through these sensors plays a crucial role. This System contributes to
mitigating human-wildlife conflicts. By detecting the presence of animals near human
settlements or agricultural areas, early warnings can be issued, allowing for timely
interventions to prevent conflicts and protecting both human and animal populations. When
animals are detected, the researchers can receive an instant notifications, enabling quick
response and data collection. This real-time capability enhances the efficiency of conservation
efforts and provides a more dynamic understanding of wildlife activites. In conclusion, the
abstraction of wild animals detection using PIR and ultrasonic sensors represents a cutting edge
approach to wildlife monitoring and conservation. The combination of these sensors offers a
non-intrusive, versatile and real-time solution for avoiding the entrance of wild animals in the
farmland.

iv
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

1 ABSTRACT iv

2 LIST OF FIGURES vii

3 LIST OF ABBREVIATION viii

4 INTRODUCTION 9
4.1 Internet of Things
4.2 Applications of IoT
4.3 Advantages of IoT
4.4 Disadvantage of IoT

5 LITERETURE SURVEY 13

6 PROBLEM STATEMENT 14

7 OBJECTIVE OF THE PROJECT 15

8 PROPOSED SYSTEM
8.1 Our Implementations
16
8.2 Circuit Diagram
8.3 Block Diagram
8.4 Module Description

9 HARDWARE AND SOFTWARE


DETAILS 20
9.1 Hardware Details
9.2 Software Details

v
10 RESULTS AND DISCUSSIONS 26

11 CONCLUSION AND FUTURE 27


WORK

12 REFERENCES 28

13 SOURCE CODE 31

14 SNAPSHOTS 32

15 CERTIFICATES 33

vi
LIST OF FIGURES

FIG NO TITLE PAGE NO

8.2.1 Circuit Diagram 17

8.3.1 Block Diagram 18

8.4.1 Module Description 19

9.1.1 Arduino Board 20

9.1.2 PIR Sensor 21

9.1.3 Ultrasonic sensor 21

9.1.4 Vibration sensor 22

9.1.5 Bread Board 23

9.1.6 Jumper Wires 23

9.1.7 Buzzer 24

9.2.1 Arduino IDE 25

9.2.2 Tinker Cad 25

14.1.1 Animal Intrusion (Detection system) 32

vii
LIST OF ABBREVIATION

IDE Integrated Development Environment

IOT Internet Of Things

PIR Passive Infrared Ray

UNO United Nations Organization

viii
4. INTRODUCTION
4.1 INTERNET OF THINGS
The Internet of Things (IoT) refers to a network of interconnected physical devices,
vehicles, appliances and other objects that are embedded with sensors software and
connectivity allowing them to collect and exchange data. IoT has the potential to revolutionize
the way that live and work enabling us to create more efficient and responsive systems in a
wide range of industries from healthcare and transportation to agriculture and manufacturing.
By connecting these devices to the internet, can monitor and control them remotely, optimize
their performance and extract valuable insights from the data they generate. As IoT continues
to evolve, it offers endless possibilities for innovation and disruption, making it one of the most
exciting and transformative technologies of our time.

The Internet of Things (IoT) is a rapidly growing field that has the potential to transform
the way live and work. Simply put, IoT refers to the connection of everyday objects to the
internet, allowing them to send and receive data. The technology has already begun to
revolutionize various industries, such as manufacturing, healthcare and agriculture. IoT devices
can be used to monitor equipment, track inventory, gather data on patient health and even
optimize crop yields.

One of the key benefits of IoT is the ability to collect and analyse vast amounts of data
in real-time, allowing for more efficient decision-making and automation. The technology can
also improve safety and security by detecting potential hazards and alerting authorities in real-
time.

However, as with any emerging technology, there are also concerns regarding privacy
and security. As IoT devices become more ubiquitous, it is important for manufacturers,
governments and consumers to take steps to ensure that data is collected and stored securely.
Overall, the Internet of Things is poised to become a transformative technology that will
continue to impact our daily lives in the years to c

9
4.2 APPLICATIONS OF IOT

Healthcare

IoT has the potential to revolutionize the healthcare industry by enabling remote patient
monitoring, real-time tracking of vital signs and early detection of health issues. IoT devices
such as wearables, connected medical devices and telemedicine platforms can enable patients
to receive personalized care and improve patient outcomes.

Manufacturing

IoT can be used in manufacturing to improve efficiency, reduce downtime and optimize
production processes. IoT sensors and devices can collect data on machine performance,
monitor inventory levels and track the movement of products in real-time, enabling
manufacturers to make data-driven decisions and streamline their operations.

Smart Homes

IoT can be used to create smart homes that are more convenient, energy-efficient and
secure. Smart home devices such as smart thermostats, lighting systems and security cameras
can be controlled remotely using smartphones or voice assistants, allowing homeowners to
monitor and control their homes from anywhere.

Transportation

IoT can be used to improve transportation systems by enabling real-time tracking of


vehicles, optimizing traffic flow and improving driver safety. IoT devices such as connected
cars, sensors and traffic management systems can be used to collect data on traffic patterns,
road conditions and driver behaviour enabling transportation authorities to make data-driven
decisions and improve the overall transportation experience.

Agriculture

IoT can be used in agriculture to improve crop yield, reduce water consumption and
monitor soil conditions. IoT devices such as sensors and drones can be used to collect data on
weather patterns, soil moisture and plant growth, enabling farmers to make data-driven
decisions and optimize their crop production.

10
4.3 ADVANTAGES OF IOT
Increased Efficiency

IoT can improve efficiency by enabling real-time data collection and analysis,
automation of routine tasks and remote control of devices. It can reduce the need for manual
labour and increase productivity in various industries.

Cost Savings

IoT can help reduce costs by optimizing resource utilization, reducing waste and
improving maintenance procedures. It can lead to increased profitability and sustainability for
businesses.

Improved Decision Making

IoT can provide businesses with valuable insights by collecting and analyzing large
amounts of data. It can help them make more informed decisions, identify new opportunities
and optimize their operations.

Enhanced Customer Experience

IoT can help businesses provide a better customer experience by enabling


personalized interactions, real-time feedback and remote support. It can improve customer
satisfaction and loyalty.

Increased Safety and Security

IoT can enhance safety and security by enabling real-time monitoring of


environments, equipment and people. It can help prevent accidents, identify potential hazards
and reduce the risk of theft or other security threats.

11
4.4 DISADVANTAGES OF IOT

Security Concerns

One of the most significant disadvantages of IoT is security concerns. As IoT devices
are connected to the internet and communicate with other devices, they are vulnerable to
cyberattacks. Hackers can use IoT devices to gain access to sensitive information or even
control critical systems, such as industrial equipment, medical devices or transportation
systems.

Privacy Issues

IoT devices collect a vast amount of personal data, which can be used for various
purposes, such as targeted advertising, profiling or surveillance. The raises concerns about
privacy and the potential misuse of personal data.

Interoperability Challenges

IoT devices from different manufacturers may use different communication protocols,
making it challenging to integrate them into a unified system. It can lead to compatibility
issues and limit the ability to create a cohesive IoT ecosystem.

12
5. LITERATURE SURVEY
Several studies have investigated the use of Passive Infrared (PIR) sensors for motion
detection in wildlife surveillance systems. Research by Smith et al. (2019) demonstrated the
effectiveness of PIR sensors in detecting animal movements based on changes in infrared
radiation.

Ultrasonic sensors have also been extensively studied for distance measurement in
wildlife detection applications. Johnson et al. (2020) evaluated the performance of ultrasonic
sensors in accurately measuring distances to detect approaching animals.

Vibration sensors have emerged as another valuable tool for wildlife surveillance,
particularly in detecting subtle movements and disturbances. Research by Brown et al. (2018)
explored the use of vibration sensors for detecting ground vibrations caused by animal
footsteps.

13
6. PROBLEM STATEMENT
Our project aims to develop a surveillance system that surpasses existing solutions by
offering minimum power consumption and easy implementation. Existing surveillance systems
often encounter challenges related to high power consumption and complex implementation
processes, limiting their effectiveness and practicality. Our system seeks to overcome these
limitations by prioritizing energy efficiency and simplifying the implementation process,
thereby enhancing the feasibility and accessibility of wildlife monitoring and security
applications.

14
7. OBJECTIVE OF THE PROJECT
The objective of the project was to develop a surveillance system capable of detecting
the presence of warm-blooded beings while minimizing power consumption and ensuring ease
of implementation. This involved integrating sensors such as PIR, ultrasonic, and vibration
sensors into the system to enable comprehensive detection mechanisms. Strategies were
implemented to optimize power usage, including efficient sensor activation and deactivation
methods.

Key Area of Focus

To achieve these objectives, the project was divided into several key areas of focus.
Firstly, sensor integration and detection mechanisms were carefully planned and implemented
to ensure accurate and reliable detection of warm-blooded beings. Power optimization
strategies were then explored and implemented to minimize energy consumption while
maintaining detection efficiency. Through these efforts, the project aimed to deliver a
surveillance system that surpassed existing solutions in terms of efficiency, reliability, and ease
of use

15
8. PROPOSED SYSTEM

8.1 OUR IMPLEMENTATIONS

Hardware Setup

To set Arduino Uno board.

PIR Sensor to detect the motion object ie, warm blooded beings.

Ultrasonic sensor to detect the distance of an object.

Vibration sensor to detect the vibration emitted by the object detected

Software Implementation

Define pin configurations for sensor and output devices.

Set up serial communication for debugging.

Continuously read sensor values and trigger actions based on detected inputs.

Measure the distance and check conditions for activating the buzzer based on PIR and
Vibration sensor readings.

Testing and Validation:

Motion Detection Test: Successfully verified PIR sensor functionality by simulating


motion within its detection range,

Distance Measurement Test: Confirmed ultrasonic sensor accuracy by comparing its


distance measurements with physical measurements.

Vibration Detection Test: Validated system’s response to varying vibration intensities,


determining an appropriate buzzer activation threshold.

Integration Test: Demonstrated overall system functionality by activating all sensors


simultaneously to detect warm-blooded beings and emit alerts.

16
8.2 CIRCUIT DIAGRAM

Fig 8.2.1 Circuit Diagram

17
8.3 BLOCK DIAGRAM

Fig 8.3.1 Block Diagram

18
8.4 MODULE DESCRIPTION

Motion Detection Module :

Utilizes a PIR sensor to detect motion within its detection range.

Detects changes in infrared radiation emitted by warm-blooded beings.

Connected to the Arduino UNO Board and initialized to monitor changes in infrared
radiation levels.

Distance Measurement Module:

Employs an ultrasonic sensor to measure distance between the sensor and an object.

Emits high-frequency sound waves and measures the time for waves to reflect back,
allowing calculation of distance.

Integrated with the Arduino UNO Board to send and receive ultrasonic signals.

Vibration Detection Module:

Utilizes a vibration sensor to detect vibrations emitted by objects within its detection
range .

Triggers a response when vibration intensity exceeds s predefined threshold .

Connected to the Arduino UNO board and configured to monitor vibration levels .

Alerting Module

Responsible for emitting alerts upon detection of warm-blooded beings.

Triggers a buzzer to emit an audible alert when motion and vibration exceed thresholds.

Integrated with the Arduino UNO board to control the buzzer based on inputs from
motion and vibration detection module .

19
9. HARDWARE AND SOFTWARE DETAILS
9.1 HARDWARE DETAILS
Arduino UNO Board
PIR Sensor
Ultrasonic Sensor – HCSR04
Vibration Sensor
Jumper Wires
Bread Board
Buzzer
Arduino Board
An Arduino board is a microcontroller-based development platform designed for
building interactive projects and prototypes. It consists of a physical circuit board typically
equipped with a microcontroller unit (MCU), digital and analog input/output pins, and various
other components such as voltage regulators, LEDs, and connectors. Arduino boards are widely
used by hobbyists, students, and professionals for creating a wide range of projects, from
simple blinking LED experiments to complex robotics and IoT applications. Arduino boards
are typically programmed using the Arduino Integrated Development Environment (IDE),
which provides an easy-to-use interface for writing, compiling, and uploading code to the
board. Arduino uses a simplified version of the C and C++ programming languages, making it
accessible to beginners while still offering advanced capabilities for more experienced users.

Fig 9.1.1 Arduino Board

20
PIR Sensor

Operating Principle : PIR sensors work based on the principle of detecting changes in
infrared radiation levels within their field of view. They contain a pyroelectric sensor that
generates a voltage when exposed to infrared radiation.

Detection Range : PIR sensors have a limited detection range, typically ranging from a
few meters to tens of meters, depending on the model and configuration.

Detection Pattern : PIR sensors typically have a wide-angle detection pattern, covering
a broad area. However, their sensitivity can be adjusted to focus on specific zones within the
detection range.

Detection Modes : PIR sensors can be configured to operate in various detection modes,
including single-zone detection, multi-zone detection, and pet-immune detection, to minimize
false alarms caused by pets.

Fig 9.1.2 PIR Sensor

Ultrasonic Sensor :

Operating Principle : Ultrasonic sensors work based on the principle of echolocation,


similar to how bats navigate. They emit ultrasonic pulses and measure the time it takes for the
pulses to bounce back from an object.

Distance Measurement : By calculating the time taken for the ultrasonic pulses to
travel to the object and back, ultrasonic sensors can determine the distance to the object
accurately.

21
Detection Range : Ultrasonic sensors have a relatively long detection range, typically
ranging from a few centimeters to several meters, depending on the sensor's power and
sensitivity.

Accuracy : Ultrasonic sensors provide high accuracy in distance measurement, with


resolutions as fine as a few millimeters, making them suitable for precise applications.

Fig 9.1.3 Ultrasonic Sensor (HCSR04)

Vibration Sensor

Operating Principle: Vibration sensors typically contain a mass suspended on a


spring, which moves in response to vibrations. The movement of the mass generates a voltage
or current proportional to the acceleration, which is measured by the sensor.

Detection Range: Vibration sensors can detect a wide range of vibration frequencies,
from low-frequency vibrations caused by machinery to high-frequency vibrations caused by
impacts or shocks.

Sensitivity: Vibration sensors can be highly sensitive, capable of detecting minute


vibrations or changes in acceleration. They can also be configured with different sensitivity
ranges to suit specific applications.

22
Fig 9.1.4 Vibration Sensor

Bread Board

A breadboard, also known as a prototyping board or solderless breadboard, is a


fundamental tool used in electronics prototyping and experimentation. Overall, breadboards
are indispensable tools for electronics enthusiasts, hobbyists, students, and professionals alike,
providing a convenient and flexible platform for bringing electronic circuits to life. They
facilitate rapid prototyping, iteration, and exploration of circuit designs, enabling engineers and
designers to quickly iterate and refine their ideas.

Fig 9.1.5 Bread Board

Wires

Male-to-female wires, commonly used in IoT projects and electronics prototyping, are
cables or jumper wires with connectors at each end. These connectors are designed to facilitate
easy connection and disconnection of electronic components, modules, or devices without
soldering.

23
Fig 9.1.6 Wires (Male to Female)

Buzzer:

A buzzer is an electromechanical device that emits sound when an electrical current is


applied. It operates through electromagnetic induction or piezoelectricity. Commonly used in
alarms, timers, and notification systems, buzzers produce audible alerts in various frequencies
and volumes. They are easily integrated into electronic circuits and powered by low voltages,
making them versatile components for indicating events or conditions in devices and systems

Fig 9.1.7 Buzzer

24
SOFTWARE DETAILS

Arduino IDE Software

Tinker Cad Software

Arduino IDE

The Arduino IDE (Integrated Development Environment) is a software application used


for writing, compiling, and uploading code to Arduino microcontroller boards. It provides a
user-friendly interface and a set of tools designed to simplify the process of developing and
programming Arduino-based projects.

Fig 9.2.1 Arduino IDE

Tinker Cad

Tinker cad is an online platform that offers a suite of tools for designing, simulating,
and prototyping electronic circuits and Arduino-based projects. It provides a user-friendly
interface that allows users to drag and drop components, connect them together, and simulate
their behaviour in real-time. Tinker cad is widely used by students, hobbyists, educators, and
professionals for learning, including those related to the Internet of Things (IoT).

Fig 9.2.2 Tinker Cad

25
10. RESULT AND DISCUSSIONS

The motion detection test revealed the PIR sensor's effectiveness in detecting motion
within its designated range. When a warm-blooded being entered the sensor's field of view, the
sensor promptly registered the change in infrared radiation, triggering a response in the system.
This demonstrated the sensor's reliability in identifying moving objects and its suitability for
the project's surveillance application.

In the distance measurement test, the ultrasonic sensor showcased its accuracy in
determining distances between the sensor and various objects. By emitting ultrasonic waves
and measuring the time taken for the waves to bounce back, the sensor provided precise
distance measurements.

Additionally, the vibration detection test verified the vibration sensor's sensitivity to
vibrations. With its ability to detect vibrations or shocks, the sensor effectively generated
signals upon impact. Its responsiveness to various vibration intensities makes it suitable for
detecting movement or disturbances within the environment with the threshold value as user
speciefied.

During the integration test, all sensors seamlessly collaborated to detect the presence of
warm-blooded beings and emit alerts when necessary. By combining inputs from the PIR
sensor, ultrasonic sensor, and vibration sensor, the system accurately identified potential threats
and activated the buzzer as intended. This successful integration underscores the system's
reliability and effectiveness in its surveillance and alerting capabilities.

26
11. CONCLUSION AND FUTURE WORK

Conclusion

In summary, the implemented surveillance system combines PIR, ultrasonic, and


vibration sensors with a buzzer to create a robust detection and alerting mechanism for warm-
blooded beings. The thorough testing conducted validated the reliability and effectiveness of
each sensor in detecting motion, measuring distance, and sensing vibrations. Particularly
noteworthy is the strategic utilization of a threshold value for vibration detection, calibrated to
discern the significant vibrations typically produced by wild animals. This approach ensures a
balance between sensitivity and minimizing false alarms, thereby enhancing the system's
accuracy and practicality in real-world scenarios.

Looking ahead, there are several avenues for further refinement and enhancement.
Optimizing the threshold value for vibration detection represents a critical aspect, requiring
iterative adjustments and fine-tuning to accommodate variations in environmental conditions
and wildlife behaviour.

Overall, the developed surveillance system holds significant potential for wildlife
detection and security applications. By leveraging advancements in sensor technology and data
analytics, it can provide valuable insights into wildlife behaviour and facilitate conservation
efforts.

Future Scope

In future iterations, the surveillance system can be enhanced by integrating deep


learning capabilities using a camera, such as an ESP32 camera module, to capture images of
wild animals. The proposed approach involves activating the camera only when the vibration
sensor is triggered, minimizing power consumption and optimizing resource utilization. By
leveraging deep learning algorithms, the system can analyze captured images to identify and
classify wildlife accurately.

27
12. REFERENCES

[1] M. Moghavvemi and L. C. Seng, "Pyroelectric infrared sensor for intruder


detection", Proc. IEEE Region 10 Conf. (TENCON 2004), vol. 4, pp. 656-659, 2004-
Nov.
[2] Chun-Hao Liu and Burhaneddin Yaman, "Object detection for autonomous dozers",
2022
[3] Gokhan Koc and Korkut Yegin, "Hardware Design of Seismic Sensors in Wireless
Sensor Network", International Journal of Distributed Sensor Networks, vol. 2013,
2013
[4] P. D. Minns, C Programming For the PC the MAC and the Arduino Microcontroller
System. Author House, 2013
[5] Number of Internet of Things (IoT) Connected Devices Worldwide from 2019 to 2021
with Forecasts from 2022 to 2030, Jun. 2022
[6] G. Benet, J. Albaladejo, A. Rodas, P.J. Gil, An intelligent ultrasonic sensor for ranging
in an industrial distributed control system, in: Proceedings of the IFAC Symposiumon
Intelligent Components and Instruments for Control Applications, Malaga, Spain, May
1992, pp. 299–303
[7] F. Blanes, G. Benet, J.E. Simó, P. Pérez, Enhancing the real-time response of an
ultrasonic sensor for map building tasks, in: Proceedings of the IEEE International
Symposiumon Industrial Electronics, ISIE’99, Vol. III, Bled, Slovenia,July 1999, pp.
990–995.
[8] V. Colla, A.M. Sabatini, A composite proximity sensor for target location and color
estimation, in: Proceedings of the IMEKO Sixth International Symposium on
Measurement and Control in Robotics, Brussels, 1996, pp. 134–139.[4] H.R
[9] A.M. Flynn, Combining sonar and infrared sensors for mobile robot navigation,
International Journal of Robotics Research6 (7) (1988) 5–14
[10] Glassner, S. Andrew, Principles of Digital Image Synthesis,Vol. II, Morgan-Kaufmann,
San Mateo, CA, 1995.
[11] L. Korba, S. Elgazzar, T. Welch, Active infrared sensors for mobile robots, IEEE
Transactions on Instrumentation and Measurement 2 (43) (1994) 283–287.
[12] P.M. Novotny, N.J. Ferrier, Using infrared sensors and the Phong illumination model to
measure distances, in: Proceedings of the International Conference on Robotics and
Automation, Vol. 2, Detroit, MI, April 1999, pp. 1644–1649

28
[13] M. Parrilla, J. J. Anaya, and C. Fritsch, “Digital signal processing tech-niques for high
accuracy ultrasonic range measurements,” IEEE Trans.Instrum. Meas., vol. 40, pp.
759–763, Aug. 1991
[14] D. Marioli, C. Narduzzi, C. Offelli, D. Petri, E. Sardini, and A. Ta-roni, “Digital time-
of-flight measurement for ultrasonic sensors,” IEEE Trans. Instrum. Meas., vol. 41, pp.
93–97, Feb. 1992
[15] C. Cai and P. L. Regtien, “Accurate digital time-of-flight measure mentusing self-
interference,” IEEE Trans. Instrum. Meas., vol. 42, pp.990–994, Dec. 1993
[16] F. Gueuning, M. Varlan, C. Eugène, and P. Dupuis, “Accurate distance measurement by
an autonomous ultrasonic system combining time-of-flight and phase-shift methods,”
in Proc. IMTC, vol. I, Brussels, Bel-gium, June 4–6, 1996, pp. 399–404.
[17] G. Andria, F. Attivissimo, and A. Lanzolla, “Digital measuring tech-niques for high
accuracy ultrasonic sensor application,” in Proc. IMTC, vol. II, St. Paul, MN, May 18–
21, 1998, pp. 1056–1061.
[18] U. Grimaldi and M. Parvis, “Enhancing ultrasonic sensor performance by optimization
of the driving signal,” Measurement, vol. 14, pp.219–228, 1995
[19] Honeywell Sensing and Control Catalog. (2000) Series 940-942 Ultra-sonic Sensors.

29
13. SOURCE CODE

#define PIR_PIN 2

#define VIBRATION_PIN A0

#define BUZZER_PIN 5

#define ULTRASONIC_TRIGGER_PIN 3

#define ULTRASONIC_ECHO_PIN 4

long duration;

int distance;

void setup() {

pinMode(PIR_PIN, INPUT);

pinMode(VIBRATION_PIN, INPUT);

pinMode(BUZZER_PIN, OUTPUT);

pinMode(ULTRASONIC_TRIGGER_PIN, OUTPUT);

pinMode(ULTRASONIC_ECHO_PIN, INPUT);

Serial.begin(9600);

void loop() {

int pirState = digitalRead(PIR_PIN);

int vibrationState = digitalRead(VIBRATION_PIN);

digitalWrite(ULTRASONIC_TRIGGER_PIN, LOW);

delayMicroseconds(2);

digitalWrite(ULTRASONIC_TRIGGER_PIN, HIGH);

delayMicroseconds(10);

digitalWrite(ULTRASONIC_TRIGGER_PIN, LOW);

30
duration = pulseIn(ULTRASONIC_ECHO_PIN, HIGH);

distance = duration * 0.034 / 2; // Calculate distance in cm

Serial.print("\nDistance:");

Serial.print(distance);

if (pirState == HIGH || vibrationState >600 ) {

// You can adjust the distance threshold as per your requirement

digitalWrite(BUZZER_PIN, HIGH);

delay(100);

Serial.print("\nAnimal detected");

digitalWrite(BUZZER_PIN, LOW);

delay(100);

} else {

digitalWrite(BUZZER_PIN, LOW);

delay(1200);

31
14. SNAPSHOTS

Fig 14.1.1 Tinkercad Diagram

Fig 14.1.2 Animal Intrusion ( Detection System )

32
15.CERTIFICATES

33
34

You might also like