You are on page 1of 25

19

CHAPTER 4
RESULTS ANALYSIS OF SMART CAR-PARKING SECURITY SYSTEM

In this chapter, testing of all components step by step and the results of testing
components were briefly described. All the processes were test by Arduino AT mega
2560. By testing the components before building the project, the properties of each
components could be known and some difficulties could be faced. However, by
solving these difficulties, many knowledge and experiences were being gotten.

4.1. Test and results of IR sensor module


Since four of IR sensor modules were used in this project, testing of IR sensor
module was one of the most importance things in this project. And Arduino Mega was
also be used in the testing of IR sensors. Either 5V or 3.3V could be used to supply
the IR sensor. When the client or object was located in front of the IR sensor, the
output of the module would be generated to 0V or GND (ground). Moreover, there
were two variable resisters on the sensor and those could adjust delay and distance.

Figure 4.1 Testing of IR sensors whether the object was existed or invalid
20

IR sensor was used in this project for power saving and it could detect whether
the client was existed in front of the door or invalid. By testing, the object or
something like that was exist or through the IR sensor could be known. Firstly, it
transmitted the infrared radiation and caught back the reflected radiation. If the object
was existed, IR sensor module produced the output and its red LED turned on. There
was an important fact that IR sensor must be avoided from the sun light. If the IR
sensor met the sunlight, that sensor will not be worked well.

4.2. Test and results of LCD (liquid crystal display)

Figure 4.2 Testing of LCD to show an information


This module could be simply understood because it was only used to display
information to the client. In this project, 16x2 LCDs were used and 16x2 means 16
characters and 2 rows could be used. There were two ways to use LCD that means
SPI (Serial Peripheral Interface) mode and I2C (Inter Integrated Circuit) mode. In this
project, SPI mode was used. However, I2C was better than SPI because I2C used only
4 pins connection such as (VCC (supply), GND (ground), TX (transmit), RX
21

(receive)). However, the extra module and library would be installed when I2C was
used. In SPI mode, 8 pins were needed to use for displaying LCD.
First, pin1, pin5, pin 12 were connected to GND (ground). Pin 2 was directly
connected to 5V, pin 11 is joined with 220ῼ resister and also connected to 5V. Pin 3
was used to adjust the brightness of LCD and so it was used with 10kῼ variable
resister. Pin D4, D5, D6, D7 were connected with Arduino pin (5, 4, 3, 2) which were
declared in program. In this thesis, two LCDs were used for entrance and exit gate.

4.3. Test and results of MFRC522


In this type of RFID (MFRC522), SPI mode can only be used and its working
frequency is 13.56 MHz (megahertz). Its working current is 13 to 26mA, its standby
current is 10 to 13mA and its sleeping current is less than 80uA. Data communication
speed is maximum 10Mbit/s.

Figure 4.3 Testing of RFID tags and receiver to know ID numbers.


22

If I2C mode and HSU mode were want to be used, PN532 RFID receiver type
must be used. PN532 have more wide range than MFRC522. However, wide range is
not necessary in this project. So, MFRC522 was used to be economical.
And for a little more range, the code “mfrc522.PCD_SetAntennaGain
(mfrc522.RxGain_max);” was used in Arduino IDE. In SPI mode, only 6 pins needed
to use for processing and which were VCC, GND, MOSI, MISO, CLK and SS. In this
type of RFID (MFRC522), 3.3 VDC should be used according to the data sheet.
MISO means master input slave output, MOSI means master output slave
input, CLK means clock pin for data bits and SS means chip select pin. When the
right card is scanned at the RFID receiver, the LCD showed “Access Granted” and
when the wrong card is scanned at the RFID receiver, the LCD showed “Invalid
Card”. The thing noticed was that the chip select pin only worked if the 0V applied
and moreover, two MFRC522s were used in this thesis for the two gates that mean the
entrance gate and the exit gate.

4.4. Test and result of servo motor

Figure 4.4 Testing of Servo motor sensors to control the degree


23

With servo motors, various kind of angles was able to be controlled and
firstly, 0 degree was adjusted to be easily modified. And then, 80 degrees was defined
as the close angle of the gate and 10 degrees was defined as the open angle of the
entrance gate. However, for the exit gate, 10 degrees was defined as the close angle of
the gate and 80 degrees was defined as the open angle. Moreover, the ultimate
security system was consisted in the exit gate and therefore there were be also degree
adjustment in servo no-3. Servo 3 were raised up from 80 degrees to 120 degrees if
the ultimate security system turned on.

