clg bus auto prjct report

53
PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 1 DECLARATION I/We hereby declare that the project entiled "COLLEGE BUS AUTOMATION USING RFID" is an authentic record of project work carried out by ASIM BIN USMAN.AP Reg .No,GGALSEL001 FAVAS.M Reg.No.GGALSEL009 MOHAMMED FAYIS REHMAN.K Reg.No.GGALSEL023 MUHAMMAD SHAHID Reg.No.GGALSEL025 ZAINUL ABIDEEN.OK Reg.No.GGALSEL026 in the fulfillment for the award of the Degree of the BACHELOR OF SCIENCE in ELECTRONICS by CALICUT UNIVERSITY during 2013-2014 Name Reg No Signature ASIM BIN USMAN.AP Reg .No,GGALSEL001 FAVAS.M Reg.No.GGALSEL009 MOHAMMED FAYIS REHMAN.K Reg.No.GGALSEL023 MUHAMMAD SHAHID Reg.No.GGALSEL025 ZAINUL ABIDHEEN.OK Reg.No.GGALSEL026 PLACE : RAMAPURAM DATE :

Upload: asim-bin-usman

Post on 22-Jan-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 1

DECLARATION

I/We hereby declare that the project entiled "COLLEGE BUS

AUTOMATION USING RFID" is an authentic record of project work carried

out by

ASIM BIN USMAN.AP Reg .No,GGALSEL001

FAVAS.M Reg.No.GGALSEL009

MOHAMMED FAYIS REHMAN.K Reg.No.GGALSEL023

MUHAMMAD SHAHID Reg.No.GGALSEL025

ZAINUL ABIDEEN.OK Reg.No.GGALSEL026

in the fulfillment for the award of the Degree of the BACHELOR OF

SCIENCE in ELECTRONICS by CALICUT UNIVERSITY during

2013-2014

Name Reg No Signature

ASIM BIN USMAN.AP Reg .No,GGALSEL001

FAVAS.M Reg.No.GGALSEL009

MOHAMMED FAYIS REHMAN.K Reg.No.GGALSEL023

MUHAMMAD SHAHID Reg.No.GGALSEL025

ZAINUL ABIDHEEN.OK Reg.No.GGALSEL026

PLACE : RAMAPURAM

DATE :

Page 2: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 2

ACKNOWLEDGEMENT

Through it may appear that following eulogizing exposition is monotonous beat of

a usual acknowledgement, we assect beyond the confines of the simple sense of the word

"GRATITUDE"

It give us immance pleasure to express our deep and sincere gratitudeto Mr.

NAVEEN MOHAN, principal GEMS ASC RAMAPURAM for allowing our

project working in this esteemed institution.

We are great full to Mr. Ishaq Ahamed A, HOD and Mr. Manohar Kv for their

valuable help and guidance, our sincere thanks to Ms. Asha and all other members for the

help we received from them.

The un grading guidance of all our able and acknowledge teachers ramifies every

aspect of our work their flawless and forthright suggestion blended with an innate and

intelligent application compel us to owe them a debt of gratitude.

Our project would never have been complete if it were not for the motivation and

support from all our friends.

Page 3: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 3

ABSTRACT

Our project topic is "COLLEGE BUS AUTOMATION USING RFID" The

project consist of an embedded section. Here we are using RFID as the bus ticket. The project

mainly contain a RFID module for swiping. There will be a LCD module for displaying the tag

features.

The embedded system consist of a microcontroller core around which the whole unit is

build up. The RFID reader transmits the relevant data obtained to the microcontroller core. The

system which have option to count the number of students those who are entered to the bus.

So ,using the project is to provide the secure entry of the students into college bus.

Page 4: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 4

CONTENTS

TOPIC PAGE NO

1. INTRODUCTION 06

2. TECHNICAL VIEW 07

3. BLOCK DIAGRAM 08

4. BLOCK DIAGRAM DESCRIPTION 08

5. CIRCUIT DIAGRAM 12

6. CIRCUIT DIAGRAM DESCRIPTION 13

7. HARDWARE OVERVIEW 14

8. SOFTWARE OVERVIEW 41

ALGORITHM 42

PROGRAM 43

9. PROCESS INVOLVED IN PCB DESIGN 46

10. FEATURES 49

11. FUTURE SCOPE 50

12. CONCLUSION 51

13. BIBLIOGRAPHY 52

14. APPENDIX 53

Page 5: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 5

COLLEGE BUS AUTOMATION

USING RFID

Page 6: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 6

INTRODUCTION

From the ancient times itself man has deployed many security measures to project

his life and property. Security and safety of homes, office and factories has a critical importance

today. In modern life these security measures have been automated a lot, and all individuals have

serious concern about the status of their assets all the time. The main aim of our project is to

provide automation of the college bus.

Here we are using RFID for as marking the entry of student, it is ultimate technology for

security available now, because RFID have a unique code. It also provides an option to deduct

the balance in each journey.

Page 7: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 7

TECHNICAL VIEW

The project consist of a microcontroller core around which the whole unit is build up. The

RFID reader transmits the relevant data obtained to the microcontroller core. The system which

have option to count the number of students those who are entered to the bus.

So the project contain a RFID module for swiping. There will be a LCD module for displaying

the tag features.

Page 8: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 8

BLOCK DIAGRAM

BLOCK DIAGRAM DESCRIPTION

The project consist of a microcontroller core around which the whole unit is

build up. The RFID reader transmits the relevant data obtained to the

microcontroller core

Page 9: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 9

MICROCONTROLLERS

A microcontroller is a small computer on a single integrated

circuit containing a processor core, memory, and programmable input/output peripherals.

Program memory is in the form of flash or OTP ROM , as well as a typically small

amount of RAM. Microcontrollers are designed for embedded applications, in contrast to

the microprocessors used in personal computers or other general purpose applications.

PIC MICROCONTROLLERS

PIC is a family of Harvard architecture microcontrollers made by

Microchip Technology, derived from the PIC1640 originally developed by General

Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral

Interface Controller". It is available in different configurations such as 8bit,16 bit, 32 bit .

The main features of PIC architecture is as follows

Separate code and data spaces (Harvard architecture).

A small number of fixed length instructions.

Most instructions are single cycle execution (4 clock cycles), with single

delay cycles upon branches and skips.

A single accumulator (W), the use of which (as source operand) is

implied (i.e. is not encoded in the op code).

All RAM locations function as registers as both source and/or

destination of math and other functions.

A hardware stack for storing return addresses.

