You are on page 1of 6

Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.

4 (24) ISSN 1843-6188

ACCESS CONTROL SYSTEM – SOLUTION BASED ON NEW SOFTWARE AND


COMMUNICATIONS TECHNOLOGIES

H.G. COANDĂ, ELENA ROXANA NICULESCU


Faculty of Electrical Engineering, Electronics and Information Technology
VALAHIA University of Targoviste
E-mail: coanda_henri@yahoo.com, niculescuroxy@yahoo.com

Abstract. This paper deals with a solution to a system video surveillance and wireless sensors, the signaling via
designed to detect intrusion attempts. The system can be used GPRS or RFiD access.
for different locations, using new software and
communications technologies for control, signaling and At the international level this subject is current. Khanna
management. Therefore, the MMC card data storage,
software modules for remote management and access control
Samrat in „Wireless Home Security System With
via Bluetooth and the PIC microcontroller family, MikroC Mobile” [2], presented in 2012 the results of his research
and Visual Basic are used here. The system was tested on a project in the area of access control systems using SMS
development board (BIGPIC5), for which a software for signaling, record sounds for the identification and the
application was created. A hardware structure in the Internet for communicating the information (e-mail).
simulation environment - ISIS – Proteus, for the tests without The solution is not revolutionary but is the subject of
physical equipment was also developed. The authors’proposal research and funding. Jer-Vui Lee, Yea-Dat Chuah and
gives some solutions for the system designers in order to Chin Tin Chai in „A Multilevel Home Security System
provide a testing version of further applications. (MHSS)” [3], published in a journal indexed by Scopus
Keywords: effraction, control-access, PIC18F8722, Visual in March 2013, proposed a system that is based on
Basic, MikroC, Proteus ISIS, SMS, Bluetooth. PIC18F4520 interaction with sensors and alarm
modules, acquisition of images by Intel processor, a
1. INTRODUCTION solution using C code in microcontroller and Visual
Basic 2010 for PC application code. The system uses
laser barriers, PIR sensors and magnetic contacts.
Statistics show that in Romania, more than 120,000
individuals and businesses have installed burglar alarm In this paper, a similar solution to their approach is
systems in homes or company offices, having contracts proposed. The existence of a virtual testing environment
with various security firms. The number of subscribers for involving MMC card, RTC components and a
that are connected to the central dispatch for monitoring Bluetooth remote access solutions, allows this research
and intervention is growing in the last years. For this to be clearly different and up-to-date in the same time.
reason, the Public Order Department approves the
operation of more than 45 central dispatches. At the Figure 1 shows a block diagram of a system for
present, in Bucharest are 90 monitoring stations from the commercial use in which a Cerber C612 (Figure 2)
total of 437 available in Romania. solution is chosen. The block diagram contains a RISC
microprocessor, EEPROM memory, digital
The role of a burglar system is to protect by prevention communicator, synthesis sounds embedded, keyboard,
of vulnerable areas of a house or a building. Burglar UART, RJ-45 for Ethernet or GPRS, PGM outputs
systems can be wired, wireless or mixed. Detection of extensions by 8, communicators DIL, memory buffer
any alarm can be locally signalized by buzzer, on the (FIFO), status leds, clock – real time, several connectors,
fixed line, on the GSM terminal or through a radio vocal processor (as module coupled to the system)
transmitter. Depending on the level of risk, areas or MPV8+DTMF (8 messages) [4].
protected properties and their assessing, the alarm
systems can be classified according to the security
levels. Therefore the most effective configuration of the
alarm system against the house breaking is given by the
safety degree and the environmental class.

The development of this segment of alarm systems is


emphasized. The topic is current from the scientific point
of view, and the trends are to include in these systems
some hardware and software technologies. In Romania
in this domain, there is a national conference (ARTS)
where the big companies exhibit their products and
solutions [1]. A big accent is on the power supply, the Figure 1. The block diagram of a system for commercial use

10
ISSN 1843-6188 Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.4 (24)

18F8722

