You are on page 1of 54

FINAL YEAR PROJECT

RF BASED WIRELESS CAMPUS PAGING SYSTEM

PROJECT MEMBERS

ABSTRACT To design a wireless paging system using RF for our campus in which one can simply type message on PC which would be displayed wirelessly on LCD`s at different places in campus.

ACKNOWLEDGMENT
First of all, thanks to Allah because given us power to complete this task just in time. Even we faced with a lot of difficulties along to complete this task; but we still manage to complete it. We also want to acknowledge our supervisor, Co-supervisor and software engineer fellows. We also appreciate the University authority for given us permission to carry out experiment in labs. University also provided apparatus and the material we used for study task

DEDICATION
SUCCESS ALWAYS SOLICITS FOR TWO THINGS EXERTION AND FORTUNE

If we are successful then our exertion is the efforts of our parents, which they made to, fulfill our wishes, and our fortune is due to their prayers hence this project is dedicated to our parents and mentors who have been a source of constant encouragement for us and to our idols who have given us inspiration throughout our degree.

CERTIFICATE
is certified that the contents and form of thesis entitled RF BASED WIRELESS CAMPUS PAGING SYSTEM submitted by ZIA UL IKRAM, MUBASHIR ALI, SYED MUHAMMAD ALI and UMER RAZA CHEMA have been found satisfactory for the requirement of the degree.
It

Head of department: _______________________ Supervisor: ________________________________


(ENG )

Examiner: _________________________________

CHAPTER 1 Introduction:
The system we are going to design is based on RF Transmitter, FSK Modulator, De Modulator, MAX 232 and Microcontroller. Our project has a lot of practical applications. In universities we can use our project as messenger or announcer for example if Dean of University wants to announce message then he simply write through a Keypad and it will be displayed all electronic notice board wirelessly through out the campus. We are using Microcontroller RF Transmitter, FSK Modulator, De Modulator, MAX 232 and key Pad for message typing. A person will type message through key Pad , that will be send to Microcontroller , which will send the message from its serial port to FSK Modulator , which will convert binary bits from controller to frequencies of ( 1200 and 2200) HZ. Because DC signal ca not be transmitted in air , These frequencies will be transmitted through FM transmitter , on receiving end FM receiver will receive it and give these two frequencies to FSK De Modulator which will again convert back to binary form , binary data will be given to controller again and then displayed on LCD. And we can also use our project to monitor Water level in a Dam, We can transfer data through a land line cable without Modem. And can we also use it in many other applications.

BLOCK DIAGRAM

1. The Paging system can operate as a stand-alone unit, or be integrated with other existing facility systems such as Nurse Call, Fire/Alarm, Access Control and more. 2. The elderly, handicapped, children or co-workers can call for attention by pressing the button on the transmitter 3. It is also being used as AlertWave Mass Notification

and Personnel Alerting System which uses an advanced high-power RF communication technology that operates on dedicated military RF bands, to provide audible and silent alerts to any facility size. The system can interface with BioChem detection devices, fire/alarm systems and other monitoring sensors to provide rapid response to any given situation.

CHAPTER 2
HARD WARE USED AND DETAILS
2.1) POWER SUPPLY:

A device, such as a generator or a transformer-rectifier-filter arrangement, that produces the power needed to operate an electronic equipment.

2.1.1) Step Down Transformer:


A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductorsthe transformer's coils. A varying current in the first or primary winding creates a varying magnetic flux in the transformer's core, and thus a varying magnetic field through the secondary winding. This varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is called mutual induction. A transformer delivering an output voltage that is lower than the input voltage. In such a transformer, the secondary (output) winding contains fewer turns than the primary (input) winding. If a load is connected to the secondary, an electric current will flow in the secondary winding and electrical energy will be transferred from the primary circuit through the transformer to the load. In an ideal transformer, the induced voltage in the secondary winding (VS) is in proportion to the primary voltage (VP), and is given by the ratio of the number of turns in the secondary (NS) to the number of turns in the primary (NP) as follows: Vs/Vp = Ns/Np If Np>Ns
7

Transformer is called a step down transformer. It converts 220vAc to 12vAc.

2.1.2) Full Waves Rectifier:


A full-wave rectifier converts the whole of the input waveform to one of constant polarity (positive or negative) at its output. Full-wave rectification converts both polarities of the input waveform to DC (direct current), and is more efficient. However, in a circuit with a non-center tapped transformer, four diodes are required instead of the one needed for half-wave rectification. (See semiconductors, diode). Four rectifiers arranged this way are called a diode bridge or bridge rectifier:

Grafts bridge rectifier: a full-wave rectifier using 4 diodes.

2.2) VOLTAGE REGULATOR:


A voltage regulator is an electrical automatically maintain a constant voltage level. regulator designed to

It may use an electromechanical mechanism, or passive or active electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages. With the exception of shunt regulators, all modern electronic voltage regulators operate by comparing the actual output voltage to some internal fixed reference voltage. Any difference is amplified and used to control the regulation element. This forms a negative feedback servo control loop. If the output voltage is too low, the regulation element is commanded to produce a higher voltage. For some regulators if the output voltage is too high, the regulation element is commanded to produce a lower voltage; however, many just stop sourcing current and depend on the current draw of whatever it is driving to pull the voltage back down. In this way, the output voltage is held roughly constant. The control loop must be carefully designed to produce the desired tradeoff between stability and speed of response. We have used LM7805 voltage regulator. Fig is given below.

Port 1=input Port 2=common Port 3=output Operating temperature=40c^o to +125c MAX232 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 device.

Frequency-shift keying (FSK)

Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave. The simplest FSK is binary FSK (BFSK). BFSK literally implies using a couple of discrete frequencies to transmit binary (0s and 1s) information. With this scheme, the "1" is called the mark frequency and the "0" is called the space frequency. The time domain of an FSK modulated carrier is illustrated in the figures to the right.

For

fsk we IC

modulation are using an XR 2206

XR
GENERAL

2206
DESCRIPTION

The XR2206 is a monolithic function generator integrated circuit capable of producing high quality sine, square, triangle, ramp, and pulse waveforms of high-stability and accuracy. The output waveforms can be both amplitude and frequency modulated by an external voltage. Frequency of operation can be selected externally over a range of 0.01Hz to more than 1MHz.

PIN CONFIGURATION

Frequency Shift Keying (FSK) demodulation;


Frequency Shift Keying (FSK) demodulation is the process of recovering the original signal by detecting the frequencies involved in the original modulation. Typically, this is done with a bandpass amplifier tuned to one of the two frequencies, followed by a amplitude demodulator. The output is the original signal. It is possible, though often unecessary, to use two bandpass ampliers, one for each frequency, but this is redundant. It is also possible to use a digital signal processing technique to perform a fourier transform on the input signal, but that can be complex and costly. For demodulation we have used an IC XR2211:

XR 2211
GENERAL DESCRIPTION

The XR-2211 is a monolithic phase-locked loop (PLL) system especially designed for data communications applications. It is particularly suited for FSK modem applications. It operates over a wide supply voltage range of 4.5 to 20V and a wide frequency range of 0.01Hz to 300kHz. It can accommodate analog signals between 10mV and 3V, and can interface with conventional DTL, TTL, and ECL logic families. The circuit consists of a basic PLL for tracking an input signal within the pass band, a quadrature phase detector which provides carrier detection, and an FSK voltage comparator which provides FSK demodulation. External components are used to independently set center frequency, bandwidth, and output delay. An internal voltage reference proportional to the power supply is provided at an output pin.

PIN CONFIGURATION

Liquid crystal display (LCD)


A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying information such as text, images, and moving pictures. Its uses include monitors for computers, televisions, instrument panels, and other devices ranging from aircraft cockpit displays, to every-day consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. Among its major features are its lightweight construction, its portability, and its ability to be produced in much larger screen sizes than are practical for the construction of cathode ray tube (CRT) display technology. Its low electrical power consumption enables it to be used in batterypowered electronic equipment. It is an electronically-modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome.

2.9) TRANSISTER

NPN

A bipolar (junction) transistor (BJT) is a type of transistor. It is a threeterminal device constructed of doped semiconductor material and may be used in amplifying or switching applications. Bipolar transistors are so named because their operation involves both electrons and holes, as opposed to uni polar transistors, such as field-effect transistors, in which only one carrier type is involved in charge flow. Although a small part of the

transistor current is due to the flow of majority carriers, most of the transistor current is due to the flow of minority carriers and so BJTs are classified as minority-carrier devices. NPN BJT with forward-biased EB junction and reverse-biased BC junctionAn NPN transistor can be considered as two diodes with a shared anode region. In typical operation, the emitterbase junction is forward biased and the basecollector junction is reverse biased. In an NPN transistor, for example, when a positive voltage is applied to the base emitter junction, the equilibrium between thermally generated carriers and the repelling electric field of the depletion region becomes unbalanced, allowing thermally excited electrons to inject into the base region. These electrons wander (or "diffuse") through the base from the region of high concentration near the emitter towards the region of low concentration near the collector. The electrons in the base are called minority carriers because the base is doped p-type which would make holes the majority carrier in the base. In our project we use NPN Transistor C945 i-e

NPN TRANSISTER C945


29

2.11) LED
A light-emittingdiode (LED) is a semiconductor diode that emits light when an electric current is applied in the forward direction of the device, as in the simple LED circuit. The effect is a form of electroluminescence where incoherent and narrow-spectrum light is emitted from the p-n junction in a solid state material. LEDs are widely used as indicator lights on electronic devices increasingly in higher power applications such as flashlights and area lighting

2.12)

DIODE

Diodes have two active electrodes between which the signal of interest may flow, and most are used for their unidirectional electric current property. The varicap diode is used as an electrically adjustable capacitor. The directionality of current flow most diodes exhibit is sometimes generically called the rectifying property. The most common function of a diode is to allow an electric current to pass in one direction (called the forward biased condition) and to block the current in the opposite direction (the reverse biased condition). Thus, the diode can be thought of as an electronic version of a valve. We use diode IN4007.

32

2.13) CRYSTAL OSSCILATOR:

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for transmitters receivers. We join cystal oscilator to Microcontroller P-18 to 19.

Crystal oscillator Circuit

2.4MICROCONTROLLER:
The microcontroller is the mastermind of the whole system and provides key functionality. In our project Atmel 89C51 microcontroller is used. It is a general-purpose device used to fetch data and perform limited calculation on that data and control its environment base on these calculations. Microcontrollers are mainly used in industries for control applications and also use in consumer products. They are suited for controlling I/O devices in designs that requires minimum components. Count, Microcomputers also implement logical components

2.4.1) Advantages Of Microcontroller Based Design


The microcontroller-based implementations provide several advantages for the hardware implementation. Some of the advantages are: a) Less Cost: The cost of a system depends on the number of ICs used in it. Larger the number of components. : Larger is the cost. The microcontroller reduces the cost of a system because it reduces the number of ICs.

14

b) Easier Evaluation and Design: The use of microcontroller simply eases the design. Because of its smaller size it occupies a smaller area. c) On Chip Facilities: The I/O and memory subsystems contained in a microcontroller specialize these devices so that they can be interfaced with hardware and control functions of the applications. Also it provides the on-chip oscillator and an external oscillator can be connected to get a specific frequency. d) Increase Frequency: The degree of control and programmability, which microcontroller provides, significantly enhances the effectiveness of the application. The System under construction becomes more flexible and provides more improvements and modifications. If changes are required, then it can be done easily by changing the program. e) Increased Reliability: The reliability of a microcontroller based system is at least ten times higher than that of hardwired implementations. One microcontroller can replace a large number of logic devices and thus provides more reliability to the system.

15

2.4.2) Features that invoke the use of AT89C51:


The AT89C51 is the original member of the Atmel product. It is a 40-pin controller that is easily available in the market. It has limited memory divided into two sections called ROM and RAM. It has flash technology i.e. EPROM (Erasable -Programmable read only Memory). It is a low voltage and high performance IC. It is very economical and affordable. It is a powerful microcomputer, which provides a high flexible and cost effective solution to many embedded control applications. FEATURES: The AT89C51 provides the following standard features. 4K bytes of flash ROM 128 bytes of RAM 32 I/O lines. Two 16-bit timer/Counter. Five vectors two level interrupt architecture. Full duplex serial port On-Chip oscillator. Clock Circuitry. In addition the AT89C51 is designed with static logic for operation down to zero frequency and support two software selectable power saving mod.

16

The Idle Mode: In Idle mode the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The contents of the on chip RAM and all the Special Function Registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. Power Down Mode: In power down mode the oscillator is stopped and the instruction that invokes power down is the last instruction executed. The on chip RAM and SFRs retain their values until the power down mode is terminated. The only exit from the power down mode is a hardware reset. Status Of External Pins During Idle Mode and Power Down Mode: The status of the external pin in the idle and power down mode is shown in the table below. Mode Program ALE PSEN 1 1 0 0 Port 0 Data Float Data Float Port1 Data Data Data Data Port2 Port3

Memory Idle Internal 1 Idle External 1 Power Internal 0 Down Power External 0 Down

Data Data Address Data Data Data Data Data

Table 3.4 Status of external pins


17

2.4.3) Oscillator Characteristics:


The on chip oscillator on 89C51 microcontroller is driven by a crystal connected to pins 18 and 19, also stabilize capacitors are used. The normal crystal frequency for most ICs in the MCS-51 TM family is 12 MHz, while 8031BH-1 can be operated with crystal frequencies up to 15 MHz. The internal clock source can be used in 89C51 microcontroller by connecting TTL, Clock source with 89C51 XTAL1 and XTAL2 and the input and output. Respectively, of an inverting amplifier. To drive the devices from an external clock source.

2.4.4) AT89C51 Microcontroller Architecture:


The AT89C51 is a microcontroller that provides a no of features. The AT89C51 has the following main components shown in a pin diagram.. It has four ports for interfacing the external memory and connecting the external components. Each port consists of eight lines. Thus a total of 32 lines are available. The eight lines of any port can be treated as a unit interfacing to parallel devices such as printer, digital to analog converters and so on. Each line can also be operated separately for interfacing to single bit devices such as switches, LEDs transistors, solenoids, motors and loud speakers.
18

2.4.5) PIN Configuration:

The pin configuration of an AT89C51 as shown.

Pin Configuration diagram

1 9

2.4.6) Ports:
Port 0:

Port 0 is an 8 bit open drain bi- directional I/O port available at ins 32-39. As on output port each pin can sink eight TTL inputs it may also be configured to be the multiplexed low ordered address data bus during accesses to external program and data memory. Port 0 also receives the code byte during flash programming and outputs the code byte during program verification. Port 1: Port 1 is an 8-bit bi directional I/O port on Pins 1-8. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 1 pins. They are pulled high by internal pull-up Resisters and can used as an input. It also receives the low order address bytes during flash programming and verification. In Our case we use it as an input port which collects data from IR receiver output and on doing further operation by a controller gives the output at LED.

20

Port 2:

Port 2 is an 8-bit bi directional I/O port on Pins 21-28. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 2 pins. They are pulled high by internal pull-ups and can used as an input. Port 2 emits the high order address byte during fetches from external program memory and during access to external data. Memory that uses 16 bit address (MOV @ DPTR). Port 3: Port 3 is an 8-bit bi directional I/O port with internal pull ups. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 3 pins. They are pulled high by internal pull-ups and can used as an input. Port 3 also serves the function of various special features of the AT89C51 are listed in table below. Port 3 also receives some control signals for Flash programming and verification.

21

Port Pins

Alternate function

P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7

RXD(Serial Input Port) TXD (Serial Output Port) INT0 (external interrupt0) INT1 (external interrupt1) T0 (timer0 external input) T1 (timer1 external output) WR (external data memory write strobe) RD (external data memory read strobe)

In our project we have use timer at pin 3.4. INTERRUPTS USED: An interrupt is the occurrence of a condition an event that causes a temporary suspension of a program while the condition is serviced by another program. Interrupts play an important role in the design and implementation of microcontroller applications. The program that deals with an interrupts is called an Interrupt Service Routing (ISR) OR INTERRUPT HANDLER. There are five interrupts sources on the AT89C51, two external interrupt two timers interrupt and a serial interrupts. All interrupts disabled by default after system reset and enable individually.

22

8 PIN CONNECTIONS: Pin connections of 89C51 are presented in the following table.

S.No 1 2 4 5 6 7 8

Pin Number 1---4 14 21 20 40 9 18-19

Connection

Function

IR receivers pins Receive the data from receivers 1--4 Servo motor Led GND Vcc Reset circuit Crystal Oscillator Rotate the camera to the desired angle Blinks Reset the microcontroller Gives the required frequency to microcontroller

CHAPTER 3 TRANSMITTER CIRCUIT

OPERATIONS

CHAPTER 4

PROGRAM ALGO TX SIDE

CHAPTER 4
MICROCONTROLLER CODE
TX

TX SIDE
#include <AT89X51.H> unsigned char RecCh; void InitSerial() { SCON = 0x50; //mode 1, 10 bit TMOD = 0x20; //Timer 1 auto reload mode TH1 = 0xfd; //9600 baud rate over 11.0592MHz crystal TH1 = 256 - ((Crystal/384)/Baud Rate) TR1 = 1; //Turn timer1 On EA = 1; //Enable All Interrupts ES = 1; //Enable Serial Port Interrupt }//end void InitSerial() //===================================== serial() interrupt 4 { if(RI) { RecCh = SBUF; RI = 0; TI = 0; SBUF = RecCh+5; } } void main() { InitSerial(); while(1) { //============================================================== ===== }}

TTTVGGAA PROGRAM ALGO RX SIDE

RX SIDE

#include <lcd4bitx51.h> //#include<AT89X51.h> sbit Led = P1^0; #define FRAMESIZE 32 unsigned char SrlDataInCtr; unsigned char SrlDataIn[FRAMESIZE + 1]; void InitSerial() { SCON = 0x52; /* mode 1: 8-bit UART, enable receiver */ TMOD |= 0x20; /* timer 1 mode 2: 8-Bit reload */ TH1 = 0xA0; /* reload value 600 baud */ EA = 1; /* Enable all interupts. */ ES = 1; /* enable serial port interrupt */ TR1 = 1; /* timer 1 run */ } void SerialInt() interrupt 4 { if(RI) { RI = 0; if(SrlDataInCtr < FRAMESIZE) SrlDataIn[SrlDataInCtr ++] = SBUF; } if(TI) { TI = 0; } } void PrintLCDEx(unsigned char String[], unsigned char nCount) { unsigned char i; for(i = 0; i < nCount; i ++) PutCharLCD(String[i]); } void main()

{ unsigned int LedCtr = 0; SrlDataIn[FRAMESIZE] = '\0'; InitLCD_rimsDEV2763 (); PrintLCD(" LCD Controller"); NextLineLCD(); PrintLCD(" Version 1.0."); InitSerial(); while(1) { LedCtr ++; if(LedCtr > 30000) { LedCtr = 0; Led = ~Led; } if(SrlDataInCtr == FRAMESIZE) { LocateLCD(1, 1); PrintLCDEx(SrlDataIn, 16); LocateLCD(2, 1); PrintLCDEx(SrlDataIn + 16, 16); SrlDataInCtr = 0; } } }

You might also like