Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Durugu Kiranmayi / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol.

7 (3) , 2016, 1444-1447

Vehicle Monitoring System Using RFID


Durugu Kiranmayi
Department of CSE, Vignan’s Institute of Information Technology
Duvvada, Visakhapatnam, Andhra Pradesh

Abstract-In present world, human population is growing II. EXISITING SYSTEM


bigger in its count. So the vehicle used by them will be more in The task of monitoring vehicles is done manually.
number. Monitoring is becoming a big challenge. The parking Monitoring vehicles of every individual member is
area has to be secure with enforced entrances and exits. It
complex task for security guards and generating reports is
should have automated and efficient monitoring system. With
not accurate as number of vehicles increases. Vehicle
RFID vehicle monitoring system vehicle information can be
automatically gathered for efficient and safe vehicle monitoring is done manually. Security guards manage all
management. For every vehicle RFID tag will be given. RFID the vehicles. The entry time and exit time is not maintained.
readers are present at the IN and OUT gates. Using reader Space management can’t be done properly, Security
tag, information is retrieved. Automatic vehicle identification problems aren’t solved.
can increase the security and prevent loss of vehicles.
III. PROPOSED SYSTEM
Keywords: RFID tag, RFID reader Monitoring the vehicles will be easy by using RFID
technology.RFID readers are present at entry and exit gates.
I. INTRODUCTION
RFID tags are given to every vehicle and readers are used
The main objective of the “Vehicle monitoring system” is
to retrieve information. Entry and exit times can easily
to manage vehicles. Maintaining records of vehicles and
stored in database and viewed.
data are a complicated task in manual process moreover it
Advantages of the proposed system
is difficult to generate reports. Maintaining records of
 The application is being developed in HTML,
vehicles reports is much easier with “vehicle monitoring PHP languages, which have the flexibility of
System”, It’s easier to maintain entries of vehicles in platform independent access. Thus application
database automatically by software rather than doing it by would be portable to any environment where web
manual process, with this system there is a possibility to browser exists with connectivity to web server
maintain in and out times easily. hosting Application.
There is a feature provided in this system to generate daily  Using this system automatic vehicle identification
can be done.
reports monitoring of vehicles can be done automatically.
 Security constraints can be easily solved.
Whenever vehicle entered into the organization the in time
 Marinating the records of vehicles is done easily.
and out time is noted automatically by the RFID device.  Monthly reports and weekly reports can be
Monitoring can be done easily administrator can easily viewed.
generate reports and verify the owner of the vehicle. This
system helps in Loss of vehicles because of automated IV. BLOCK DIAGRAM
system. The records which are maintained manually are
automated with this device and our software. Overall this Vehicle with RFID
tag RFID reader
Vehicle monitoring system simplifies the task of managing
vehicles by security guards and made automated system.

System Essentials
 RFID tags, or transponders, carry object-
identifying data.
 RFID readers, or transceivers, read and write tag
data.
 Databases associate arbitrary records with tag Database
identifying data.

www.ijcsit.com 1444
Durugu Kiranmayi / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 7 (3) , 2016, 1444-1447

V. SOURCE CODE: READ IN-OUT TIMES