4.5. Test and result of LEDs and Buzzer (Alarm System)

Figure 4.5 Testing of an alarm system


The alarm system turned on if an unauthorized card or an invalid card was
scanned at the RFID receiver.

4.6. Test and result of Smart Car-Parking Security System


There were two parts in this thesis. The first one was aimed for the clients or
users and the second one was for the controllers. For the users, this system only
allowed to access the gates whether the scanned card was corrected or wronged. For
24

the controllers, this system was able to be added or removed the extra ID cards.
Moreover, this system even could be reset if needed.

4.6.1. User manual of smart car-parking security system


The initialization of the car-parking security system was shown in the figure.
According to the figure, four IR sensors, two LCDs, two RFID MFRC522 receivers
and three servo motors were mainly consisted. IR sensor 1 was used to detect whether
the cars was existed in front of the entrance gate or invalid and IR sensor 3 was also to
detect the present of car at the exit gate. However, IR sensor 2 and IR sensor 4 were
used to detect whether the car was passed through the gates or stopped.

Figure 4.6 Initialization of the car-parking security system


Both of RFID MFRC522 receivers were used to check whether the authorized
card or wrong card. Servo motor 1 and 2 were used for entrance gate and the exit gate.
However, servo motor 3 was used for the ultimate security system. To save the
electricity energy, LCD displays were turned off the light as the following figure.
Both of the LCD displays were turned off the light and that were only turned on the
light if the IR sensor 1 was detected the object or the car. And that were known by the
following figures.
25

Figure 4.7 Turn off the light of LCD for energy saving

Figure 4.8 LCD of the entrance gate turned on the light when IR sensor 1 was
detected
26

Figure 4.9 LCD at the entrance gate when an unauthorized card was scanned
When an unauthorized card was scanned, the LCD display showed “Access
Denied” and the entrance gate was not opened. Moreover, the alarm system turned on.
This case was shown in the above figure.

Figure 4.10 LCD at the entrance gate when an authorized card is scanned
27

Figure 4.11 when the car is leave from the IR sensor 1, the LCD turned off the light

Figure 4.12 when the IR sensor 2 is sensed, the gate closed automatically
However, when an authorized card was scanned at the receiver, LCD display
showed “Access Granted” and the entrance gate was opened that means servo motor 1
28

was rise up from 10 degrees to 80 degrees. The car entered to the parking and when
the car leaved from IR sensor 1, the LCD display turned off the light automatically.
This phenomenon was shown in the above figures.
According to the figure 4.6.1.7, when the car is passed through the IR sensor
2, the gate was closed again that means servo motor 1 was falling down from 80
degrees to 10 degrees.

Figure 4.13 The initial condition of the exit gate


According to the above figure, the LCD display turned off the light if there
was no car to leave from the car-parking. When the client’s car was wanted to leave
from the parking, that car must go to the exit gate. IR sensor 3 sensed and the LCD
display turned on the light as shown in the following figure.
Similar to the entrance gate, the RFID receiver (MFRC522) at the exit gate
determined whether the scanned card ID was valid in the authorized list or invalid. If
the authorized card was scanned, the LCD display showed “Access Granted” and the
exit gate was opened. That means servo motor 2 was rise up from 80 degrees to 10
degrees. If unauthorized card was scanned, the LCD display showed “Access
Denied”, the servo motor 2 was not work at that time and the alarm system turned on.
29

In the alarm system, red led and buzzer module were blinked. All the above
phenomenon was shown as the following figures.

Figure 4.14 LCD turned on the light if the car was detected by IR sensor 3

Figure 4.15 The information of LCD at the exit gate when an authorized card was
scanned
30

Figure 4.16 The car was leaving from the car parking when access granted

Figure 4.17 The information of LCD when an unauthorized card was scanned
31

Figure 4.18 The light of LCD and the exit gate closed when the authorized card was
scanned and IR sensor 4 was sensed

Figure 4.19 Although the invalid card, break the exit gate condition
32

Figure 4.20 Ultimate security system was not activated because IR sensor 4 wasn’t
sensed yet

Figure 4.21 Ultimate security system


33

