Anti-Theft Lab Security System Based On Rfid
Anti-Theft Lab Security System Based On Rfid
XXVI Seminarium
ZASTOSOWANIE KOMPUTERÓW W NAUCE I TECHNICE 2016
Oddział Gdański PTETiS
124 Zeszyty Naukowe Wydziału Elektrotechniki i Automatyki PG, ISSN 2353-1290, Nr 51/2016
connected to a serial port COM. The entire central panel
module is supplied by 19 V DC.
The central panel software is started through
the initialization of peripherals and both UART interfaces.
Next, the algorithm checks if the flag determining a time
when the request is sent to the next detector is active. If so,
the central panel clears the flag, creates and sends the request
frame to the next detector. If an answer from the detector is
available, the second flag is activated. The flag is checked in
the second step of the algorithm. The frame is received
besides the main loop, by the interrupt handling of the
UART interface. The data from the detector is processed and
stored in RAM memory with a unique RFID number of the
transponder. Moreover, the information about the presence
of the transponder within the detector range is stored. If
the detector does not respond in 30 ms, it means it is not
available. The third flag determines the communication with
the PC. In this case, the frame is also received besides the
main loop, by the interrupt handling of the second UART
interface. If the flag is active, the program clears it and the
data from the PC are processed. The last part of the
algorithm analyzes the data from all detectors and,
potentially, makes a decision about an alarm.
Fig. 3. Blocks of the proposed anti-theft system
The PC application was created in Java in Netbeans
The main element of the system is an ATmega162 IDE virtual machine. Before initialization of the system, it is
microcontroller with an external quartz resonator of 12 MHz necessary to configure the connection settings between
clock rate. The microcontroller has two independent UART the application and the central panel. The application enables
interfaces used to communicate with the MP01611 reader performance of alarm actions and makes it possible to define
and RS-485 network. The power supply of 5 V is provided the type of situation that causes an emergency situation.
by an L7805CV stabilizer. The system can be programmed Such situations include: sensor address mismatch, absence of
with the use of ISP (In-System Programming). the object or sensor or transponder mismatch. Alarm
After initialization of basic peripherals, the situation may be signalized by LEDs or by a buzzer. All
corresponding outputs of the microcontroller are set as actions are stored in a TXT log file, allowing for easy and
inputs or outputs, both UART interfaces are initiated and remote monitoring of the system.
a global flag allowing for the interrupts is activated. Next,
the program checks if the request frame from the control 5. TESTS
panel is received. If so, the answer to the central panel is
The test began with reading the unique RFID numbers
sent. The message contains a RFID number of the
of transponder s. Next, the database with all transponder
transponder recently registered in the detector range and the
numbers and object names was stored in a TXT file. The
status of the protected object.
central panel was configured and programmed in the PC
UNIQUE standard transponder s have a code length of
application (Fig. 4a). Before running the monitoring part of
5 bytes. However, the MP01611 sends 12 bytes.
the PC application, two transponder s were placed within the
The redundancy is caused by the fact that each byte of the
range of the proper detector. The third sensor was not
unique transponder code is represented by two ASCII code
connected and the alarm in this case was switched off. The
digits. Moreover, the reader adds 2 additional bytes that
detected objects were the same as monitored, so their alarm
indicate: CR (Carriage Return) and LF (Line Feed) flags.
status was “OK” (Fig. 4b). Then, the first object was
The algorithm checks if all 12 bytes are received. Next, all
removed from its detector range. Moreover, a wrong object
data are stored in a dedicated table in RAM memory.
was placed within the second detector range. Both cases
If within 0.5 s the next string with the same 12 bytes
resulted in an alarm situation, registered by the PC
appears, it means that the protected object is still present
application and caused the activation of the optical signaler
within the reader range. After that, the system returns to a
(bulb) and siren (Fig. 4c). All operations were written down
state of checking the receiving frame and the procedure is
in the TXT log file (Fig. 4d). The test proved that the entire
repeated infinitely.
system works properly.
ATmega128 microcontroller is the heart of the central
panel. The implemented PCF8586 real-time clock is 6. CONCLUSIONS
supplied with the battery which provides the necessary
power even if the basic supply is disabled. The paper presents a fully functional alarm system for
The communication between them takes place through an academic laboratory. The anti-theft system monitors
I2C (Inter-Integrated Circuit) interface. The UART interface laboratory equipment and signals incorrect placement or
of ATmega128 in combination with the MAX487 absence of the monitored objects. Affordable price of the
transceiver enables communication with detectors network. components allows for the use of the system in most
On the other hand, the communication with the PC academic laboratories. Such solution allows the teacher to
application takes place through the FT232RL converter. The fully focus on students and conducted classes.
central panel is recognized by the PC as a new device
Zeszyty Naukowe Wydziału Elektrotechniki i Automatyki PG, ISSN 2353-1290, Nr 51/2016 125
a) b)
c) d)
Fig. 4. View of graphical user interface in: a) programming part, monitoring part, b) non-alarm situation, c) alarm
situation and d) log file.
9. Dębowski L.: Technika RFID i jej aplikacje, Zeszyty
7. REFERENCES Naukowe Wydziału Elektrotechniki i Automatyki
Politechniki Gdańskiej, Nr 22, 2006.
1. Lowe P.: Electronic anti-shoplifting system employing 10. Koślacz G.: Systemy alarmowe, terminologia
an RFID tag, United States Patent number 5,874,896. i klasyfikacja, Elektronika Praktyczna, nr 6/96.
2. Finkenzeller K.: RFID Handbook: Fundamentals and 11. Kozłowski K., Bizewski K., Michałek M., Kulas Ł.,
Applications in Contactless SmartCards, Radio Nyka K.: Hybrid RFID System, 18-th Internacional
Frequency Identification and Near-Field Conference on Microwaves, Radar and WIRELESS
Communication, Wiley, 2010. Communications, 2010.
3. Dębowski L.: Technika RFID i jej aplikacje, Zeszyty 12. Shih S.-H., Sun P.-L. Yen D. C., Huang Sh.-M.:
Naukowe Wydziału Elektrotechniki i Automatyki Taxonomy and survey of RFID anti-collision protocols,
Politechniki Gdańskiej, No. 22, pp. 3136 Computer Communications, 29, 2006.
4. Hunt D., Puglia A., Puglia M.: RFID: A Guide to Radio 13. Cha J.-R., Kim J.-H.: Novel Anti-collision Algorithms
Frequency Identification, Wiley, 2007. for Fast object identification in RFID system,
5. Ranasinghe D. C., Sheng Q. Z., Zeadally Sh.: Unique Proceedings of the 2005 11th International Conference
Radio Innovation for the 21st Century: Building on Parallel and Distributed Systems (ICPADS'05),
Scalable and Global RFID Networks, Springer Science 2005.
& Business Media, 2010. 14. Klair D. K., Chin K.-W., Raad R.: A survey and
6. Dębkowski W., Szlendak M.: System RFID kontroli tutorial of RFID anti-collosion protocols, IEEE
dostępu do pomieszczeń. Praca dyplomowa Communications Surveys & Tutorials, Vol. 12, No. 3,
magisterska. WETI PG, 2011. 2010.
7. Daniel M. Dobkin: The RF In RFID: Passive UHF 15. EM Microelectronic- Marin SA:, EM4102 – Read only
RFID In Practice, Newnes, 2012. contact less identification device, data sheet, 02/2005,
8. Wójtkowicz-Kowalska M., Rebech D.: Wykorzystanie Rev. F., 2005.
technologii RFID do zabezpieczenia zbiorów 16. Noga K.M.: Cyfrowe sterowanie z zastosowaniem
w wolnym dostępie w bibliotece Uniwersytetu układów programowalnych, Zeszyty Naukowe
Papieskiego Jana Pawła II w Krakowie, Kraków, 2013. Wydziału Elektrotechniki i Automatyki Politechniki
Gdańskiej, Nr 40, 2014.
Tematem podejmowanym w pracy jest projekt systemu zabezpieczenia pomieszczeń laboratoryjnych przed kradzieżą.
Na podstawie analizy rynku, opracowano koncepcję systemu alarmowego z zaimplementowaną techniką RFID. W sposób
szczegółowy opisano metody realizacji poszczególnych modułów systemu. Omówiono algorytmy działania oprogramowania
przeznaczonego na mikrokontrolery i komputery osobiste. Przedstawiono przebieg testów działania zrealizowanego sprzętu
oraz sposób obsługi oprogramowania.
126 Zeszyty Naukowe Wydziału Elektrotechniki i Automatyki PG, ISSN 2353-1290, Nr 51/2016