Figure 2. PCB Cerber board C612 [5]

Our solution is shown in Figure 3. The features of the


system are described as follows: The modules that are drawn with
ƒ programmer and user menu using GLCD; dashed line are now in tests and
aren't present in this paper.
ƒ keyboard for commands;
ƒ remote commands for system activation/ Figure 3. System block components for the proposed
deactivation by Bluetooth; system
ƒ remote command using Bluetooth for
downloading data from the MMC card; 2. HARDWARE DESIGN OF THE SYSTEM
ƒ save to file, system status on the MMC card;
ƒ real time clock used for the time stamping of To the access control system proposed here some
system status messages; components like BIGPIC5 development board [6],
ƒ transmission by SMS for the alarm signals; 18F8722 microcontroller [7], 10MHz clock, real time
ƒ remote management, storage / visualization of clock (RTC) type PCF8583P [8], GM862 GSM QUAD
the data into HDD [9], Bluetooth EasyBT, GLCD 128 x 64 monochrome,
ƒ monitoring for the various sensors allocated on 4x3 keypad (4x4 in ISIS), MMC 2MB and
the same line. communication via UART using MAX232. SPI (for
MMC) and I2C (for RTC) were used. Figure 4 shows the
system components tested in ISIS.

C1 C2 U4 C7
22p 22p
CLK-RC3 6 1
SCL OSCI
X1 DO-RC4 5
SDA
3 22p
A0
X2
10MHz CRYSTAL
INT-RC0 7 2
RESET
PIC18F8722 INT OSCO
PCF8583
MCLR

MMC Card 2MB U5


A0 30 4 CS-RE0 C52
M1 LS-A1 29
RA0/AN0
RA1/AN1
RE0/RD/AD8/P2D
RE1/W R/AD9/P2C
3 Real Time Clock 10u
28 78 RS-RE2 C41
RA2/AN2/VREF- RE2/CS/AD10/P2B
27 77 E-RE3
CLK RA3/AN3/VREF+ RE3/AD11/P3C'
Multimedia

34 76 D4-RE4
DO RA4/T0CKI RE4/AD12/P3B' U21
Card

33 75 D5-RE5 4 10u 5
DI RA5/AN4/LVDIN RE5/AD13/P1C'
D6-RE6 LCD P11
50
RA6/OSC2/CLKO RE6/AD14/P1B'
74 C61
CS-RE0 49 73 D7-RE7 ERROR
CS RA7/OSC1/CLKI RE7/ECCP2C/AD15/P2A' C2+ C2- 10u
CS-RB0 58 24 6
MMC RB0/INT0 RF0/AN5 VS-
1-RB1 57 23 2 U3:B 9
RB1/INT1 RF1/AN6/C2OUT VS+ RI
2-RB2 56 18 4
RB2/INT2 RF2/AN7/C1OUT DTR
3-RB3 55 17 9 8 4 3 8
A-RB4 54
RB3/INT3/ECCP2B/P2A' RF3/AN8/C2IN+
16 Bluetooth, PC 10
R2OUT R2IN
7 3
CTS
C4 Keypad B-RB5 53
RB4/KBI0 RF4/AN9/C2IN-
15 12
T2IN T2OUT
13 7
TXD
RB5/KBI1/PGM RF5/AN10/CVREF/C1IN+ R1OUT R1IN 7404 RTS
C-RB6 52 14 11 14 2
RB6/KBI2/PGC RF6/AN11/C1IN- T1IN T1OUT RXD
D-RB7 47 13 U3:A 6
U2 RB7/KBI3/PGD RF7/SS DSR
5 10u 4 1
C1+ C1- DCD
C6 C5 INT-RC0 36 5 1 2
P1 RC0/T1OSO/T13CKI RG0/CCP3/P3A
10u 10u C2- C2+
35
RC1/T1OSI/ECCP2A/P2A RG1/TX2/CK2
6 R71 C31
ERROR 43 7 1 3 MAX232 COMPIM
MMC RC2/ECCP1/P1A RG2/RX2/DT2 1k 7404
6 CLK-RC3 44 8
VS- RC3/SCK/SCL RG3/CCP4/P3D
U3:C 2 D0-RC4 45 10
VS+ RC4/SDI/SDA RG4/CCP5/P1D
9 46 9 MCLR 10u
RI RC5/SDO RG5/MCLR/VPP
4 5 6 8 9 37
DTR R2IN R2OUT RC6/TX1/CK1
8 7 10 38 79
CTS T2OUT T2IN RC7/RX1/DT1 RH0/A16
3 13 12 80
TXD 7404 R1IN R1OUT RH1/A17
1-RB1

