Professional Documents
Culture Documents
CHAPTER I
INTRODUCTION
This chapter includes the statemetn of the objectives, significance and scope of
the study.
institution is indeed essential. With this, the institutions can keep track on their students
and teachers’ absences and tardiness. This could also benefit the institution in saving
money and paper works, time and effort while at the same time molding students
producing more quality and discipline graduates as well as in monitoring and increasing
resulting into low student grades and unfavorable post performances review. It is
important to keep into note that attendance and its significance should be taught to
school attendance habits be established for later years when students seek employment.
and attention like the school dean assigned checker and the teachers. However, cases like
the loss of checkers copy, human errors, erasures, inaccuracy, considerations and
transparency could vary to the credibility of the record holder and that could also add up
There are several institutions all over the world had already adopted and used
improve discipline and provide security. There are in fact several ways on doing
attendance monitoring nowadays. This can be done either writing it in log books, using
Bundy clocks or punch cards, also using computerized systems such as smart cards,
Hamid, H. (2010), RFID has been used to access control in many different areas, from
asset tracking to limiting access to restricted areas. Although the use of RFID systems in
educational institutions is not new, it is intended to show how the use of it came to solve
method, relying on storing and remotely retrieving data using devices called RFID tags or
transponders, thus the RFID is a wireless identification that normally comprises RFID
Reader and RFID Tag. Hence, RFID is another suitable way or remedy that can be used
Tiong Sing, G.C. (2012) described Automatic Access Control System using
Student Identification Card Based on RFID Technology, the system has multiple
functions and objectives. The first function is to provide security to help and support their
university police to keep track of every entry activity in every student’s hostel rooms,
offices, facilities and classrooms that prevents any theft activity and easily identify
students or user who are registered on their system. The system contributed and replaced
their conventional door locking mechanism with simple key interlock automated door
students’ attendance during class schedule while the teacher could maintain and print out
the students’ attendance record. The system server was able to maintain and monitor both
functions and brought a positive and drastic measure result in obtaining their objectives.
In the Philippines, an institution had also adapted the use of RFID technology in
attendance monitoring with Web- Portal and SMS. The system captures student RFID
upon entrance allowing the parents to monitor their children’s presence inside the campus
everyday. The system also provides a parent-portal web-based system tool to monitor the
rank and grade of their child or children on a specific subject using a web-based system.
Thus, the system could notify the parents if their child needs an immediate action or
follow up together with the school teacher and the guidance counselor, Baltazar, Et. Al.
(2012).
The Attendance Monitoring System using RFID of the Notre Dame of Tacurong
College is a centralized system that monitors and records employee’s daily time record.
The system automates the recording of the time-in and time-out of every employee using
RFID. This method helped save time, paper, effort and the DTR in-charge from hassle in
generating and merging salary reports and the total of late and absences of all employees.
located at the Central Mindanao, is also having similar problems concerning attendance
monitoring, But another particular problem of the school is their administrative overhead
of every college classroom security. As an institution that has modern set-up, fully air-
entry that are using its classrooms, and unit’s which leads into improper electricity
consumption and wastage. This is because there was no present additional security
4
measures installed that could prevent unsupervised entry or worst from a possible theft of
any class room units. The classroom only has normal door knob and door lock keys
which are left open during class hours that is why students can freely spend their free
time inside open classrooms charging up their gadgets or refreshing themselves from the
The College of Arts and Sciences and Education (CAS-ED) assigned working
students to check the attendance of every teachers evey period. This repetetive task of the
working students is a hassle and tiresome for them to regularly perform the room-to-room
routine. The dean entrusted the checker to keep the attendance record, and then later
the process is time consuming for the office to prepare. Sometimes it led to inconsistency.
The teachers are using the conventional way of recording student attendance in
paper or logbook manually while doing the traditional process of roll-calling names
which is basically time consuming and is indeed troublesome for the teachers. This
affects both teachers and students as time is spent on roll-calling, checking and verifying
students’ names that is supposedly intended for lesson. The student attendance record of
the teacher is kept. After every semester, the teacher summarizes and prepares a report
that will be submitted to the dean. It is a slow and stressful process that could sometimes
trigger human errors and could possibly result’s into inaccuracy and misplacement of
Magnetic Door Lock with Attendance Monitoring System using Radio Frequency
Identification. The study could lower the stated problems based on this research
5
Objectives
General Objective
with Attendance Monitoring System using Radio Frequency Identification for Notre
Specific Objectives
2. Design and implement a database structure for data storage which will hold all
The result of this study on Automated Classroom Magnetic Door Lock with
following stakeholders.
To the Notre Dame of Tacurong College, The research could benefit the
entry as well as usage of every college classroom facilities which could impose
observation in the consumption of energy during class days operation, hence, decreasing
To the College Dean’s Office, the office may no longer require working students
to manually deal the room-to-room attendance checking and consolidation of records just
to create necessary reports needed by the school for evaluation. Hence, the system may
help save time, loads of paper works, man power and energy. In using the attendance
monitoring system, the dean could easily track and monitor the performance and the
attendance records of every teacher using the Reports Form in the system. Through this
Reports Form, the system allows the Dean to view and print records.
To the School Physical Plant and Logistics Office, the electromagnetic door lock
security feature may aid the janitorial personnel to improve the condition of classroom
maintenance. This may also help school security personnel which are under the
maintenance office in carrying out their duty from manually checking the college Smith
To the College Teachers, They won’t need any log-books to do the manual
attendance recording. They can easily keep track, monitor and record students’ tardiness
and absences allowing them to monitor their students’ performances. The system can
automatically count, summarize and print the attendance percentage of every student at
the end of every semester providing them with ease during the production of reports
instead of creating it manually. Furthermore, it could help the teachers to refrain from
manual writing and calling student’s name individually that consumes valuable time
To the College Students, the students could easily tap their RFID’s during class
schedules while the system automatically captures their RFID’s and count it as part of
their tardiness and absences’ record. These data are directly counted inside the system
that is stored inside the database. Through the system’s attendance monitoring and
avoid rule deviation, tardiness, cutting of classes and other unethical misconduct patterns
which students commonly do before or every after class sessions. Hence, it helps the
students to adopt and practice punctuality, professionalism and adhere to proper school
To the Parents and Student Guardians, they could be easily informed about their
childrens' school performance through the reports taken from the system given by the
school teacher or the school administrator. The report contains the student’s attendance
records in which the school could use it as a basis for a student referral to the guidance
office to undergo a counseling in preventing any further cause and effect detrimental to
8
career and reputation of both student and parents or guardians inside and outside the
campus.
To the Bachelor of Science in Computer Science Program, this research may also
new ideas and insights in more advanced and effective algorithm formulation in the field
of software development.
To the Future Researchers, this may be considered as their basis for their future
studies, explorations developments in the fields of security and attendance monitor ing
system and for new or other purpose and possibilities using the RFID technology. The
results and findings of this study may give them some necessary information which they
This chapter presents the scope and the capabilities of the proposed research
system.
Door Lock with Attendance Monitoring System using Radio Frequency Identification
Technology. The study was implemented in every College classroom of Smith Building
of Notre Dame of Tacurong College, City of Tacurong. The system was made to record
teachers’ and students’ attendances, classroom entry and exit logs, calculation of
The system had the capability to retain current and previous records which could
be used for future educational reference, entry log history or for security references. Only
the system administrator was authorized to create and update subjects and schedules and
assign teachers and students to it. Also, the system administrator had the authority to
create system users, enroll student and teachers’ basic details that was then linked to their
every RFID’s.
The College Dean had limited access to the system. The dean can only view
teachers’ and students’ attendance records and their statuses. The teachers were limited
only to viewing students’ attendance records, students’ status. Both the Dean and
Teachers can access the system using their assigned passwords. They were also allowed
created two (2) miniature classroom doors which will served as the prototype model for
the simulation of the system and its operation in order to showcase and attest its features
and capabilities. The proponents could achieve the following goals by combining
hardware and software. The system will used Microsoft Visual Studio 2015 Community
Edition and its MSsql Local Database as its application software. Its hardware
components included Gizduino v.5 for RFID Reader and RFID Card Communication,
Arduino Uno to control Electromagnetic lock devices providing security and restriction
on every classroom doors, 4x4 Keypad buttons for security override and 16x2 LCD for
entry and attendance log status display. All hardware, aside from electromagnetic lock
were placed into a 14 inches single wood board to hold every device. The wood board
was covered by a glass frame according to its size securing all the wirings and devices.
10
The proposed system did not have a backup battery to operate and assist the system
Definition of Terms
To firmly understand the study, the following terms are contextually and
operationally defined:
maintenance and the person responsible for the encoding of the teacher and student
Attendance Monitoring refers to the recording of time in and out of teachers and
Algorithm refers to the set of rules used in the system which specifies in solving
Database refers to the software installed in the centralized computer server that
holds and stores all the user information for attendance monitoring and door access and
control.
application software and the local database. This also serves as the main brain of the
attendance monitoring that receives data, transmits, and commands to the hardware
devices.
11
classroom door that operates using electric current passing through electromagnet which
Notre Dame of Tacurong College refers to the institution where the proposed
system is to be applied.
Passive RFID Card refers to one of the main components that carries the user’s
information with authentic serial codes that is linked to the information of every end user
Pin Code refers to the four (4) set of characters used in keypad inputto manually
RFID tag refers to the microchip an inside the RFID card that holds authentic
serial codes.
RFID Reader refers to the device that detects and reads information from the
RFID tag.
System User refers to the teacher, dean and working student who use the proposed
CHAPTER 2
This chapter presents the relevant literature and studies related to the proposed
system from different authors and books that may help in the development of the
proposed study.
According to Chow, H. et, al. (2012), RFID is a perfect solution which had
a problem in security and monitoring the attendance. In recent years, there has
A study in radio frequency identification based attendance system has also been
automate the recording of student attendances by simply tapping the given student RFID
to the reader during class entry. Also, their other objective is to eliminate human errors
made by teachers during and to prevent students from their tardiness and absenteeism, et,
technique was proposed by Chitresh, S. and Amit K. (2010). The fingerprint technique
verification was achieved using extraction of abnormal point on the ridge of user’s
against the stored templates in the database. The proposed automatic attendance system
signals either true or false based on logical result of previous one to one verification of
person’s authenticity.
Shashank Shukla, Shailee Shah, Pooja Save from the Department of Information
flashing their student card at the RFID reader, thus solving the problems in unnecessary
consumption of class time by the students to find and sign their name on the attendance
attendance sheet.This is the main motive of their system and in addition having an online
system accessible anywhere and anytime can greatly help the lecturers to keep track of
their students' attendance. Looking at a bigger picture, deploying the system throughout
the academic faculty will benefit the academic management as students' attendance to
classes was is one of the key factors in improving the quality of teaching and monitoring
their students' performance. Besides, this system provided valuable online facilities for
easy record maintenance offered not only to lecturers but also to related academic
Furthermore, another study relating to security access has been made by Nor
Amiyana Binti, M.A. (2011) from Universiti Teknikal Malaysia Melaka which is entitled
Attendance and Access Control System Using RFID System designed specially for
Companies that lack in controlling employees and outsiders entry flow. People
14
(employees or outsiders) can go in and out of the company’s premises with minimal
supervision. Manual log booking and attendance system for employees and visitors has
the absolute potential of wasting valuable time since the outsiders apecially employees
needs to line up and wait their turn to tally up hand-written punch clock cards manually
while entering the company gate. The proposed system resolves the stated problems by
the use of RFID. Important records such as picture and time of entry or exit are added and
managed. The attendance system monitors and implements an access control based on the
presence of employees and visitors. The system also recorded and calculated working
hours of employees in order to pay their wages and evaluate the jobs accurately.
15
CHAPTER 3
TECHNICAL BACKGROND
In this chapter discuss the technicality of the research study by which it describes
The primary purpose of an RFID system in this application area is to detect the
presence and absence of the teacher and student data to be transmitted through wiring
connection, called tag, which is read by an RFID reader and processed according to the
programmed instructions on the personal computer (PC). The proposed system provides
solution to lecture attendance problem through coordinated hardware and software design
handshaking data communications between RFID tag and RFID reader serially interfaced
Figure 1 represents the network and system architecture which comprises the
hardware and software connection of the system as a whole. In order for the system to be
fully functional, the first operation starts in registering student and teachers’ details which
is handled by the system administrator. The system administrator gathers the teachers and
students details and the serial code of their given RFID’s which will be registered in the
Teachers and Students Form for their accounts. Assuming that the subject and schedules
are already created, the admin will assign teachers and students to the schedules to the
system using MsSql Local Database system and Visual Studio 2015 application software
In order for anyone to have an access to every classroom, the teachers will use
their assigned RFID’s containing their information tapping it to RFID reader. RFID
reader will convert the analog signal into digital and pass the converted data to the
GizDuino v.5 microcontroller sending it to the computer server. The system application
inside the centralized computer server will verify the received data and compares it to the
stored data inside the data base management system for user validation or filtration.
Successful log-in and log-out will be counted and stored in the database for the
attendance recording. Whether the result of a transaction either successful or not, the
programming application software with the help of the centralized computer server will
send back a signal to the GizDuino and decide whether to command or not the
electromagnetic lock to change its status and projecting message to the 16x2 LCD
possible using the 4x4 universal keypad. The passcode that is being typed by any
personnel will be processed and compared inside the Arduino Uno microcontroller and its
17
pre-defined logic. Right combination of entered pic code in the Arduino Uno will will
trigger the Gizduino microcontroller to operate the relay switch that controls and cut the
power supply of the electromagnetic lock. Teachers and students attendance records
summary can be produced using the printer which is connected to the computer server.
microcontroller which can hold RFID serial data, RFID uses radio waves signal to
transfer data. Tags can be read at once as long as they are passed within close enough
proximity to an RFID reader. RFID contains serial codes and which is then processed and
compared in the system using a host computer to identify the user’s information. There
are many variety of RFID that is being used in the industry but the most common types of
RFID are Passive and Active RFID. Passive RFID do not use any battery to operate
instead it leeches power from the RFID reader to become active and detectable. The
18
passive RFID operates in a low frequency, it works on 125 kHz and it has approximately
from within 4 inches up to a half meter reading range and mostly used for short reading
range applications. Kamran Ahsan, (2010). In this research, Passive RFID is used in the
operation of attendance monitoring and in classroom security access with and through
RFID reader works as a central place for the RFID system. It reads tags data
through the RFID antennas at a certain frequency. Basically, the reader is an electronic
apparatus which produce and accept a radio signalsm. The antennas contains an attached
reader, the reader translates the tags’ radio signals through antenna which acts as a
Transceiver depending on the tags capacity. The reader consist a build-in anti-collision
schemes and a single reader can operate on multiple frequencies. As a result, these
readers are expected to collect or write data onto tag and pass it to computer systems
In order for the centralized computer system to capture RFID card, the system
will use Gizduino to control the classroom entry and access. This device sends a signal to
the electromagnetic lock to control and change the magnetic lock’s status.
board. You can use the Gizduino to read sensors and control things like motors and
lights. This allows you to upload programs to this board which can then interact with
things in the real world. With this, you can make devices which respond and react to the
world at large. Basically, if there is something that is in any way controlled by electricity,
the Gizduino can interface with it in some manner and even if it is not controlled by
electricity, you can probably still use things which are (like motors and electromagnets),
Universal keypad buttons is an input device that has a set of buttons arranged in a
block or "pad", these buttons are labelled with digits (numerals), symbols and
alphabetical letters. Keypad is used in the system for manual override of classroom
security for the security and maintenance personnel use. The entered pin code will be
flexible, easy-to-use hardware and software. Arduino can sense the environment by
receiving input from a variety of sensors and can affect its surroundings by controlling
lights, motors, and other actuators. The microcontroller on the board is programmed
using the Arduino programming language (based on Wiring). In the system, this is used
to receive data from the 4x4 universal keypad which processes and compares it to the
pre-defined programmed logic codes and transmits a signal from its digital PIN 0 to
Gizduino microcontroller Pin 11. Result of the activity will be projected to the 16x2
connected to GizDuino. It could display digital output message response relay in order to
provide an interaction between the system and the user. LCD responds and displays the
characters or codes entered by school personnel that enable them to interact with the
computer server when accessing a. The LCD displays a message of teacher’s entry status
(CCS) is needed. The computer server will serve as the front-end of the system that
provides an interface between the RFID hardware and application based system, which is
the “main brain” of the system. It is used to network multiple RFID interrogators and
GizDuino and Arduino Uno microcontrolles to centrally process input and output
information using USB wires and Serial Ports. The data that flows to computer enters
through computer serial ports. Serial ports are detected in the computer as ComPort or
Microsoft. It is the .NET version of the Visual Basic (VB) programming language. Like
all .NET languages, VB.NET uses the Common Language Runtime (CLR) for program
execution. Visual Studio is used to program the attendance monitoring system that allows
the admin and user to create, read, update and delete teacher, student, subjects and
schedule details as well as in creating user and setting the user limitation and system
access to the application. Furthermore, it is also used for DTR function feature. Visual
Studio only allows and limits registered teachers, working students and dean as a user
only in previewing and printing records and reports. The information that are created and
projected or viewed in the attendance monitoring system are stored and retrieved inside
its Local Database called MsSql Local Database 2015 which is part of the package of
Database Technology is used for large scale of data. In this study, the researchers
will be dealing with data. A database is needed to store and organize information in an
that handles the storage, retrieval, and updating of data in a computer system. The
Database system contains an SQL server in which all the data will be stored. All the
information loaded to the GUI will come from the system’s Database server. This will
basically hold the entire user’s (Students and Teachers) data, class schedules, time and
open source relational database management system. It is based on the structure query
language (SQL), which is used for adding, removing, and modifying information in the
database. Successful or failure classroom attendance and door access will vary or depend
based on the registered data inside specially for controlling door access in changing
Electro Magnetic Door lock will be the suitable component for the problem. The
Magnetic Door lock device is a simple locking device that consists of a magnetic lock
and armature plate with no moving parts and it purely works due to the magnetic field.
25
Therefore the magnetic lock is truly fail-safe (Power to lock). Magnetic lock or mag lock
uses an electrical current to produce a magnetic force. When a current is passed through
the coil, the magnet lock becomes magnetized. The door will be securely bonded when
the electromagnet is energized holding against the armature plate. Access control systems
are operated by peripheral device (ie.Numeric Keypads, RFID Tag and RFID Reader) to
identify the user whether access is permitted or not. Controlling multiple electromagnetic
lock in this study, it requires a printed circuit board in which transistors, resistors,
Gizduino and Arduino Uno microcontroller are all being connected to a customized
Printed Circuit Board. Using PCB, the computer server manipulate or control the flow of
microcontrollers.
as copper, which have been etched from a layer fixed to a flat insulating sheet called a
printed circuit board, and to which integrated circuits and other components are attached.
the board base for physically supporting and wiring the surface-mounted and socketed
26
components in most electronics. This customized printed circuit board holds the
microcontroller pins and other electronic devices such as 12 Volts replay, Transistor
electrically and connect them magnetically. They are very useful devices and allow one
circuit to switch another one while they are completely separate. They are often used to
works at very high voltage. For example, a relay can make a 5V DC battery circuit to
switch a 230V AC mains circuit. Thus a small sensor circuit can drive, say, a fan or an
electric bulb.
A relay switch can be divided into two parts: input and output. The input section
has a coil which generates magnetic field when a small voltage from an electronic circuit
is applied to it. This voltage is called the operating voltage. Commonly used relays are
available in different configuration of operating voltages like 6V, 9V, 12V, 24V etc. The
basic relay there are three contactors: normally open (NO), normally closed (NC) and
common (COM). At no input state, the COM is connected to NC. When the operating
voltage is applied the relay coil gets energized and the COM changes contact to NO. In
this study, relay is trigger by the Gizduino and Arduino Uno microcontroller. Both
microcontroller runs on 5-9 Volts, thus, the power of both microcontrollers are not
enough to trigger the 12 Volts electromagnetic lock. With the help of the transistor and a
resistor, power can be controlled and increase which is enough voltage for the relay.
Through transistor and a resistor, the 5-9 volts power from the microcontrollers will be
converted. Thus, allowing it to either change the connection status of the 12 volts relay in
controlling the flow of the current supply powering the electromagnetic lock. To further
define, The 2N2222 transistor is a common NPN bipolar junction transistor (BJT) used
low to medium current, low power, medium voltage, and can operate at moderately high
speeds. It was originally made in the TO-18 metal can as shown in the picture. A 4.7kΩ
resistor has yellow, purple, and red stripes in that order. The last stripe represents the
voltage divider used for measuring electric potential (voltage); the component is an
implementation of the same principle, hence its name. Potentiometers are commonly used
to control electrical devices such as volume controls on audio equipment. This is used as
a peripheral device or the Liquid Crystal Display (LCD), it controls the intensity by
languages.
prgrammed using Arduino 1.0.1 and Adruino 1.6.7. it is needed for Gizduino v.5 and
Arduino Uno in order to establish, communicate with other devices and to the computer.
Arduino 1.0.1 and Adruino 1.6.7. are version types of programming languages that
contains libraries, syntax and includes presets of codes for deferent devices such as for
accepts text and graphic output from centralized computer server (computer) and prints
the information to paper. Using this device, it will allow the system administrator, teacher
especially the College Dean to print attendance records on paper. To do its work, a
CHAPTER IV
METHODOLOGY
This chapter highlights the techniques and tools used in the proposed study. It
includes the Operational Diagram, Context and Physical Data Flow Diagram, Entity
Operational Diagram:
Figure 17 shows how the Automated Classroom Magnetic Door Lock with
Attendance Monitoring System using Radio Frequency Identification works. The system
operation starts during the Users Tapping of their RFID’s assuming that the teachers’ and
31
students’ information of the current school year has been registered in the Centralized
In order to access and use a classroom, the Teacher must be the first user to tap-in
using his or her assigned RFID to the RFID Reader device. The system will compare,
validate and record the teacher’s RFID and log-in information to the Database
Management System. The result of the teacher’s access transaction will then trigger the
Changing the electromagnetic lock status, the system then activates the attendance
recording feature for the teachers and students in a particular class schedule. The students
can now tap their RFID’s to the RFID reader for recording students’ log-in. both teacher
and student entry access and attendance recording are prompted by the 16x2 Liquid
Crystal Display whether for or failed successful transaction. When leaving the classroom
after the class session, the students are obliged to re-tap their RFID’s for their log-out
information. To close a classroom and to magnetize the magnetic lock, the teachers must
also re-tap their RFID’s. This action will record teachers and students log-in and log-out
while the system calculates and summarizes both users’ attendance records to the
system’s database and count as one record entry for the day.
personnel without having or any issued RFID with them can access the classrooms using
the universal keypad by typing the personnel or classroom access code. When De-
magnetizing the lock status, the system allocates five (5) seconds to return to its
magnetized status. The teacher and students can open the door from the inside using the
32
push button exit device. Monitoring System Using Radio Frequency Identification is
divided into three (3) sub parts that explains more about the system.
Frequency Identification.
Figure 18 shows that using the teacher RFID tag serves as the key to trigger the
system to de-magnetize the electromagnetic lock which opens the classroom door and
To start the process, the teacher will first tap his/her RFID card to the RFID
reader. Using his or her RFID card, this allows the teacher to communicate with the
centralized computer server and its system application through RFID reader and
Gizduino microcontroller. The RFID reader will capture the analog signal from the
teacher’s RFID and sends the information to the Gizduino microcontroller converting it
into digital data in a way for a computer could understand. Relaying this digital data to
the centralized computer server allows the system to analyze and compare if the detected
RFID card information is from a teacher or not, this is made possible using the records
33
inside its Local Database system. This process allows the system logic to decide and
trigger whether to suspend the power supply de-magnetizing the electromagnetic lock.
After the teacher logs-in, the student can now tap their RFID card for their
individual log-in attendances. After the class session has ended, all students must be the
first to tap out before their teacher in order for the system to record it as a student log-out.
This process is followed by the teacher tapping out his or her RFID card telling the
system that the class session has already ended. This will stop the attendance monitoring
and recording system on a particular subject schedule and signals the system to trigger
the gizduino microcontroller to magnetize the electromagnetic lock closing the door.
Finally, the system will count and summarize the attendance records of both teachers and
Instances like students tapping their RFID card first will only limit them from
opening the classroom door. Also, for the students who failed to log-out before their
teacher will be counted as absent. Students and teachers who failed to log-in before the
In this figure, the push button will be used inside the classroom. Either students or
the teacher can use the push button for their personal necessities, emergencies and/or
evacuation. The push button is connected to the Printed Circuit Board (PCB) through PIN
4 triggering the 12 volts (V) Relay Direct Current (DC) cutting the power supply to
In the figure shown above, the security or maintenance personnel can access
every classroom using the given passcode to override the classroom door lock security
system for classroom maintenance purposes. Using keypad, the security personnel can
also access the classroom for monitoring, security or emergency situation purposes.
The Electromagnetic lock status is lock and powered by default as well as the
16x2 LCD message displaying “Welcome, Pin Code:”. If the personnel would like to
access any classroom, the personnel will type his or her passcode using the universal
keypad located outside the classroom. Upon typing his or her four (4) digit passcode
35
enter by pressing “hashtag” (#), the Arduino Uno microcontroller will then compare the
entered passcode to the data programmed inside Arduino Uno. If the passcode is correct,
the Arduino Uno microcontroller will display “Pin Code Correct!, Door is Open.” and at
the same time it will throw a data through its PIN 0 to the PIN 12 of Gizduino
microcontroller disabling the power supply of the Electromagnetic Lock through PIN 13.
After disabling the magnetic locks power supply, there will be 5 seconds delay in order
for the Arduino Uno microcontroller to reactivate the 12 volts (V) Relay resupplying the
12 volts(V) power supply to re-magnetizing the electromagnetic lock. Else, if the given
password by the personnel is incorrect, the Arduino Uno microcontroller will send a
digital data to the 16x2 LCD displaying a message “Wrong Pin Code, Please try again”
System Analysis
Developmental Approach
This section discusses the steps or procedures that the researchers made in making
the study, Automated Classroom Magnetic Door Lock with Attendance Monitoring
Procedures
The attainment of the objectives was the main concern of this study and the
following processes were made in order to produce a successful project. The researchers
used the Waterfall Approach where different phases of the process and sequences were
1. The researchers determined the problems of the study, formulated the objectives,
identified the scope of the proposed study and formulated a solution to the problems
determined.
3. The researchers determined the different devices needed and checked its availabilit y
was identified and chosen for the study with the supervision of the thesis adviser.
40
5. After identifying the hardware and software needed for the development, the
6. The researchers compiled, simulated and tested the program together with the
7. Changes were made for better improvement after testing the compatibility of the
devices and the software, the researchers found out the problems that occurred
8. The researchers checked the system’s stability to know if the objectives were
obtained.
9. Since the testing was proved successful, the presentation of project documentation
Particular Specification
HARDWARE
ATmega328 microcontroller
Arduino Uno R3 Input voltage: 7-12V
14 Digital I/O Pins (6 PWM outputs)
6 Analog Inputs,
32k Flash Memory, 16Mhz Clock Speed.
Display Mode: STN, BLUB
16x2 LCD 1602A Display Format: 16 Character x 2 Line,
Viewing Direction: 6 O’Clock,
Input Data: 4-Bits or 8-Bits interface available,
Display Font: 5 x 8 Dots,
Power Supply: Single Power Supply (5V±10%),
Driving Scheme: 1/16Duty,1/5Bias,
Backlight: Side
LED: WHITE
EM-300LED:
(Ebelco) Voltage Input : 12 VDC / 24 VDC,
Electro Magnetic Lock Current Draw: 12V / 320mA; 24V / 160mA (±5%)
Holding Force: Up to 300 lbs (136 kg)
Hall Effect Contact: SPDT rated 2A at 24 VDC
Anti-Rust Surface Treatment : Blue Zinc Plating
Operating Temperature: 0~55° C ( 32~131° F)
Operating Humidity: 0~95% ( non-condensing)
Weight (Magnet): 0.7 kg (±1%)
Dimensions :
Magnet: (L)210x(W)35x(T)21 mm
Armature: (L)130x(W)33x(T)11 mm
EM-600LED:
Voltage Input : 12 VDC / 24 VDC
Current Draw: 12V / 500mA; 24V / 250mA (±5%)
Holding Force: Up to 600 lbs (272 kg)
Hall Effect Contact: SPDT rated 2A at 24 VDC
Anti-Rust Surface Treatment: Blue Zinc Plating
42
TAG:
Radio Frequency Type: Passive
Identification (RFID) RF Frequency: 125KHz
43
Visual Studio Community Windows 7 Service Pack 1, Windows 10, Windows 8.1, or
2015 Windows 8
1.6 GHz or faster processor
1 GB of RAM (1.5 GB if running on a virtual machine)
4 GB of available hard disk space
5400 RPM hard disk drive
DirectX 9-capable video card that runs at 1024 x 768 or
higher display resolution
This section shows the calendar of activities done to accomplish the study, Automated Classroom Magnetic Door Lock
with Attendance Monitoring System using Radio Frequency Identification. It shows all events scheduled for particular weeks
Budgetary Outlay
Budget and proper cost management including the available resources and the
cost of the device and software tools needed for the system must be considered. The
Table below shows the budgetary outlay which includes the list of all items and the total
HARDWARE
SOFTWARE
TOTAL: 28,406.00
47
CHAPTER 5
Figure 24. Automated Classroom Magnetic Door Lock with Attendance Monitoring
Figure 24 is the whole structure and conceptual model of the entire system.
Administrator, Student, Teacher, and Personnel are the main users of the system. Thus,
the Admin will facilitate or control the system inside the desktop computer, the student
and teacher will tap their RFID tag in order for them to register their personal information
and login or logout between classes. The RFID Reader that connects to Gizduino will
serve as bridge between RFID tags and desktop computer. The data that comes from
RFID tags and student and teacher personal information will be saved into database that
was pre-installed in the desktop computer using the visual studio. The personnel will
enter his/her four (4) digit passcode in universal keypad, the Arduino Uno will evaluate
the passcode entered to its own secret passcode. If the passcode is correct, the Arduino
Uno will send a data to the LCD that will display a message, the Arduino Uno will send a
48
signal to Gizduino that controls the Printed Circuit Board (PCB) to trigger the
electromagnetic lock to open. Else if the passcode entered in Arduino Uno is wrong, the
Arduino Uno will not send a signal Gizduino, the electromagnetic locked will remain
Figure 25. Algorithm flowchart for teacher attendance monitoring and classroom security
Figure 25. shows the process flow for teachers in using the system. The User
(teacher) would tap his or her RFID card to the RFID Reader then the data will pass
through Gizduino to the Computer. This is the first security level of the system in
controlling the door lock status. After the data has entered the system, the application will
compare and check the RFID tag data to the MsSql 2015 Local Database and verifies if
the user’s RFID card is a teacher’s RFID or not, otherwise, the system will deny access
and prompts the user as unregistered displaying the second message as door status as
locked maintaining it as closed. If the tapped RFID of the user is identified as teacher’s
RFID, the system will activate its second level of security function. The system will
checked if the detected teacher’s RFID has a class schedule on a specific time. If there
was, the system will automatically record it as attendance and treats it as teachers log-in
inside the Local Database Server displaying a message while at the same time changing
de-magnetizing electromagnetic lock opening the door allowing the teacher and student
During this state, the system’s attendance monitoring for student is activated
allowing students to tap their RFID’s for their log-in. Before or during the end of the
class session, the students are required to tap again their RFID’s for student attendance
log-out. The second time the teacher taps his or her RFID, this activates the
electromagnetic lock into magnetize state securing the door and displaying a message.
This also treats the teacher’s second tap as log-out and records it to the database.
50
Figure 26 shows the process flow for student attendance monitoring and
recording. After the teacher tapped in and activated the attendance recording system for
the students, the students would tap their individual RFID’s to the RFID reader in order
for the system to compare it to the local database. If the students’ RFID tag data matches
the record inside the local database, it will then verify if the student is enrolled on the
class schedule in order to treat it as log-in in the system and displays Log-in success
51
message, otherwise it prompts the student an access denied message which is a failure in
In order for the system to consider a counted student attendance, the system must
consider a pair or a complete set of student log-in and log-out logical condition. This
logical condition programmed inside the system will determine if a student will be
counted as absent or not. Students who failed in tapping their RFID for log-out will be
Figure 27. Algorithm flowchart for security and maintenance personnel classroom
access.
using set of programmed codes. Security and maintenance personnel of the school will
52
type the access codes which is a combination of four numbers and pressing “#” special
character. By pressing “#” special character, the entered pin code will be processed and
validated by the microcontroller. Correct pin code sets the electromagnetic status to de-
magnetized mode and releases its lock while displaying a “Welcome, Door is Open”
message projected to the 16x2 liquid crystal display (LCD) allowing any school
personnel to enter the room. Otherwise, the door will remain closed and the
electromagnetic lock stays on its magnetized state maintaining its lock mode.
Specific Objective 2. Design and implement a database structure for data storage
Figure 28. Database Structure of Automated Classroom Magnetic Door Lock with
Figure 28 illustrates that the system administrator is the only person who is
authorized to register student and teacher RFID and basic information details to the
system in MsSql 2015 Local Database inside Visual Studio 2015. To do this, the
administrator will log-in as a user that has full access on the Main Form of the system
using the Authentication Form. The admin will use the Teacher and Student Registration
Forms to add their individual information to the system. The administrator will also
register their every RFID’s using a separate RFID Reader. These students and teachers
RFID’s are linked to their individual registered accounts in order for the teachers and
attendance monitoring system and classroom magnetic door lock security feature.
Fig. 29. shows how the actual simulation of accessing the door using the RFID
and recording of attendance, Push Button and Universal Keypad. The teacher’s RFID will
be used to manipulate the electromagnetic state to open and close the classroom door and
also for teachers’ attendance time in and out. Students will use their RFID cards to
between class hours. By doing this, the system will use RFID reader to capture RFID tag
opening classroom is handled by the Visual Studio 2015. Data comparison and record
Security and maintenance personnel can access the classroom without using
RFID. It is done using keypad, 16x2 LCD and Arduino Uno. Personnel will only type a
set of pin codes using the keypad. After the entering of pin code, the 16x2 LCD will
display a message for either successful or unsuccessful activity. To control the magnetic
lock state using keypad, the command will vary on the logic programmed inside the
CHAPTER 6
Conclusion
After developing the research project, the results showed the Automated
Classroom Magnetic Door Lock with Attendance Monitoring System Using Radio
Frequency Identification system satisfied the entire objectives. When it was tested, it
showed that through the attendance monitoring, the accuracy, reliability, convenience and
security satisfied the needs of the teachers and students. It only proved that proposed
study was a manageable system that is capable of recording attendance accurately and
securely in lesser time. It was consistent in terms of providing correct information and
updating of student’s and teacher’s attendance; it can be easily accessed by the school
dean. The system was specifically developed for attendance monitoring, security access
and maintenance which used a technology that is being used nowadays. The research
implied that the system was designed as user-friendly and easy to access.
Therefore, the researchers say that Automated Classroom Magnetic Door Lock
with Attendance Monitoring System using RFID system is ideal for attendance
monitoring.
56
Recommendations
Monitoring System.
2. The system should not be limited to Microsoft Operating System (O.S.) and
Visual Studio.net platforms but should also in other platforms (i.e. Linux, Mac
3. The system should also provide access to students in viewing their attendance
4. The system should use two database platforms to back up all files.
5. The system should have a power backup device called Uninterruptible Power
REFERENCES
Hanisah Binti Hamid (25th Nov. 2010). “RFID Based Systematic Student’s Attendance
Management System”.
Geoffrey Chua Tiong Sing (5th JULY 2012).“Automatic Access Control System Using
Student Identification Card Based On RFID Technology”.
Carlo V. Baltazar and Ferick John B. Ragojos (2012). “The Parent Portal and Attendance
Monitoring System with SMS”.
Chi-Kong Chan, Harry K. H. Chow, Alex K. S. Ng, Henry C. B. Chan, and Vincent T. Y.
Ng; (July 2012). “An RFID Case Study for Air Cargo Supply Chain Management”.
Proceedings of the International MultiConference of Engineers &; 2012, Vol. 1,
p201
Chitresh, S and Amit K. (2010), “An efficient Automatic Attendance Using Fingerprint
Verification Technique”,International Journal on Computer Science and
Engineering (IJCSE),Vol. 2 No. 2,pp 264-269.
Shashank Shukla, Shailee Shah, Pooja Save (No. 6, December 2013). “RFID Based
Attendance Management System”. International Journal of Electricaland
Computer Engineering (IJECE) Vol. 3, No. 6, December 2013, pp. 784~790
ISSN: 2088-8708
Nor Amiyana Biti Mohd Alias (2011). “Attendance and Access Control System Using
RFID System”. Universiti Teknikal Malaysia Melaka, Fakulti Kejuruteraan
Elektronik Dan Kejuruteraan Komputer. Borang Pengesahan Status Laporan
Project Sarjana Muda II
Jun Wu Li Zhou Zhenting Xiang (2010) “The Research of RFID-Based Indoor Signal
Block Positioning System Optimum Interval of Placing Tags”. ICCEA '10
Proceedings of the 2010 Second International Conference on Computer
Engineering and Applications - Volume 01
58
APPENDIX A
User’s Manual
For a user can access and use the system and its features, the user must either supply the
fields in the Authentication form by entering the User Name and Password and click
the Authenticate Button or by tapping their RFID tag, the same process goes to the
system administrator.
Main Form
The system has three (3) levels of security access, first is the administrator level, which
all Forms are accessible, second is the School Dean level, which allows him or her to
access all Forms but limited to Settings Form. Lastly, the Teacher access level, which
only allow any teacher to manipulate students, subject and schedule Forms and its details.
60
The administrator can manage users using the Manage Users Account in the settings
menu. FormUserList Form will pop-up, it is where the list of user accounts are displayed
and the administrator can add edit and delete Users(Teachers and School Dean).
By clicking the Add Button or by double clicking a user record on the list, a
FormUserDetail will appear. To delete a user account, right click on the user and click
This form allows you to add or edit user details and menu form access. supply the
necessary fields and click the Save Button. Save button automatically updates the user
details.
In the Main Form, click the Teacher Menu tab and choose View Teachers. This will
Tap in the Teacher’s RFID Tag to the RFID Reader to register its RFID data. In this
form, it also displays the list of teachers that are already registered in the system.
The RFID Tag data of the teacher is displayed in the Teacher RFID. Fill in the First,
Middle and the Last name textbox fields and click Save Button. To remove the name
In the main form just click the Student menu tab and then choose View Student, the
After choosing the View Student menu, tap the Student’s RFID tag to register it to the
system using RFID Reader. This also displays the list of the registered students. Click
refresh to activate updates on the student list. To edit the Student details, double click on
Supply the necessary information in the Student Detail Fields and click Save. Clear the
text fields using the Clear Button. The list of students can be seen and managed on the
schedule menu.
In the main form just click the Subject menu tab and then choose View
The registered subjects are displayed in this form. To create another subject, click Add
Button. To delete a subject in the list, just simply right click on the selected and choose
delete. Double clicking on a subject in the list brings up the FormSubjectCreate, this
will allow you to edit the subject details or its data fields and save it using Save Button
to update it.
Fill in the subject code and subject description textboxes. Click the Save Button to
save the data. Clear Button to clear out the text fields.
66
Go to main form just click the Schedule and then you will see the View Schedule on the
FormSchedule displays the list of class schedules in the system. To add another subject,
click on the Add Button to open up the ScheduleDetails Form. Refresh Button to
update the list in case nothing appears in the list or the newly created subject.
NOTE: The schedule contains subject I.D., teachers full name, day and time.
67
To create a new schedule, select any registered Subject, Teacher and Day from the
respective individual dropdown combobox lists. Also, you have to define the time and
To delete and edit in the FormSchedule form, just simply right click and choose Delete
to remove a schedule and Edit to re-open the ScheduleDetails form make do updates.
NOTE: You can’t delete any of the schedule in the list from FormSchedule if they have
To delete a student enrolled in a schedule, right click and choose delete. The Edit option
To use the Daily Time Record (DTR) form, click the DTR Menu and choose Open DTR.
During the class, the administrator enables the DTR system for in order to record the
teachers’ and students’ attendances. To open the door and to activate the electro-magnetic
lock, first, the teacher must first tap its RFID tag to the RFID Reader, this will signal the
system that the class has been started and the teacher’s attendance is automatically
recorded. Next, the students must tap their RFID tags to register their time in and time
out. Lastly, on a range of a pre-defined time in a class, the teacher must tap their RFID
70
tag again to signal the system that the class is finished. This process ends the recording of
any attendances and activates the electro-magnetic device to close the door.
Choose Reports in the Menu and select either Teacher, Student and Schedule Master
Liss or Teachers nad Student Absences. This will open Report Forms based on what you
have selected.
71
FormTeacherPrint displays the Teachers Master List registered in the system. You
can either Print or Save the list as a text file the Teacher’s Master List.
In this FormStudentList, all the registered students are displayed and can be Print or
To view reports of student enrolled per subject, just go to Reports and choose
Schedules Master List. Here, you can use the Filter Button to either filter and view it
To View the total absences of teacher/s per subject, go to Reports tab menu
and choose Teachers Absences. Use the Filter Button to view the list per
To View the total absences of student/s per subject, go to Reports tab menu
and choose Students Absences. Use the Filter Button to view the list per Name
APPENDIX B
Letter of Invitation for Thesis Adviser
NOTRE DAME OF TACURONG COLLEGE
City of Tacurong
July 6, 2015
ENGR. LOUIE ANGELO G. VILLEGAS
College Instructor
Notre Dame of Tacurong College
Dear Sir:
Part of the BS in Computer Science curriculum is to accomplish at least one (1) Thesis
Study with software implementation for one whole year. The said study will help the
students show their potentials in research writing and creating innovative software
program that will contribute much to the development of BSCS department and its
curriculum.
In this regard, may we ask you to be our Adviser/Consultant for the above mentioned
study. We believe that your expertise can be a great help throughout the group’s research
work.
Thank you very much for your favorable merit to this request.
Truly yours,
Noted by:
(SGD) ANALIZA S. HENODIA, MIT ENGR. ACEL S. MONARES, MSIT
Thesis Coordinator Program Head, BSCS/BSCPE
Approved by:
ENGR. LOUIE ANGELO G. VILLEGAS, MSIT
Thesis Adviser
76
APPENDIX C
Dear Ma’am:
Part of the BS in Computer Science curriculum is to accomplish at least one (1) Thesis
Study with software implementation for one whole year. The said study will help the
students show their potentials in research writing and creating innovative software
program that will contribute much to the development of BSCS department and its
curriculum.
In this regard, may we ask you to be our Grammarian for the above mentioned study. We
believe that your expertise can be a great help throughout the group’s research work.
Thank you very much for your favorable merit to this request.
Truly yours,
Noted by:
(SGD) ANALIZA S. HENODIA, MIT ENGR. ACEL S. MONARES, MSIT
Thesis Coordinator Program Head, BSCS/BSCPE
Approved by:
MARY JANE B. TUBALADO
Thesis Grammarian
77
APPENDIX D
Dear Ma’am:
The group has already accomplished the three (3) Chapters of the research study and its
50-75% program output. Hence, to know the reliability and accuracy of our paper and
software program, please allow us to present them on October 15, 2015 at exactly 9:00-
12:00 in the AVR.
Our research study is Automated Classroom Magnetic Door Lock with Attendance
Monitoring System using Radio Frequency Identification. We hope that with your
approval we will be able to show the contents of our Thesis study.
Truly yours,
Approved by:
APPENDIX E
The group has already accomplished the five (5) Chapters of the research study,
Software, and Hardware of the system. Hence, to know the reliability and accuracy of our
paper, please allow us to present them on Monday, April 11, 2016 at exactly 9:00 a.m in
the morning.
Truly yours,
Approved by:
Noted By:
APPENDIX F
Dear Ma’am:
The group is happy to inform you that we had already accomplished one greatest
achievement in Academic life – our Thesis study which is entitled Automated Classroom
Magnetic Door Lock with Attendance Monitoring System using Radio Frequency
Identification.
In connection with this, we would like to apply for a Final Defense this coming April 21,
2016, at exactly 5:00 p.m., at AVR.
With your approval, we will be able to show the results and contributions of the said
study to the community it covers.
Truly yours,
Approved by:
APPENDIX G
Proponents’ Profile
PERSONAL DATA:
Date of Birth : February 23, 1989
Age : 27
Place of Birth : 2nd Block Purok 9, Tacurong City, Sultan Kudarat
Nationality : Filipino
Gender : Male
Civil Status : Single
Person to be contacted in case of emergency: Mrs. Pilgriminda S. Bernardo
Address : 2nd Block Purok 9, Tacurong City, Sultan Kudarat
Contact Number : +63-906-719-5925
EDUCATIONAL BACKGROUND:
AFFILIATIONS:
PERSONAL DATA:
Date of Birth : June 05, 1993
Age : 22
Place of Birth : Isulan, Sultan Kudarat
Nationality : Filipino
Gender : Male
Civil Status : Single
Person to be contacted in case of emergency: Mrs. Winefreda D. Garcia
Address : Brgy. Katiku, Pres. Quirino, Sultan Kudarat
Contact Number: +63-910-354-8868
EDUCATIONAL BACKGROUND:
AFFILIATIONS:
PERSONAL DATA:
Date of Birth : March 25, 1993
Age : 22
Place of Birth : 60 Bonifacio Street, Tacurong City, Sultan Kudarat
Nationality : Filipino
Gender : Male
Civil Status : Single
Person to be contacted in case of emergency: Mrs. Jocelyn J. Pagmanoja
Address : 60 Bonifacio Street, Tacurong City, Sultan Kudarat
Contact Number: +63-936-367-6840
EDUCATIONAL BACKGROUND:
AFFILIATIONS:
ACES - 2012-2014
Philippine Society of Information Technology Students (PSITS),
Member - 2014-2016
Peer Counselor - 2013-2016
83
MICHAEL F. ROQUE
Aurora Extension, Digos City
+63-921-248-4010
PERSONAL DATA:
Date of Birth : September 30, 1988
Age : 27
Place of Birth : Aurora Extension, Digos City
Nationality : Filipino
Gender : Male
Civil Status : Single
Person to be contacted in case of emergency: Dr. Marlene G. Ferolino
Address : 2nd Block New Rosario, Tacurong City, Sultan Kudarat
Contact Number: +200-3141
EDUCATIONAL BACKGROUND:
AFFILIATIONS:
APPENDIX H
Source Code
FormAuthentication
Imports Encryption.AESMethod
With Form1
sprfid.Dispose()
.UserCode = tbusername.Text
ClearData()
.ShowDialog()
End With
ElseIf tbusername.Text = "admin" And tbpassword.Text = "admin"
FormUserList.Show()
Else
MsgBox(Message)
ClearData()
End If
End Sub
Function Auth(ByVal u As String, ByVal p As String) As Boolean
Using jb As New JBContext
Dim guser = (From x In jb.Users
Where x.UserCode = u
Select x)
FormMain
Public Class Form1
Property UserCode As String
Private Sub ViewTeachersToolStripMenuItem_Click(sender As Object, e As
EventArgs) Handles ViewTeachersToolStripMenuItem.Click
FormTeacherRegistration.ShowDialog()
End Sub
With g_user
SettingsToolStripMenuItem.Enabled = .HasSettings
StudentToolStripMenuItem.Enabled = .HasStudent
TeacherToolStripMenuItem.Enabled = .HasTeacher
SubjectToolStripMenuItem.Enabled = .HasSubject
DTRToolStripMenuItem.Enabled = .HasDTR
ReportsToolStripMenuItem.Enabled = .HasReports
86
ScheduleToolStripMenuItem.Enabled = .HasSchedule
End With
End Using
End Sub
End Sub
End Sub
Formexec
FormDTR
87
Imports System.IO.Ports
End Using
End Sub
End If
Else
Using jb As New JBContext
Dim gatt = (From a In jb.Attendance
Where a.AttSchedule.ScdId = ScheduleId And
a.AttStat = True Select a
)
If gatt.Count > 0 Then
LogAttendance(tbrfid.Text, gatt.First.AttId)
tbrfid.Clear()
tbrfid.Focus()
Else
MsgBox("No onging class.")
tbrfid.Clear()
tbrfid.Focus()
End If
88
End Using
End If
End If
'sprfid1.Close()
End Sub
End Using
End Function
With c_stud.First
.ADtlTimeOut = Now.TimeOfDay
End With
With jb
.SaveChanges()
End With
Else
.ADtlStd = stud}
With jb
.AttendanceDetail.Add(dtl)
.SaveChanges()
End With
End If
RefreshData(attid)
End Using
Else
MsgBox("Not enrolled in this subject")
End If
End Sub
Private Sub ReceivedText(ByVal [text] As String)
If tbrfid.InvokeRequired Then
Dim x As New settextcallback(AddressOf ReceivedText)
Me.BeginInvoke(x, New Object() {(text)})
Else
tbrfid.Text &= [text]
End If
End Sub
dgv.DataSource = Nothing
Dim att As New Attendance With {
.AttDate = Today,
.AttStat = stat,
.AttSchedule = sched,
.AttTimeOpen = Now.TimeOfDay}
With jb
.Attendance.Add(att)
.SaveChanges()
tbstat.Text = "Ongoing"
Status = True
tbrfid.Clear()
90
End With
End Using
End Sub
With att
.AttStat = stat
.AttTimeClose = Now.TimeOfDay
End With
tbstat.Text = "Finished"
Status = False
With jb
.SaveChanges()
tbrfid.Clear()
End With
'Close()
'Formexec.port = port
'Formexec.ShowDialog()
'If sprfid1.PortName = "COM5" Then
' sprfid1.Write("C")
'End If
End Using
Call closesprfid1()
End Sub
Else
CreateAttendance(True, Now, scdid)
End If
End Using
Return True
End Function
If d = 1 Or d = 3 Or d = 5 Then
s = "MWF"
Else
s = "TTH"
End If
With getsched.First
tbteacher.Text = .ThrFName & " " & .ThrLName
tbdesc.Text = .SubDesc
tbsched.Text = .ScdDay & "" & .ScdFrmTime.ToString & " - "
& .ScdToTime.ToString
CheckAttendance(.ScdId)
ScheduleId = .ScdId
End With
Else
'MsgBox("No schedule for today or Teacher has not opened the
class yet.")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
tbrfid.Clear()
End Using
End Sub
tbrfid.Focus()
Try
With sprfid1
.PortName = "COM5"
.BaudRate = "9600"
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
End With
'''''''sprfid1.Open()
If Not sprfid1.IsOpen Then
sprfid1.Open()
End If
With sprfid2
.Close()
.PortName = "COM6"
.BaudRate = "9600"
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
End With
''''''' sprfid2.Open()
If Not sprfid2.IsOpen Then
sprfid2.Open()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Sub closesprfid1()
If sprfid1.PortName = "COM5" Then
sprfid1.Close()
sprfid1.Open()
sprfid1.Write("C")
End If
End Sub
End Class
formschedDetail
With cmbsubj
.DataSource = Nothing
.DataSource = getsubj
.ValueMember = "SubId"
.DisplayMember = "SubDesc"
End With
With cmbteacher
.DataSource = Nothing
.DataSource = getteacher
.ValueMember = "Id"
.DisplayMember = "FullName"
End With
End Using
End Sub
Function ToAMPM(ByVal t As TimeSpan) As String
Dim tp As New TimeSpan(12, 00, 00)
If tp > t Then
Return t.ToString.Substring(0, 5) & " AM"
Else
Return t.Subtract(tp).ToString.Substring(0, 5) & " PM"
End If
End Function
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles
btnSave.Click
Using jb As New JBContext
Dim subid As Integer = cmbsubj.SelectedValue
Dim thrid As Integer = cmbteacher.SelectedValue
With jb
.Schedule.Add(sched)
If .SaveChanges Then
MsgBox("Added")
Close()
End If
End With
End Using
End Sub
End Class
FormSchedStudents
Sub RefreshData()
Using jb As New JBContext
Dim getdet = (From d In jb.ScheduleDetails
Where d.DtlScd.ScdId = SchedId
Select d.DtlId, d.DtlScd.ScdId, d.DtlStdId.StdFName,
d.DtlStdId.StdLName).ToList
With dgv
.DataSource = Nothing
.DataSource = getdet
End With
End Using
End Sub
.SchedId = SchedId
.ShowDialog()
RefreshData()
End With
End Sub
'Try
Using jb As New JBContext
Dim RemoveStud = (From s In jb.ScheduleDetails
Where s.DtlId = id
Select s).First
With jb
.ScheduleDetails.Remove(RemoveStud)
If .SaveChanges Then
MsgBox("removed")
RefreshData()
End If
End With
End Using
'Catch ex As Exception
' MsgBox(ex.InnerException.Message)
'End Try
End If
End Sub
End Class
FormShowStudent
With dgv
.DataSource = Nothing
.DataSource = getstud
End With
End Using
End Sub
With jb
.ScheduleDetails.Add(schedstd)
.SaveChanges()
End With
Next
MsgBox("Success")
Close()
End Using
End If
End Sub
End Class
FormStudentDetail
With JB
.Students.Add(srecord)
If .SaveChanges Then
97
Clear()
MsgBox("Added")
Close()
End If
End With
End Using
Else
Using JB As New JBContext
Dim getstudent = (From s In JB.Students
Where s.StdRFID = RFID
Select s).First
With getstudent
.StdRFID = RFID
.StdFName = tbfname.Text
.StdLName = tblname.Text
.StdMName = tbmname.Text
.StdContact = tbcontact.Text
.Address = tbaddress.Text
End With
With JB
.SaveChanges()
End With
Clear()
MsgBox("Updated")
Close()
End Using
End If
End Sub
Sub Clear()
tbaddress.Clear()
tbcontact.Clear()
tbfname.Clear()
tblname.Clear()
tbmname.Clear()
End Sub
tbmname.Text = .StdMName
tbaddress.Text = .Address
tbcontact.Text = .StdContact
End With
Return True
Else
Clear()
tbrfid.Text = RFID
Return False
End If
End Using
End Function
End Class
FormStudentRegistration
Imports System.IO.Ports
With sprfid
99
.PortName = "COM5"
.BaudRate = "9600"
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
End With
End Sub
Sub RefreshData()
Using JB As New JBContext
Dim getrecords = (From s In JB.Students
Select s).ToList
With dgv
.DataSource = Nothing
.DataSource = getrecords
End With
End Using
End Sub
With JB
.Students.Remove(getstudent)
If .SaveChanges Then
MsgBox("Removed")
RefreshData()
End If
End With
End Using
Catch ex As Exception
MsgBox(ex.InnerException.Message)
End Try
100
End If
End Sub
End With
End If
End Sub
End Class
FormSubjectCreate
With jb
.Subjects.Add(subj)
If .SaveChanges Then
MsgBox("Added")
clear()
Close()
End If
End With
End Using
Else
Using jb As New JBContext
Dim subj = (From s In jb.Subjects
Where s.SubId = SubjID
Select s).First
With subj
.SubCode = tbcode.Text
101
.SubDesc = tbdesc.Text
End With
With jb
If .SaveChanges Then
MsgBox("Updated")
clear()
Close()
End If
End With
End Using
End If
End Sub
Sub clear()
tbcode.Clear()
tbdesc.Clear()
End Sub
End Sub
End Sub
End Class
FormSubjectRegistration
With FormSubjectCreate
.Stat = True
.ShowDialog()
RefreshData()
End With
End Sub
Sub RefreshData()
Using jb As New JBContext
Dim getrecord = (From subj In jb.Subjects
Select subj).ToList
With dgv
.DataSource = Nothing
.DataSource = getrecord
End With
End Using
End Sub
Try
Using jb As New JBContext
Dim subj = (From s In jb.Subjects
Where s.SubId = id
Select s).First
103
With jb
.Subjects.Remove(subj)
If .SaveChanges Then
MsgBox("removed")
RefreshData()
End If
End With
End Using
Catch ex As Exception
MsgBox(ex.InnerException.Message)
End Try
End If
End Sub
End Class
FormTeacherDetail
End With
Return True
Else
Clear()
tbrfid.Text = RFID
Return False
End If
End Using
End Function
Sub Clear()
tbfname.Clear()
tblname.Clear()
104
tbmname.Clear()
End Sub
End Sub
With JB
.Teachers.Add(srecord)
If .SaveChanges Then
Clear()
MsgBox("Added")
Close()
End If
End With
End Using
Else
Using JB As New JBContext
Dim getTeacher = (From s In JB.Teachers
Where s.ThrRFID = RFID
Select s).First
With getTeacher
.ThrRFID = RFID
.ThrFName = tbfname.Text
.ThrLName = tblname.Text
.ThrMName = tbmname.Text
End With
With JB
.SaveChanges()
End With
Clear()
MsgBox("Updated")
Close()
End Using
End If
End Sub
End Class
FormUserDetail
Imports Encryption.AESMethod
105
With jb
.Users.Add(nuser)
If .SaveChanges Then
MsgBox("Added")
Close()
End If
End With
End Using
Else
Using jb As New JBContext
Dim guser = (From u In jb.Users
Where u.UserId = UID
Select u).First
With guser
.UserFullName = tbfullname.Text
.UserPassword = Encrypt(tbpassword.Text, "s3cr3t")
.UserFullName = tbfullname.Text
.HasReports = cbreports.Checked
.HasSchedule = cbreports.Checked
.HasSettings = cbsettings.Checked
.HasStudent = cbstudents.Checked
.HasSubject = cbsubjects.Checked
.HasTeacher = cbteachers.Checked
.HasDTR = cbdtr.Checked
End With
With jb
If .SaveChanges() Then
MsgBox("Updated")
End If
End With
Close()
End Using
End If
106
End Sub
Sub ClearData()
tbfullname.Clear()
tbpassword.Clear()
tbusername.Clear()
End Sub
With guser
tbfullname.Text = .UserFullName
tbpassword.Text = Decrypt(.UserPassword, "s3cr3t")
tbusername.Text = .UserCode
cbreports.Checked = .HasReports
cbschedules.Checked = .HasSchedule
cbsettings.Checked = .HasSettings
cbstudents.Checked = .HasStudent
cbsubjects.Checked = .HasSubject
cbteachers.Checked = .HasTeacher
cbdtr.Checked = .HasDTR
End With
End Using
End If
End Sub
FormUserList
Sub RefreshData()
Using jb As New JBContext
Dim listUser = (From u In jb.Users
Select u.UserId, u.UserCode, u.HasSettings, u.HasDTR,
u.HasReports, u.HasSchedule, u.HasStudent, u.HasSubject, u.HasTeacher).ToList
With dgv
.DataSource = Nothing
.DataSource = listUser
End With
End Using
End Sub
With jb
.Users.Remove(guser)
If .SaveChanges Then
MsgBox("Removed")
End If
End With
RefreshData()
End Using
End If
End Sub
End Sub
End Class
FromSchedule
Sub RefreshData()
Using jb As New JBContext
Dim getrecords = (From schd In jb.Schedule
Select New With {
.ScdId = schd.ScdId,
.SubCode = schd.ScdSub.SubCode,
.ThrFullName = schd.ScdThr.ThrFName & " " &
schd.ScdThr.ThrLName,
.ScdDay = schd.ScdDay,
.ScdFrmTime = schd.ScdFrmTimestr,
.ScdToTime = schd.ScdToTimestr}).ToList
With dgv
.DataSource = Nothing
.DataSource = getrecords
End With
End Using
End Sub
End Using
Catch ex As Exception
MsgBox(ex.Message)
End Try
109
End If
End Sub
End Sub
End Class
TeacherRegistration
Imports System.IO.Ports
Sub RefreshData()
Using JB As New JBContext
Dim getrecords = (From s In JB.Teachers
Select s).ToList
With dgv
.DataSource = Nothing
.DataSource = getrecords
End With
End Using
End Sub
With sprfid
.PortName = "COM5"
.BaudRate = "9600"
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
End With
End Sub
With JB
.Teachers.Remove(getstudent)
If .SaveChanges Then
MsgBox("Removed")
RefreshData()
111
End If
End With
End Using
Catch ex As Exception
MsgBox(ex.InnerException.ToString)
End Try
End If
End Sub
End With
End If
End Sub
End Class
#include <SoftwareSerial.h>
void setup() {
Serial.begin(9600);
RFIDReader.begin(9600);
pinMode(MagneticLock, OUTPUT);
pinMode(SW1, INPUT);
pinMode(fromPINCode, INPUT);
digitalWrite(MagneticLock, HIGH);
}
void loop()
switchState = digitalRead(SW1);
isOpen = digitalRead(fromPINCode);
if (RFIDReader.available() > 0)
{
dataReceived = RFIDReader.read();
Serial.print(dataReceived);
//Serial.print("S202"); //change everytime you upload and
assign COM number
}
if (Serial.available() > 0)
{
setByte = Serial.read();
if (setByte == 'O') {
digitalWrite(MagneticLock, LOW);
// Serial.println("DOOR OPEN.");
}
if (setByte == 'C') {
digitalWrite(MagneticLock, HIGH);
113
// Serial.println("DOOR CLOSED.");
if (switchState == LOW)
{
digitalWrite(MagneticLock, LOW);
// Serial.println("DOOR OPEN.");
delay(5000);
digitalWrite(MagneticLock, HIGH);
// Serial.println("DOOR CLOSED.");
}
if (isOpen == LOW)
{
digitalWrite(MagneticLock, LOW);
// Serial.println("DOOR OPEN.");
delay(5000);
digitalWrite(MagneticLock, HIGH);
// Serial.println("DOOR CLOSED.");
}