Page 10: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 10

A fairly small amount of addressable data space (typically 256 bytes),

extended through banking.

Data space mapped CPU, port, and peripheral registers.

The program counter is also mapped into the data space and writable

(this is used to implement indirect jumps).

Unlike most other CPUs, there is no distinction between memory space

and register space because the RAM serves the job of both memory and registers,

and the RAM is usually just referred to as the register file or simply as the registers

LCD DISPLAY

Page 11: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 11

There are a number of display systems available now days. In this

project we use a 16* 2 Liquid Crystal Display for displaying the balance and details

in the RFID card. An LCD consists of two glass panels, with the liquid Crystal

material sandwiched in between them. When sufficient voltage is applied to the

electrodes, the liquid crystal molecules would be aligned in a specific direction. The

light rays passing through the LCD would be rotated by the polarizer, which would

result in activating/highlighting the desired characters.

RFID MODULE

RF READER

A radio frequency identification reader (RFID reader) is a device used to

gather information from an RFID tag, which is used to track individual objects.

Radio waves are used to transfer data from the tag to a reader.

RFID is a technology similar in theory to bar codes. However, the RFID tag does

not have to be scanned directly, nor does it require line-of-sight to a reader. The

RFID tag it must be within the range of an RFID reader, which ranges from 3 to 300

feet, in order to be read. RFID technology allows several items to be quickly scanned

and enables fast identification of a particular product, even when it is surrounded by

several other items.

RFID tags have not replaced bar codes because of their cost and the need to

individually identify every item.

RF TAGS

A radio-frequency identification tag (RFID tag) is an electronic tag that

exchanges data with an RFID reader through radio waves. Most RFID tags are made

up of at least two main parts. The first one is an antenna that receives the radio

frequency (RF) waves. used for processing and storing data as well as for

modulating and demodulating the radio waves received/sent by the antenna.

Page 12: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 12

CIRCUIT DIAGRAM

Page 13: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 13

CIRCUIT DIAGRAM DESCRIPTION

The system consists of mainly five components. Heart of the system is a

PIC microcontroller. The system consists of a PIC microcontroller, RFID Module, Lcd

display ,Motor driver IC and a power supply.

PIC 16F877A controls and co-ordinate the working of the whole

components. It is equipped with the necessary circuits such as power supply, clock and

reset circuits for its efficient operation. The frequency of the clock used in this circuit is

4MHz, a piezo-electric crystal is used for this purpose. Two 33pF capacitors are connected

to it for avoiding the damping of the clock signal. Quartz crystal is connected to pin 13 and

14 of the microcontroller. The power supply used in this circuit is a 5V dc source, positive

terminal is connected to the pin numbers 11 and 32 and ground terminal is connected to

the pin 12 and 31. The reset circuit consist of a resistor and switch. Resistor is connected

to VCC and pin 1 and a push button switch is connected to pin 1. When the power supply

is turned on and the switch is pressed ,then the master clear pin goes to ground potential,

and the system terminates all the activities, microcontroller will start program execution

from the beginning.

The RFID reads the data that stored the RFID tag and checks the card valid or

not. The radio frequency signals will allowing the communication. The RFID reader

transmits the relevant data obtained to the microcontroller core. The Motor driver IC will recives

the data from the microcontroller, and it will start it’s working. When the recived data is positive

then the driver IC will allows to operate the motor.

The LCD display will displays the RFID tag’s number and balance. The Enable

control line is used to tell the LCD that you are sending it data. The LCD display connected

to the PORTD of the PIC16F877A microcontroller.

Page 14: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 14

HARDWARE OVERVIEW

The main components used in this circuit are

PIC16F877A

16*2 LCD

LM7805

L293D

DC Motor

RFID Module

RESISTORS&DIODES

Page 15: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 15

PIC 16F877A

The microcontroller we have used is a PIC16F877A. It is a 40-pin

microcontroller. It can be programmed over 10,000 times and it is very easy to program. It

uses RISC so it has very simple and user friendly instruction set. The pin out diagram for

the microcontroller is shown below:

PIN DIAGRAM:

Some of the core features of PIC16F877A are:

High performance RISC CPU

Only 35 single word instructions

Operating speed of about DC-20MHz clock input

It has a large interrupting capability-up to 20 sources

Programmable code protection

Extended temperature ranges

Page 16: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 16

This microcontroller has programmable code protection or it can be protected

by the user. Since the system has to work for a long period of time and at different weather

conditions in different countries extended temperature ranges are important. The PIC has

the advantage is that it has industrial as well as commercial temperature ranges.

The characteristics of the PIC16F877A microcontroller are:

8K X 14 program memory

368 X8 user RAM registers

40 pins, bidirectional ports Internal oscillator

Interrupts

Analog Features:

10-bit, up to 8-channel Analog-to-Digital Converter (A/D)

Brown-out Reset (BOR)

Analog Comparator module with: two analog comparators

Programmable on-chip voltage reference

(VREF) module

Programmable input multiplexing from device

Inputs and internal voltage reference

Comparator outputs are externally accessible

The PIC contains 2 separate memory blocks which can be accessed

simultaneously

program memory

data memory

It is a FLASH EEPROM MEMORY where the program from the assembly

code is written to .The program memory bus is 14 bit wide. The PIC16F877A has 8K X

14 bits of program memory which is equivalent to memory space of 8,192 words X 14

Page 17: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 17

bits. The addresses are in hexadecimal and the last available address is 1FFF. The data

memory has 368 general purpose registers and 33 special function registers.

Pinout Description:

PORTA (RA)

(PORTA is a bidirectional I/O port.)

RA0/AN0:- RA0 Digital I/O.

AN0 Analog input0

RA1/AN1:- RA1 Digital I/O.

AN1 Analog input1

RA2/AN2/VREF-/ CVREF:- RA2 Digital I/O

AN2 Analog input2.

VREF- A/D reference voltage (Low) input.

CVREF Comparator VREF output.

RA3/AN3/VREF+:- RA3 Digital I/O

AN3 Analog input 3

VREF+ A/D reference voltage (High) input.

RA4/T0CKI/C1OUT:- RA4 Digital I/O.

T0CKI Timer0 external clock input.

C1OUT Comparator 1 output.

RA5/AN4/SS/C2OUT:- RA5 Digital I/O.

AN4 Analog input 4.

SS SPI slave select input.

C2OUT Comparator 2 output.

PORTB (RB)

RB0/INT:- RB0 Digital I/O.

INT External interrupt.

RB1:- RB1 Digital I/O.

