Smart prepaid traffic fines system using RFID, IoT and mobile app

This work is intended to deliver an intelligent traffic system using radio frequency identification (RFID) technology. It designed and implemented in a way where fines are autonomously registered. In addition, a mobile app was built to assist traffic officers managing their field works. Low cost equipment’s have been used such as RFID technology, passive tags, processing unit (personal computer), and a connection system. First stage is represented by collecting data using the RFID, where it reads any identified tag that attached with vehicles. Next, a certain data are transmitted to the server using internet network communication system. The server is responsible for processing these data according to a pre-defined rules. Finally, police officers can use the mobile app to perform several tasks according the processed data such as monitoring a specific car, register a new car ID and others.

To overcome this problem, the fusion of V2V and V2I together was proposed by collecting information using GPS and giving feedback message by mobile phone application incase traffic jam or an accident [16][17][18]. Vicente et al. have been examined V2I communications with fuzzy control using the AUTOPIA approach to improve the traffic management while Jungang Liu proposed V2I communication with IntelRate controller to overcome performance problems of control protocol [19,20]. Lu´ıs Conde Ben et al. have been applied a legacy algorithm to reduce crossroad accidents and wasting time for vehicles which is not supplied with V2I and V2V communications [21].
Different Scientifics have focused their researches on using radio frequency identification in traffic management system [22][23][24]. W. Wen has proposed a smart traffic management system for minimizing the road congestion, tracking a stolen car, shortest path, as well as improving vehicles flow rate by utilizing high speed server for collection information from each RIFD sensors that attached to each vehicle [12]. Rajeshwari Sundar et al. have been presented that NSK EDK-125-TTL and PIC16F877A SoC used for counting average number of car that passes through a specified road using RIFD in order to control the duration of green light for crowded path [1]. While Freddy Kurniawan et al. proposed the signal-timing synchronization system using AVR microcontroller master and locale to coordinate the green light interval [25].
To sum up, researchers used IoT and different traffic management techniques to overcome challenges such as congestion, stolen cars or even giving priority for ambulance vehicles. On the other hand, our contribution is represented by building an autonomous system that develops a way of charging fines simultaneously from drivers balance and then send a detailed SMS to them. Also, we programmed a mobile application to assist traffic police officers in doing their field works. The next sections are arranged as follow. Next, Section three describes the research method that used to build this study. Section four shows the result of the project. The conclusion has been mentioned in section five.

Research Methodology
The suggested research was designed and implemented to provide an intelligent traffic system in An Najaf city as a case study. Figure 1 depicts the main road in An Najaf, showing all the directions, the allowed parking points in front of the University of Kufa and the traffic light as well. The aticle studied four different traffic problems and gave a solution by using RFID tag, RFID Reader, Mobile Android App and a main processing unit. Figure 2 illustrates the framework of the system and the procedure for collecting and processing data. The RFID readers connected to the local processing unit (Arduino UNO microcontroller), which is connected to ESP8266 WiFi that enables the microcontroller to communicate with the main processing unit (server). This project divides into three parts: the first part is the Local Processing Unit of the system that contains (Microcontroller with ESP8266 WiFi, RFID Reader and RFID tag). The second part is the Main Processing Unit (Server) which contains the database of the drivers and communication with first and third part wirelessly via internet network. The last part is the Mobile Android App. which is designed to be the port of the second part.

