Вы находитесь на странице: 1из 64

VISWAJYOTHI COLLEGE OF ENGINEERING AND TECHNOLOGY

AUTOMATIC BUS ANNOUCMENT SYSTEM MINI PROJECT REPORT DONE BY GEORGE JOSEPH JIS K SUNNY DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING BATCH 2008-2012

VISWAJYOTHI COLLEGE OF ENGINEERING AND TECHNOLOGY

AUTOMATIC BUS ANNOUCMENT SYSTEM MINI PROJECT


Submitted in partial fulfillment for the requirement of the Award of Degree of Bachelor of Technology in Electronics and Communication Engineering of Mahatma Gandhi University.

BY GEORGE JOSEPH DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

BATCH 2008-2012

VISWAJYOTHI COLLEGE OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


CERTIFICATE
This is to certify that this mini project report entitled AUTOMATIC BUS

ANNOUCMENT SYSTEM
is the bonafide report of mini project work done by GEORGE JOSEPH of sixth semester Electronics and Communication Engineering in partial fulfillment for the requirement of the award of Bachelor of Technology in Electronics and Communication Engineering of Mahatma Gandhi University. REG NO:67159 Mini Project Coordinator Head of Dept.

-------------------------------------------------------

Abstract
The main aim of our project is to demonstrate how to replace the announcer in bus
station,Airport, railway station etc.The project only shows a basic demonstration of it using the latest technologies Such as RFID reader, various soft wares

rt

CONTENTS
Introduction...6 Block Diagram7 Block Diagram Explanation..8 Circuit Diagram10 Circuit Diagram Explanation..12 PCB Design &Fabrication..25 PCB Layouts.28 Software.30 Advantages, Disadvantages, Applications 38

Future Scope39 Conclusion40

INTRODUCTION
Embedded systems have already pervaded our lives in numerous ways. Their applications remain limited only by the imagination of the developers who design them. The embedded system is a combination of hardware, software and perhaps additional mechanical or electrical parts designed to perform a specific function.

RFID stands for Radio Frequency Identification. RFID is a technology that uses communication via electromagnetic waves to exchange data between a terminal and an object such as a product, animal, or person for the purpose of identification and tracking. An RFID consist of an RFID tag and an RFID receiver. Our preliminary aim in this project is to build an automatic announcement system in bus terminal. Heart of this project is MicrochipsPIC16F877A microcontroller. There are two main units:- Electronic Control Unit & System Unit. The Electronic Control Unit consist of an RFID tag, RFID reader, microcontroller,. The system unit consist of a computer system and a public addressing system. The bus contains a RFID tag which has information regarding the particular bus the RFID Module senses the information in RFID tag and sends MicrochipsPIC16F877A microcontroller the microcontroller sends it to the system via MAX232 which converts TTL logic of PIC to RS 232 of the PC and vice versa

BLOCK DIAGRAM

Power supply

Info. From RFID tag

Passive RFID module

Microchip's PIC16F877A microcontroller

system

BLOCK DIAGRAM EXPLANATION


Power supply
It provides regulated power supply of 5v and 12v with help of transformer and rectifier the block diagram of power supply is:

Transformer

Rectifier

Voltage regulator

Microcontroller

A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, 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. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the

size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes.

Radio frequency identification (RFID reader)


Radio-frequency identification (RFID) is a technology that uses communication via electromagnetic waves to exchange data between a terminal and an object such as a product, animal, or

person for the purpose of identification and tracking. Some tags can be read from several meters away and beyond the line of sight of the reader.Radio-frequency identification involves interrogators (also known as readers), and tags (also known as labels). The RFID reader senses the information stored in the RFID tag which is located in the bus

Radio-frequency identification (RFID tag)


Most RFID tags contain at least two parts. One is an integrated circuit for storing and processing information, modulating and demodulating a radio-frequency (RF) signal, and other specialized functions. The other is an antenna for receiving and transmitting the signal. There are three types of RFID tags: passive RFID tags, which have no power source and require an external electromagnetic field to initiate a signal transmission, active RFID tags, which contain a battery and can transmit signals once an external source (Interrogator) has been successfully identified, and battery assisted passive (BAP) RFID tags, which require an external source to wake up but have significant higher forward link capability providing greater range.

RFID has many applications; for example, it is used in enterprise supply chain management to improve the efficiency of inventory tracking and management .

System
The system announces the information send from the PIC via max232 to public