Page 18: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 18

RB2:- RB2 Digital I/O

RB3/PGM:- RB3 Digital I/O

PGM Low-voltage ICSP programming enable pin.

RB4:- RB4 Digital I/O

RB5:- RB5 Digital I/O

RB6/PGC:- RB6 Digital I/O.

PGC In-circuit debugger and ICSP programming clock.

RB7/PGD:- RB7 Digital I/O.

PGD In-circuit debugger and ICSP programming data.

PORTC (RC)

RC0/T1OSO/T1CKI:-RC0 Digital I/O.

T1OSO Timer1 oscillator output.

T1CKI Timer1 external clock input.

RC1/T1OSI/CCP2:- RC1 Digital I/O.

T1OSI Timer1 oscillator input.

CCP2 Capture2 input, Compare2 output, PWM2 output.

RC2/CCP1:- RC2 Digital I/O.

CCP1 Capture1 input, Compare1 output, PWM1 output.

RC3/SCK/SCL:- RC3 Digital I/O.

SCK Synchronous serial clock input/output for SPI mode.

SCL Synchronous serial clock input/output for I2C mode.

RC4/SDI/SDA:- RC4 Digital I/O.

SDA I2C data I/O.

RC6/TX/CK:- RC6 Digital I/O.

TX USART asynchronous transmit.

CK USART1 synchronous clock.

RC7/RX/DT:- RC7 Digital I/O.

Page 19: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 19

RX USART asynchronous receive.

DT USART synchronous data.

PORTD (RD)

(PORTD is a bidirectional I/O port or Parallel Slave Port when interfacing to a

microprocessor bus. )

RD0/PSP0:- RD0 Digital I/O.

PSP0 Parallel Slave Port data.

RD1/PSP1:- RD1 Digital I/O.

PSP1 Parallel Slave Port data.

RD2/PSP2:- RD2 Digital I/O.

PSP2 Parallel Slave Port data.

RD3/PSP3:- RD3 Digital I/O.

PSP3 Parallel Slave Port data.

RD4/PSP4:- RD4 Digital I/O.

PSP4 Parallel Slave Port data.

RD5/PSP5:- RD5 Digital I/O.

PSP5 Parallel Slave Port data.

RD6/PSP6:- RD6 Digital I/O.

PSP6 Parallel Slave Port data.

RD7/PSP7:- RD7 Digital I/O.

PSP7 Parallel Slave Port data.

PORTE (RE)

RE0/RD/AN5:- RE0 Digital I/O.

RD Read control for Parallel Slave Port.

AN5 Anolag input 5.

RE1/WR/AN6:- RE1 Digital I/O.

WR Write control for Parallel Slave Port.

Page 20: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 20

AN6 Analog input 6.

RE2/CS/AN7:- RE2 Digital I/O.

CS Chip select control for Parallel Slave Port.

AN7 Analog input 7.

OSC1/CLKI (Oscillator crystal or external clock input.):-

OSC1 Oscillator crystal input or external clock source input. ST buffer when

configured in RC mode; otherwise CMOS.

CLKI External clock source input. Always associated with pin function OSC1

(OSC1/CLKI, OSC2/CLKO pins).

OSC2/CLKO (Oscillator crystal or clock output.):-

OSC2 Oscillator crystal output. Connects to crystal or resonator in Crystal

oscillator mode.

CLKO In RC mode, OSC2 pin outputs CLKO, which has 1/4 the frequency of OSC1

and denotes the instruction cycle rate.

MCLR/VPP (Master Clear (input) or programming voltage (output)):-

MCLR Master Clear (Reset) input. This pin is an active low Reset to the device.

VPP Programming voltage input.

Page 21: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 21

I/O PORTS

Some pins for these I/O ports are multiplexed with an alternate function for

the peripheral features on the device. In general, when a peripheral is enabled, that pin may

not be used as a general purpose I/O pin. PIC 16F877A contain 5 I/O ports and 33 I/O

pins.

PORTA AND TRISA REGISTERS:-

PORTA is a 6-bit wide, bi-directional port. The corresponding data direction

register is TRISA. Setting a TRISA bit (= 1) will make the corresponding PORTA pin an

input (i.e., put the corresponding output driver in a High-Impedance mode). Clearing a

TRISA bit (= 0) will make the corresponding PORTA pin an output (i.e., put the contents

of the output latch on the selected pin).

Reading the PORTA register reads the status of the pins, whereas writing to

it will write to the port latch. All write operations are read-modify-write operations.

Therefore, a write to a port implies that the port pins are read, the value is modified and

then written to the port data latch. Pin RA4 is multiplexed with the Timer0 module clock

input to become the RA4/T0CKI pin. The RA4/T0CKI pin is a Schmitt Trigger input and

an open-drain output. All other PORTA pins have TTL input levels and full CMOS output

drivers. Other PORTA pins are multiplexed with analog inputs and the analog VREF input

for both the A/D converters and the comparators. The operation of each pin is selected by

clearing/setting the appropriate control bits in the ADCON1 and/or CMCON registers.

The TRISA register controls the direction of the port pins even when they

are being used as analog inputs. The user must ensure the bits in the TRISA register are

maintained set when using them as analog inputs.

PORTB AND THE TRISB REGISTER:-

Page 22: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 22

PORTB is an 8-bit wide, bi-directional port. The corresponding data direction

register is TRISB. Setting a TRISB bit (= ‘1’) will make the corresponding PORTB pin an

input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a

TRISB bit(= ‘0’) will make the corresponding PORTB pin an output (i.e., put the contents

of the output latch on the selected pin).

Three pins of PORTB are multiplexed with the In-Circuit Debugger and Low-

Voltage Programming function: RB3/PGM, RB6/PGC and RB7/PGD.

Each of the PORTB pins has a weak internal pull-up. A single control bit can

turn on all the pull-ups. This is performed by clearing bit RBPU (OPTION_REG<7>). The

weak pull-up is automatically turned off when the port pin is configured as an output. The

pull-ups are disabled on a Power-on Reset.

Four of the PORTB pins, RB7:RB4, have an interrupt on- change feature. Only

pins configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin

configured as an output is excluded from the interrupt on- change comparison). The input

pins (of RB7:RB4) are compared with the old value latched on the last read of PORTB.

The “mismatch” outputs of RB7:RB4 are OR’ed together to generate the RB port change

interrupt with flag bit RBIF (INTCON<0>).

PORTC AND THE TRISC REGISTER:-

PORTC is an 8-bit wide, bidirectional port. The corresponding data direction

