PIR Based Security System Done by:Boddu Chandu – CB.EN.U4EIE16006 Hari Mathur – CB.EN.U4EIE16016 Karan Sudheer – CB.EN.U4EIE16023
Department of Electronics and Instrumentation, Amrita School of Engineering, Amritanagar P. O., Coimbatore -641112
Abstract In this paper, a PIR based security system which saves the power consumption and the memory space of the recording system has been proposed. Passive Infrared Radiation (PIR) sensor detects the change in infrared radiation of warm-blooded moving object in its detection range. According to the change in infrared radiation, there will be a change in the voltages generated which was amplified and used to turn ON the camera and the lighting system through relay. Software was developed and installed in the computer to capture and record the video when the webcam gets turned ON. When an intruder comes in the detection range of the PIR sensor, it actuates the lighting system and the webcam. The software detects the camera connection and starts to record the video. Once the intruder moves out of detection range of the sensor, the webcam and light get turn OFF. The software repeats the process. Through this method, the lamp and webcam will only get turned ON when PIR sensors detects an object, hence saving power consumption and memory space.
Introduction: Due to the increase in crime rates and burglary, the need for security system is very essential. We have lots of security systems in the market for both indoor and outdoor applications such as ultrasonic detectors, CCTV, microwave detectors, photoelectric detectors, infrared detectors etc... However, these systems have the limitations of being expensive, have high electrical power consumption, utilizes more memory space of the recording system and have complex circuitry, etc. A solution to overcome these problems could be by using a sensor of low cost which has the ability to detect the intruders as they come within the sensor’s detection range and by generating an output when detected. This output can be used for further signal processing or activating other devices like alarm system, lighting system, recording system and similar devices. This could save power consumptions as some components get actuated only when there are intruders in the sensor’s detection range. Passive Infrared Sensor is a low cost, low power and reliable sensor. Therefore, it was felt that a PIR sensor-based security system consisting of the sensor, a lighting system and a recording system (OV7670 camera module and software for recording and saving the video) could overcome few or all of the above stated problems. The sensor can detect the levels of infrared radiation in the presence of intruders. Upon detection of IR, PIR sensor generates the output in the form of electrical signal. Although the output from the sensor is of few volts, it could be amplified to required voltage using amplifier circuit and could be used for actuating lighting system and the webcam. The lamp and camera could be turned ON when the PIR sensor is activated and could remain OFF when the sensor is idle. This way, the energy consumed by the overall system could be minimized. Also, the cost of system could be far less than the security system available in the market. With this hypothesis, we have proposed a simple low power PIR based security system. It consists of connecting lighting system and camera to the PIR senor and software development for the recording video captured by webcam on the computer. The system works in the following steps: i. ii. iii. iv. v. vi. vii.
The software developed is kept running and checks if the camera is turned ON. When an intruder comes in the detection range of the PIR sensor, the sensor generates an output of approximately 3.3 volts. This output is further amplified and is used for activating the relay of the lighting system and the webcam. Once the lamp and camera are actuated with the output from the amplifier, software finds the camera when turned ON. The software starts to save the video captured by the camera on the computer. After the intruder leaves the detection range of the sensor, there is no output from the sensor. Therefore, it turns OFF the lamp and the camera. The video captured will be saved in the computer. Every time when the intruders come in the detection range of the sensor, the above steps from step 2 to step 6 repeats.
The proposed system basically consists of two parts viz. hardware part and software. These two parts are interfaced to work with each other according to the response of the PIR sensor.
Hardware Parts The hardware part consists of PIR sensor, power supply, amplifier, window detection circuit, camera and the computer. 1)
PIR Sensor:
PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors.
PIRs are basically made of a pyroelectric sensor (which you can see below as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low.
2)
Op AMP 741
The µA741 device is a general-purpose operational amplifier featuring offset-voltage null capability. The high common-mode input voltage range and the absence of latch-up make the amplifier ideal for voltage-follower applications. The device is short-circuit protected and the internal frequency compensation ensures stability without external components. A low-value potentiometer may be connected between the offset null inputs to null out the offset voltage.
The µA741C device is characterized for operation from 0°C to 70°C.
3)
Op Amp LM324
The LM324 series are low-cost, quad op-amps with true differential inputs. They have several distinct advantages over standard operational amplifier types in single supply applications. The quad amplifier can operate at supply voltages as low as 3.0 V or as high as 32 V with quiescent currents about one-fifth of those associated with the MC1741 (on a per amplifier basis). The common mode input range includes the negative supply, thereby eliminating the necessity for external biasing components in many applications. The output voltage range also includes the negative power supply voltage.
4)
IN4148 Diode
The 1N4148 is a standard silicon switching signal diode. It is one of the most popular and long-lived switching diodes because of its dependable specifications and low cost. Its name follows the JEDEC nomenclature. The 1N4148 is useful in switching applications up to about 100 MHz with a reverse-recovery time of no more than 4 ns.
5)
2N222A/ZTG Transistor
The 2N2222 is a common NPN bipolar junction transistor (BJT) used for general purpose lowpower amplifying or switching applications. It is designed for low to medium current, low power, medium voltage, and can operate at moderately high speeds. It was originally made in the TO-18 metal can as shown in the picture. The 2N2222 is considered a very common transistor, and is used as an exemplar of an NPN transistor. It is frequently used as a small-signal transistor, and it remains a small general purpose transistor of enduring popularity.
6)
OV7670 Camera Module
The OV7670 is a low voltage CMOS image sensor that provides the full functionality of a singlechip VGA camera and image processor in a small footprint package. The OV7670 provides fullframe, sub-sampled or windowed 8-bit images in a wide range of formats, controlled through the Serial Camera Control Bus (SCCB) interface. It has image array capable of operating at up to 30 frames per second (fps) in VGA with complete user control over image quality, formatting
and output data transfer. All required image processing functions, including exposure control, gamma, white balance, color saturation, hue control and more, are also programmable through the SCCB interface. In addition, Omni Vision Camera chips use proprietary sensor technology to improve image quality by reducing or eliminating common lighting/electrical sources of image contamination such as fixed pattern noise, smearing blooming to produce a clean, fully stable color image.
Software
1)
INTELLIJ IDEA
INTELLIJ IDEA is a Java integrated development environment (IDE) for developing computer software. It is developed by JetBrains (formerly known as IntelliJ), and is available as an Apache 2 Licensed community edition,and in a proprietary commercial edition. Both can be used for commercial development 2) Arduino IDE The following Libraries were used:
LiveOV7670 - Modified (Arduino IDE) Arduin CameraCapture.jar (Intellij IDEA)
Algorithm for Camera control 1)