Circuit diagram

CIRCUIT DIAGRAM EXPLANATION


Transformer & Rectifier circuit
The transformer is used to step down the down the 230v AC to 6v AC and the rectifier is used to convert AC into DC

Voltage regulator section


A regulated power supply is an embedded circuit, or stand alone unit, the function of which is to supply a stable voltage (or less often current), to a circuit or device that must be operated within certain power supply limits. The output from the regulated power supply may be alternating or unidirectional, but is nearly always DC (Direct Current).Usually a voltage regulator IC is used for generating a fixed voltage a voltage regulator IC called 78xx is used for this. The 78xx (also sometimes known as LM78xx) series of devices is a family of selfcontained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular choice for many electronic circuits which require a regulated power supply, due to their ease of use and relative cheapness. When specifying individual ICs within this family, the xx is replaced with a two-digit number, which indicates the output voltage the particular device is designed to provide (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts).78xx is positive voltage ICSs 79xx is negative voltage regulator Ics

Microcontroller
A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, 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.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate

microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes.

Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.

IO 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. Additional information on I/O ports may be found in the PICmicro MidRange Reference Manual (DS33023). PORTA and the TRISA Register PORTA is a 6-bit wide, bidirectional 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-modifywrite 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


PORTB is an 8-bit wide, bidirectional 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 High-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 interruptionan output is excluded from the interruptionmismatch outputs of RB7:RB4

change feature. Only pins

configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured as change comparison). The input pins (of RB7:RB4) are compared with the old value latched on the last read of PORTB. The are ORed together to generate the RB port change interrupt with flag bit RBIF (INTCON<0>). This interrupt can wake the device from Sleep. The user, in the Interrupt Service Routine, can clear the interrupt in the following manner: a) Any read or write of PORTB. This will end the mismatch condition. b) Clear flag bit RBIF. A mismatch condition will continue to set flag bit RBIF. Reading PORTB will end the mismatch condition and allow flag bit RBIF to be cleared. The interrupt-on-change feature is recommended for wake-up on key depression operation and operations where PORTB is only used for the interrupt-on-change feature. Polling of PORTB is not

recommended while

using the interrupt-on-change feature.

This interrupt-on-mismatch

feature, together with software configurable pull-ups on these four pins, allow easy interface

to a keypad and make it possible for wake-up on key depression.

RB0/INT is an external

interrupt input pin and is configured using the INTEDG bit (OPTION_REG<6>).

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). PORTC is multiplexed with several peripheral functions (Table 4-5). PORTC pins have Schmitt Trigger input buffers. When the I2C module is enabled, the PORTC<4:3> pins can be configured with normal I2C levels, or with SMBus levels, by using the CKE bit (SSPSTAT<6>). When enabling peripheral functions, care should be

taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modifywrite instructions (BSF, BCF, XORWF) with TRISC as the destination, should be avoided. The user should refer to the corresponding peripheral section for the correct TRIS bit settings.

PORTD and TRISD Registers


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.

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. Register 41 shows the TRISE register which also controls the Parallel Slave Port operation. PORTE pins are multiplexed with analog inputs. When selected for analog input, these pins will read as 0s. TRISE controls the direction of the RE pins, even when they are being used as analog inputs. The user must make sure to keep the pins configured as inputs when using them as analog inputs

INTERRUPTS
The PIC16F87XA family has up to 15 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 interrupts 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. Individual interrupt bits are set regardless of the status of the GIE bit. The GIE bit is cleared on Reset. The return from interrupt instruction, RETFIE, exits the interrupt routine, as well as sets the GIE bit, which re-enables interrupts. The RB0/INT pin interrupt, the RB port change interrupt and the TMR0 overflow interrupt flags are contained in the INTCON register. The peripheral interrupt flags are contained in the Special Function Registers, PIR1 and PIR2. The corresponding interrupt enable bits are contained in Special Function Registers, PIE1 and PIE2, and the peripheral interrupt enable

bit is contained in Special Function Register, INTCON. When an interrupt is responded to, the GIE bit is cleared to disable any further interrupt, the return address is pushed onto the stack and the PC is loaded with 0004h. Once in the Interrupt Service Routine, the source(s) of the interrupt can be determined by polling the interrupt flag bits. The interrupt flag bit(s) must be cleared in software before re-enabling interrupts to avoid recursive interrupts. For external interrupt events, such as the INT pin or PORTB change interrupt, the interrupt latency will be three or four instruction cycles. The exact latency depends when the interrupt event occurs. The latency is the same for one or two-cycle instructions. Individual interrupt flag bits are set regardless of the status of their corresponding mask bit, PEIE bit or GIE bit.