register is TRISC. Setting a TRISC bit (= 1) will make the corresponding PORTC pin an

input (i.e., put the corresponding output driver in a High-Impedance mode). Clearing a

TRISC bit (= 0) will make the corresponding PORTC pin an output (i.e., put the contents

of the output latch on the selected pin).

PORTD AND TRISD REGISTERS:-

Page 23: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 23

PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually

configurable as an input or output. PORTD can be configured as an 8-bit wide

microprocessor port (Parallel Slave Port) by setting control bit, PSPMODE (TRISE<4>).

In this mode, the input buffers are TTL.

PORTD operates as an 8-bit wide Parallel Slave Port, or microprocessor port, when

control bit PSPMODE (TRISE<4>) is set. In Slave mode, it is asynchronously readable

and writable by the external world through RD control input pin, RE0/RD/AN5, and WR

control input pin, RE1/WR/AN6.

PORTE AND TRISE REGISTER:-

PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7) which are

individually configurable as inputs or outputs. These pins have Schmitt Trigger input

buffers. The PORTE pins become the I/O control inputs for the microprocessor port when

bit PSPMODE (TRISE<4>) is set. In this mode, the user must make certain that the

TRISE<2:0> bits are set and that the pins are configured as digital inputs. Also, ensure that

ADCON1 is configured for digital I/O. In this mode, the input buffers are TTL.

TIMER0 MODULE

The Timer0 module timer/counter has the following features:

8-bit timer/counter

Readable and writable

8-bit software programmable pre scalar

Internal or external clock select

Interrupt on overflow from FFh to 00h

Edge select for external clock

Page 24: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 24

TIMER1 MODULE

The Timer1 module is a 16-bit timer/counter consisting of two 8-bit registers

(TMR1H and TMR1L) which are readable and writable. The TMR1 register pair

(TMR1H:TMR1L) increments from 0000h to FFFFh and rolls over to 0000h. The TMR1

interrupt, if enabled, is generated on overflow which is latched in interrupt flag bit,

TMR1IF (PIR1<0>). This interrupt can be enabled/disabled by setting/clearing TMR1

interrupt enable bit, TMR1IE (PIE1<0>).

Timer1 can operate in one of two modes:

• As a Timer

• As a Counter

The operating mode is determined by the clock select bit, TMR1CS (T1CON<1>).

TIMER2 MODULE

Timer2 is an 8-bit timer with a pre scalar and a post scalar. It can be used as the

PWM time base for the PWM mode of the CCP module(s). The TMR2 register is readable

and writable and is cleared on any device Reset. The input clock (FOSC/4) has a prescale

option of 1:1, 1:4 or 1:16, selected by control bits T2CKPS1:T2CKPS0 (T2CON<1:0>).

The Timer2 module has an 8-bit period register, PR2. Timer2 increments from 00h until it

matches PR2 and then resets to 00h on the next increment cycle. PR2 is a readable and

writable register. The PR2 register is initialized to FFh upon Reset. The match output of

TMR2 goes through a 4-bit post scalar (which gives a 1:1 to 1:16 scaling inclusive) to

generate a TMR2 interrupt (latched in flag bit, TMR2IF (PIR1<1>)). Timer2 can be shut-

off by clearing control bit, TMR2ON (T2CON<2>), to minimize power consumption.

CAPTURE/COMPARE/PWM MODULES

Page 25: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 25

Each Capture/Compare/PWM (CCP) module contains a 16-bit register which

can operate as a:

• 16-bit Capture register

• 16-bit Compare register

• PWM Master/Slave Duty Cycle register

Both the CCP1 and CCP2 modules are identical in operation, with the

exception being the operation of the special event trigger.

CCP1 Module:

Capture/Compare/PWM Register 1 (CCPR1) is comprised of two 8-bit

registers: CCPR1L (low byte) and CCPR1H (high byte). The CCP1CON register controls

the operation of CCP1. The special event trigger is generated by a compare match and will

reset Timer1.

CCP2 Module:

Capture/Compare/PWM Register 2 (CCPR2) is comprised of two 8-bit

registers: CCPR2L (low byte) and CCPR2H (high byte). The CCP2CON register controls

the operation of CCP2. The special event trigger is generated by a compare match and will

reset Timer1 and start an A/D conversion (if the A/D module is enabled).

Capture Mode

In Capture mode, CCPR1H:CCPR1L captures the 16-bit value of the TMR1 register

when an event occurs on pin RC2/CCP1. An event is defined as one of the

following:

Every falling edge

Every rising edge

Every 4th rising edge

Every 16th rising edge

Compare Mode

Page 26: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 26

In Compare mode, the 16-bit CCPR1 register value is constantly compared

against the TMR1 register pair value. When a match occurs, the RC2/CCP1 pin is:

• Driven high

• Driven low

• Remains unchanged

USART

The Universal Synchronous Asynchronous Receiver Transmitter (USART)

module is one of the two serial I/O modules. (USART is also known as a Serial

Communications Interface or SCI.) The USART can be configured as a full-duplex

asynchronous system that can communicate with peripheral devices, such as CRT

terminals and personal computers, or it can be configured as a half-duplex synchronous

system that can communicate with peripheral devices, such as A/D or D/A integrated

circuits, serial EEPROMs, etc.

The USART can be configured in the following modes:

• Asynchronous (full-duplex)

• Synchronous – Master (half-duplex)

• Synchronous – Slave (half-duplex)

Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be set in order to

configure pins RC6/TX/CK and RC7/RX/DT as the Universal Synchronous Asynchronous

Receiver Transmitter.

The USART module also has a multi-processor communication capability using

9-bit address detection.

REGISTERS

Page 27: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 27

TXSTA(TRANSMIT STATUS AND CONTROL REGISTER):-

CSRC TX9 TXEN SYNC _ BRGH TRMT TX9D

7 6 5 4 3 2 1 0

Bit7 CSRC: Clock Source Select bit

Asynchronous mode:

Don’t care.

Synchronous mode:

1 = Master mode (clock generated internally from BRG)

0 = Slave mode (clock from external source)

bit 6 TX9: 9-bit Transmit Enable bit

1 = Selects 9-bit transmission

0 = Selects 8-bit transmission

bit 5 TXEN: Transmit Enable bit

1 = Transmit enabled

0 = Transmit disabled

Note: SREN/CREN overrides TXEN in Sync mode.

bit 4 SYNC: USART Mode Select bit

1 = Synchronous mode

0 = Asynchronous mode