2-RB2

3-RB3

7 14 11 DB0-RD0 72 1
RTS
2 U3:D
T1OUT T1IN
DB1-RD1 69
RD0/PSP0/AD0 RH2/A18
2 LCD1
RXD RD1/PSP1/AD1 RH3/A19 AMPIRE128X64
6 R7 DB2-RD2 68 22
DSR C1- C1+ RD2/PSP2/AD2 RH4/AN12/P3C
1 12 13 DB3-RD3 67 21
DCD 1k GLCD RD3/PSP3/AD3 RH5/AN13/P3B
DB4-RD4 66 20
1

C3 RD4/PSP4/AD4/SDO2 RH6/AN14/P1C
3 1 MAX232 DB5-RD5 65 19
7404 RD5/PSP5/AD5/SDI2/SDA2 RH7/AN15/P1B
COMPIM DB6-RD6 64 A-RB4
DB7-RD7 63
RD6/PSP6/AD6/SCK2/SCL2
RD7/PSP7/AD7/SS2 RJ0/ALE
62 CS1-RJ0
A 1 2 3 Up
10u 61 CS2-RJ1
RJ1/OE
LS1(1) 60 RS-RJ2
RJ2/WRL
59 RW-RJ3 GLCD B-RB5
RJ3/WRH
RJ4/BA0
39 E-RJ4
B 4 5 6 Down
40 RST-RJ5
SMS. GSM module 25
AVDD
RJ5/CE
RJ6/LB
41
26 42 C-RB6
7 8 9 Enter
-Vout

GND

LS1 AVSS RJ7/UB C


VCC
RST
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0

CS2
CS1
R/W
RS
V0
E

PIC18F8722
18
RST-RJ5 17
16
15
14
13
12
11
10
DB0-RD09
E-RJ4 8
RW-RJ37
RS-RJ2 6
5
4
3
CS2-RJ12
CS1-RJ01

D-RB7
DB7-RD7
DB6-RD6
DB5-RD5
DB4-RD4
DB3-RD3
DB2-RD2
DB1-RD1

LCD3
D 0 # Back
SPEAKER
LM016L

RL1
G5S-1A-DC12
VDD
VSS

VEE

RW
RS

Sensors
D0
D1
D2
D3
D4
D5
D6
D7
E

Q2 Alarm
1
2
3

4
5
6

7
8
9
10
11
12
13
14

LS-A1 Q1
BC547
BC547 R4 R3 R2 R1 R5
RS-RE2

D4-RE4
D5-RE5
D6-RE6
D7-RE7
E-RE3

R14 1k 3k 5k1 6k8 1k


A0

1k

52%

RV1
10k
R14(1)

Figure 4. Circuit diagram for the proposed system

11
Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.4 (24) ISSN 1843-6188

Keypad
magnetic sensors or motion sensors are placed in the
Magnetic sensors different areas. In zone 1, the sensor which detects the
GM862
movement enables to be a voltage level on A0 which
will activate a timer having the period established by the
18F8722
user. If the deactivation code is incorrectly introduced
Bluetooth
for three times in the waiting period or exceeding this
LCD
period, an alarm will be activated and a SMS to the
GLCD numbers set by the installer and the programmer will be
sent. In the other areas, the movement sensor will
RTC MMC
automatically activate the alarm without existing a
waiting period. The alarm will be switched off just by
Figure 5. Hardware solution for the testing system entering the right deactivation code of the system.

