You are on page 1of 5

GSM based Security System using LabVIEW

Hasan Baig1, Muhammad Owais1, Muhammad Saleheen Aftab1, Kamran Shamim1 and Hamza Azeem2
Department of Electronic Engineering NED University of Engineering & Technology, 2PAF KIET, Pakistan. (hasan.baig, ovaisbabai, saleheen2006, kamranshamim, hamzaazeem)@hotmail.com
1

Abstract- The purpose of this paper is to introduce an efficient, reliable and cost-effective security system for use at homes, offices, schools, and shops. The system automatically reports intrusion by making a call to a target mobile phone. Thus, the reporting mechanism is based on Global System for Mobile (GSM) and the logic is designed using LabVIEW. Keywords: Security System, LabVIEW, GSM, Infrared.

II. HARDWARE Infrared transmitter-receiver has been used to detect the obstruction in infrared beam. Transmitter is placed at one end and receiver is placed at a distance (according to its range) exactly in the line of sight of transmitter at the other end. The basic component of transmitter is LM555 which generates the desired frequency to be transmitted to receiver. A. Transmitter

I. INTRODUCTION One of the biggest demerits of the development in the field of technology is the innovative techniques and ideas that are being introducing for illusory purposes. These imperfections of on going technology should be prevented through the inventions to hinder such types of criminal or illegal activities. This project is one of such campaigns which are taking part to guard the areas that need a lot of security. The theme of this model is illustrated in Fig. 1. The figure shows the whole system comprises of two sections. First one is Hardware and the second one is Software (Computer). Hardware section senses the interruption in infrared beam and generates a HIGH voltage level which in turn provided to the computer via LPT (Line Printing Terminal). This condition is detected by logic, programmed on LabVIEW causing the computer to make a call (to a number assigned for receiving alert) through mobile connected to computer via Bluetooth device. The model is divided into two sections. Hardware Software The transmitter circuit is quite simple and based on LM556 timer, which consists of two 555 timers. These two timers operate independently of each other sharing only VCC & Ground. The first timer generates a square wave of about 10ms (100 Hz) with a duty cycle of about 96% while the second timer generates a 38 kHz square wave. This particular frequency is set in order to modulate the 100Hz signal (Amplitude modulation) to fulfill the characteristics of the receiver module. Also the inverter has been used after the output of the first timer. As the module can detect the square wave signal properly of around 38 kHz modulated by another square wave signal with a minimum period of about 10 ms at a duty cycle of 4%, which can not be achieved by a 555 timer directly as it can generate the signals with a minimum duty cycle of 50% [1]. Thus first a square wave of 96% duty cycle is generated and then it is inverted to have a duty cycle of 4% (Fig. 2).

Fig. 1. The Block diagram of Security System. Fig. 2. Inverted signal

III. SOFTWARE The software section of the system has been designed on LabVIEW, a leading graphical tool for Science and Engineering development. It offers built-in functionality for simulation, measurement analysis, instrument control, data acquisition and data presentation. LabVIEW is an acronym of Laboratory Virtual Instrument Engineering Workshop. It is flexible instrumentation and analysis software developed by National Instrument (a company that creates hardware and software using computer technology to help engineers and scientists take measurements, control processes and analyze and store data) [3]. LabVIEW programs are called Virtual Instruments (or VIs). It is a Graphical programming language (G-Language) rather then the text language like C or FORTRAN. LabVIEW is a powerful and complex programming environment that uses a terminology familiar to scientist and engineers, and the graphical icons (used to construct the G programs) that can easily be identified by quick visual inspection [4]. A. LabVIEW Environment LabVIEW programming is divided into two parts. Front Panel (Fig. 5) and a Block Diagram (Fig. 6). Front panel is the user interface of a VI. One can build the front panel with Controls: and Indicators, which are the interactive input and output terminals of the VI, respectively. Controls are knobs, push buttons, dials, and other input devices while Indicators are graphs, LEDs and other visual displays. Controls simulate instrument input devices and supply data to the block diagram (visual source code).

Fig. 3. Final waveform at the transmitting end.

The RESET pin of 38 kHz timer is connected to the inverted output of the 100 Hz signal so that the second timer works only when the Reset pin of the timer is given high voltage. Fig. 3 shows the final modulated waveform of the transmitter with which the IR led is driven. B. Receiver The module used in receiver is TSOP 1738. Its main features include immunity to invalid signals (due to band pass filter inside the module), low power consumption and active low output [2]. It receives the modulated infrared signals from the transmitter portion and due to demodulator inside the module; the carrier and modulated waves are separated. At the output pin we have our 100 Hz signal. This is the output which is to be provided to computer through D0 pin of parallel port. Since the LPT works on Low and High voltage levels, therefore the square wave signal has to be converted into voltage levels using the conditional circuit shown in Fig. 4.

Fig. 4. The circuit which converts square wave signal into voltage levels.

Fig. 5. The front panel of Security System.

Fig. 6. The Block Diagram of Security System.

Whereas Indicators simulate instrument output devices and display data, which the block diagram generates according to the logic. The block diagram contains the graphical source code of VI. The objects (Controls or indicators) appear as icon terminals on the block diagram. Wires connect control and indicator terminal to express VIs B. Working The function of this program is to sense high voltage, to be appear at D0 pin of parallel port (pin configuration of LPT can easily be found on internet), which is produced when the infrared beam is interrupted. In Fig. 6, the outer most rectangular box is the while loop which contains the whole logic of the system. The logic of this system is designed to detect level HIGH at D0 pin of LPT and then to make a call at a particular number. So the program runs until the high voltage is read at D0 pin of LPT (terminating condition of while loop). The graphical code at the extreme left bottom, detects whether D0 pin of LPT is High or Low. Three comparators are used in this section. Comparator has two inputs and an output. Output of comparator is true when both of its inputs are equal. The output of the comparator (at the bottom), is connected to the indicator (green LED icon), signifies no interruption. One input of this comparator is

