Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 28

2009

MOHAMMAD ALI FINAL YEAR PROJECT REPORT


JINNAH
UNIVERSITY

MOHAMMAD ALI JINNAH UNIVERSITY ISLAMABAD

Hardware Implementation of CDMA Based


Transmitter and Receiver
GROUP MEMBERS:

Muhammad Ikram Sarwar EE053050

Asim iqbal BT043002

Saqib Rehman EE053066

PROJECT SUPERVISOR:

Dr.NOOR KHAN

1
Acknowledgement
First of all we are thankful to Almighty Allah who gave us opportunity to study
and courage to complete our project. We would like to thank our project
supervisor Sir Dr Noor Khan for his constant guidance, enthusiasm and
support throughout this project. We are also thankful to our parents who
prayed for us, and without their support and prayers we would be unable to
complete our project.

2
DECLARATION

We declare that this is our own work and has not been submitted in any form
for another degree or diploma at any university or other institution for
tertiary education. We have given the reference for the data we took from
other books and from the internet.

Muhammad Ikram Sarwar Asim Iqbal


Saqib Rehman
EE053050 BT043002
EE053066

3
CERTIFICATE OF APPROVAL

This is to certify that the project presented entitled “Hardware Implementation Of CDMA
based transmitter and receiver” was conducted by Mr. Muhammad Ikram Sarwar, Mr.
Asim Iqbal and Mr. Saqib Rehman under the supervision of Dr. Noor Khan.

Dr. Noor Khan Dr.Fazul-ur-Rehman

Project Advisor, Head of Department,

Dept. of Electronic Engineering, Electronic Engineering,

Faculty of Engineering and Applied Sciences. Faculty of Engineering and Applied Sciences.

4
ABSTRACT

Code division multiple access (CDMA) is the technique being most


seriously considered for third generation wireless system. Code Division
Multiple Access is a method for transmitting simultaneous digital signals
over a shared portion of the spectrum. The CDMA technology can be
implemented by spreading the spectrum which can be done in the following
two ways

 Direct Sequence Spread Spectrum - DSSS


CDMA

 Frequency Hopping - FH CDMA

We are using DS CDMA in our project.

5
TABLE OF CONTENT
Chapter 1
08

1.1 Overview
08

1.2Purpose of Project
08

1.3Expected Outcomes
08

1.4Applications
08

1.5Organization of report
08

Chapter 2
10

2.1 Overview
10

2.2 System model


10

2.2.1 Hardware used


11

2.2.2 PN code
13

2.2.3Serial port interface


13

2.2.4 Working of serial port


14

6
2.2.5 Modulation
16

2.2.5.1 FSK modulation


17

2.2.5.2 FSK demodulation


17

2.2.6 MAX 232 circuit


17

2.2.7Basic of antennas
18

2.2.7.1 Antennas
18

Chapter 3
19

3.1 Overview
19

3.2 Patch Antenna Design


19

3.3 Amplifier
20

Chapter 4
21

4.1 Overview
21

4.2 Results and Recommendation


21

References
21

Appendix
22

7
CHAPTER 1

INTRODUCTION

1.1 Overview
In this project we have one transmitter and two receivers. The transmitter
will send voice and text over the same frequency using DS CDMA
technique while one receiver will receive text and other receiver will receive
voice on the basis of PN code. The aim of this project is learning the
concepts and techniques used in wireless communication.

1.2 Purpose of Project

8
The purpose of the project is to implement technique used in wireless
communication which is CDMA.This technology can be implemented using
DS CDMA or FH CDMA however we are using DS CDMA technique in
our project.

1.3 Expected Outcomes


We will transmit voice and text from the one transmitter; we have two
receivers and one receiver will receive text while the other will receive voice
on the basis of PN code using DS CDMA technique.

1.4 Applications
DS CDMA has many applications for example it is used for security purpose
because it is difficult to interrupt and jam. It has high bandwidth and
multiple signals can be transmitted at the same frequency.

1.5 Organization of Report


In the upcoming chapter we have organized our report; in such a way that
chapter 2 contains the description of the project.

In chapter 3 we have shown a brief and descriptive knowledge about


designing and analysis of the hardware we used, i.e. why we chose the patch
antenna and how its designing occurs, then its analysis. Further in later
section of the chapter we have shown the different parts/hardware working
and implementation on the Vero board.