bit 3 Unimplemented: Read as ‘0’

bit 2 BRGH: High Baud Rate Select bit

Asynchronous mode:

1 = High speed

0 = Low speed

Synchronous mode:

Unused in this mode.

RCSTA(RECEIVE STATUS AND CONTROL REGISTER):-

Page 28: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 28

SPEN RX9 SREN CREN ADDEN FERR OERR RX9D

bit 7 bit 0

bit 7 SPEN: Serial Port Enable bit

1 = Serial port enabled

0 = Serial port disabled

bit 6 RX9: 9-bit Receive Enable bit

1 = Selects 9-bit reception

0 = Selects 8-bit reception

bit 5 SREN: Single Receive Enable bit

Asynchronous mode:

Don’t care.

Synchronous mode – Master:

1 = Enables single receive

0 = Disables single receive

This bit is cleared after reception is complete.

Synchronous mode – Slave:

Don’t care.

bit 4 CREN: Continuous Receive Enable bit

Asynchronous mode:

1 = Enables continuous receive

0 = Disables continuous receive

Synchronous mode:

1 = Enables continuous receive until enable bit CREN is cleared

0 = Disables continuous receive

bit 3 ADDEN: Address Detect Enable bit

Asynchronous mode 9-bit (RX9 = 1):

1 = Enables address detection, enables interrupt and load of the receive

buffer when RSR<8> is set

Page 29: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 29

0 = Disables address detection, all bytes are received and ninth bit can be

used as parity bit

bit 2 FERR: Framing Error bit

1 = Framing error

0 = No framing error

bit 1 OERR: Overrun Error bit

1 = Overrun error (can be cleared by clearing bit CREN)

0 = No overrun error

bit 0 RX9D: 9th bit of Received Data (can be parity bit but must be calculated by

user firmware)

INTERRUPTS

The PIC16F87X family has up to 12 sources of interrupt. The interrupt control

register (INTCON) records individual interrupt requests in flag bits. It also has individual

and global interrupt enable bits. A global interrupt enable bit, GIE (INTCON<7>) enables

(if set) all unmasked interrupts, or disables (if cleared) all interrupts. When bit GIE is

enabled and an interrupt’s flag bit and mask bit are set, the interrupt will vector

immediately. Individual interrupts can be disabled through their corresponding enable bits

in various registers.

INTCON Register

The INTCON register is a readable and writable register, which contains various

enable and flag bits for the TMR0 register overflow, RB Port change and External

RB0/INT pin interrupts.

Page 30: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 30

bit 7 GIE: Global Interrupt Enable bit

1 = Enables all unmasked interrupts

0 = Disables all interrupts

bit 6 PEIE: Peripheral Interrupt Enable bit

1 = Enables all unmasked peripheral interrupts

0 = Disables all peripheral interrupts

bit 5 TMR0IE: TMR0 Overflow Interrupt Enable bit

1 = Enables the TMR0 interrupt

0 = Disables the TMR0 interrupt

bit 4 INTE: RB0/INT External Interrupt Enable bit

1 = Enables the RB0/INT external interrupt

0 = Disables the RB0/INT external interrupt

bit 3 RBIE: RB Port Change Interrupt Enable bit

1 = Enables the RB port change interrupt

0 = Disables the RB port change interrupt

bit 2 TMR0IF: TMR0 Overflow Interrupt Flag bit

1 = TMR0 register has overflowed (must be cleared in software)

0 = TMR0 register did not overflow

bit 1 INTF: RB0/INT External Interrupt Flag bit

1 = The RB0/INT external interrupt

0 = The RB0/INT external interrupt did not occur

bit 0 RBIF: RB Port Change Interrupt Flag bit

1 = At least one of the RB7:RB4 pins changed state

Page 31: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 31

MOTOR DRIVER IC (L293D)

Introduction

The L293D motor driver is available for providing User with ease and user

friendly interfacing for embedded application. L293D motor driver is mounted on

a good quality, single sided non-PTH PCB. The pins of L293D motor driver IC are

connected to connectors for easy access to the driver IC’s pin functions. The

L293D is a Dual Full Bridge driver that can drive up to 1Amp per bridge with

supply voltage up to 24V. It can drive two DC motors, relays, solenoids, etc. The

device is TTL compatible. Two H bridges of L293D can be connected in parallel to

increase its current capacity to 2 Amp.

Features · Easily compatible with any of the system

· Easy interfacing through FRC (Flat Ribbon Cable)

· External Power supply pin for Motors supported

· Onboard PWM (Pulse Width Modulation) selection switch

· 2pin Terminal Block (Phoenix Connectors) for easy Motors Connection

· Onboard H-Bridge base Motor Driver IC (L293D)

Technical Specification · Power Supply : Over FRC connector 5V DC

External Power 9V to 24V DC

Dimensional Size : 44mm x 37mm x 14mm (l x b x h)

· Temperature Range : 0°C to +70 °C

Page 32: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 32

RFID MODULE

RF READER

A radio frequency identification reader (RFID reader) is a device used to

gather information from an RFID tag, which is used to track individual objects.

Radio waves are used to transfer data from the tag to a reader.

RFID is a technology similar in theory to bar codes. However, the RFID tag

does not have to be scanned directly, nor does it require line-of-sight to a reader.

The RFID tag it must be within the range of an RFID reader, which ranges from 3

to 300 feet, in order to be read. RFID technology allows several items to be quickly

scanned and enables fast identification of a particular product, even when it is

surrounded by several other items.

RFID tags have not replaced bar codes because of their cost and the need to

individually identify every item.

RF TAGS

A radio-frequency identification tag (RFID tag) is an electronic tag that

exchanges data with an RFID reader through radio waves. Most RFID tags are made

up of at least two main parts. The first one is an antenna that receives the radio

frequency (RF) waves. The second part is an IC (integrated circuit), which is used

for processing and storing data as well as for modulating and demodulating the radio

waves received/sent by the antenna.

Early commercial examples of RFID applications include automatic tracking

of train cars, shipping containers, and automobiles. Railroad cars were originally

labeled with optical barcode labels for tracking. These labels began to deteriorate

and be obscured by dirt, causing reads to fail. As a solution, railroad companies

began to tag railcars with RFID devices. By1994, these devices were mandatory

and nearly every railcar in the United States was tagged RFID devices began to be

used for automated toll collection in the late 1980s and early1990s. Electronic toll

systems have since been adopted around the world. Like railway and shipping

applications, electronic toll systems may use sturdy, self-powered RFID devices

