You are on page 1of 6

Automation system for the authorized entrance in

controlled areas using an Android application

Nikolaos Portolos, Dept. of Informatics of the Technological Educational Institute (T.E.I.) of


Athens, Greece

Abstract The main subject of this paper focuses on At the same time, the rapid evolution of technology,
the Research and Development (R&D) of an combined with extensive spread of Open Source
automation system which allows authorized users Software and Automation Systems, have made publicly
(personnel, students and guests) to enter or exit the gates accessible to develop applications and devices with
of the Technological Educational Institute (TEI) of notably low cost. Furthermore, many of our needs and
Athens. actions, are all automatically converted into "Smart"
To accomplish that, there will be placed Arduino electric devices (mobile, TV, etc) to our private lives or
receivers stations (Beacon) at the main gates of the TEI our workplace, universities, industries, public services,
of Athens (Central, West and East) in order to control etc.
the entrance and exit through them. The stations will be Automation systems offer convenience to our lives,
connected serially to the computer of each station- better quality of security, communication, technical
gateway and will communicate with the database on the management and management of resources and energy.
Foundations servers. The user identification and The level of automation, as well as the management of
validation will be accomplished using an Android such a system vary, since it depends on several
application, which communicates with the stations via parameters. The most important is that automation is
Bluetooth, using the communication protocol interface addressed to everyone and besides conveniences, can
that was designed for this thesis. offer real solutions to people who really need them, such
Furthermore, in this thesis will be analyzed concepts as people with disabilities and elderly, providing them
such as Backlog management, Control Version, with an independent and functional life.
Logging, etc., knowledge that is necessary for a software
engineer and the participation in a software development
team. II. Purpose of research
Keywords Automation system, Android operating While observing the rapid technological developments
system, Arduino microprocessor, smart systems, C#, in the field of automation systems, arises the need of
.NET, MySQL, Backlog management, Version Control, research and development of "smart" systems that will
Logging improve our quality of life on both personal and
professional level.
The aim of this thesis is the implementation of an
I. Introduction integrated low cost automation system, which gives
Nowadays, the use of smart devices has become an permission to authorized users drivers to entry or exit
indispensable part of our everyday life and constitutes the gates of the TEI of Athens.
the technology sector with the largest growth in recent The above system consists of three subsystems:
years. The easy access to all kinds and forms of Microcontroller Arduino which will operate as a
information is something that characterizes the modern beacon, it will receive requests from users and
society, due to the wide spread of Internet, leading to control the bars and the indicative LED lights
constant development of new technological trends and according to the commands received from the
applications. administration application.
Android Application which gives user the ability The programming languages and the technologies used
to connect remotely via Bluetooth to the Arduino to implement the system are:
Beacon, placed on the gates of the TEI of Athens, The programming language used for the
and send an authorization request. development of the native Android application is
Windows Application that is installed on the Java, as well as XML for the User Interface.
gateway computer and undertakes the management Programming the Beacon was done with the use of
and communication with the Foundations database the official Arduino programming language. It is
to validate users. based on C/C++, it links against AVR Libc and
The main target of this system is the automated allows the use of any of its functions making the use
management of the foundations gates with multiple of ordinary I/O operations much easier.
benefits: The administration application (BtAdmin) was
Easy and safer entrance and exit from the TEI of written in C# using Visual Studio 2013.
Athens, for both drivers and pedestrians Registered users credentials, Beacons details and
The number of vehicles within the premises other necessary information are stored in a MySQL
becomes available, which in a case of emergency, database server.
consists a preventive safety measure
Security to avoid accidents around the gates
User statistics for better management of the vehicle IV. Communication Protocol Interface
parking slots and the personnel resources The format of the commands that construct the packets
between the involved applications:
III. Architecture of the system
On the current thesis, we are going to use a Message
Microcontroller Arduino UNO and the necessary Description: Used to transfer a message via the Beacon
peripherals to build an automation system that will be Example: #MSG^This is a message$
installed at the gates of the TEI of Athens and will allow
the entry / exit to authorized users by using an Android Action Command
application for mobile devices. Description: Used to change Beacons state
The Arduino (Beacon) will be connected serially via Example: #CMD^5^$
USB to the computer at the gates, on which will be
installed the Administration Application (BtAdmin). User Login
BtAdmin is responsible for identifying users and Description: Used by the Android Application to send
providing them with informative messages, as well as the user authorization request
the automated handling of the gates (indicative LED Example: #USR^username^password^$
lights, bars, etc).
Users will have to install the Android Application on Trace Log
their Smartphones or Tablets and login using their Description: Used by the Arduino Beacon to trace log
private credentials. Activating the service for the messages to Administration Application
automated authorization request, the application Example: #LOG^Tracing out log text$
activates devices Bluetooth and searches for Beacons
within range. When a reliable device is found, it Action with Message
automatically connects via Bluetooth to it and sends a Description: Used to change Beacons state and transfer
message that contains users credentials. The Beacon a message
forwards that message to the administration application Example: #INF^cmd^message$
BtAdmin, which processes the request by querying the
database in foundations servers. If the user is Display State
successfully validated, then a command is sent to the Description: Used by the Administration Application to
Beacon to raise the bars (for certain period of time), get the Beacons state
activate the LED indicator lights, and send a message to Example: #STA^$
inform the user. Otherwise, the user is notified with a
Toast message on their smartphone and by the LED with Reset Beacon
an appropriate indication, to prevent accidents. Description: Used to restart and re-initialize Beacon
Example: #RST^$
V. Android Application
The application uses an Android Service to control
devices Bluetooth automatically search for Beacons,
connect with them and send the authorization request.
The service can stop on users demand, or else it will be
auto-terminated when the Beacon responds to the
request.