In chapter 4 we have given the result and some recommendation about the
project, so that one can easily understand the calculated and measured value.
The results are also discussed in a theory form to have a clear understanding
of the end result. Then at the end of the project appendix is given, in which
datasheet of various Integrated Circuits and their functionality are described
to have crystal clear understanding of the project. One can easily understand
the working and implementation of the electronic parts.

9
CHAPTER 2

SYSTEM MODEL

2.1 Overview

As already mentioned that we have one transmitter and two receivers from
the transmitter we will transmit voice and text signal. One receiver will
receive voice signal and other receiver will receive text. As there are number

10
of techniques used for the digital transmission namely PSK,FSK,QPSK,but
the most useful and easy to analyze in undergrad level is the FSK .In DS
CDMA PN code are used and we have generated the PN code using
microcontroller 89C51 in our project. A hyper-terminal is linked to the
transmitting elements in order to transmit and to receiver. Then we will
show how data was transmitted using FSK modulation scheme, and how the
data was demodulated on the receiver side. We are using patch antennas to
transmit signal.

2.2 System model

Our model of the project consists of one transmitter and two receivers.
Transmitter side consists of DB9. MAX 232, FSK Modulator ic XR2206,
PN code generator using microcontroller 89C51, Analog to digital converter
The block diagram of our project is shown below:-

11
S

DB9

VOIC
E Max23 89C5
2
XOR
1

PN
CODE

XR2 AMPLIFIE
ADDER
206 R

A2D
MIC CONVERTO XOR
R

PN
CODE

Figure-2.1

The brief description of above model is as follows:-

2.2.1 Hardware used

We have done our project on Vero board on which we have designed our
transmitter while our receiver is also on Vero board.

Further major elements which we used in our project are listed as below:-

• Serial port cable DB-9.

12
• PN code using micro controller

• FSK Integrated circuit XR-2206.

• Analog to digital converter

• Exclusive or gate

• FSK demodulator Integrated circuit XR-2211.

• MAX-232 Integrated circuit for serial port interface.

• Patch antennas.

In the next section we have explained the each hardware in detail so


to have a clear understanding how the above mentioned hardware is
used and how it is configure so that we were able to transmit and
receive signal on the basis of PN code using DS CDMA.

Demodu ADC XOR signal


lator

PN
CODE

Figure- 2.2

Demodu ADC XOR signal


lator

PN
CODE

Figure- 2.3
13
2.2.2 PN CODE

In DS CDMA technique different PN codes are used to transmit and receive


the signal. We Exclusive OR the signal with the PN code and the same PN
code is used on the receiver side to receive the signal. There are different
types of PN codes however we are using maximal sequence or m sequence
code. To generate the code we are using 89C51 microcontroller and we have
programmed it in assembly language [1].We have generated two code for
transmitter side and two code for receiver side. The transmitter and receiver
code should match for proper functioning.

2.2.3 Serial Port Interface

With the text signal serial ports is used to communicate between the
computer and the other hardware. The Integrated circuit IC which we are
using in this project is RS-232 with MAX-232 .RS-232 is a standard and
used for serial communications and used in many data acquisition systems.
And also it is the mostly commonly used serial communication and it is the
only way to support the communication to only one device connected to the
bus at a time and it only supports transmission distances up to 50 feet. It has
9 pin connectors that relay information, incoming or outgoing, one byte at a
time. Each byte is broken up into a series of eight bits, hence the term serial
port.

Serial ports are one of the oldest types of interface standards. Before internal
modems became common place, external modems were connected to
14
computers via serial ports, also known as communication or "COM" ports
[2]. Computer mouse and even keyboards also used serial ports.DB-9-pin
connector is mostly used. So there are DB-9 and DB-25 cables available.
Serial ports differ from 25-pin parallel ports in that the parallel ports
transmit one byte at a time by using eight parallel wires that each carry one
bit. With data traveling in parallel, the transfer rate was greater. A parallel
port could support rates up to 100 kilobytes per second, while serial ports
only supported 115kbps.

At the consumer level, the USB interface has effectively replaced the serial
port. “Many manufacturers of personal computers and laptops consider
serial to be a legacy port and no longer include the serial interface. USB to
serial adapters are available to use with USB-only systems”[3]

