Computer Monitoring and Security System Using Bluetooth Technology

The design and implementation of security, monitoring and controlling system with data communication based on Bluetooth technology is described. The application has been accomplished using wireless Bluetooth USB into the motion detector to demonstrate the establishment of connection and the changing of the motion detector settings. There will be a Graphic User Interface (GUI) implemented on the User Laptop and protocol written to let the user configure the motion detector sensitivity and range also monitoring using wireless surveillance camera. The study also describes an investigation into implementation potential of remote access methods to laptop using PC Anywhere method. The implementation process consisting of application architecture design, system requirement, software design, hardware design and establish Bluetooth connection is described in detail. Experimental results show that the designed system is more reliable, flexible and easy to use.


Introduction:
Home Security System is gaining its importance in many modern homes. With a personal computer available in many households today, home security system has found its practical application in Personal Area Network (PAN). PAN offers to users the advantage to personalize the network according to their needs instead of linking to public network. Fire alarm system is becoming essential in any home security system. Users are no longer satisfied with a simple fire alarm detector that just senses and sounds the alarm. Many would like to have a security system that monitors and alert them in case of emergency especially when they are away. Many products in the market are expensive, complicated and require the system to be linked to a public emergency system. However, people are looking for a low cost and simpler solution.
The aim of this research is to incorporate wireless technology into the motion, which uses the Bluetooth technology to enable a Laptop (User) to control the sensitivity and range of the detection area.
Replacing of wired connections between electronic devices with wireless connections will revolutionize the way for organizing industrial, office and home environments [1].

The Bluetooth Technology:
Bluetooth is currently arises as one of the most promising personal wireless network technologies. Bluetooth is a short range wireless technology standard intended to replace cables connecting mobile and fixed electronic devices, such as handhelds, mobile phones and laptops to external peripherals and with each other forming a Personal Area Network (PAN) [2]. Bluetooth key features are robustness to interference, low complexity, low cost, inherent security and low power, where it operates in the 2.4 GHz frequency ISM band [3].
Bluetooth is a low power, short-range radio wireless technology. Recognizing the literal jungle of connectivity options as an impediment to the ability to allow different gadgets to interoperate was more likely one of the reasons for the development of Bluetooth. It is designed to support communications at distances to approximately 100m for devices that operate using a limited amount of power. Its design for low power consumption makes the technology well suited for use with small, portable devices that typically are powered by battery. The Bluetooth technology has created a notion for Personal Area Network, a kind of close range wireless network that look set to revolutionize the way people interact with information technology around them. It allows PDAs (Personal Digital Assistance) to connect to cell phones and cell phones to connect to notebooks, the potential use of Bluetooth is only limited by ones imagination. Printers, fax machines, keyboards, even toaster, as well as home and office alarm systems, all eventually could be Bluetooth-compliant [4].
The following are the Stack that contains the higher layers of the Bluetooth protocol stack and compliant with the Bluetooth specification: 1. Radio Frequency Communication (RFCOMM) 2. Service Discovery Protocol (SDP) 3. Logical Link Control and Adaptation Protocol (L2CAP) 4. Host Controller Interface (HCI) Driver The Bluetooth specification is made up of seven main Protocol Stacks. A brief description of each of their function is shown in Fig. 1 .

Application
Host Controller Interface HCI firmware L2CAP Link Manager Base band RF (radio and antenna)

Fig. (1) Bluetooth Protocol Layers
Bluetooth operates in the unlicensed ISM band at 2.4GHz. As this frequency is not reserved for Bluetooth, a frequency-hopping scheme with 79 sub-frequencies is used to combat interference and fading. The frequency-hopping scheme also enables Bluetooth to work not only in point-to-point connections but also in point to multi-point connections.
Each Bluetooth device may be a Master or a Slave at any one time, though not simultaneously. Two or more units share the same channel forming a piconet, consisting of one master an up to seven slaves.
Every Bluetooth device has a unique Bluetooth device address, and a Bluetooth clock. When Slaves connect to a Master, they are told of the Bluetooth address and clock of the Master. The Master controls when devices are allowed to transmit.