Figure 5 shows the hardware solution for the testing The values of the resistors enable different decisions,
system. The attached modules are: LCD (port E), GLCD thus identifying the action area of the offender. The
(port D and J) Keypad (Port B), Bluetooth (port G) GSM expressions for an activated sensor and m activated
module (port C), MMC card (port C and E) Real Time sensors are written as follows:
Clock (port C) sensor and alarm subsystem (port A). The Vcc ⋅ R5
A / D converter 10-bit on input A0, interruption for GSM • activated sensor k: , k = 1..4
module and Timer0 for access door are also used. In R5 + Rk
simulator, the buzzer was replaced with a system that Vcc ⋅ R5
uses a relay, a speaker and the control drivers using • m activated sensors: where j ,
transistors so that the buzzer of the PC or laptop speaker R5 + R j + ...R j + m
can be used. In simulator the access is achieved by the m = 1..4 and R5 = 1kΏ.
UART and MAX232 using COMPIM device and for this
reason between the two devices, the inverting modules Table 1 shows the voltage values referring to the
are included. possible combinations of sensors and resistances.

The magnetic sensors for doors and windows and PIR Table 1. Voltage values, in mV, at pin A0
sensors for motion are also used (Figure 6). These
sensors may communicate with the central unit (in this
case the development board BIGPIC5) on the cable. At
present the radio solution is tested.

The values appear by activating simultaneously multiple


sensors. For example, for one active sensor, with the
1k ⋅ 5V
resistance of 6.8kΩ, it is obtained: 641mV = ,
1k + 6.8k
for two active sensors, with the resistances of 6.8kΩ and
Figure 6. Magnetic sensors (left) and PIR (right)
1k ⋅ 5V
5.1kΩ, it is obtained: 388mV = ; for
Figure 7 shows method by which the magnetic sensors 1k + 6.8k + 5.1k
have been included in the system, and can detect banned three active sensors having the resistances of 6.8kΩ,
access. 3kΩ, and 5.1kΩ, it is obtained:
1k ⋅ 5V
315mV = .
1k + 6.8k + 5.1k + 3k

The combinations between a sensor and others are


highlighted on horizontal as shown in Table 1. The zones
Figure 7. Connection of the sensors in the proposed system where the burglar sensors were activated can be
identified by interpreting the voltage values as shown in
The detection system used for tests includes 4 sensors in Figure 7 and 12.
real hardware and 4 switches in ISIS. There are resistors
in parallel with sensors having different values. The 3. SOFTWARE DESIGN OF THE SYSTEM
analog voltage on A0 is converted to a digital signal by 3.1 Software applications for microcontroller
the digital analog converter of 10 bits from the
microcontroller. The sensor parallel with R1 is a The interaction of microcontroller with equipments
magnetic sensor, being positioned in front of the which are attached is shown in Figure 8. The software
entrance door (zone 1). The others sensors which are routines must respond to specified requirements and to

12
ISSN 1843-6188 Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.4 (24)

the access codes proposed by the installer or user this An important component of this software architecture is
system. represented by the communication between the
microcontroller and GSM module, shown in Figure 10.
The state machine identifies the response "OK" from
GM862 if this has a number of fulfilled conditions (the
card, the access in mobile system and so on) [10, 11].

The GSM module sends SMS to the receivers predefined


(dispatch, system owner) or defined by user (ambulance,
firemen), using AT commands. The MMC module is
designed to store the data sent by microcontroller for the
unauthorized access, calls towards the distant entities
and towards RTC regarding the date and the time.

The module UART1 is used by GM862 and the module