2.2.4 Working of serial port

Devices which use serial cables for their communication are split into two
categories. These are Data Communications Equipment

Data Communications Equipment is a device such as your modem, TA


adapter, plotter etc while Data Terminal Equipment is Computer or
Terminal.

The electrical specifications of the serial port are contained in the


Electronics Industry Association RS-232C standard. It states many
parameters such as:–

The A space logic 0 is between the +3 and +25 volts and while the A
mark logic 1 will be between the -3 and -25 Volts and the while the
region of +3 and -3 is undefined and because it is not unknown. And the
open circuit voltage should never exceed 25 volts and it is the maximum
voltage and should not exceed then that and while the short circuit
current should not exceed 500 mA and while the driver should handle
this without any damage.

15
In the RS-232 standard and it specifies a maximum baud rate of 20 Kbps
which is rather slow by today's standards because now a days the baud
rate is increased. A new standard, RS-232D has been recently released.
The shape of the DB-9 pin connector is shown below.

Figure 2.4 DB-9 serial port

Although all the pins have their own perspectives, but for the operation to know
that what pin actually do is given is full detail in the table 2.1 which is on the
next page.

D-Type-9 Pin No. Abbreviation Full Name

Pin 3 TXD Transmit Data

Pin 2 RXD Receive Data

Pin 7 RTS Request To Send

Pin 8 CTS Clear To Send

Pin 6 DSR Data Set Ready

Pin 5 GND Signal Ground

Pin 1 CD Carrier Detect

Pin 4 DTR Data Terminal Ready

Pin 9 RI Ring Indicator

Table 2.1 FUNCTIONING OF DB-9 PINS


16
In DB-9 configuration, there are three pins of our interest are listed below:

Pin 2- RD: RECIEVER DATA.

Pin 3-TD: TRANSMIT DATA.

Pin 5- SG: SIGNAL OR SYSTEM GROUND.

Using the null modem cable the PC is interfaced with the transceiver circuit as the
pc has male connector so the female connector was used on the both ends of the
wire. Only three pins of the null modem cable were used one to transmit, other to
receive and one for the ground.

2.2.5 MODULATION

We are using FSK modulation to transmit the signal at the transmitter side and we
are using XR2206 modulator IC for this purpose. The modulation is we used is for
to encode the signal and to produce the next signal and the properties are matched
to the characteristic of the medium or the path and the path with which the signal is
transmitted is called modulation. [4].There are many different modulation
techniques which we are using and there are analog and as well as digital
modulation. In digital modulation an analog carries signal is modulated by a digital
bit stream and when it is modulated and digital bit stream technique is used for this
purpose. In digital modulation method we are doing digital to analog conversion
and in the demodulation we are doing analog to digital conversion..

In digital signals sometime distortion occurs due to high frequency component and
it is easily attenuated when the transmission distance is higher and when the
transmission distance is smaller and then attenuation doesn’t occurs usually. And if
we want to improve the digital modulation and we are using Frequency Shift
Keying (FSK).

Mainly there are three common and widely used methods for digital transmission
which are given as below:
17
 Amplitude modulation which leads to Amplitude Shift Keying
(ASK)
 Phase modulation which leads to Phase Shift Keying (PSK)
 Frequency modulation which leads to Frequency Shift Keying
(FSK)
Digital information can be transmitted by when we modulate the frequency of the
carrier and when the frequency of the carrier is modulated and then it will be
transmitted. In binary signal we are using two frequency which are f1 and f2 and
we are using to the transmit the information by using the two frequency[5]
While in the demodulation side 0 and 1 are generated for the two different
frequencies. The more detail of the FSK modulator and Demodulator is explained
in the next section.

2.2.5.1 FSK MODULATION

In FSK modulation, two frequencies are shifted and varied against the input signal
and the in this the signal changes because the carries come in the signal. One
frequency say for f1 corresponds to digital input high and say for other frequency
f2 corresponds to digital input low. Also the FSK modulator is used to convert the
digital signal into the analog signal having two different frequencies corresponding
to the input signal levels.

In our project we have used the FSK modulation scheme for the digital
transmission of the data and which transmit the signal through antenna and we have
to remember one thing which is that antenna is an analog transmission. The digital
data is to ensure that we able to know that transmission occurs and which was
confirm by hyper terminal point.