INT

INTERRUPT
External interrupt on the RB0/INT pin is edge triggered, either rising if bit INTEDG

OPTION_REG<6>) is set or falling if the INTEDG bit is clear. When a valid edge appears on the RB0/INT pin, flag bit, INTF (INTCON<1>), is set. This interrupt can be disabled by

clearing enable bit, INTE (INTCON<4>). Flag bit INTF must be cleared in software in the Interrupt Service Routine before re-enabling this interrupt. The INT interrupt can wake-up the processor from Sleep if bit INTE was set prior to going into Sleep. The status of global interrupt enable bit, GIE, decides whether or not the processor branches to the interrupt vector following wake-up.

TMR0 INTERRUPT
An overflow (FFh 00h) in the TMR0 register will set flag bit, TMR0IF (INTCON<2>). The interrupt can be enabled/disabled by setting/clearing enable bit, TMR0IE (INTCON<5).

PORTB INTCON CHANGE

An input change on PORTB<7:4> sets flag bit, RBIF (INTCON<0>). The interrupt can be enabled/disabled by setting/clearing enable bit, RBIE (INTCON<4>).

KEY FEATURES Operating frequency Resets (and delays)

PIC16F877A DC 20 MHz POR , BOR (PWRT, OST) 8K

Flash program memory (14 bit words) Data memory(bytes) EEPROM Data Memory(bytes) Interrupts I/O ports Timers Capture/Compare/PWM

368 256

15 Ports A, B, C, D, E 3 2

Modules Serial Communications MSSP , USART Parallel communications PSP 10-bit Analog to digital 8 input channels modules Analog Comparators Instruction set Packages

2 35 instructions 40 pin PDIP

Context Saving During Interrupts


During an interrupt, only the return PC value is saved on the stack. Typically, users may wish to save key registers during an interrupt (i.e., W register and Status register). This will have to be implemented in software. For the PIC16F873A/874A devices, the register W_TEMP must be defined in both Banks 0 and 1 and must be defined at the same offset from the bank base address (i.e., If W_TEMP is defined at 0x20 in Bank 0, it must also be defined at 0xA0 in Bank 1). The registers, PCLATH_TEMP and STATUS_TEMP, are only defined in Bank 0. Since the upper 16 bytes of each bank are common in the IC16F876A/877A devices, temporary holding registers, W_TEMP, STATUS_TEMP and PCLATH_TEMP, should be placed in here. These 16 locations dont require banking and therefore, make it easier for context save and restore.

ELEMENTS OF AN RFID SYSYTEM


RFID system consisting of 3 component An antenna RFID Reader A transponder (RF tag) electronically programmed with unique information

RFID tag
An RFID tag is a microchip combined with an antenna in a compact package; the packaging is structured to allow the RFID tag to be attached to an object to be tracked. "RFID" stands for Radio Frequency Identification.

The tag's antenna picks up signals from an RFID reader or scanner and then returns the signal, usually with some additional data (like a unique serial number or other customized information).

RFID tags can be very small - the size of a large rice grain. Others may be the size of a small paperback book.

RFID Reader
An RFID reader is a device that is used to interrogate an RFID tag. The reader has an antenna that emits radio waves; the tag responds by sending back its data. A number of factors can affect the distance at which a tag can be read (the read range). The frequency used for identification, the antenna gain, the orientation and polarization of the reader antenna and the transponder antenna, as well as the placement of the tag on the object to be identified will all have an impact on the RFID systems read range. WORKING

The antenna emits radio signals to activate the tag and to read and write data to it. The reader emits radio waves in ranges of anywhere from one inch to 100 feet or more, depending upon its power output and the radio frequency used. When an RFID tag passes through the electromagnetic zone, it detects the reader's activation signal. The reader decodes the data encoded in the tag's integrated circuit (silicon chip) and the data is passed to the host computer for processing. The purpose of an RFID system is to enable data to be transmitted by a portable device, called a tag, which is read by an RFID reader and processed according to the needs of a particular application. The data transmitted by the tag may provide identification or location information, or specifics about the product tagged, such as price, color, date of purchase, etc. RFID technology has been used by thousands of companies for a decade or more. . RFID quickly gained attention because of its ability to track moving objects. As the technology is refined, more pervasive - and invasive - uses for RFID tags are in the works.