public synchronized void close() {
import gnu.io.CommPortIdentifier; if (Port != null) {
import gnu.io.SerialPort; Port.removeEventListener();
import gnu.io.SerialPortEvent; Port.close();
import gnu.io.SerialPortEventListener; }
import java.io.BufferedWriter; }
import java.io.File;
import java.io.FileWriter; @SuppressWarnings("rawtypes")
import java.io.IOException;
import java.io.InputStream; public void initialize() {
import java.io.OutputStream; CommPortIdentifierRFPort = null;
import java.io.PrintWriter; Enumeration getports =
import java.io.*; CommPortIdentifier.getPortIdentifiers();
import java.text.DateFormat; while (getports.hasMoreElements()) {
import java.text.SimpleDateFormat; CommPortIdentifierPid = (CommPortIdentifier)
import java.util.Date; getports.nextElement();
import java.util.Calendar; for (String portName : Ports) {
import java.util.Enumeration; if (Pid.getName().equals(portName)) {
import java.lang.String; RFPort = Pid;
import java.sql.*; break
public class StaffRFID12 implements }
SerialPortEventListener { }
String a,b,c,d,e,f,g,i; }
SerialPort Port;
int status1=1,ser=0, ser1=0; if (RFPort == null) {
String System.out.println("COM port not available.");
flag="IN",content=null,s1=null,s2=null,mobile=null,temp return;
="n" , inoutflag="0"; }
public static int serial=0;
String s_id=null, s_rfid=null, s_name =null, try {
gender=null, s_desg=null, s_dept=null, Port = (SerialPort)
job_type=null,date_from_db=null,time_record1=null,time RFPort.open(this.getClass().getName(), TimeOut);
_record2=null,time_record3=null,time_record4=null,time Port.setSerialPortParams(DataRate,
_record5=null,time_record6=null,time_record7=null,time SerialPort.DATABITS_8,
_record8=null; SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
long seconds=0l,seconds1=0l; Port.setFlowControlMode(SerialPort.FLOWCONTROL_
int sec1=01; NONE);
//int i =-1,i1=-1,i2=-1,i3=-1; input = Port.getInputStream();
public static intcont=1; Port.addEventListener(this);
private static final String Ports[] = { "COM1",// Port.notifyOnDataAvailable(true);
Windows }
"COM2", // Windows catch (Exception e) {
"COM3",// Windows e.printStackTrace();
"COM4", // Windows Port.close();
"COM5",// Windows }
"COM6", // Windows } //initialize()
"COM7", // Windows
"COM8", // Windows public void rffilewrite(String content) throws Exception {
"COM9", // Windows String s=content.trim();
"COM10", // Windows
"COM11", // Windows // flag= 0 in ; flag = 1 out ; s = 4149529;
"COM12" };
public static void main(String[] args) throws System.out.print(s + " RFID.\n");
Exception {
inoutflag = s.substring(0,1);
StaffRFID12 RfReader = new StaffRFID12(); s= s.substring(1);
RfReader.initialize(); //System.out.println(s.substring(0,1));
//RfReader.filewrite_template(); //System.out.println(s.substring(1));
} System.out.println(inoutflag);
private InputStream input; System.out.println(s);
private OutputStream output; PreparedStatement p5 = null;
private static final intTimeOut = 1500, DataRate = PreparedStatement p7 = null;
9600;

www.ijcsit.com 1445
Durugu Kiranmayi / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 7 (3) , 2016, 1444-1447

//seconds=timedifference(s);
//System.out.print(seconds + " seconds."); // Bind values
/*if(temp.equals(s)){ ps4.setString(1, vt);
System.out.println("\nAlready your record inserted"); //ps4.setTimestamp(2, null);
} */ ps4.setTimestamp(2, now);
//else{ cont=1;
temp=s; ps4.executeUpdate();
try { }
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection( // Insert
"jdbc:mysql://localhost:3306/vehicle","root","root");
//Connection } catch (SQLException e) {
con=DriverManager.getConnection("jdbc:mysql://localhost:33 e.printStackTrace();
06/vehicle","",""); }
//PreparedStatement ps1=con.prepareStatement("select * from
vehicle_details where RFID_tag=?"); //String query = "update REPORT2 set rfid = ? where sid
=? ";
//PreparedStatement ps2=con.prepareStatement("insert into //pstmt = conn.prepareStatement(query); // create a statement
lupadte_attendance values(?,?,?,?,?,?,?)"); //DateFormatdateFormat = new
SimpleDateFormat("dd/MM/yyyy");
//PreparedStatement ps3=con.prepareStatement("select //DateFormat dateFormat1 = new
s_rfid,status,s_no,attend_date from lupadte_attendance order SimpleDateFormat("kk:mm:ss");
by s_noasc"); //Date date = new Date();//String s1=dateFormat.format(date);
Timestamp now = new Timestamp(new Date().getTime()); //String s2=dateFormat1.format(date);
String sql = "SELECT Vehicle_no from vehicle_details where /ps1.setString(1,s);
RFID_tag='"+s +"'"; //ResultSet rs1=ps1.executeQuery();
Statement stmt = null; System.out.println("record inserted");
String vt = null; } //end try
stmt=con.createStatement(); catch(ClassNotFoundExceptionce){ ce.printStackTrace();
ResultSetrs = stmt.executeQuery(sql); }
if(rs.next()) catch(SQLException se){
{ se.printStackTrace();
vt=rs.getString("Vehicle_no"); }
} catch (Exception e) {
System.out.println("This is not registered");
try { }
// Prepare INSERT through Connection //} // end else
System.out.println("countr value is "+cont);
if(cont==1) } //end rffilewrite method
{
System.out.println("in"); public void serialEvent(SerialPortEvent event) {
// PreparedStatement ps4=con.prepareStatement("insert if (event.getEventType() ==
into report values(?,?,?)"); SerialPortEvent.DATA_AVAILABLE) {
PreparedStatement ps4=con.prepareStatement("insert into try {
in_time values(?,?)"); Thread.sleep(1000);
// Bind values int available = input.available();
ps4.setString(1, vt); byte data[] = new byte[available];
ps4.setTimestamp(2, now); input.read(data, 0, available);
// ps4.setTimestamp(3, null); rffilewrite(new String(data));
cont=2; }
ps4.executeUpdate(); catch (Exception e1) {
} e1.printStackTrace();
else if(cont==2) }
{ }
System.out.println("out");
//PreparedStatement }
ps4=con.prepareStatement("insert into report }
values(?,?,?)");
PreparedStatement ps4=con.prepareStatement("insert into
out_time values(?,?)");

www.ijcsit.com 1446
Durugu Kiranmayi / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 7 (3) , 2016, 1444-1447

VI. OUTPUTS

Fig 4. Monthy report generated

VII. CONCLUSION
With RFID vehicle monitoring system vehicle information
Fig 1.The RFID Tag value is read in to the software can be automatically gathered for efficient and safe vehicle
management.For every vehicle RFID tag will be given.
RFID readers are present at the IN and OUT gates.
Automatic vehicle identification can increase the security
and prevent loss of vehicles.

REFERENCES:
[1] R.Ranjini1, D.Manivannan2, A Comparative Review on Car Parking
Technologies presented at International Journal of Engineering and
Technology (IJET)
[2] www.rfidjournal.com
[3] ASPIRE FP7 Project Training: Introduction to RFID Technology
[4] Kumar,Chaturvedula.U.P,M.Tech,EmbeddedSystems, RFID Based
Embedded System for Vehicle Tracking and Prevention of Road
Accidents ,International Journal of Engineering Research
&Technology (IJERT)Vol. 1 Issue 6, August-2012
[5] Zeydin Pala1, Nihat Inanc2, UTILIZING RFID FOR
SMARTPARKING APPLICATIONS UDC 65.011.56
[6] http://www.technovelgy.com/ct/technology-article.asp
[7] https://www.youtube.com/watch?v=-Reyu_axkwY
[8] http://www.nedapidentification.com/solutions/cases/why-should-
you-consider-long-range-rfid-for-automatic-vehicle-
Fig 2.The Rfid tag values are stored in database identification.html

Fig 3. Giving range for Monthy reports

www.ijcsit.com 1447

You might also like