FSK modulator can be implemented by using LM566 but the limit of the frequency
is in hertz and for out project we are using XR2206 and while the limit of this IC is
in mega hertz and so that we are using high frequency modulation .To knows the
detail expression and diagram of the Integrated Circuit see appendix.
18
2.2.5.2 FSK DEMODULATION

As in the previous section it is mentioned that the digital signal is converted into
FSK signal by FSK modulator for long distance communication. At the receiver
side an FSK DEMODULATOR is required to recover the original signal from the
received FSK signal and it removes the carries from the modulated signal and then
we get the original signal.

For the FSK Demodulator we can also choose the circuitry of LM-565 but same the
problem with the frequency so we used an easily available and affordable
Integrated Circuit named as XR-2211.The detail expression and diagram for the
circuit which we use in our project can be seen in appendix.

2.2.6 MAX-232 Integrated circuit for serial port interface

Computers can communicate with other devices through its serial and parallel port.
And so knowledge about them and voltage conversion should be required. It is
basically use for level conversion. The Integrated circuit actually converts signals
from serial port (RS-232) into levels which are compatible to digital logic circuits.
The Max-232 typically converts the RX,TX,CTS,and RTS signals.[6].The basic
configuration of the Max-232 is shown in the following diagram.

Figure-2.5

19
2.2.7 Basic of antennas

An antenna is a device that transmits and/or receives electromagnetic waves.


Electromagnetic waves are often referred to as radio waves.

2.2.7.1 Antennas

Antennas are widely used in the communication field. As the world of antenna
progress different types of antenna come into being with some different and
complex properties or characteristics. Antennas are the most important part of the
communication field if one talking about communication especially wireless
communication without antenna has jobless meaning.

There are number of antennas and decide what type of antenna is to be used is
selected by its characteristic. In our project our main concern is to transmit the
signal in the line of sight so we require directive antenna so that’s why we are using
directional antennas which is patch antenna

Since all the types mentioned above are different from each other regarding their
characteristic perspective i.e. some of them are omni directional and some are
directional. While the patch antenna is highly directive antenna from above
mentioned types. Further a patch antenna can be divided into different types
regarding its shape i.e. rectangular patch, square patch, circular patch, triangular
patch.

In our project me make use of patch antenna because they are highly directive
antenna and the type which we used is a square patch and we will explain it in the
next chapter.

20
CHAPTER 3
ANALYSIS AND DESIGN
3.1 OVERVIEW
Some of the hardware used in our project required designing and specification as
there are different electronic components can be used differently as per required
use. So in this chapter we have explained in brief the analysis and design of the
different types of the model which we have used in our project. The hardware as we
mentioned in chapter 2 will now be explained in detail. For example the designing
of the antenna (patch antenna), the power amplifiers and its configuration, the
designing of monopole antenna is now explained in the following chapter’s section.

21
So that we have a clear understanding about the antennas and different electronic
components.

3.2 PATCH ANTENNAS DESIGN


As discussed in chapter 2 that antennas are the most important part of the
communication field. There are different types of antennas having different
characteristic and one using the antenna type is a difficult part to select what type
should be used. As all the types exhibits some major and common characteristic
like directivity, radiation pattern etc but the directivity and radiation pattern are
different for different antennas.

In our project we have used the Patch Antenna to transmit and receive DS CDMA
signal. The Patch antennas are the highly directive antennas and required a great
attention while designing them. Different parameters such as width, length, height
of substrate (as patch antenna requires a substrate), value of dielectric constant.

There are many shapes of the patch antenna such as square, rectangular, elliptical,
triangular etc.In our project we are using the “Square shape patch”, whose complete
designing is shown below, the formulation which we used for the designing are as
below:-[7]

The length L of the patch usually taken as

.3333λo < L < 0.5λo …………………………(3.1)

Where

λo = walength of free space

We have calculated the patch length at the given frequency i.e. 1200MHz .

The value of dielectric constant is taken after several experiments εr = 4.35.

λ = C/F

λ = 3*10^8/1200*10^6

λ=0.25

L= λ/4

L=0.25/4

L=0.0625