A typical RFID tag consists of a microchip attached to a radio antenna mounted on a substrate. The chip can store as much as 2 kilobytes of data.To retrieve the data stored on an RFID tag, you need a reader. A typical reader is a device that has one or more antennas that emit radio waves and receive signals back from the tag. The reader then passes the information in digital form to a computer system.

APPLICATIONS
Asset Tracking It's no surprise that asset tracking is one of the most common uses of RFID. Companies can put RFID tags on assets that are lost or stolen often, that are underutilized or that are just hard to locate at the time they are needed. Just about every type of RFID system is used for asset management. NYK Logistics, a third-party logistics provider based in Secaucus, N.J., needed to track containers at its Long Beach, Calif., distribution center. It chose a real-time locating system that uses active RFID beacons to locate container to within 10 feet. 1. Manufacturing RFID has been used in manufacturing plants for more than a decade. It's used to track parts and work in process and to reduce defects, increase throughput and manage the production of different versions of the same product. 2 .Supply Chain Management RFID technology has been used in closed loop supply chains or to automate parts of the supply chain within a company's control for years.As standards emerge, companies are increasingly turning to RFID to track shipments among supply chain partners.

3. Retailing

Retailers such as Best Buy, Metro, Target, Tesco and Wal-Mart are in the forefront of RFID adoption. These retailers are currently focused on improving supply chain efficiency and making sure product is on the shelf when customers want to buy it.

4. Payment Systems

RFID is all the rage in the supply chain world, but the technology is also catching on as a convenient payment mechanism. One of the most popular uses of RFID today is to pay for road tolls without stopping.

These active systems have caught on in many countries, and quick service restaurants are experimenting with using the same active RFID tags to pay for meals at drive-through windows. 5. Security and Access Control

RFID has long been used as an electronic key to control who has access to office buildings or areas within office buildings. The first access control systems used lowfrequency RFID tags. Recently, vendors have introduced 13.56 MHz systems that offer longer read range. The advantage of RFID is it is convenient (an employee can hold up a badge to unlock a door, rather than looking for a key or swiping a magnetic stripe card) and because there is no contact between the card and reader, there is less wear and tear, and therefore less maintenance. As RFID technology evolves and becomes less expensive and more robust, it's likely that companies and RFID vendors will develop many new applications to solve common and unique business problems.

MAX 232

The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V.

The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F capacitors used with the original deviceThe newer MAX3232 is also backwards compatible, but operates at a broader voltage range, from 3 to 5.5 V.

Pin out of max232

PCB DESIGN AND FABRICATION


After the designing and testing of the circuit, the next step is to mount the circuit on the PCB and solder them properly. The PCB fabrication involves two steps:

Preparing the PCB drawing:

The traditional method of making a PCB layout involves the complete placement of parts, taking a photographic negative of the drawing, developing the image of negative formed on the photosensitive copper plate and dissolving the excess by etching. For small scale operation where large number of copies are not needed a cost saving procedure is used. In this later conversion problem is overcome, also tracing of the circuit and fault finding is made easy, as the PCB exactly matches the original circuit so that one does not have to constantly look for positions to drill holes and place various components. Making the PCB drawing involves some primary considerations such as placement of component on a piece of paper, location of holes dividing diameter of various holes, the optimum area each component should occupy, full utilization and prevention of overcrowding of components at a particular place. For anchoring leads of components 1mm diameter holes and for fixing PCB pattern total chassis of 3mm diameter holes are recommended. After this the sketch must be drawn. The sketch is the mirror image of the PCB pattern desired. It shows the component placement on the other side of the PCB laminate. The mirror image of this PCB pattern drawn on the tracing paper will appear as the PCB pattern when viewed from the other side. To save time and effort the sketch can be made on a paper itself right at the beginning. Alternatively the PCB pattern can be drawn from the sketch with the help of carbon paper. A fresh carbon paper may be placed upon a flat surface and covered with a plain sheet of paper. On this the sketch is drawn with a ball pen or hard pencil. The mirror image of the sketch pen can be obtained on lower sheet of the paper.