UART2 is used by Bluetooth or computer through
RS232. The LCD is used to display the measured voltage
Figure 8. Exchange of information in the system values for each combination of active sensors. The
GLCD is also used for the application menu and the
There are four different phases managed by the display of the status messages.
application from the microcontroller. In phase 1, the
menu is modified according to the keyboard codes and
the operating parameters are set. In phase 2, the
detection sensors are activated, being measured the
voltage (signaling the forcible entry), the alarm will be
switched on and the SMS will be sent. In phase 3 by
means of the deactivation codes, the alarm is blocked
and the system is brought to its initial state. The MMC
card is written with information about the event. In phase
4, using the remote access (via wireless Bluetooth or
wired using RS232), the information stored on the MMC
card is read by computer or the system is remotely reset.

Figure 10. State machine - communication with GM862

3.2 VB application to monitor system access

A communication by Bluetooth for mobile and an


application in Visual Basic 6.0 for computer were used
Figure 9. Flowchart for the main program here in order to download the information from the
MMC card attached to the system [12, 13]. The interface
The main program (Figure 9) follows the initialization of enables the transmission of access codes to the system,
the installed modules on system, initializing the the MMC card for downloading the file and for resetting
communication with the GSM module, RTC module and remotely. The codes are predefined but can be changed
MMC module. The program will respond to keyboard by the company that installs the system or by the user
commands which are sent by UART from the computer just by direct access to the system using the keyboard.
or by Bluetooth from a mobile terminal, satisfying the
requirements of signaling sensors.

13
Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.4 (24) ISSN 1843-6188

By means of the OnComm function, and the events effraction accompanied by call to the dispatcher, police
CommEvent and commEvReceive, the software and the owner of the system (2 minutes, 14:35:21-
application (Figure 11) enables to receive status 14:37:21), the remote access in system for reading
messages (disabled and displayed in the application) and information on the card (5 seconds, 14:39:10 to
to write the information on the MMC card in a file 14:39:15) and finally, a last access for seeing an empty
named logfile.txt on the hard disk and to view this file card (2 seconds 14:39:15-14:39:16).
within the application. At each operation of data transfer,
the file on the MMC card is read and deleted and after a 3.3. Other software products
new file is created while the file on the hard disc is
opened for adding the new information and after that is In the application, in relation to the ISIS simulation two
closed. Access occurs only by external control (access freeware products were used - Network Serial Port Kit
code into system + access code at MMC) whenever it is for creating virtual connections between ports COM and
necessary or regular depending on the access which WinImage for achieving virtual disks.
filled out the MMC card.
Network Serial Port Kit (NSPK). The Network Serial
Programming is based on events, UART's reading, Port Kit enables the virtual connection between two
code's transmission, or access to the interface elements COM ports. In this application, COM2 is not an active
that can be performed simultaneously. port, being attached virtually and shared to COM
terminal from ISIS, used for Bluetooth connection, and
COM6 is an active port of the computer where the
connection through NSPK was created. The Virtual
Serial Port Kit (VSPK) can be chosen.

WinImage. The WinImage enables to be created a


virtual disk of different capacities and formatted FAT16
or FAT32, as a file with the extension "imz". In the case
of the MMC card from ISIS which accepts the files with
the extension "mmc" formatted FAT16, the extension of
file created in WinImage must be modified, and
Remote acces onto alarm system.
formatting must be properly done. The our disk is called
Using UART and bluetooth device we "Acces.mmc" and includes a "logfile.txt" file which can
read data from MMC card and they
are write into a file on the PC. be created, deleted, read, write, open for adding the
application. The file was created using Notepad and put
Figure 11. The main interface and COM module on the disk by "drag and drop".

Using a code like 3333, the system


can be disabled after an alarm
signal. The buzzer is stoped now.

On A0 pin of the microcontroller appear an 0.498V


voltage. Because this value is into a range of
voltage, the system know that in our location are
three enabled sensors and where are they located.

Three sensors are enabled for three zones.


Three burglars are in front of sensors and
now the system must enable the
transmission of SMS using GSM module.

Figure 12. Deactivating the system after an unauthorized


access (ISIS)

Figure 11 shows the main interface and COM module. 4. RESULTS