BtC consists of the following 4 Activities:


1. SplashScreen: Appears when the application is
launching
2. MainActivity: Contains the User Interface to
control the application and monitor important
messages
3. Settings: Contains the application configuration
parameters
4. DeviceList: An Activity template used to enlist
Bluetooth devices

Figure 2: BtC Settings

VI. Arduino Beacon


The Beacon receives commands either serially (from
computer) or via Bluetooth (from Android). It parses
them, validating that incoming packets are not corrupt
and valid, and then executes the requested action.
Beacons Bluetooth range is approximately 10 meters.

Figure 1: BtC MainActivity

BtC is a fully parametrical application, giving the ability


to users to configure the desired settings to get the best
of it.
Finally, BtC offers advanced logging, both on monitor
and files, in order to contribute to the development and
possible bug-fixing.
Figure 3: Arduino Beacon
i. Hardware 3 CONNECTED
Blink
Genuino Uno (European version of Arduino) Authorization granted Aqua
Blue
Bluetooth Module HC-05
4 TRIGGERED
Mini breadboard (47 x 36.5 x 10mm)
LED - RGB Clear Common Cathode (x2) Authorization granted for a Blink
Green
defined period of time Green
Breadboard Jumper Wires (Male to Male) (x13)
Resistor 2,2k ohm (x1) 5 LOCKDOWN
Resistor 4,7k ohm (x1) Deny all authorization
Red Red
Resistor 220 ohm (x6) requests
Type-B USB 6 MANUAL OPEN
Arduino Box Manually authorize Beacon Blink
Green
to open the gate Green
ii. Circuit 7 FREE ACCESS
Accept all incoming
requests without validating Green Green
user credentials
8 LOGIN
Authorization request
- -
received

VII. Administration Application


The Administration Application (BtAdmin) uses .NET
functionality and methods to connect serially to Beacon
Figure 4: Beacons circuit #1
and communicate with it, while it queries the database in
order to validate users. BtAdmins main window
contains a monitor to trace applications messages, as
well as buttons to manually control the Beacon.
Finally, the application offers users various settings to
configure database and serial connection, as well as
advanced settings for debugging purposes.

Figure 5: Beacon's circuit #2

iii. Beacon States