Local Processing Unit
Seven RFID readers were wired and programmed in this project as shown in Figure 3. Arduino Uno is used as a microcontroller to identify the position and type of the violation depending on each RFID reader. These seven RFID readers were distributed in four different locations as illustrated in the Table 1.
The system suggests that all cars must have RFID tag and the system must store the information of each RFID tag as (car's number, driver's name, driver's phone number, serial number, balance) in the database of the system. When a violation is made, a unique packet code will be generated by the local microcontroller. This code consists of three sets of data as demonstrated in Figure 4. The first code of the set is the serial number of the violated car, the second code is the type of an infraction and, the last code is the address of RFID reader.   Finally, the local unit will send the packet code to the Server via Internet Network. The Main processing unit will take a suitable decision depending on the received code. The next section explains the work of the server.

Main Processing Unit (Server)
This section describes the procedure of processing data collected from each local unit and the output generated for each state. Each local unit send the packet code periodically as mentioned above. According to that code, the server checks for any fine need to be charged depending on its database. If so, a SMS will be sent to the driver containing all the details as shown in Figure 5. Also, if the driver is out of balance, then the procedure is to double the fine after a specific time. The database of the system could be updated by using mobile App. In addition, the Server communicates to Mobile App., via Internet Network by using a specific IP.
The android App. is designed and programmed to do and provide some tasks by the police officers themselves. This means that the server needs to communicate with this App. in real time (RTS). For example, to track a stolen car or out of balance, the server needs to send the car code to the App. in real time. The outputs of the server that programmed in this prototype are as follow: -Sending SMS message -Send alarm to the App. when a stolen car pass through any check point.
-Store information of the new car IDs.
To generate a suitable SMS for each different infraction as mentioned before, four rules are assigned and used in this project as described below:-Rule 1: Override traffic light violation For each local unit, the violated car tag code should be sent to the main server directly when car override the red traffic light. The RFID reader that placed next to traffic light works only at the same time with red traffic light ON to detect the violated driver. Rule 2: Wrong side violation In this rule, there are two RFID readers installed for checking the car wrong side, these two readers placed in such way there is a distance between them along the road as shown in Figure 6. If RFID D reads the same code of RFID E after few seconds, the violated car tag code will be send to the server. The Main Processing Unit provides the mobile application with information of each car that passes over the RFID reader of the check point. Therefore, the policemen have the ability to check that information and compare it with the driver information such as his ID or car number to detect the stolen or suspicious car. The Mobile Application was designed to assist traffic police officers. It communicates to the main center unit via WIFI over the internet network. The mobile App. must be installed in smart phones of the traffic officers. Consequently, the police traffic can add a new driver, top-up the balance, request information and monitor the movement in each local processing unit. The App. was designed by using MIT App Inventor platform. A web-based development platform can be implemented by MIT App Inventor. This platform gives design flexibility by letting users to drag and drop blocks/objects on the interface editor. In addition, the app has been programmed with same property of dragging and dropping, where all the codes are designed in blocks as shown in Figure 7. The reason behind developing the application by this platform is the availability to send SMS, communicate with other web resources and connect with external data storage [26]. top-up driver balance. The last window was designed to assist police officers at check points by giving information for the passing cars. In addition, an alarm will be buzzard when reported cars passing on those check points. The flexibility of the mobile application makes it very easy to be used by the officers. They can check violations and add balances as well as vehicle monitoring periodically. The drivers who have no balance can recharge account from any local point. Finally, a violated driver will be receiving a SMS when he ruined the traffic laws. Figure 8. Shows the mobile application windows

Results and Analysis
The proposed project was implemented and examined according to the prototype that mimics the real main road (Ibn Bilal cross section). Information of ten vehicles was stored in the database to be used later for testing the system. The officers can communicate to the main server by using a secured IP. On the other hand, the server can communicate with each local unit by different defined IP addresses in real time.
First of all, the override traffic violation was tested by using a small car which has the specific RFID tag (Serial No.=5374216101) that passing over RFID Reader (A) during the red traffic light ON. Therefore, once the microcontroller received the tag of the violated car from RFID reader (A), the packet code was generated as following: (5374216101AA). This packet code was sent directly to the main server for processing. The server compared this received code with the stored database. Then, it provided the mobile application by information of violation and the phone number via internet network. The mobile application redirected the SMS to the driver phone as shown in Figure 9. the microcontroller. Then, the received packet code was checked by the main server. Therefore, the SMS was generated and sent to the mobile application in order to resend it to the violated driver phone as the following Figure 10. Last violation was tested depending on the parking in forbidden or limited time parking areas in front of university of Kufa. The RFID reader (F) is programmed to read the cars tag hourly, and this tag (2522481229) was detected six times by the local unit. Consequently, this car assigned as a violated car and the packet code (2522481229CF) was generated to be sent to the main server. As a result, a SMS was sent to the violated driver phone containing all the details. The final property of this project was examined on one RFID reader (H). This RFID read each car passing over it and the microcontroller sent the packet code directly to the database. The server sent information of those cars to the mobile App. in real time for checking. Figure 11 shows information of a registered car passed over RFID reader (H).

Conclusion
This work proposed a mobile application to assist traffic police officer in doing their filed works. The main objective was to develop a prepaid traffic violation method, which could help traffic in Iraq to be more intelligent. Police officers can be easily connected with this system by simply providing them with smart phones containing the app. The project have been tested on a prototype that simulates a real cross road In An-Najaf city. In this prototype, seven RFID readers were used and connected to one Arduino Uno microcontroller. This unit is programmed to communicate through the Internet Network with the server. Finally, the mobile App was developed to control the procedure of registering and monitoring of drivers.
The research main contribution is to charge fines simultaneously from drivers balance and then send a detailed SMS to the driver. Also, it assists the police officers in their local points to perform individual tasks. For example, registering new driver, top-up driver balance and monitor violated vehicles. This work could be developed as a future work by adding more functionality for the app such as adding cameras for the system to be used in detected violated