Design of Wild Animal Detection and Rescue System with Passive Infrared and Ultrasonic Sensor based Microcontroller

Purpose – The purpose of this research is to design and build a wild animal pest repellent device with combination of passive infrared (PIR) sensor and ultrasonic signal based on microcontroller as system controller. The PIR sensor is used to detect the presence of wild animal objects and ultrasonic signals to interfere with thehearing. Design/Methodology/Approach – The design of the system is built based on microcontroller as the system controller.The system as a wholeincludes hardware andsoftware. The design of hardware consists of the system design on the transmitter side and the system design on the receiver side, while the software in the of systemarealgorithms usingC languageprogramming. Findings – The resulting repellent device can detect animals approaching up to a distance of 5 m and may interfere with its hearing with a 40 kHz ultrasonic frequency up to a distance of 20 m. The system also uses remotemonitoringdevicesusing433MHzradiofrequency up to a distanceof 60 m. Research Limitations/Implications – Each animal has different hearing frequencies, as well as some wild animals, but the hearing frequencies of wild animals are generally at ultrasonic frequencies. The frequency of animal hearing may vary from audio frequency to ultrasonic frequency, so ultrasonic wave emissiontesting with varying frequenciesis required. The authors would like to thank the Unit of Research and Community Service of Lhokseumawe State Polytechnic which has provided funds for the implementation of this research. The authors are also grateful to the Telemetry Laboratory of Electrical Engineering


Introduction
Gardening communities in their management often face pest constraints that can reduce or frustrate the harvest in the future.Wild animals besides disturbing plants can also attack villagers and threaten the safety of the soul.The traditional way of expelling wild animals is by ringing trumpets that are specially made and have been handed down from generation to generation.The trumpet is made of buffalo horns carved in such a way and able to make a sound that makes some wild animals uncomfortable and running.Based on the above problems, it is necessary to have a system or device that can expel or keep wild animals of garden plant predators such as cows, goats, pigs, civets, and monkeys from the plantation area.
The purpose of this research is to design and build wild animal pest repellent device with a combination of passive infrared (PIR) sensor and ultrasonic signal based on microcontroller as a system controller.The method used is that the system emits ultrasonic waves according to the range of hearing frequency of wild animals.The frequency released will have an effect that can interfere with the hearing of wild animals.Objects of wild animals will be detected with PIR sensors, then ultrasonic devices will emit a hearing-loss frequency wave.The system will also transmit the animal zone data detected to the monitoring post with telemetry indicator display.

Telemetry
Telemetry is the process of measuring the parameters of an object (objects, space, and natural conditions), in which results show that measurements are sent to other places through the process of sending data either by cable or without using the cable (wireless), then the data are to be used directly or need to be analyzed.In general, the telemetry system consists of six supporting parts, namely measuring object, sensor, transmitter, transmission line, and receiver.
In the purest sense, telemetry is a technology that allows data acquired in one location to be monitored and displayed in another (Dondelinger, 2013).The telemetry system is a remote measurement system with faster data acquisition, more easily, automatically and a wider range of areas.In the telemetry system, the commonly used radio frequencies are Ultra High Freg (UHF) and Very High Freg.(VHF).Their use is possible through 400-500 MHz (UHF) and 100-200 MHz (VHF) frequencies, microwaves (micro wave), radar (radio aid to detection and ranging), satellite, and cellular (GSM and CDMA).

Sensor PIR
PIR sensor is a sensor used to detect the presence of infrared rays.PIR sensor is passive, meaning this sensor does not emit infrared rays but only receive infrared radiation from outside.One of the PIR sensor modules available on the market is the HC-SR501 type.Figure 1 shows the appearance of PIR HC-SR501 sensor module (Chodon et al., 2013).

Arduino uno microcontroller
Arduino-Uno uses the Atmega328 programmable integrated circuit with 6 analog inputs and 14 digital i/o pins.Arduino-Uno operates at 5 V, which is acceptable in most sensor devices (Sidik et al., 2016), 16 MHz ceramic crystal resonators, USB connections, adapter sockets, ICSP header pins, and reset buttons.This is what is needed to support microcontroller easily connected with USB power cable or AC adapter power supply cable to DC or also battery.

Hearing frequencies of some animals
Hearing frequency test in animals is different from the commonly used method with humans to report voluntarily if there is an audible sound.When determining the frequency range in animals, investigators usually have to first train animals to respond to the sound stimulus provided by choosing between two actions.Table 1 shows estimates of different species of  hearing ranges with attempts to apply the same cut-off criteria for all, using data from Fay (1988) and Heffner and Heffner (2007).