Home Security System Design:
Basically, a home security system is to protect one property from intruders. We can categorize it in to two parts. They are the exterior sensors and the interior sensors. The sensors should perform one of the three functions: (1) Detection of an intruder approaching or penetrating a secured boundary, such as a door, wall, roof, floor, vent or window.
(2) Detection of an intruder moving within a secured area, such as a room or hallway.
(3) Detection of an intruder moving, lifting, or touching a particular object. The interior sensors are also susceptible to false and nuisance alarms, however not to the extent of their exterior counterparts. This is due to the more controlled nature.
In order to fulfill the aim of this paper, it is necessary to derive the hardware architecture design based on the understanding of the Bluetooth technology. To begin, the basic design module of the hardware is shown in Fig. 2 below.
This section describes the design requirements :

Power Requirements:
A 9 V battery will be used for the motion detector with an estimated life of 9 months to 1 year. Another consideration is that the product has to consume the least power possible to conserve and enhance the battery life.

Processor Requirements:
The product will use a low power ATMEL AT90S8515 CMOS 8-bit microcontroller. The AT90S8515 microcontroller achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed. Some of the features of the AT90S8515 are: 8k  The wireless tuning of the motion detector will be done with the Bluetooth Stack residing on a laptop and communicates with the motion detector via the serial link (RS-232 serial cable between the motion detector and the laptop). The setting is get from the remote laptop over the Bluetooth communication and then send over via the serial cable to the motion detector.
The prototype Bluetooth communication link will be done by using two laptops with Bluetooth stack resides on the Laptop connected with the Ericsson ROK 101007 Bluetooth module via the Universal Serial Bus (USB). The motion detector will be connected to one of the laptop via the serial link (Serial cable between the motion detector and the laptop) [5].
In this research PC Anywhere method has been used as remote access to the master desktop PC. PC Anywhere is a useful tool for accessing PC over a network, from a PC at a different locations. Typically, people use PC Anywhere to connect from their home computers to their office PCs. PC Anywhere's built-in 256-bit encryption and enhanced video performance help make communications much more secure and fast. The PC Anywhere method has several features [6]: • Connection wizard guides new users through their initial client-host connection. • Powerful file-transfer capabilities allow users to upload and download files across different platforms. • Mandatory password protection and login encryption help ensure that only authorized users can access a PC Anywhere host. • Remote Management tools provide direct access to vital operating system utilities (such as Command Prompt, Task Manager, and Services) on the host system. Single Session manager combines PC Anywhere manager.

Security Requirements:
The sensor for the motion detector is the LHi-958 pyroelectric (PIR) sensor. It is an infrared detector for passive infrared intrusion alarms and motion detector.
The pyroelectric materials produce a charge transfer when they undergo a change in thermal energy. This effect is applied for detectors that show an output signal similar to alternating current with a charge in the infrared radiation. The uses of these sensors are in movement detectors, passive infrared alarms and automatic light switches.
The typical connection the PIR sensor consist of the amplifier is a typical bandwidth limited to about 1Hz to reject high frequency noise. The comparator responds to both positive and negative transitions of the sensor output signal.

PIR Motion Detector:
The wireless communication of the Bluetooth motion detector will be done using the Ericsson ROK 101007 module with the laptops. The Ericsson ROK 101007 is a short-range module for implementing Bluetooth functionality into various devices. The module also supports all Bluetooth profiles.
There will be a Graphic User Interface (GUI) implemented on the User Laptop and protocol written to let the user configure the motion detector sensitivity and range. While the motion detector will be connected to the other Laptop via the serial port using the RS-232 cable. The application running on the microprocessor (ATMEL) in the motion detector gets the data from the Serial Port and then changes the settings on the motion detector.
The scope of this project is to produce a microcontroller controlled motion detector connected to a laptop via a serial cable, which enable a remote laptop to control the sensitivity and the range of the motion detector. This technique gives the homeowner more reliable, flexible and easy to use for monitoring the home indoor or outdoor by depending on transmit power type of Bluetooth device inside laptop. Let us discourse for a while and explain what is basic capability of a Home Security System motion detector.