State Description LED #1 LED #2
0 ERROR
Error occurred Device Blink
Red
will auto-reset Red
1 OFFLINE
Offline Beacon (not
Off Off
discoverable)
2 IDLE
Figure 6: BtAdmin's main window
Beacon is idle waiting for
Off Red
incoming connections
VIII. MySQL Database manage multiple electrical gates at once and multiple
phones can be connected to the device at the same time.
When you approach the garage door with your car, the
application automatically pops up on the screen of your
phone for even more convenience.
Gogogate2, by Remsol
The Gogogate 2 is a simple and smart way to remotely
open, close and monitor your garage door or gate from a
Smartphone, Tablet or PC. This kit lets you close or open
your garage door using a tablet or smartphone. For added
security, the Gogogate 2 kit also features an audible
warning system and lets you grant or deny entrance to
others. Connect the Gogogate2 device to your Wi-Fi
network (2.4Ghz) and operate up to 3 garage doors or
gates from anywhere. Conveniently use the Gogogate2
remote opener from a Smartphone (iOS & Android),
Figure 7: Database Schema Tablet, PC or Apple Watch. Synch a compatible IP
camera with the Gogogate2 system to watch real time all
your garage events and get them stored in a built-in
IX. Conclusion and Results calendar. A triple led light will flash intermittently in
The conclusions drawn from this thesis enhances the combination with a loud beep during 5 seconds before
initial position in the introduction, concerning garage door is closed remotely. Grant and deny access
automation systems and the multiple benefits that to your guests on the go from your Smartphone. Limit
provide us. their access by time, location and door.
The development of a low cost but with great potential
circuit, combined with trending technologies, such as Blue Entry, by Bft
the development of mobile applications can provide far An innovative application for access automation
better security and confidence in our daily lives and management with just a tap on your mobile phone or
improve our quality of life by modernizing it. smartphone (Android and iOS operating system).
The experience I gained during the research and
Operation is in manual mode requiring confirmation by
implementation of the above system was unique. I was
the user before opening, and in automatic mode allowing
given the opportunity to design and develop three
applications that communicate with each other by opening only by approaching the gate. Maximum
combining hardware, different operating systems and flexibility and modularity over time: Blue Entry lets you
various programming languages and technologies. control and nominate up to 4 different accesses,
assigning the most convenient manual/automatic
X. Similar automation systems opening mode for each. Maximum control and
protection of accesses, thanks to the high data encryption
iBlue Smart Gate, by iBlue
The iBlue Smart Gate device enables you to easily and guaranteed by the Bluetooth standard and by passwords
securely control electric gates and garage doors from for accessing the Bluetooth expansion card installed in
your smartphone via a Bluetooth Smart (Bluetooth LE) the Bft control unit.
connection. Furthermore, iBlues virtual key sharing
technology allows you to regulate the movement of your All of the above systems use Smartphone Applications,
friends and family members (also employees or guests) in order to give users the ability to replace keys or
by providing individual access rights. The iBlue Smart common remote controllers. iBlue Smart Gate and Blue
Gate device is a small black box, which is wired into the Entry both use Bluetooth technology for the
electrical circuit panel therefore you can operate it with communication between the user and the receiver, while
your phone. The Smart Gate works with the free iBlue Gogogate2 uses WiFi.
Smart Key app to create keys, grant access, view activity The major difference between the above systems and the
log and more. Share and control the access to your automation system that was developed for this thesis, is
that the latter uses open source software and hardware.
garage door from a single app. The app will let you
Furthermore, it is designed for wide-range usage, like
public or private parking areas, and can adapt to central
database servers.

XI. Future scope and alternative use


Based on the above, the potentials for future
enhancements, and alternative uses of the developed
system (with appropriate modifications of course) are
unlimited.
First of all, it could be used for daily use in our personal
life, for example for the automation of a house when
approaching near it (such as automatically turn on the
lights or the garage door). It could be used to benefit
vulnerable groups in society, such as to install a traffic
light for the safe passage of disabled people.
Furthermore, another alternative use of the above system
would be to install it in businesses, both public and
private, or even for vehicle fleet management.
A major expansion of the system would be to develop
applications for iOS and Windows Phones.
Alternatively, a microcontroller Raspberry Pi could be
used for implementing the Beacon, which has a rapid
development in the field of Internet of Things (IoT) and
generally in automation systems.

XII. References
[1] el.wikipedia.org/wiki/Android
[2] el.wikipedia.org/wiki/Git_()
[3] el.wikipedia.org/wiki/Arduino
[4] stackoverflow.com
[5] www.instructables.com
[6] www.android.com
[7] developer.android.com
[8] www.arduino.cc
[9] arduino.stackexchange.com
[10] arduino-info.wikispaces.com
[11] www.codeproject.com
[12] github.com
[13] eclipse.org
[14] marketplace.eclipse.org/content/android-
development-tools-eclipse
[15] www.dotnetperls.com
[16] www.microsoft.com/net
[17] msdn.microsoft.com
[18] Ken Schwaber and Jeff Sutherland, 2013,
Scrum
[19] iblue.eu/smart-gate
[20] www.gogogate.com
[21] www.bft-automation.com

You might also like