Radio frequency 433 MHz
Radio frequency is an electromagnetic wave that propagates in space as a basis for many different communication systems.Due to their varied characteristics, radio waves of different frequencies are used not only for broadcasting but also on cordless devices, telephone, television, radar, navigation, and other communications systems such as telemetry systems.The working of 3-pin RF RF315/433 MHz transmitter and receiver modules is as follows in sending/transforming the secrete information (Agarwal, 2017).

Research and design method
A physical parameter can be measured using sensors and transducers, the results of sensor measurements can be observed indicators in real-time.However, sometimes the measurement data from the sensor must be observed remotely due to environmental factors, difficult to reach remote places.With some alternative data transmission medium, the measurement data of a physical parameter can be sent and observed remotely using a system called telemetry.

Hardware design
The hardware system consists of two parts, namely the dispenser part or its detector, and the receiving part or place of monitoring.The sender section serves to detect the presence of objects, in this case the infrared passive sensor that works.PIR sensors are able to detect live objects that move, especially large ones.The sender section also serves to transmit sound waves that interfere with the hearing of wild animals, in this case the ultrasonic sensors that work.The transmitter system is shown in Figure 2(a).While the receiver serves to monitor the movement of wild animals, if in any zone there are wild animals, the system at the receiver will turn on the indicator according to the zones.The indicators will continue to burn until the wild animals move away from the range of ultrasonic waves.The system at the receiver is as shown in Figure 2(b).

Software design
The algorithm of the wildlife detection and repulsion system consists of two sides, the algorithm on the transmitter side and the receiving side as in Figure 3  4. Result and outside 4.1.PIR sensor testing PIR sensor testing is done using equipment consisting of computer unit, microcontroller, and PIR sensor.The measurement system is configured as shown in Figure 4.This test aims to determine the sensitivity level of PIR sensors to the detection of objects in the form of wild animals.
The result of sensitivity measurement of PIR sensor shows that the voltage of the sensor PIR sensor to wild animal variation is the same that is 3.3 V.This is because the PIR sensor has an output of digital level.This 3.3 V voltage is a digital level for high logic, while 0 V is a digital level for low logic.The range reaches the object indicating that the PIR sensor can still detect at a distance of 5 m for all types of animals tested, as shown in Table 2.

Ultrasonic sensors testing
Ultrasonic signal testing is performed by making several variations of ultrasonic frequency within the range of hearing of wild animals, as shown in Table 3.Several variations of ultrasonic frequency were tested against four wild animal species including 25 kHz, 30 kHz, 35 kHz, and 40 kHz.This signal is formed through programming on a microcontroller as a  wave generator.Ultrasonic signal with a frequency of 25 kHz has a period of 4 Â 10 À5 s.Then this period of time is divided into two parts, that is, 75% for low signal and 25% for high signal.
The effect of 25 kHz ultrasonic signals on animals in Table 3 indicates that all animals tested can be subject to hearing disturbances at a distance of up to 15 m.This ultrasonic wave distance is highly dependent on the radiant power of the signal.The higher the emission power is offset by the ability of ultrasonic devices, the further the radiated distance.

Proceedings of MICoMS 2017
Testing ultrasonic signal with a frequency of 40 kHz has a period of 2.5 Â 10 À5 s.Then the period of time is divided into two parts, that is, 75% or 18 ls for low signal and 25% or 7 ls for high signal, and waveform at a frequency of 40 kHz is shown in Figure 5. Influence of 40 kHz ultrasonic signal to animals indicates that animals of cow, goats, monkeys, and civets are still subject to hearing distances up to 20 m and have not increased the range of hearing loss as shown in Figure 6.

Conclusion
After implementation design of wild animal detection and rescue system with PIR and ultrasonic sensor based on microcontroller the following conclusions can be drawn: PIR sensor is used to detect animals in the form of cow, goats, monkeys and civets with a voltage output of 3.3 V up to a maximum distance of 5 m.Ultrasonic signal with a frequency of 40 kHz is the highest frequency that can be produced on this wild animal repellent device because of the limitations of ultrasonic speakers used with frequency response 3-40 kHz.Frequency 40 kHz is the most disturbing frequency of hearing of all wild animals that are tested at distances up to 20 m.
Figure 2. Transmitter and Reeiver Block Diagram Figure 3. Flowchart on Transmitter and Receiver Side Figure 4. PIR Sensor Sensitivity Measurement Figure 6.Graphic Range of Interference versus Ultrasonic Frequency