.Automobiles, and shipping containers are all high-value items, with ample

physical space that can accommodate more expensive and bulky RFID devices.

These types of tags could offer much more functionality than simple identification.

For example, shipping containers might have accelerometer sensors, tamper

Page 33: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 33

alarms, or satellite tracking integrated into an identification device. As

manufacturing costs dropped, RFID systems began to be used for lower-value

items in industries besides transport. An example is in animal identification of both

pets and livestock. Glass-encapsulated RFID devices have been implanted in

millions of pets throughout the United States. These tags allow lost animals to be

identified and returned to their rightful owners. These tags have a very short read

range. Livestock, particularly cattle, are often labeled with a RFID device that is

clamped or pierced through their ear, attached to a collar, or swallowed. Unlike

implanted pet tags, these RFID devices are rugged and able to be read from greater

distances.

Concerns over Bovine Spongiform Encephalopathy (mad cow) disease have

motivated proposals for universal tracking of livestock with these types of RFID

systems. Like transport applications, animal tracking is still essentially a low-

volume, high-value market that may justify relatively expensive RFID systems.

Other widespread applications of RFID systems include contactless payment,

access control, or stored-value systems. Since 1997, ExxonMobil gasoline stations

have offered a system called Speed Pass that allows customers to make purchases

with an RFID “fob”, typically a keychain-sized form factor [7]. In 2005, American

Express launched a credit card enhanced with RFID that allows customers to make

purchases without swiping a card 0. RFID proximity cards or “prox cards” are

commonly used for building access control at many companies and universities

throughout the world. Similar systems have been used for ski-lift access control at

ski resorts around the world. Many subway and bus systems around the world, for

example in Singapore, use stored-value RFID proximity cards.

What happens with respect to privacy while RFID-tagged items are in the

hands of a consumer has been an issue of major contention and will be addressed

in Section 4. Supply chain management and inventory control applications of this

scale require an extremely low-cost tag to be economically viable. In settings like

animal identification, proximity cards, electronic toll systems, or stored-value

systems, RFID tags costing as much several US dollars could be justified.

However, items in consumer supply-chain management and inventory control

applications are much cheaper than in traditional settings. RFID tags in these

applications should be as simple and cheap as the traditional, UPC optical bar

code. EPC global, an RFID standards body, has developed specifications for low-

cost electronic product code (EPC) tags as a replacement for the ubiquitous UPC

[6]. In the past, the lack of an open standard was a barrier to RFID adoption. The

EPC standard, and to some extent, the ISO-18000 standard [11] will make it easier

Page 34: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 34

for users to integrate their RFID systems. The potential for EPC may be huge.

Globally, over five billion barcode transactions are conducted daily [25]. Even

miniscule savings per transaction could translate into a huge aggregate cost

savings. The market has already begun to adopt low-cost RFID on a large scale. A

single RFID IC manufacturer, Philips Semiconductor, has already shipped several

billion RFID chips.

RFID tags have also been used as a pedigree for high-fashion items or to

enhance the consumer shopping experience. For example, Prada’s retail store in

New York City offers an RFID-enhanced dressing room that displays product

information and suggests matching apparel. Clothing is particularly suited for

RFID, since it does not contain metals or liquids that interfere with some types of

RFID systems. Retail stores also typically do not have sensitive electronics, like

medical equipment, that some RFID operating frequencies may interfere with.

Clothing’s relatively high per-unit value also justifies the use of RFID tags, which

could be removed and recycled at purchase-time. The clothing industry was an

early-adopter of simple EAS systems in the 1960s for these very reasons. It will

likely be a leader in RFID adoption as well.

Page 35: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 35

LCD INTERFACING

One of the most common devices attached to an 8051 is an LCD display.

Some of the most common LCDs connected to the PIC microcontrollers are 16x2

and 20x4 displays. This means 16 characters per line by 2 lines and 20 characters

per line by 4 lines, respectively. In recent years the LCD is finding widespread use

replacing LED’s. This is due to the following reasons.

LCD OPERATION

The LCDs are used widely in all application namely microcontroller instead of

LEDs or other multi segment LEDs. This is due to

The declining prices of LCDs.

The ability to display numbers, characters and graphics.this is in contrast to

LEDs, which are limited to numbers and a few characters.

Incorporation of a refreshing controller into the LCD, thereby relieving the

CPU of the task of refreshing the LCD. In contrst, the LED must be refreshed

by the CPU (or in some other way) to keep displaying the data.

Ease of programming for characters and graphics.

Pin Description for LCD

Page 36: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 36

No.of

Pin

Symbols I/O Description

1 Vss ------- Ground

2 Vcc ------- +5V power supply

3 VEE ------- Power supply to control contrast

4 RS I RS=0 to select command register

RS=1 to select data register

5 R/W I R/W=0 for write

R/W=1 for read

6 E I/O Enable

7 DB0 I/O The 8 bit data bus

8 DB1 I/O The 8 bit data bus

9 DB2 I/O The 8 bit data bus

10 DB3 I/O The 8 bit data bus

11 DB4 I/O The 8 bit data bus

12 DB5 I/O The 8 bit data bus

13 DB6 I/O The 8 bit data bus

14 DB7 I/O The 8 bit data bus

15 Lamp+ Back ground light

16 Lamp- Back ground light

Page 37: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 37

ADVANTAGES

Consumes much lesser energy (i.e., low power) when compared to LEDs.

Utilizes the light available outside and no generation of light.

Since very thin layer of liquid crystal is used, more suitable to act as display

elements (in digital watches, pocket calculators, etc…).

Since reflectivity is highly sensitive to temperature, used as temperature

measuring sensor.

Very cheap.

DISADVANTAGES

Angle of viewing is limited and external light is must for display.

Since not generating its own light and makes use of external display, contrast is

poor.

Cannot be used under wide range of temperature.

IMPORTANT SIGNALS

The following pins are important to LCD’s while programming

Enable (EN):-

The EN line is called "Enable." This control line is used to tell the LCD that

you are sending it data. To send data to the LCD, your program should make sure this line

is low (0) and then set the other two control lines and/or put data on the data bus. When

the other lines are completely ready, bring EN high (1) and wait for the minimum amount

of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing

it low (0) again.

Page 38: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 38

Register Select (RS):-

The RS line is the "Register Select" line. When RS is low (0), the data is to be

treated as a command or special instruction (such as clear screen, position cursor, etc.).

When RS is high (1), the data being sent is text data which should be displayed on the

screen. For example, to display the letter "T" on the screen we will set RS high.