A time window of 8 minutes and 29 seconds is presented
here where the tests were performed: access into system The code implemented for microcontroller exceeds the
(2 seconds 14:30:45 to 14:30:46) for reading the card limit of 2KB which there is in 18F8520 (implicitly to
(this is empty), call the ambulance, firemen and BIGPIC5). For this reason a variant with 4KB RAM, i.e.

14
ISSN 1843-6188 Scientific Bulletin of the Electrical Engineering Faculty – Year 13 No.4 (24)

18F8722 was used. The memory was filled up at any • programming the system parameters (phone
attempt in modifying the static variables in dynamic numbers, locations, timers, access codes, etc.)
variables and vice versa for a smaller memory space. remotely, using a PC or mobile phone;
• encryption of information by the
The system worked properly, and can be programmed by microcontroller and decryption on the computer
the installer or user for timers, zones, call numbers and or phone;
access codes. • implementation of the state machine for the
GSM module in order to communicate with an
Wired sensors offered the expected results (Figure 12 for virtual phone using Java for Mobile (J2ME).
ISIS) and the remote access by Bluetooth using a laptop
or mobile phone, enabled the access in the system and 6. REFERENCES
the MMC card reading. Also, according to a predefined
access code, the system could be reset remotely. [1] ALARM, A.R.T.S a IV-th National Conference,
no.1, 2012;
The simulation in ISIS using the two freeware software [2] Khanna Samrat Vivekanand, Wireless Home
products offers spectacular results. Figure 12 shows the Security System With Mobile, International Journal
deactivating state of the system after unauthorized access of Advanced Engineering Technology, 2011.
in areas 2 and 3. The active sensors can be observed and [3] Jer-Vui Lee, Yea-Dat Chuah and Chin-Tin Chai, A
the voltage value of 0.547V (ideally 0.55 but the error Multilevel Home Security System (MHSS),
occurs from the conversion A/D) on A0 pin (as is shown International Journal of Smart Home, Vol. 7, No. 2,
in Table 1). All operations performed on the real system March, 2013.
worked correctly and in ISIS the commands are sent by [4] Cerber C612/C816(W), Short manual for installing
means of USART of the MikroC Pro for PIC replacing and programming, 2009.
the keyboard or by means of VB application for resetting [5] Cerber C612, Central equipment for anti-burglary,
and reading on the MMC card. The exception occurred 12 areas & 2 partitions, installation and
in case of GSM module that could not be involved in the programming manual, 2006.
virtual application, because the ISIS do not have the [6] MikroElektronica, BIGPIC5 Manual, 2001.
library for such equipment, but the UART terminal can [7] MicroChip, PIC18F8722 Datasheet, 2004.
be programmed to use the implemented state machine. [8] PCF8583 Clock/Calendar Data Sheet, 1997.
[9] Telit, Telit GM862 Family Hardware User Guide,
5. CONCLUSIONS 2011.
[10] Telit, Telit AT Commands Reference Guide, 2013.
This application represents a good example to highlight [11] Telit, Telit Module Software User Guide, 2013.
the capabilities of a control-access system introducing [12] Tylee Lou, Learn Visual Basic 6.0, KIDware, 1998.
some new aspects, the remote communication by [13] Axelson J., Serial port complete – Programing and
Bluetooth for the access in the system, for activating and Circuits for RS-232 and RS-485 links and
deactivating the system, for resetting the system and networks, Lakeview Research, 2000.
access to the MMC card. On the other hand, the
utilization of the GLCD in place of the standard LCD
was performed that is proper for current commercial
systems. In the same time a flowchart for an equivalent
virtual solution by simulation in ISIS – Proteus is
proposed here.

The solution can be improved (some proposals are


currently) tested, by:
• achievement of a prototype systems, with
validation by simulation in Proteus and Orcad,
for responding to a price as low as possible;
• adding some modules for the wireless sensors;
• achievement of an interface in PHP connected
to a MySQL database, for the access in the
system of the remote user; implementing
Ethernet module;
• implementation of the WiFi communications
and GPRS in order to transmit alarm messages;
• eliminating the conventional keyboard using an
touch screen keyboard (keyboard on the
display);

15

You might also like