PCB fabrication:
An outline of the copper clad board is drawn on a paper and drawing is filled onto it, making correct outlines of IC pins, resistors etc. The positive layout is also drawn from that. For simplicity inch graph is used. This negative is transferred to the copper clad board using enamel paint or nail polish. It is dried in sunlight. It is not advisable to rub or touch the board to avoid scratching of the surface. Finally the board should be placed in the etchant which is ferric chloride solution(FeCl3). FeCl3 is usually supplied in crystalline form. It is dissolved in water to make solution of specific gravity 1.2. Etching is also a time dependent process, for a fresh solution warmed upto 40 degree Celsius. Time taken should be typically 10-15minutes. During this time the board should be agitated and checked to

ascertain the state of etching. The board should be removed as soon as copper has cleared all the areas affected by resistance. Failure will result in undercutting. Having completed the etching process, the next step involves washing, cleaning and drying the PCB. Remove the enamel paint by rubbing with a cloth soaked in thinner or turpentine. After that holes are drilled on the sides. Now a coat of varnish is applied if necessary over the PCB to prevent corrosion.

Soldering Soldering is the process of joining metats by using lower melting point metal or alloy with joining surface. Soldered joints will establish strong electrical connection between component leads. The popularly used solders are alloys of tin and lead melt below the melting point of tin.

Flux: In order to make the surface accept the solder readily, the component terminal should be free from oxides and other obstructing films. The leads should be cleaned chemically or by abrasion using blades or knives. A small amount of lead coating can be done on cleaned portion of lead using soldered iron. This process is called thinning. Zinc chloride or Ammonium chloride or in combination is mostly used as fluxes. These are available in petroleum jelly as paste flux. The residue which remains after soldering may be washed out with more water accompanied by brushing.

Soldering Iron:

This tool is used to melt solder and apply at the joint in the circuit. It operates on 230V supply. The iron bit at the tip of it gets heated within few minutes. 50W or 25W soldering iron are commonly used for soldering purposes. Soldering Steps: Make the layout of components in the circuit. Plug in the cord of soldering iron into the mains to get it heated. Straighten and remove the coating of component leads using a blade or knife. Apply a little flux on the leads. Take a little solder on soldering iron and apply the molten solder on the leads. Care must be taken to avoid the components getting heated up. Mount the components on PCB by bending the leads of components using nose pliers. Apply flux on the joints and solder the joints. Soldering must be done in minimum to avoid the dry soldering and heating up of components. Wash the residue using water and brush

PCB Layouts
Bottom layer

Assembly top

Top layer

Software

#include "main.h" #include "init.h" //************************************************************************* // Structure for wiegand data RFID1 //************************************************************************* // data stucture for the 26 bit wiegand data receive struct wiegand_data_rfid1 { BYTE data1; BYTE data2; BYTE data3; BYTE data4; BYTE data5; }wdata1; struct wiegand_data_rfid1 *wiegand_data_str1_ptr; BYTE *wiegand_data_ptr1;

//************************************************************************* // Clear Structure Variables //************************************************************************* void clear_str_var1() { wdata1.data1=0; wdata1.data2=0; wdata1.data3=0; wdata1.data4=0; wdata1.data5=0; // clear the structure variables

} //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; // Function Name : // Details : Data pack It removes the parity bit and pack the data as 3 byte

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; //data packing function //it will remove the parity at the starting and end of the 26 bit wiegand data void data_pack(BYTE *wiegand_data_ptr,BYTE Rfid) { BYTE *temp_ptr; temp_ptr=wiegand_data_ptr; temp_ptr--; for(i=0;i<3;i++) { temp_ptr += 2; if(i==2) { // wiegand data pointer initilizing

bit_test_data = bit_test(*temp_ptr,1); // if last byte, check 1st bit } else { bit_test_data = bit_test(*temp_ptr,7);// otherwise check 7th bit } temp_ptr--; if(bit_test_data) { rotate_left( temp_ptr, 1); //rotate the buffer 1 bit //if bit is high

bit_set(*temp_ptr,0); } else { rotate_left( temp_ptr, 1); bit_clear(*temp_ptr,0); } } temp_ptr=wiegand_data_ptr; putc('$'); for(i=0;i<3;i++) { printf("%X",*temp_ptr); temp_ptr++; } putc('*'); //end character temp_ptr=wiegand_data_ptr; }

// set the 0th bit of the buffer

//if low rotate the buffer 1bit // clear the 0th bit of the buffer

// wiegand data pointer initilizing //starting character

