International Journal of Current Trends in Engineering & Research (IJCTER) e-ISSN 2455–1392 Volume 2 Issue 4, April 2016 pp. 133 - 144 Scientific Journal Impact Factor : 3.468 http://www.ijcter.com Embedded-Based Moveable CCTV Camera Surveillance System Using PIR Motion Sensors S. B. JAGADAL1, S. V. HALSE2 Ph.D. scholar, 2Professor and chairman 1,2 Electronics department Karnataka State Women’s University, Vijayapura, India. 1 Abstract—In present scenario CCTV camera available in the market is immoveable and has limited view. Therefore many cameras are required to monitor a whole region under video surveillance. In order to increase the field of view of the CCTV it should be made moveable. The proposed system moves camera horizontally towards a location where motion is detected. Here we used two embedded processors which are programmed in assembly language and interfaced to essential peripherals devices such as PIR motion sensors, camera, DC motor, stepper motor, IR proximity sensors etc. The camera is made to slide horizontally in between of sensors pairs (IR and PIR motion sensors) which are fixed on either side of track.IR sensor is located at above or backside of motion sensor.IR sensor is used to stop the DC motor whereas PIR motion sensor is used to run the DC motor. Hence camera is able to travel along the wall and stops at three or more intended locations automatically to record the activities in the monitoring area. Moreover along with this the camera unit is made to rotate left and right on its own axis point using stepper motor. This will increase the field of view of CCTV camera with picture clarity. This proposed system will be very beneficial in helping to monitor restricted areas of a location where motion is less frequent. It helps in reducing the number of cameras used, power consumption, and is cost effective in memory storage. Keywords— Embedded processor, PIR motion sensors, CCTV camera, stepper motor, IR sensor, DC motor and surveillance system. I. INTRODUCTION In today’s world CCTV surveillance system is very essential irrespective of whether it is small business or a multinational business [6]. And every surveillance area is different so we need different kinds of surveillance system with essential qualities for a particular type of area. Some of the public places need continuous monitoring where traffic movement is frequent. Some areas are restricted for human trespassing for security reasons. For such areas we need one or two moveable cameras and few fixed camera to monitor whole region, hence the need to design mainly two kinds of video surveillance system to fulfill these different kinds of requirements. The proposed system can be used mainly for restricted areas whether it is indoor or outdoor. This proposed system has two parts; both parts contain an 8051 microcontroller to control the hardware: in part 1 8051 MCS1 is interfaced to control the stepper motor and two PIR motion sensors. These PIR motion sensors are fixed at angle of 35 degrees at either side of the CCTV camera unit. If any one of the motion sensors shows high output, then 8051MCS1 initiates stepper motor to turn camera at an angle of 35 degree toward left or right as the case may be, and it records the activities in the same location till the motion sensor output fallouts. Otherwise it will remain in central position. In part 2 microcontroller 8051 MCS2 is interfaced with three or more pair of PIR motion sensors and IR obstacle sensors and a dc motor. A horizontal track is fixed on the wall of a building to be monitored as shown in 3D model. DC motor is attached to a wheel so that when dc motor rotates, the wheel will move horizontally to slide the camera to a location where motion is currently detected. The microcontroller is programmed in assembly language to run DC motor in a direction towards detected activity at a point where motion and obstacle sensor are fixed in a pair at either @IJCTER-2016, All rights Reserved 133 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] side of track. The three (or more) motion sensors on the front side of track are paired with three (or more) IR sensors on the backside exactly kept in a line. All IR proximity sensors are situated at backside (or above) of track and all PIR motion sensors are fixed at exactly in front side (or below) of track and that of the IR proximity sensor as shown in 3d model fig 6: When any one of the motion sensor detects motion the microcontroller sense the output and runs the DC motor, subsequently camera moves towards activated motion sensor point. When camera comes in front of corresponding paired IR proximity sensor it sense camera as obstacle. A high output signal is send to the microcontroller. As soon as the signal is received from IR proximity sensor the microcontroller stops the DC motor. CCTV camera halts and records activities. It continues to stay there until the output of motion sensor fallouts. The length of track and distance between two intended locations (paired sensor shack) can be defined by the user as desired or as per the monitoring area demands. The wireless and web enable cameras are best suitable for the proposed system. The proposed embeddedbased system can also be used to control two or more CCTV cameras by repeating software and integrating hardware required for indoor or outdoor surveillance system. II. CIRCUIT DIAGRAMS Fig 1: circuit diagram (part 1) (Interfacing 8051 MCS1 with stepper motor and two motion sensors) @IJCTER-2016, All rights Reserved 134 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] Fig 2: circuit diagram (part 2): (Interfacing 8051 MCS2 with DC motor, pair of sensors with 8051 MCS2) III. HARDWARE DESCRIPTION The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of insystem programmable Flash memory. Stepper Motor: a hybrid stepper motor with a step angle of 1.8 degree and drive voltage of 12 V cab be used. DC motor: A DC Motor with 500 revolutions per minute with 2kg torque feature can be used having an operating Voltage of 12V DC. Two type of sensors are used here are described blow one is PIR motion sensor with Detection range of sensor is 3m to 7m approximately and another is IR proximity sensor which is also called as obstacle detector. IV. SENSORS MODULES Fig 3: Infrared proximity sensor circuit module. Fig 4: Pyro electric ("Passive") Infrared sensor; IR proximity sensor: Proximity sensing is the ability to detect an object or obstacle without any direct physical contact. A typical infrared proximity sensor arrangement consists of a photo diode and infrared IR LED, in which Infrared LED emits the IR radiation which are reflected back to the photo diode from an object within a nominal range. In the field of robotics and automation proximity sensors are used to detect an object as a collision avoidance method or as Object detector to avoid any possible physical impact on detection of an unexpected obstacle on the way points of a robot. These types of proximity sensor use infrared rays for object detection. The infrared proximity sensors have certain limitation or disadvantages; they are affected by external atmospherics and @IJCTER-2016, All rights Reserved 135 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] nature of the object or the surface. The range is usually very less and it can be easily affected by dust particles on sensor, rain or dark objects.[12][13] PIR motion sensor: A passive infrared sensor is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used in PIR-based motion detectors. 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 low power and low cost, pretty rugged, have a wide lens range, and are easy to interface with. 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. When a warm body passes by it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected. [13] V. OPERATIONAL DESCRIPTION The proposed system is divided in to two parts: Part 1: Motion of the Camera about Its Own Axis Part 2: Motion of the Camera along the Horizontal Track Part 1: Motion of the camera about its own axis The circuit diagram showing part 1of the proposed system is depicted in figure 1 and 3d model of the same is presented in figure 5. The 8051 MCS is interfaced with camera, two motion sensors, and a stepper motor. The CCTV camera is mounted on the stepper motor and two motion sensors are attached to the camera at both sides at angle of 35 degree. The microcontroller 8051 MCS1 continuously monitors the output from the two motion sensors. Wherever motion is detected the microcontroller turns the camera towards live motion at an angle of 35 degrees either left or right with the help of stepper motor. The camera records the activities in that location till the output of the motion sensor fallouts. If there are no activities in the surveillance area, under such situation the camera will keep recording by remaining itself at the center position. This part of the system shows the interim movement of CCTV camera about it axis. Part2: Horizontal movement of the CCTV camera. Figure 2 shows the circuit diagram of the second part of the system and figure 6 shows the 3d model of the same. Microcontroller MCS2 is interfaced with a dc motor, three motion sensors and three IR proximity sensors (obstacle sensor). The system installation accommodates some mechanical equipment such as gear wheel and a horizontal track and other supporting materials as per the magnitudes of a specific surveillance area. Part 1 of the system is mounted on the dc motors, and then this dc motor is further attached to a wheel and with a horizontal track. Now the camera is able to slide along the wall on the track. The three motion sensors are fixed at front sides below this track. The user is allowed to choose or define the total distance of the horizontal track and distance between each motion sensors. The microcontroller activates the dc motor when any of the three motion sensors detect activities. The dc motor slides the camera horizontally to a location where currently activities are going on. In case when there are no activities in the area the dc motor keeps the camera unit at central position of the horizontal track. Whenever camera reaches an intended location the IR sensor detects it and the 8051 MCS2 turns DC motor off. And camera is stopped from moving further. This part of the system is not implemented in real hardware instead its working is tested virtually. The above discussed part 2 of the system is simulated in MULTISIM simulator using advanced peripheral device conveyer belt and program is written and executed successfully. A box is moved on conveyer belt can be regarded as CCTV camera. And the conveyer belt can be regarded @IJCTER-2016, All rights Reserved 136 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] as horizontal track and its movement in forward and reverse direction resembles DC motor operation. 3D models: Fig5: 3D model (part1)( top view) Fig 6: 3d model (part2) (front view) @IJCTER-2016, All rights Reserved 137 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] Fig 7 3d model (side view) part1 VI. SOFTWARE DESIGN FOR PART 1: Moving the Camera on Its Own Axis; ORG 000 MOV P0,#00H ; ------------------------Motion Detection by Two Sensors Fixed At 35°--------------------------MOV A,#0FFH MOV P2,A MOTIONCHK: MOV P2,#0FFH SENSORE1: JNB P2.1,SENSOR2 SJMP CAMERA_RIGHT SENSOR2: JNB P2.2,SENSOR1 SJMP CAMERA_LEFT ; port 2 as a input port ; motion detected at right side rotate the camera ; right- side at angle 35'degree ; motion detected at left side rotate the camera ; left-side at angle 35'degree ;************************************************************************** CAMERA_RIGHT: MOV R3,#03H ;rotating stepper motor right side MOV P0,#00H CF1: MOV A,#0EH MOV P0,A @IJCTER-2016, All rights Reserved 138 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] ACALL DELAY MOV A,#0DH MOV P0,A ACALL DELAY MOV A,#0BH MOV P0,A ACALL DELAY MOV A,#07H MOV P0,A ACALL DELAY DJNZ R3,CF1 R-stop: MOV P2,#0FFH JNB P2.1, Back-Centre SJMP R-stop ; to stop the stepper motor at right; side motion sensor ; check motion is there or not.. If not ; Camera back to its Centre position ; camera stops at right position on right ; motion Sensor activation ; ------------- Programing Module To Move Back Camera To Centre----------------------------Back-Centre: MOV R3,#03H CF2: MOV P0,#00H MOV A,#07H MOV P0,A ACALL DELAY MOV A,#0BH MOV P0,A ACALL DELAY MOV A,#0DH MOV P0,A ACALL DELAY MOV A,#0EH MOV P0,A ACALL DELAY DJNZ R3,CF2 SJMP MOTIONCHK ;*************************************************************************** CAMERA_LEFT: MOV R4,#03H MOV P0,#00H @IJCTER-2016, All rights Reserved 139 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] CR1: MOV A,#07H MOV P0,A ACALL DELAY MOV A,#0BH MOV P0,A ACALL DELAY MOV A,#0DH MOV P0,A ACALL DELAY MOV A,#0EH MOV P0,A ACALL DELAY DJNZ R4,CR1 L-stop: MOV P2,#0FFH JNB P2.2, back-Centre SJMP L-stop ; check motion is there or not... if not camera ; back to its Centre position ; camera stops at left position at left motion sensor ;............................................................................................................................................ LBack-Centre : ; moving camera from left side back to center MOV R3,#03H MOV P0,#00H CR2: MOV A,#0EH MOV P0,A ACALL DELAY MOV A,#0DH MOV P0,A ACALL DELAY MOV A,#0BH MOV P0,A ACALL DELAY MOV A,#07H MOV P0,A ACALL DELAY DJNZ R3,CR2 LJMP MOTIONCHK ; ------------------------------------------------------------------------------------------------------------------DELAY: SETB ET1 @IJCTER-2016, All rights Reserved 140 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] SETB EA MOV R1,#030H BACK: MOV TL1,#80H MOV TH1,#20H SETB TR1 HERE: JNB TF1,HERE CLR TF1 CLR TR1 DJNZ R1, BACK RET ;......................................... End of program part 1................................................ .................... END ; -------------------------Program for part 2 of the system------------------------------------------For part2: $MOD51 ; this includes 8051 definitions for the Metalink assembler ; Assembly Program to control Moment of Camera on the Slider Using Motion Sensors and proximity Sensors ; -----------------------------------------------------------------------------------------------------------------MOV MOV MOV MOV SP,#20h P1,#00h P2,#00h P3,#00h LCALL DELAY ;Move SP beyond registers ;Slider Clear control ; Start with a bit of a delay ; Delay for a bit ; set camera position to Center of Slider CENTER: JNB P0.2, FCENTER CLR P2.7 CLR P2.5 SETB P2.6 JNB P0.1, CENTER CLR P2.7 SETB P2.5 CLR P2.6 FCENTER: CLR P2.6 CLR P2.5 SETB P2.7 JNB P0.1, FCENTER CLR P2.7 SETB P2.5 ACALL DELAY CLR P2.5 ; The camera is at center position of the slider ; -------------------------------------------------------------------------------------------------------; Scanning motion sensors M1, M2 AND M3 @IJCTER-2016, All rights Reserved 141 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] MOTION: JNB P1.0, M2 SJMP MOTION1 ; if motion detected by motion sensor 1 M2: JNB P1.1, M3 SJMP MOTION2 ; if motion detected by motion sensor 2 M3: JNB P1.2, MOTION SJMP MOTION3 ; if motion detected by motion sensor 3 ;......................................................................................................................................... MOTION1: CLR P2.5 FIRST: SETB P2.6, REV JNB P0.0, FIRST CLR P2.6 SETB P2.5 CLR P2.5 STOP1: JNB P1.0, CENTER SETB P2.5 SJMP STOP1 ;--------------------------------------------------------------------------------------------------------MOTION2: CLR P2.7 ; clear fwd. signal of dc motor CLR P2.6 ; clear rev signal of dc motor CLR P2.5 ; clear stop signal of dc motor; (no voltage on fwd. and rev; terminal of dc motor) JNB P0.0, THRIDMOTION BK2: SETB P2.5 JNB P0.1, BK2 SJMP MOTION THRIDMOTION: JNB P0.2, MOTION BK3: SETB P2.6 JNB P0.2, BK3 SJMP MOTION ;------------------------------------------------------------------------------------------------------MOTION3: THRID: SETB P2.7 JNB P0.2, THRID CLR P2.7 SETB P2.5 ; stop dc motor CLR P2.5 STOP3: JNB P1.2, CENTERM3 ; go back to center position if no ; Motion detected by sensor M3 SETB P2.5 ; stop dc motor SJMP STOP3 CENTERM3: SETB P2.6 @IJCTER-2016, All rights Reserved 142 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] CLR P2.5 BK: JNB P0.1, BK ; check obstacle sensor for center CLR P2.6 ; stop rev SETB P2.5 ; stop dc motor SJMP MOTION ;---------- --------------------------------------------------------------------------------------------------------DELAY: MOV PSW, #18h MOV R7, #0FFh RET ; Move to register bank 3 ; loop register HALT: JMP HALT ; finish END ; -------------------------------------End of program------------------------------------------------VII. RESULT AND CONCLUSION This paper presents the hardware and software design approach to make a CCTV camera moveable. The CCTV camera is successfully moved about its own axis in real hardware So as to make larger field of view for camera. The camera is moved successfully towards left/right after getting signal from the two PIR motion sensors. The use of PIR motion and IR proximity sensors proved to reduce complexity in software design. Besides this the PIR-based tracking also reveals the benefits of reducing number of cameras utilization. Here a single moveable camera monitors the same area what the two or three fixed cameras would have monitored. Advanced peripheral device conveyer belt in MULTISIM simulator is used in place of track and DC motor (of real employment) to test the program execution and the program is written in assembly language which is executed successfully. The so written program can be burned in 8051 MCS using development board and interfacing minimum three pair of IR and PIR sensors and a DC motor along with mechanical setup as shown in 3D models provided above easily be implemented. The proposed system is useful in areas where motion is less frequent. The camera can be turned on only when more information on the people movements is required. Since this system integrates low power and low cost sensors it allows saving power and reducing cost. So it may be employed to monitor outdoor/indoor of a premises, town centers and help in controlling crime. This proposed system is especially useful in series of compartment or a hostel/building etc. which have several room entrances with including exiting features of CCTV surveillance available in the market. REFERENCES [1] [2] [3] [4] [5] “Webcam Based Intelligent Surveillance System” By Akshada Deshmukh, Harshalata Wadaskar, Leena Zade, Neha Dhakate, Preetee Karmore. In International Journal Of Engineering And Science Vol.2, Issue 8 (March 2013), Pp. 38-42 Issn (e): 2278-4721, Issn (p):2319-6483, Www.Researchinventy.Com. “Smart Surveillance System using Thing Speak and Raspberry Pi” by R.Chandana , Dr.S.A.K.Jilani and Mr.S.Javeed Hussain. in “International Journal of Advanced Research in Computer and Communication Engineering Vol. 4, Issue 7, July 2015 . “Smart Surveillance System Using PIR Sensor Network and GSM” by M. Sathishkumar, S.Rajini International Journal of Advanced Research in Computer Engineering & Technology (IJARCET) Volume 4 Issue 1, January 2015. “Motion detection enhanced with algorithms in wireless surveillance systems” by Chaitali S. Panchal, and Mitul M. Patel IJAERS/Vol. I/ Issue III/April-June, 2012/268-269. “Surveillance of Object Motion Detection and Alert Using Android”by S.Shahid Ali Basha, T.Senthil Kumar, in International Journal of Engineering Development and Research ( www.ijedr.org) 2014 IJEDR | Volume 2, Issue 1 | ISSN: 2321-9939. @IJCTER-2016, All rights Reserved 143 International Journal of Current Trends in Engineering & Research (IJCTER) Volume 02, Issue 04; April – 2016 [Online ISSN 2455–1392] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] “Role Of CCTV In Business Organization: A Case Study “by Harikrishnan G in International Journal of Commerce, Business and Management (IJCBM), ISSN: 2319–2828Vol. 3, No. 3, June 2014. “A Study of Motion Detection Method for Smart Home System” by Mayur J. Charadva * Ramesh V. Sejpal Dr. Nisha P. Sarwade in International Journal of Innovative Research in Advanced Engineering (IJIRAE) ISSN: 23492163 Volume 1 Issue 5 (June 2014) http://ijirae.com. “Speed control of DC Motor A review” by Prabha Malviya and Menka Dubey. at http: // www.ijesrt.com in International Journal of Engineering Sciences & Research Technology ISSN: 2277-9655 August, 201 “Human Motion Detection Using Passive Infra-Red Sensor” by K Sravani1, Md. Parvez Ahmed, N Chandra Sekhar, G Sirisha,V Prasad. in International Journal of Research in Computer Applications & Information Technology, Volume-2, Issue-2, March-April, 2014, “A study on usage of CCTV surveillance system with special reference to business outlets in Hyderabad.” By T. Nagalakshmi in Tactful Management Research Journal. Vol. 1, Issue. 2 , Nov 2012 “Remote Controlled Six Camera CCTV Switcher System” by Mr.C.S.Patil Mr. Sagar B. Kothawade, Miss chaudhari J.R In International journal of advanced electronics & communication systems FEB, 2014. http://www.instructables.com/id/PIR-Motion-Sensor-Tutorial/ https://en.wikipedia.org/wiki/DC_motor./ IR and PIR sensor “Tracking Motion Direction and Distance With Pyroelectric IR Sensors” by Piero Zappi, Elisabetta Farella, and Luca Benini, Fellow, IEEE SENSORS JOURNAL, VOL. 10, NO. 9, SEPTEMBER 2010. “Embedded Surveillance System Using PIR Sensor” by Padmashree S. Dhake and Sumedha S. Borde. www.ijates.com in Volume No.02, Issue No. 03, March 2014 “Dynamic Calibration of Pan–Tilt–Zoom Cameras for Traffic Monitoring” by Kai-Tai Song, Associate Member, IEEE, and Jen-Chao Tai CYBERNETICS, VOL. 36, NO. 5, OCTOBER 2006 “Wireless Surveillance Robot with Motion Detection and Live Video Transmission” by A.Sivasoundari, S.Kalaimani, M.Balamurugan in International Journal of Emerging Science and Engineering (IJESE) , Volume-I, Issue-6 April 2013 “Design and Implementation of Robot Motion with IR Wireless Camera [Review]” by Ujwala G. Meshram and Shubhangi Borkar, in International Journal on Recent and Innovation Trends in Computing and Communication Volume: 3 Issue: 2 February 2015, Available @ http://www.ijritcc.org “Detection and Tracking of Moving Object for Surveillance System” by Mrinali M. Bhajibhakare, Pradeep K. Deshmukh in International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Volume 2, Issue 12, December 2013 ARTICL CCTV Surveillance Systems These systems usually consist of @IJCTER-2016, All rights Reserved 144