As we are using square patch antenna so the length and width are same.
22
3.3 Amplifier
To boost the signal we are using NPN transister.The Bipolar Junction Transistor
(BJT) is an extremely common electronic device to all forms of electronic circuits.
It can be used for a number of useful applications such as an amplifier, a switch, a
buffer, an oscillator, a nonlinear circuit – so forth.

The basic diagram of the BJT is shown below:

Collector

Base

Emitter

Figure 3.1

BJT’s and all types of the transistors are made up of p and n types of
semiconductors materials. The combination of p-type and n-type semiconductors
give rise to two combinations i.e. n-p-n and p-n-p. As in our project we are using
the n-p-n transistors whose complete specification is given in the appendix

CHAPTER 4
RESULTS
4.1 Overview
In this chapter we have concluded the results.

4.2 Results and Recommendations


After implementing the proposed model of the project certain results are
obtained. Data is transmitted successfully at the baud rate of 2400 using MAX232
23
integrated circuit. Frequency on which project is being operated is 1200 MHz.
Further patch antennas were designed on the basis of this frequency using Fr-4.

REFERENCES
[1] Satellite Communication Edition by Dennis Roddy Third

[2] http://www.answer.com/topic/serialport

[3] http://www.answer.com/topic/seiralportinterfacing

[4] http://www.answer.com/topic/modulation/fsk modulation

[5] http://www.answer.com/topic/modulation/fsk modulation

[6] http://en.wikipedia.org/wiki/MAX232,accessed

[7] Antenna Theory: Analysis and Design, Third Edition, by Constantine


A.Balanis.

Appendix

MAX-232
IC DESCRIPTION

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator


to supply TIA/EIA-232F voltage levels from a single 5-V supply. Each receiver
24
converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a
typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept ±30-V
inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels.
The driver, receiver, and voltage-generator functions are available as cells in the
Texas Instruments LinASIC library.

 Meets or Exceeds TIA/EIA-232-F and ITU


 Recommendation V.28
 Operates From a Single 5-V Power Supply
 With 1.0-_F Charge-Pump Capacitors
 Operates Up To 120 kbit/s
 Two Drivers and Two Receivers
 ±30-V Input Levels
 Low Supply Current . . . 8 mA Typical
 ESD Protection Exceeds JESD 22
 -2000-V Human-Body Model (A114-A)
 Upgrade With Improved ESD (15-kV HBM) and 0.1-_F Charge-Pump
Capacitors is Available With the MAX202
 Applications
 TIA/EIA-232-F, Battery-Powered Systems,
 Terminals, Modems, and Computers

Figure-3

LM386
Low Voltage Audio Power Amplifier
General Description
The LM386 is a power amplifier designed for use in low voltage
consumer applications. The gain is internally set to 20 to keep
external part count low, but the addition of an external resistor and

25
capacitor between pins 1 and 8 will increase the gain to any value
from 20 to 200.
The inputs are ground referenced while the output automatically
biases to one-half the supply voltage. The quiescent power drain is
only 24 milliwatts when operating from a 6 volt supply, making the
LM386 ideal for battery operation.
Features
 Battery operation
 Minimum external parts
 Wide supply voltage range: 4V–12V or 5V–18V
 Low quiescent current drain: 4mA
 Voltage gains from 20 to 200
 Ground referenced input
 Self-centering output quiescent voltage
 Low distortion: 0.2% (AV = 20, VS = 6V, RL = 8Ω , PO =
 125mW, f = 1kHz)
 Available in 8 pin MSOP package
Applications
 AM-FM radio amplifiers
 Portable tape player amplifiers
 Intercoms
 TV sound systems
 Line drivers
 Ultrasonic drivers
 Small servo drivers
 Power converters

XR-2206
SYSTEM DESCRIPTION

The XR-2206 is comprised of four functional blocks; a) and sine-shaper; a unity


gain buffer amplifier; and a set of current switches. The VCO produces an output
frequency proportional to an input current, which is set by a resistor from the
timing terminals to ground. With two timing pins, two discrete output frequencies
can be independently produced for FSK generation applications by using the FSK

26
input control pin. This input controls the current switches which select one of the
timing resistor currents, and routes it to the VCO.

Figure.1

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. 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
27
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. The XR-2211 is available in 14
pin packages specified for military and industrial temperature ranges.

Figure-2

28

You might also like