Read/Write (R/W):-

The RW line is the "Read/Write" control line. When RW is low (0), the

information on the data bus is being written to the LCD. When RW is high (1), the program

is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a

read command. All others are write commands--so RW will almost always be low. Finally,

the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the

user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,

DB4, DB5, DB6, and DB7.

Page 39: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 39

POWER SUPPLY

The AC voltage typically 230V is connected to a transformer, which steps

down the AC voltage down to the level of desired output. A diode rectifier then provides

a rectified voltage that is initially filtered by a simple capacitor filter to produce a DC

voltage. This resulting DC voltage usually has some ripple or AC voltage variation. A

regular circuit can use this DC input to provide a DC voltage that not only has much less

ripple voltage but also remains the same DC values even if the input DC voltage varies

some what, or the load connected to the output DC voltage changes. This voltage

regulation is usually obtained by using one of popular voltage regulator IC’s.

A transformer is a static device in which electric power in one circuit is

transformed into electric power of same frequency in another circuit. It provides a decrease

or increase in the output section along with a decrease or increase in the current. It works

in the principle of mutual induction. It provides isolation to the circuit. The stepped down

transformer is used in this section.

RECTIFIER SECTION

The process of rectification really means conversion of AC into DC voltage.

The DC level obtained from a sinusoidal input can be improved 100% using a process

called bridge configuration. In the bridge opposite two diodes are on in one cycle and other

Page 40: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 40

are on in the other cycle. In one cycle D1 and D3 conducts and in the other cycle D2 and

D4 is on. Irrespective of the input cycle the output polarity across the load remains same.

FILTER SECTION

The filter circuit used her is the capacitor filter where a capacitor is

connected at the rectifier output and the DC voltage is obtained at the output, the filter

filters the ac components. Still the output contains negligible ripple.

VOLTAGE REGULATOR SECTION

The voltage regulator is a device, which maintains the output voltage

constant irrespective of the change in supply variations, load variations and temperature

variations. Regulator IC units contain the circuitry for reference source, comparator,

amplifier, control device and overload protection, all in a single IC.

LM7805

Features:

Output Current up to 1A

Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V

Thermal Overload Protection

Short Circuit Protection

Page 41: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 41

SOFTWARE OVERVIEW

In this project we use the software’s named as PROTEUS, Micro C for PIC and

RIMU PCB.

PROTEUS:

Proteus VSM uses ISIS schematic capture software to provide the environment for design entry and development. The ISIS software combines ease of use with powerful editing tools. It is capable of supporting schematic capture for both simulation and PCB design. Designs entered in to Proteus VSM for testing can be net-listed for PCB layout either with Proteus PCB Design products or with third party PCB layout tools. ISIS also provides a very high degree of control over the drawing appearance, in terms of line widths, fill styles, fonts, etc. These capabilities are used to provide the graphics necessary for circuit animation. The Proteus VSM includes the Pro SPICE which is an established product that combines uses a SPICE3f5 analogue simulator kernel with a fast event-driven digital simulator to provide seamless mixed-mode simulation. The use of a SPICE kernel allows the designer to utilize any of the numerous manufacturer-supplied SPICE models now available and around 6000 of these are included with the package. Proteus VSM includes a number of virtual instruments including an Oscilloscope, Logic Analyzer, Function Generator, Pattern Generator, Counter Timer and Virtual Terminal as well as simple voltmeters and ammeters. The Advanced Simulation Option allows the designer to take detailed measurements on graphs, or perform other analysis types such as frequency, distortion, noise or sweep analyses of analogue circuits. This option also includes Conformance Analysis - a unique and powerful tool for Software Quality Assurance.

MICRO C FOR PIC

The Micro C for PIC is used as the compiler. We can write the program/code in

micro C and then we can simply burn to the microcontroller.

Page 42: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 42

ALGORITHM

STEP 1: START

STEP 2: Read the card details

STEP 3: Open the door if the card have minimum balance

Else go to STEP 5

STEP 4: Deduct a fixed amount for each journey

STEP 5: Display “Please Recharge”

STEP 7: Display parameters on output screen

STEP 8: STOP

Page 43: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 43

PROGRAM

sbit LCD_RS at RD2_bit;

sbit LCD_EN at RD3_bit;

sbit LCD_D4 at RD4_bit;

sbit LCD_D5 at RD5_bit;

sbit LCD_D6 at RD6_bit;

sbit LCD_D7 at RD7_bit;

sbit LCD_RS_Direction at TRISD2_bit;

sbit LCD_EN_Direction at TRISD3_bit;

sbit LCD_D4_Direction at TRISD4_bit;

sbit LCD_D5_Direction at TRISD5_bit;

sbit LCD_D6_Direction at TRISD6_bit;

sbit LCD_D7_Direction at TRISD7_bit;

Unsigned char bal_1[5],bal_2[5];

Unsigned int crd1,crd2;

Sbit in1 at RB6_bit;

Sbit in2 at RB5_bit;

Sbit s_1 at RB0_bit;

Sbit s_2 at RB4_bit;

Unsigned char rcv[10];

Void main()