Hardware Design:
The control Board consists of several components, the description of these components is the same as in control board1. These elements are illustrated as follows: The control board consists of 15-bit bi-directional I/O port, it can connect 4 devices to this board. The microcontroller has two ports (p1 and p3). The p3 is an 8-bit bi-directional I/O port (p3.0 -p3.7), these ports are connected to 74LS244. P1 is an 8bit bi-directional I/O port (p1.0 -p1.7), this port is connected to the driver ULN2803.
The microcontroller in this board represents the slave unit, which has three input signals (Manual switch, Sensors and RS-232) these signals have been analyzed by AT89C2051 then distributed over home appliances, so that it is possible to turn devices on/off, as shown in Fig. (3).

Fig. (3) Block Diagram Demonstrates Slave (Control Board Unit) and Master Units
In this control board two comparator types (LM324 ) have been used, one comparator is used to convert the analogue signal (alarm sound) of smoke sensor to a digital signal to be as an input to the microcontroller. The second comparator is used to convert the analogue signal (alarm sound) of the motion detector sensor to the digital signal, to be as an input of microcontroller for process it. The schematic design of control board is illustrated in Fig.(4). Finally, Fig. (5) illustrates the layout of control board unit with all particles and elements.

PC Anywhere Method Implementation:
The PC Anywhere program is used to control laptop screen from remote access location. After installation the program in two Laptops has been chosen the network communication as Bluetooth is shown in Fig.(6) and fig. (7) shows motion sensor connected with laptop through RS-232. The installed surveillance camera can be controlled to watch out special object from client computer Laptop. The image data from surveillance camera can be monitored in real time. The maximum effective transmission distance for transferring image between the sensor module of camera and the camera receiver module was about 10m indoor by using wireless communication RF 900 MHz. The transfer video image between two Laptops as shown in Fig.(8).

Motion Detector Sensor Interfacing:
The motion detector is connected to microcontroller through comparator (LM324). The microcontroller receive the sensor signal then it sends to alarm device to be operated and at the same time sends the command to all devices at home to be shut down (OFF), in order to protect the home from any further attack. The block diagram shown in Fig. (9) illustrates the interface motion detector sensor with microcontroller through buffer (74LS244). The method of this interface is similar to the interface between smoke sensor and microcontroller, which used comparator (LM324) between sensor and buffer. The function of this comparator is to convert the analog signal (alarm sound of sensor) to digital signal (logic1 or logic0), logic1 represents +5V while logic0 represents 0V. When sensor alarm is operating (ON) the -12V appears on output of the first comparator, the second comparator acts as inverting the (-12V) to (+12V), then this digital signal input to buffer then to microcontroller to process it. When alarm of sensor is not operating (OFF), the +12V appears on output of first comparator. After this operation the second comparator inverts +12V to -12V ( OFF state).

Fig.(9) Block Diagram of Motion Detector Interfacing
An Ad-Hoc mode wireless network connects two computers directly without the use of a router or Access Point (AP), in order to monitoring and controlling the situation of the home devices, Fig. (10) illustrates this connection.

Fig.(10) Ad-hoc Connection
Surveillance cameras increase security as they allow for monitoring of an area in order to alert home owner. Installing cameras in a home setting can be difficult, expensive and time consuming because of the long wires that are required. Thus, a wireless solution is needed to remedy this problem. The interface to the master desktop PC will allow a user to view images that are captured from the camera and sent via RF which operates in the globally available 900 MHz frequency range. The wireless camera system consists of wireless camera which is connected to the power supply 12V and wireless receiver that converts the capturing image from camera to the A/V. This receiver is connected to video capture card via power line.
The video capture card with remote control shown in Fig. (11), is used to connect the wireless camera receiver with master desktop PC, this capture card interfaces with master desktop PC via PCI slot. The capture card function is used to convert the analog signal of wireless camera to digital signal of master desktop PC. The ability to connect external video and record image indoor or outdoor is done by using video capture card, then this image can transfer it through WLAN to the Laptop for monitoring and controlling the home remotely.