provided a constant value 0 while the other one is connected to the output of In Port.vi (VI used to read data). When it reads 0, it means D0 is Low and both the inputs of this comparator are equal, thus indicating No Interruption with the glow of green LED. The comparator just above this comparator is used to determine the condition at which the while loop is to be terminated. Its output is connected to the conditional terminal (terminal which terminates the while loop when the condition is true) of the while loop. One of its inputs is connected to a constant value 1. Another one is connected to the output of In Port.vi. Thus a while loop will continue on running until this input will become 1 i.e. when D0 gets High. The 2nd rectangular boundary, inside the while loop is the Case Structure which executes only when the output of the uppermost comparator is true i.e. when D0 is High. Now, when the condition of case structure to execute is satisfied, the code inside the structure (at the bottom) will make a call to a number on which the person is supposed to receive alert. The rectangular box shown inside the Case Structure is For Loop. It is an optional work and is done to blink the Red LED on front panel when system read High at D0. The Variable N is the number of how many times the loop executes. The iteration (i) terminal provides the current loop iteration counts and its value ranges for 0 to N-1. In this case, the loop runs for the 10 times (N=11). The upper left most logic is developed to simulate the project.

Fig. 7. Green light indicates No Interruption across Infrared transmitter-receiver.

Fig. 8. Red light starts blinking when interruption occurs across Infrared transmitter-receiver.

Two constant values 1 and 0 are given to the inputs of Select function. This function passes the value to the output when the Control wired to its select input is true or false. . In this case, simulation button icon is connected to its select terminal. When this select button is not pressed (false condition), value 0 will appear at its output terminal. When this select button is pressed (true condition), value 1 will appear at its output terminal which in turn insert into the input of OR gate. Since one input of OR gate is set to 0 therefore output of OR gate will be 1 which will get into the write value terminal of Out Port.vi (VI used to write data at the LPT port). Hence a High voltage is manually written at D0 pin of LPT so the program runs in the same manner as it runs when D0 gets High due to the interruption in the infra red beam. The option has been provided on the front panel to enter the mobile number (Fig. 7) on which one wants to receive alert when anyone crosses the infrared beam. Program signifies No Interruption indicated by green light (Fig. 7) until interruption occurs across infrared transmitter-receiver. Notice that in Fig. 7, grids are absent as compared to that of fig. 5. This will be the case either when the Virtual Instrument is running or when the block diagram of VI is password protected. When the infrared beam interrupts, a high voltage will appear at D0 pin (any pin of LPT can be exploit for this purpose except 18-25 as they are gnd pins) of parallel port, red light (Fig. 8) starts blinking and makes a call at a number that has been entered for being informed of current situation. This call will be made using Bluetooth device.

Notice that in Fig. 8, extreme left LED (D0) of data read indicator is glowing, indicating that a high voltage has been read at D0. One thing should be kept in mind that in LabVIEW, the leftmost bit is (by default) LSB (Least Significant Bit) whereas the right most is MSB (Most Significant Bit) i.e. D0D1D2D3D4D5D6D7, which is in fact opposite to that of standard (i.e. D7D6D5D4D3D2D1D0). There is a simulation button showing at the bottom of front panel. This button can be used to simulate the project even when the hardware is not connected to the computer via parallel port. This is one of the magnificence of LabVIEW. C. Bluetooth Fig. 9 shows the IDE of the software of Bluetooth which comes along with a device. There are many options showing at the top among which Bluetooth Serial port service has to be used. The purpose of this function is to create a virtual serial port for the Bluetooth device connected to the USB port of computer. It will assign a unique virtual serial port to the Bluetooth device rather than a COM1 which is by default a standard serial port of ordinary computers. The computer now assumes that a data is transmitting serially to the device (Bluetooth mobile) which is connected to the computer via Bluetooth device. Now mention the COM port (virtually assigned for mobile device) in the LabVIEW block diagram. It access to the particular COM port to which the mobile device is connected, when a specific condition (to make call) is being satisfied. Finally, call can easily be made by using AT or ATtention Commands.

Fig. 9. The software of Bluetooth that creates virtual serial port for Bluetooth device.

IV. CONCLUSION This model described is appropriate for securing homes, industries and offices. The source code of program can be further improved to ensure that the call has been made to a person who is supposed to be alert when someone crosses the door. This can be done by using simple AT indication that is received by a calling mobile when network goes busy. It will keep on calling repeatedly until the successful attempt of making call is made. More enhancements can be employed to this project by making it independent of PC and this can be achieved by means of microcontrollers. Further enhancement that can be applied to this project is that when an alert is received, one can command a machine or Robot (positioned at a place which is to be protected. e.g., at home) to perform some pre-defined tasks (tasks to be perform when it receives signal) via Short Messaging Service (SMS). REFERENCES
[1]. Thomas L. Floyd, Electronic Devices, Pearson Education, 2002. [2]. Infrared receiver Modules, www.vishay.com. [3]. Robert H. Bishop, Learning with LabVIEWTM 7 Express, Pearson Education, 2005. [4]. National Instruments, www.ni.com.

You might also like