{'fraction_non_alphanumeric': 0.02411968247506615, 'fraction_numerical': 0.009159373091797273, 'mean_word_length': 4.781994704324801, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A framework implementation of surveillance tracking system based on pir motion sensors

Received Sep 2, 2018 Revised Nov 3, 2018 Accepted Nov 17, 2018 A motion tracking system made from affordable hardware components is implemented to be used inside the University of Kufa (UoK) buildings to track and detect any suspicious activities. The current research objectives are to automatically monitor, track intruders using sensors, servo, and camera that occurs around the system using Arduino microcontroller. The mounted camera track, capture the moving object and sending a live broadcast to a receiving host which could be a desktop computer, laptop, tablet or a smartphone. In this study, we consider the problem of automated position estimation using the electronic circuit of inexpensive binary motion sensors. We present simulation and experiments with Passive Infrared (PIR) motion sensors that suggest our current estimator. Fritzing software simulator is used to test and draw the circuits of the system. The proposed design worked efficiently during the experiments and shown high performance with 360 degrees of detection for the sensing environments.


INTRODUCTION
Sensing environments and security systems are the most significant technologies to keep valuable things safe [1]. Automation of security systems has been an active area of research for privacy concerns. Many of technologies for automated security, wireless networks, and sensing have emerged since the properties become more critical and useful for (Companies, Labs, Government offices, etc.) [2][3][4]. Over the past few years, a lot of surveillance and tracking systems applied in the environments that need to be monitored and controlled remotely based on detecting devices [5]. Algorithms are also involved in improving and enhancing the operations to be automated [6] [7]. To make such systems, electronic components can be assembled to individual formation system based on the purpose that designed [8]. Automatic monitoring systems are specific devices created to rescue lives and save the valuables from theft, damage, etc. [9], [10]. By notifying the in charge person through an online application, camera, alarm, or text message or under any circumstances. Automated systems can be derived to be smart to do the tracking job without need any human interactions [11], [12]. Since environmental sensing devices need sensors to provide information about the movements, a lot of sensing devices are available in markets can be [13]. Security systems deliver the highest level of security to all facilitates which is always can be accessed by the public [14][15]. For that purpose, a video surveillance system is sufficient to monitor movements [16]. The primary focus will be on the sensing device (sensors, detectors, etc.) which give automated surveillance instead of the human surveillance which provide broad real-time support against any threat and helps in investigations [17]. To accomplish the sensing function, sensors need to be addressed as the primary resources. Where the camera must work to detect any movements with high resolution for the intruders through the area that requires being controlled and monitored the captured progress shouldn't provide any biometric test by gait, gesture, or image recognition procedures [18]. New robotic cameras can serve to observe high-resolution detailed images of activity over a full field of view.
Cheap sensors are available in markets especially sensors and cameras because of the rapid advance in technology [19]. That's led to make the aim of monitoring is very powerful since a single sensor with a single camera can be used to an advanced surveillance system or deploying a lot of cheeping sensors and cameras to sense and monitor essential areas. Besides, most of the large area cannot be tracked easily so it requires a large number of viewpoints which cannot be offered by the most of the recent technologies [20]. Automated surveillance systems have been known area for industrial and scientific researchers since it plays a significant role in tracking movements visually [21]. Also, Automation of security systems is an active area of research that also raises fundamental privacy concerns.
A literature survey has been made to discuss the recent technologies in the field of the monitoring systems. There are a lot of designs and proposed methods being used to enhance and improve the monitoring systems, especially the ones that use PIR motion sensors.
Byunghun Song et al. (2008), has made analysis for the performance of the conducted system and proposed that the region of the human motion implemented with algorithm then it has been achieved with actual results in real environments based on the uses of PIR Motion sensors [14]. As well, Masoud Vatanpour Azghandi et al. (2015), demonstrate a simulator to embed the PIR motion sensors inside a house with RFID tags to identify the person who enters it [21]. Hence, the RFID readings with figure out the occupants. In another design, Anshika Chaturvedi et al. (2016), proposed a security system constructed from PIR motion sensor to reduce the power consumption and the space of the memory of the system itself. As a result of this project, the system was able to change the infrared radiation and detect the movement of the objects in practical range of detection. Also, recording when the camera is turned on [22]. While, Serkan Akbas1 et al. (2014), deployed the PIR sensors in the environment where the coverage issue is essential. They preferred to design a security system with a Java simulator based on a deployment theory [23]. This project is different from the above other ones since it tried to change the thinking of making the own system instead of using a microcontroller to manage the tracking process. Besides, Nathavuth Kitbutrawat et al. (2017), took the security from another point of view by proposing a localized sensor method which capable to automatically identify the location of the human movement inside a house by deploying of the multiple PIR motion sensors [24]. The presented system delivered the accuracy of the proposed approach in to (80%) after five days of experiments. As the analysis of this work, the suggested method enhanced the detection accuracy of the security system by changing the position of the sensors until he got this result [24]. Also, the study introduced by Minh Pham et al. (2015), focused on a system to discover humans inside closed environments by deploying PIR motion sensors. The inertial measurement unit is used to determine the body activity of the obtained person. Particle filter-based sensor fusion algorithm proposed to increase the accuracy of detection. All the experiment of this study was tested inside an apartment and used the ground truth data to evaluate the final result for the system [25]. Likewise, Authors Jeremy Schiff and Ken Goldberg et al. (2006), they suggested using inexpensive PIR motion sensors to solve the problem of determining the position of an intruder by using the wireless network technique. They presented a model of experiments and simulation to determine the velocity and the probability of determining the location for any intruders with these [26]. Furthermore, Husni Teja Sukmana et al. (2008), built a surveillance system by attaching PIR motion sensor to Arduino UNO board. The discussed method applies Internet of Thing (IoT) concept by sending real-time notifications through twitter. From this side, mentioned that the result was satisfied because the motions sensors will read the input signal and send it to the main Microcontroller. This technique has shown a reliable process. Whoever, the designed system has some limitations such the limited number of the I/O ports inside the Arduino Board [14]. Also, Suresh.S et al. (2016), used the AtMega microcontroller inside the Arduino to control any suspicious activity inside the house by changing the temperature and humidity inside the room instead of using PIR sensor [27]. GSM module model is used to inform the owner of the house by sending a text message that there is an intruder inside the home. From my point of view, I'm sure that this approach is brilliant and high and could be an alternative in case the motion sensor is not available. Finally, Raviteja Upadrashta et al. (2015), they constructed a system that has the shape of a Sensor-Tower Platform (STP) and was elaborated inside the house [28]. They suggested that this approach would be beneficial and useful in case we distribute the motion sensors among the humans and animals to monitor this activity.

RESEARCH METHOD
This section presents the methodology phases that used in this research, explaining the particular methods, techniques, and tools used to accomplish the research study. The research methodology describes 237 the proposing, design and implementation of the automated intruder tracking system. The method that will be used in this research comprises of three phases: software simulation, programming, and hardware components phase, as shown in Figure 1.

Fritzing Software
Before we implement the hardware design, we need to simulate the system and make sure that the system is working correctly. To do so, Fritzing software is used to accomplish the drawing of the schematic diagram and the circuit.

Drawing Schematic Diagram (Fritzing Software)
Fritzing is an open source, devoted to making creative use of an electronics accessible to everyone. Figure 3 and 4 show all details about the primary connections and parts that used to finalize the research. In the simulation phase, the block diagram and the circuit diagram are drawn after making sure that the block diagram is working.

Drawing Circuit Diagram (Fritzing Software)
After the block diagram is perfectly working, the next step was to implement the real circuit in a virtual environment. Five PIR motion sensors used to detect any movement within a 360 radius. When the PIR sensors detect a movement, the servo motor will rotate to the direction of that movement. Also, there are five LEDs, there LED's indicate which sensor is working when it goes high. Figure 5. Circuit diagram of the proposing system using fritzing software

Programming (Phase Two)
This is the crucial part or phase of the research because we are going to convert the design from a dummy device to an autonomous device by writing a proposed algorithm and then convert that algorithm to a code that written by a programming language. Phase Two (Programming Phase), as shown in Figure 5.

Flowchart
To simplify the progress of writing the code, we required defining a proposed algorithm which consists of a set of inputs and outputs beside a loop and some conditions. Sensors for wireless motion subjected several significant limitations such as: (1) they are binary and (2) after being triggered by movement in their field of view. They suffer from a refractory period of several seconds during which they are unresponsive. Since these sensors and related technologies provide only coarse information about the presence or absence of an intruder.
Sensors are assigned as input to read the signals when the movements are detected. The LEDs are attached as outputs to give the status of the particular sensor when it works. Then, if statement is used to determine the sensor status. If the sensor is high, the led will be on; otherwise, the led will be off, and the previous status sensor will be off too. In case the sensor is on, it will check the sensor whether it detects motions or not, if it detects, the sensor status will be on, and the previous sensor will be on as well. If the sensor read zero, it will keep the last status sensor as it is and will end the program. All the process will repeat itself five-time based on the number of the PIR sensors which is five.  Figure 7. Flowchart of the research system

Writing Code
Writing code from scratch is very hard especially if there is no flowchart to follow. After the diagram is completed, the code is ready to be written. C language is used to convert the flowchart.

Compilation and Uploading Code
This is the final step of the programming phase. In this step, Arduino platform is used to apply the code on the hardware simulation. Arduino is very useful programming tool to learn how to program and to develop electronic circuits. The described flowchart that mentioned (see Figure 6) are converted to C programming language. The next step is to compile the code and figure out if there any compilation issues. If not, the code is ready to be uploaded to the central microcontroller to see the final result. All the details about the programming and compiling will be explained in the hardware part in more information (Section 2.3).

Hardware Components (Phase Three)
The last phase where hardware requirements are assembled selected and described clearly. Phase three (hardware selecting phase), as shown in Figure 7.

Hardware Selecting
The proposed system consists of ARDUINO UNO Board, five LEDs, five PIR motion sensors, five Resistors, one Capacitor, wires, Bread Boards, Servo motor, and Wireless Camera as we see in next Section 2.3.2. (See Table 1).

Hardware Description
Arduino platform is used to write, compile, and upload code. The system uses motion sensors to detect and track any movement occurs around the system using Arduino Uno board. HC-SR501 model PIR sensors are used in this system detection. The total number of sensors in the study are five. Each PIR sensor is attached to a digital input (2-6) on the Arduino, 5V power, and ground. Each LED required to be connected to the corresponding sensor. Each PIR sensor links to the corresponding LED light in the code uploaded later. Figure 8 shows the mechanism of PIR sensor. Table 1. Hardware Component of the Design Figure 9. PIR motion sensor detection from observer's view point A breadboard is used to connect the LEDs. Each one of them is assigned to a PIR sensor to give a high status when the PIR motion sensor detects motion. Directly connect each LED to a separate digital input (9-13) on the Arduino, and ground them through a 220-ohm resistor.
The camera attached to the servo motor which takes its signal from the Passive Infrared Sensor. Since the camera is connected to the servo motor, the servo will make the camera to take a rotation movement to the direction of the active sensor. The servo motor will be connected to the Arduino board through the Input pin 7 to receive the digital signal. The other second one will be connected to the power, while the last pin will be grounded through the same board. It's critical to ensure that the capacitor 100µF is connected between the ground and power before turn on the Arduino. This connection will save the board from any massive power occur while the servo motor is moving. There is additional matter must be noted about servo motor which is that it doesn't have full 360 motion range. After some testing, we figured outs that mine only moved, so modify the code accordingly if your motor differs. When the servo motor makes mashing noise, it will try to move away from the PIR sensor position. The system uses motion sensors to detect and track any movement occurs around the system using Arduino. The mounted camera track, capture the moving object and send a live broadcast to a receiving host which could be a desktop computer, laptop, tablet or a smartphone (see Figure 5). The wiring for this system is simple and straightforward, however, because there are five of everything except the servo motor, the number of wires starts to add up quite a bit. The structure is designed in a way that consists of upper and lower layers and separated between the panels of the fiber class designed for each sensor and also separated between each sensor and the other fiber class is used to not occur between the interference. The diameter of the circle was 31.5 centimeters the length of the board was 10 centimeters, and the width was 15 centimeters.  Figure 3 and Figure 4 are shown the block and schematic diagram of the proposed detection system respectively and Figure 6 show the implementation steps of the final tracking system. Where the system uses five PIR motion sensors to detect and track any movement occurs around the system within a 360 radius using Arduino microcontroller board. Whether, if the PIR sensors detect a movement any, the servo motor will rotate to the direction of that movement. Also, there are five LEDs, there LED's indicate which sensor is working when it goes high. The mounted camera track, capture the moving object and send a live broadcast to a receiving host which could be a desktop computer, laptop, tablet or a smartphone.

RESULTS AND DISCUSSION
As a result for this system, a surveillance motion tracking system is designed and made from affordable hardware components, is implemented to be used inside the University of Kufa (UoK) buildings to track and detect any suspicious activities. The system uses motion sensors to detect and track any movement occurs around the system using Arduino Uno board. The mounted camera track, capture the moving object and send a live broadcast to a receiving host which could be a desktop computer, laptop, tablet or a smartphone. Fritzing is used to draw the circuit and simulate the system. All the progress of the entire work is previously explained in the simulation, programming, and hardware phases. The proposed design worked very efficiently during the experiments and shown very high performance with 360 degrees of detection for the sensing environments. The mathematical calculations and equations weren't that important due to the user of the PIR sensors. The only significant things are the sensing hardware besides the using the right and exact programming (See Figure 6). Another feature added to the system by using built-in application comes with the camera so, the user can install to the smartphones and tablets which helps them to monitor their places while they are away remotely.

CONCLUSIONS AND FUTURE RESEARCH DIRECTIONS
In this study, we have implemented a framework with PIR motion sensors to detect and determine any movement for intruders. With simple tools we were able to track the activity of any person, therefore; it will control essential places and isolated. We started this project by stating the major parts that we need to implement the framework such as Sensors, Boards, Algorithms, etc. Also, we developed a proposed algorithm to process the data which it comes from the sensors to be sent to the motor". "We examined 6 PIR motion Sensor to implement our framework in a simulator. After the results are passed the simulator, we deployed the physical sensors to our final implementation in the UoK laboratory. In the future, we aim to develop the proposed detection system via using different sensor models and different spatial arrangements of sensors and set up the camera system to run over the extended duration in UoK lab (An interesting open problem optimal sensors placement, which can be considered a variant of the art gallery problem). As well, we intend to investigate methods that can simultaneously track multiple intruders. As alongside, we are also interested in ways to decentralize the algorithm by moving processing in a network of smart sensors. Additionally, we plan to investigate how altering parameters, such as the number of samples, or data processing frequency affects performance. Lastly, we can use vision processing techniques to utilize information gathered from the camera to enhance the proposed tracking system.