Fig.(11) Video Capture Card and Remote Control
The application for the user is written in Microsoft Visual C++, which utilize the Microsoft Foundation Class (MFC) library. Visual C++ provides several AppWizards. This Microsoft's Wizard technology allows us to create a project, including a project file, source code files, a resource script and a module definition file [7]. The AppWizard that was chosen for the project is the MFC AppWizard (exe). The reason for choosing this AppWizard is because, the Visual C++ 's built-in AppWizard produces predefined code and makes it easier to begin writing an applications. When an application is generated with AppWizard, it produces code that implements an application around the options that have been requested.

Software design:
The following software components have been designed and used:

• Assembly Language Program
This language is used in programming microcontroller. The initialization and reset (Serial Port, Timers and Variables) was selected then microcontroller read inputs (Sensor, RF, Manual Switch and Serial Port). The order goes to the device to turn on or off. At the same time the microcontroller give handshake signals to the laptop to display the situation of the device.

• C++ Language
This language is used to design the GUI in laptop which is show sensitivity and range of motion detector sensor.

• Graphic User Interface (GUI)
When the client executed the program, it will display a GUI shown in the Fig. (12).

Fig.(12) The Client GUI Application
The Client will have to click on the 'Connect to Motion Detector' button and send an inquiry for the motion detector Server. When the motion detector device is found, the Client GUI will receive the address of the motion detector. The address of the motion detector device will appear in the text box as shown in Fig.(12). The Client will then highlight the address and click on the 'ok' button. This will allows the Client L2CAP to request a connection to the motion detector. If the request is successful, the RFCOMM will then create a wireless link between the two laptops. is shown in Fig.  (13) and Fig.(14). Now that both the laptops (Client and Server) have been connected, the Client has and got the initial data from the connected motion detector device, the Client is ready to armed or disarm the motion detector. If the Client choose to the motion detector, the client just have to click on the 'Armed' button and click the 'set' button. Both the Server and the Client will get response, which is shown in Fig. (15) and Fig.  (16). The Client GUI will display a text box 'configuring the Motion Detector'. As for disarming the motion detector, the disarming response of both Client and Server is the same. When the Client want to disconnect from the motion detector, the Client just have to click on the 'Disconnect from Motion Detector' button. The display will show a textbox showing 'closed' as shown in the Fig.(17) and Fig.(18).

Fig. (18) Server Display for Disconnection
After the Client click on the 'ok' button of the textbox, the Client GUI status bar will display that the motion detector has been disconnected as shown in Fig. ( 19). 1-For more security and high band width the Bluetooth technology 802.15 seems to be suitable for the setup of a wireless instrument control network. Bluetooth key features are robustness to interference, low complexity, low cost, inherent security and low power, where it operates in the 2.4 GHz frequency ISM band 2-A remote access surveillance system is a conjunction with GUI to make a remote control and video monitoring system. The PC Anywhere is powerful to remote access the master laptop via Bluetooth technology, because it is more secure, confidence for controlling the devices and transfer video image. Also, the distance can be made more longer for transfer files and multimedia. In addition, this method needs one person to remote control and manage the communication between two computers. 3-The system has been designed to be more flexible, by using Laptop as outdoor control or indoor control. But this outdoor control is more sensitive to environment between two Laptops, while indoor control is affected by number of walls inside the home. 4-The system is considered a real time system and more reliable, through controlling and monitoring any place through using security sensors such as motion sensor with wireless surveillance camera and at the same time displays the status of outputs on laptop screen in real time.