Figure 4.22 The ultimate security system turned on when the IR sensor 4 was sensed

Figure 4.23 The car couldn’t move due to the ultimate security system
34

According to the above system, the ultimate security system was involved in
this thesis. This system was activated if an unauthorized card was scanned and the
client was forced to leave from the car-parking. In this situation, that client was
marked as the thief and IR sensor 4 must be passed to leave from the parking.
Therefore, when the IR sensor 4 was sensed, the ultimate security system turned on.
When the ultimate security system turned on, the servo motor 3 was rise up from 80
degrees to 120 degrees. That made the car’s tiers to be break and that car couldn’t run
from the parking.

4.6.2. Advance system manual for smart car-parking security system


Since all the authorized RFID card’s IDs were saved on EEPROM, EEPROM
was defined as the database of the smart car-parking security system. Before explain
about the system, EEPROM must be explained. EEPROM is Electrically Erasable
Read-Only Memory and according to the Arduino board, the data storage may be
different. (Example, In Arduino Uno,1kbyte can be used as EEPROM for database, in
Arduino Mega, 4kbyte can be used as database and so on. Moreover, the Arduino
Mega was used for more memory space in this project.

Figure 4.24 Resetting of the entire system


35

Figure 4.25 Waiting 15 seconds to be reset the entire system

Figure 4.26 Entire system is completely formatted


36

Figure 4.27 Warning to restart the device for running system again

Above figures showed how to reset or format the database of the entire smart
car-parking security system that mean wiping of EEPROM. The Reset button or
format key was added in this system to be more reliable.
Since this thesis was aimed for the university campus and therefore some
amount of fees must be paid to the university for using this car-parking. And every
student will get the authorized card for one semester (about four months). After one
semester, each authorized card will be invalid card by formatting this system.
Therefore, each student will pay the fees to register the card again. That mean this
entire system must be reset or format after the defined time.
The above figure 4.24 to 4.27 will happened if the smart car-parking security
system is formatted or reset. Actually, that was wiping of EEPROM or cleaning of
EEPROM because 0 was replaced with all the memory in EEPROM. After reset the
system, the Arduino board must be restarted to run that system again.
To be special for this thesis, master card program is written. With this card,
the RFID cards can be marked or removed on EEPROM. After resetting this system,
there is no master card on EEPROM. Therefore, a master card must be marked on
EEPROM to be continue next steps. The following figures will show about how to
define a master card.
37

Figure 4.28 LCD showing lacking of master card

Figure 4.29 LCD showing request to define master card


38

Figure 4.30 Writing process of master card on EEPROM at entrance gate

Figure 4.31 Master card was already written on EEPROM at the entrance gate
39

Figure 4.32 Writing process of master card on EEPROM at exit gate

Figure 4.33 Master card was already written on EEPROM at the exit gate
40

With that master card, the authorized card was able to be added or removed.
Before add or remove ID cards from EEPROM, Program mode must be change by
master card. That mean master card could be able to switched from the normal mode
to the program mode or from the program mode to the normal mode.
In the program mode, adding or removing functions were worked. However,
in the normal mode, only checking function was able to be work that mean the system
only checked whether the scanned card was authorized card or unauthorized card.
Moreover, in the program mode, green led, red led and blue led were blinked
as alternatively. Adding ID cards to the EEPROM or removing ID cards from the
EEPROM could be shown in the following figures.

Figure 4.34 When master scanned, LEDs blinked alternatively(entrance)

Figure 4.35 When master scanned, program mode was entered(entrance)


41

Figure 4.36 ID card was adding to EEPROM at the entrance gate

Figure 4.37 ID card was removing from EEPROM at the entrance gate
42

Figure 4.38 ID card was adding to EEPROM at the exit gate

Figure 4.39 Switching program mode with master card at the exit gate
43

Figure 4.40 Switching normal mode with master card at the entrance gate

After adding or removing ID on EEPROM, normal mode must be switched


from program mode by using master card. If normal mode was turn on, the scanned
card could be determined whether that card was authorized card or unauthorized card.

4.7. Summary
In this chapter, results analysis of smart car-parking security system was
briefly described. The way how to eliminate the errors and the way how to improve
the system in the future can be known by testing the project. And discussions and
conclusions of the smart car-parking security system will be known in the coming
chapter. Moreover, the future scope of this project will also be discussed in the next
chapter.

You might also like