//3 byte data

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;; // Function Name : // Details ;;;;;;;;; : RFID1_check() It receives the wiegamd data bits

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

void RFID1_read() {

if(input_state(pin_B4)^input_state(pin_B5)) low pin of RFID1 { if(!input_state(pin_B4)) { bit_high=1;

//exor the data high pin and the data

//if the data high pin is low //set the bit high flag

bit_set(*wiegand_data_ptr1,0); // set the 0th bit of the wiegand data buffer } else if(!input_state(pin_B5)) { bit_low=1; buffer } rotate_left( wiegand_data_ptr1, 1); // rotate the wiegand data buffer 1 bit for next bit bit_cnt1++; Data_cnt1++; } if(bit_cnt1==8) { wiegand_data_ptr1++; bit_cnt1=0; } if(Data_cnt1==26) wiegand format) { // wiegand data bits received =26(if using 26 bit //incrimet wiegand data structure pointer //clear bit count //if one byte received //incriment the bit count // wiegand data bit count incriment //set the bit low flag //if the data low pin is low

bit_clear(*wiegand_data_ptr1,0); // clear the 0th bit of the wiegand data

wiegand_data_ptr1=wiegand_data_str1_ptr; //initilize the wiegand data stucture pointer for( i=0;i<4;i++) {

rotate_right(wiegand_data_ptr1, 1); //rotate right all byes of data received wiegand_data_ptr1++; } read_ok_Rfid1_flg=1; Data_cnt1=0; bit_cnt1=0; //clear wiegand data bit count //clear bit count //initilize the wiegand data // to compensate the final left rotation

wiegand_data_ptr1=wiegand_data_str1_ptr; stucture pointer } } #int_RB void RB_isr(void) { RFID1_read(); } //call RFID 1 read

void main() { setup_adc_ports(NO_ANALOGS); setup_adc(ADC_CLOCK_DIV_2); setup_psp(PSP_DISABLED);

setup_spi(SPI_SS_DISABLED); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); setup_timer_1(T1_DISABLED); setup_timer_2(T2_DISABLED,0,1);

setup_ccp1(CCP_OFF); setup_comparator(NC_NC_NC_NC); setup_vref(FALSE); enable_interrupts(INT_RDA); enable_interrupts(INT_RB); enable_interrupts(GLOBAL); read_ok_Rfid1_flg=0; set_tris_b (0xFF); port_b_pullups(TRUE); wiegand_data_str1_ptr=&wdata1; structure pointer wiegand_data_ptr1=wiegand_data_str1_ptr; pointer //load the structure pointer to a byte //init i/o ports //enable the internal pullup of PORT B //assign the wdata1 address to the

clear_str_var1(); delay_ms(3000); while(1) { if(read_ok_Rfid1_flg) {

// clear the structure variables

//if RFID 1 read ok //data decoding function

data_pack(wiegand_data_str1_ptr,1); clear_str_var1();

// clear the structure variables

Data_cnt1=0; bit_cnt1=0; read_ok_Rfid1_flg=0; } } }

//clear wiegand data bit count

ADVANTAGES
It replaces the announcer thereby reducing the monthly expenditure for the announcer Since the announcing messages are already pre recorded in a clear background, the resultant announcement will be very much audible for the passengers. It has improved accuracy. It simplifies the traffic inside the bus stand .

Low running cost.

DISADVANTAGES
Initial cost is higher. Information about vehicles that are not available in the data base will not be announced.

APPLICATIONS
Automatic Announcement System is applicable in the following fields BUS STAND RAILWAY STATION PUNCHING STATIONS AIRPORT

FUTURE SCOPE
We can also announce the bus details when it leave from the bus station. It can be made possible to announce the information that are arrived late. It can also be made wireless

CONCLUSION
The advent of new high speed technology and the growing computer capacity provided realistic opportunity for public addressing system. Our announcement system will replaces the announcer in the bus terminal . The most innovative technology, zigbee can be used efficiently for the wireless communication between the controller module and the system. The main advantage is that it will give high performance and more reliable.

BIBLIOGRAPHY
1. www.microchip.com 2. John Burrough, Microchip Technology, 2002 edition, Page 2-26, 2002 3. Martin Pates, Interfacing PIC Microcontrollers; Embedded design by interactive Simulation, 2006 edition. 4. John B Peakman, Designing with PIC Microcontroller

Appendix

PIC 16F87X

LM78XX AND MAX232

Вам также может понравиться