{

TRISD=0;

PORTD=0;

TRISB.F0=1;

TRISB.F4=1;

TRISB.F6=1;

TRISB.F5=1;

in1=0;

in2=0;

Lcd_Init();

Lcd_Cmd(_LCD_CLEAR);

Lcd_Cmd(_LCD_CURSOR_OFF);

UART1_Init(9600);

Crd1=EEPROM_Read(0X02);

Delay_ms(50);

Crd2_EEPROM_Read(0X06);

While(1)

Page 44: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 44

{

Lcd_Out(1,1.”AUTO BUS S/M”);

*rcv=Uart1_Read_text();

If(s_1==1)

{

EEPROM_Write(0X02,200);

Delay_ms(500);

}

If(s_2==1)

{

EEPROM_Write(0X06,200);

Delay_ms(500);

}

If(rfid)

{

Rfid=0;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(1,5,”WELCOME”);

Lcd_Out(2,1,rcv);

Delay_ms(1000);

if(rcv[0]==’1’&&rcv[1]==’5’&&rcv[2]==’4’&&rcv[3]==’3’&&

rcv[4]==’1’&&rcv[5]==’5’&&rcv[6]==’2’&&rcv[7]==’1’)

{

crd1=EEPROM_Read(0X02);

if(crd1>25)

{

crd1=crd1_20;

Delay_ms(40);

Lcd_Cmd(_LCD_CLEAR);

EEPROM_Write(0X02,crd1);

intTostr(crd1,bal_1);

Lcd_Out(1,1,”U r Balance”);

Lcd_Out(2,1,bal_1);

in1=1;

in2=0;

Delay_ms(1000);

in1=0;

in2=0;

Delay_ms(1000);

in1=0;

in2=1;

Delay_ms(1000);

in1=0;

in2=0;

}

If(crd1<25){

Lcd_Cmd(_LCD_CLEAR);

Page 45: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 45

Lcd_Out(1,1,bal_1);

Lcd_Out(2,1,”Sry Pls Rchrg”);

Delay_ms(1000);

}

}

if(rcv[0]==’1’&&rcv[1]==’3’&&rcv[2]==’3’&&rcv[3]==’2’&&

rcv[4]==’0’&&rcv[5]==’6’&&rcv[6]==’4’&&rcv[7]==’5’)

{

Crd=EEPROM_Read(0X06);

if(crd2>25)

{

Crd2=crd2_20;

Delay_ms(40);

Lcd_Cmd(_LCD_CLEAR);

EEPROM_Write(0X06,crd2);

intTostr(crd2,bal_2);

Lcd_Out(1,1,”U r Balance”);

Lcd_Out(2,1,bal_2);

in1=1;

in2=0;

Delay_ms(1000);

in1=0;

in2=0;

Delay_ms(1500);

in1=0;

in2=1;

Delay_ms(1000);

in1=0;

in2=0;

}

If(crd2<25)

{

Lcd_Cnd(_LCD_CLEAR);

Lcd_Out(1,1,bal_2);

Lcd_Out(2,1,”Sry Pls Rchrg”);

Delay_ms(1000);

}

}

Delay_ms(1000);

Lcd_Cmd(_LCD_CLEAR);

}

}

}

Page 46: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 46

PROCESS INVOLVED IN PCB DESIGN

INTRODUCTION

Printed circuit boards, or PCBs form the core of electronic equipment domestic

and industrial .some of the areas where PCB are intensively used are computers, process

control, telecommunications and instrumentation.

MANUFACTURING

The manufacturing process consists of two methods: Print and etch, print plate

and etch. The single sided PCB are usually made using the print and etch method. The

double sided plate through-hole (PTH) boards are made by the print plate and etch method.

The production of multilayer boards uses both the methods. The inner layers are printed

and etch while the outer layers are produced by print , plate and etch after pressing the

inner layers.

SOFTWARE

The software used in our project to design the pcb is RIMU PCB.

RIMU PCB:

This is a popular PCB design software. The main features of this layout editor

are:

-Easy to use and cost effective.

-Can import a netlist from your schematic. Seven different formats. -Design rule checking - 32 rules in five categories.

-Multiple Undo / Redo command.

Page 47: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 47

-Automatic shape based power planes.

-Extensive printing options and print preview. -Search libraries by part number and/or description.

-New component footprints and libraries can be created and edited easily. -Floating/drop down palettes.

-Windows MDI interface. -32 bit application runs under Windows 98, NT4.0, 2000 and XP

PANELISATION

Here the schematic transformed in to the working positive/negative films. The

circuit is repeated conveniently to accommodate economically as many circuits as possible

in a panel, which can be operated in every sequence of subsequent steps in the PCB

process. This is called penalization. For the PTH boards, the next operation is drilling.

DRILLING

PCB drilling is a state of the art operation. Very small holes are drilled with

high speed drilling machines, giving a wall finish with less smear.

PLATING

The heart of the PCB manufacturing process. The holes drilled in the board

are treated both mechanically and chemically before depositing the copper by the electro

less copper plating process.

ETCHING

Dosing equipment, which analyses and controls etchants concentrations.

Once a multiplier board is drilled and electro less copper deposited, the image available in

the form of a film is transferred on to the outside by photo printing using a dry film printing

Page 48: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 48

process. The board are then electrolitically plated on to the circuit pattern with copper and

tin. The tin-plated deposit serves an etch resist when copper in the unwanted area is

removed by the conveyorized spray etching machines with chemical etchants.

SOLDERMASK

Since a PCB design call for very close spacing between conductors a solder

mask has to be applied on the both sides of the circuitry to avoid the bridging of conductors

. the solder mask ink is applied by screening .the ink is dried , exposed to UV, developed

in a mild alkaline solution and finally cured by both UV and thermal energy .

HOT AIR LEVELING

After applying the solder mask , the circuit pads are soldered using the hot air

leveling process. The bare bodies fluxed and dipped into a molten solder bath. While

removing the board from the solder bath , hot air is blown on both sides of the board

through air knives in the machines , leaving the board soldered and leveled . This is one of

the common finishes given to the boards . Thus the double side plated through hole printed

circuit board is manufactured and is now ready for the components to be soldered.

Page 49: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 49

FEATURES

Provides high security.

Updated data can be conveying to audience.

Low cost.

No man power is needed.

More reliable and simple circuitry.

.

Page 50: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 50

FUTURE SCOPE

This electronic circuit is mainly used in “AUTOMATION OF DOORS”.

This project can also be used for the following application

1. To mark attendance of workers in a company/industry

2. To store number of the students entering to the bus/class.

3. To monitor / display the balance of the RFID card.

It can be used in a college/company/industry to mark the attendance of

students/employees/workers. The system can be implemented on metro rails, by

that it provides easy ticketing and much more security to the passengers.

In future we can monitor the bus tickets/railway tickets as rfid tickets.

By that the need man power is decreasing. And also we can implement this circuitry

for developing a smart library system.

Page 51: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 51

CONCLUSION

RFID in the library speeds up book borrowing ,monitoring, book

searching processes and thus frees staff to do more user service tasks. But the

performance varies with respect to the vendors of RFID readers and tags. The

efficient utilization of the technology also depends upon the information to be

written tag. Experimental results with respect to effectiveness of RFID reader

position, tag position are presented in the paper.

BIBLIOGRAPHY

Page 52: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 52

BOOKS

Design with PIC microcontrollers -John B Peatman

Basic electronics and linear circuits - NN Bhargava

Microcontroller &embedded systems -Mazidi

WEBSITES

www.google.com

www.wikipedia.org

www.microchip.com

www.maxim-ic.com

www.alldatasheet.com

APPENDIX

Page 53: clg bus auto prjct REPORT

PROJECT REPORT 2013-2014 COLLEGE BUS AUTOMATION USING RFID

DEPARTMENT OF ELECTRONICS GEMS ASC RAMAPURAM 53