PC TO PC DATA COMM

48
MINOR PROJECT ON “PC TO PC DATA COMMUNICATION” BACHELOR OF TECHNOLOGY (ELEX. & COMM. ENGG.) UNDER GUIDANCE OF:- SUBMITTED BY:- MR. RAJENDER KUMAR VEENU (B1051) {LECT.IN ECE} DEPARTMENT OF ELEX. & COMM.ENGG. 1

description

useful

Transcript of PC TO PC DATA COMM

Page 1: PC TO PC DATA COMM

MINOR PROJECT

ON

“PC TO PC DATA COMMUNICATION”

BACHELOR OF TECHNOLOGY

(ELEX. & COMM. ENGG.)

UNDER GUIDANCE OF:- SUBMITTED BY:-MR. RAJENDER KUMAR VEENU (B1051) {LECT.IN ECE}

DEPARTMENT OF ELEX. & COMM.ENGG.SCHOOL OF ENGG. & SCIENCES

BPS MAHILA VISHWAVIDYALAYA,KHANPUR KALANSONEPAT

1

Page 2: PC TO PC DATA COMM

CONTENTS

ACKNOWLEDGEMENT

CERTIFICATE

COMPONENTS LIST

COMPONENTS DESCRIPTION

PCB LAYOUT

CIRCUIT DIAGRAMS

WORKING OF CIRCUIT

TESTING

POINTS TO REMEMBER

INSTRUCTIONS FOR SETUP

2

Page 3: PC TO PC DATA COMM

ACKNOWLEDGEMENT

“To the accomplishment of any feat is required a motivation and an

extreme of guidance and knowledge.”

3

Page 4: PC TO PC DATA COMM

Behind the successful completion of our project there are number of

people whom we would like to thank. With immense pleasure and deep sense

of gratitude we would like to express our sincere thanks to “MR. RAJENDER

KUMAR,” for providing us the necessary infrastructure & guidance and for

his resourcefulness which propelled us toward our destiny.

In the end we would like to thanks all the staff members of

“ELECTRONICS & COMM. ENGG. DEPARTMENT OF BPS MAHILA

VISHWAVIDYALAYA, KHANPUR KALAN , SONEPAT”

for their co-operation.

VEENU (ROLL NO. B1051)

4

Page 5: PC TO PC DATA COMM

CERTIFICATE

5

Page 6: PC TO PC DATA COMM

It is certified that “ VEENU ” students of “ELECTRONICS &

COMMUNICATION ENGG.” has completed this project with my

knowledge. All the information provided in the project is under my

supervision. The work on the project “PC TO PC DATA

COMMUNICATION” has been tested and found up to the mark by me.

PROJECT GUIDED BY:-

MR. RAJENDER KUMAR

6

Page 7: PC TO PC DATA COMM

COMPONENTS REQUIRED

SEMI-CONDUCTORS: -

IC1...................................MAX232AIC2...................................NE555 TimerT1....................................BC558 pnp transistorT2....................................BC558 npn transistorD1....................................IN4148 diodeLED1-LED3....................SIMPLE LEDIRLED1, IRLED2...........Infrared Light Emitting Diode

7

Page 8: PC TO PC DATA COMM

RESISTORS

R1, R2.............................47-ohmR3, R4.............................4.7-kilo-ohmR5, R9.............................1-kilo-ohmR6....................................1.2-kilo-ohmR7....................................10-ohmR8....................................330-ohmR10..................................2.2-kilo-ohmR11..................................10-kilo-ohmR12..................................4.7-kilo-ohm

CAPACITORS:

C1-C5..............................1, 25V electrolyticC6....................................470, 25V electrolyticC7, C8.............................0.01, ceramic disk

8

Page 9: PC TO PC DATA COMM

9

Page 10: PC TO PC DATA COMM

RESISTANCE

Resistance is the opposition of a material to the current. It is measured in Ohms (). All conductors represent a certain amount of resistance, since no conductor is 100% efficient. To control the electron flow (current) in a predictable manner, we use resistors. Electronic circuits use calibrated lumped resistance to control the flow of current. Broadly speaking, resistor can be divided into two groups viz. fixed & adjustable (variable) resistors. In fixed resistors, the value is fixed & cannot be varied. In variable resistors, the resistance value can be varied by an adjuster knob.

It can be divided into (a) Carbon composition (b) Wire wound (c) Special type.

The most common type of resistors used in our projects is carbon type. The resistance value is normally indicated by colour bands. Each resistance has four colours, one of the band on either side will be gold or silver, this is called fourth band and indicates the tolerance, others three band will give the value of resistance (see table).

For example if a resistor has the following marking on it say red, violet, gold. Comparing these coloured rings with the colour code, its value is 27000 ohms or 27 kilo ohms and its tolerance is ±5%. Resistor comes in various sizes (Power rating). The bigger, the size, the more power rating of 1/4 watts. The four colour rings on its body tells us the value of resistor value as given in table 1.

10

Page 11: PC TO PC DATA COMM

Colours code

Black---------------------------------------------0Brown--------------------------------------------1Red-----------------------------------------------2Orange-------------------------------------------3Yellow-------------------------------------------4Green--------------------------------------------5Blue----------------------------------------------6Violet--------------------------------------------7Grey----------------------------------------------8White--------------------------------------------9

Table 1

The first ring gives the first digit. The second ring gives the second digit. The third ring indicates the number of zeroes to be placed after the digits. The fourth ring gives tolerance (gold ±5%, silver ± 10%, No colour ± 20%).

11

Page 12: PC TO PC DATA COMM

CAPACITOR

The capacitor’s function is to store electricity, or electrical energy.

The capacitor also functions as a filter, passing alternating current (AC), and

blocking direct current (DC). The capacitor is constructed with two electrode

plates facing each other, but separated by an insulator.

When DC voltage is applied to the capacitor, an electric charge is

stored on each electrode. While the capacitors are charging up, current

flows. The current will stop flowing when the capacitors have fully charged.

When a circuit tester, such as an analog meter set to measure

capacitance, is connected to a 10 microfarad (uF) electrolytic capacitor, a

current will flow, but only for a moment. You can confirm that the meter’s

needle moves off of zero, but returns to zero right away.

(Different types of capacitors)

12

Page 13: PC TO PC DATA COMM

The value of a capacitor (the capacitance), is designated in units called the

Farad (F). The capacitance of a capacitor is generally very small, so units

such as the microfarad, Nano farad, and Pico farad are used.

capacitors

555 INTEGRATED CIRCUIT(TIMER OPERATION)

13

Page 14: PC TO PC DATA COMM

555 Timer IC

The original name was the SE555/NE555 and was called "The IC Time Machine". It is still in wide use, because of low price and good stability. The 555 timer is one of the most popular and versatile integrated circuits ever produced.

It includes 23 transistors, 2 diodes and 16 resistors on a silicon chip installed in an 8-pin mini dual-in-line package (DIP). The 556 is a 14-pin DIP that combines two 555s on a single chip. The 558 is a 16-pin DIP that combines four, slightly modified, 555s on a single chip. Also available are ultra-low power versions of the 555 such as the 7555 and TLC555. The 7555 requires slightly different wiring using fewer external components and less power.

OPERATING MODES

The 555 timer has two basic operational modes:

a) Monostable multivibrator (One Shot)

b) Astable mode of operation.

MONOSTABLE MODE OF OPERATION:

14

Page 15: PC TO PC DATA COMM

In the one-shot mode, the 555 acts like a monostable multivibrator. A

monostable is said to have a single stable state - that is the off state. Whenever it

is triggered by an input pulse, the monostable switches to its temporary state, it

remains in that state for a period of time determined by an RC network. It then

returns to its stable state. In other words, the monostable circuit generates a

single pulse of a fixed time duration each time it received and input trigger

pu l s e . Thus the name one-shot.

555-INTEGRATED CIRCUIT

ASTABLE MODE OF OPERATION:

15

Page 16: PC TO PC DATA COMM

The other basic operational mode of the 555 is as and astable multivibrator.

An astable multivibrator is simply an oscillator. The astable multivibrator

generates a continuous stream of rectangular off-on pulse that switch

between two voltage levels. The frequency of the pulses and their duty cycle

are dependent upon the RC network is the common power rail.

Block diagram of 555 Timer IC

Applications for the 555 chip include precision timing, pulse generation, pulse width modulation, pulse position modulation, sequential timing, and missing pulse detection.

9 VOLTS BATTERY

16

Page 17: PC TO PC DATA COMM

We have used a lead acid battery. This battery is of 9 volts. Power of this battery is used for glowing tube light when the power supply is off. Otherwise, the power supply keeps on charging the battery.

KA78XX/KA78XXA (3-Terminal 1A Positive Voltage Regulator)

Features• Output Current up to 1A• Output Voltages of 5 to 24V• Thermal Overload Protection

17

Page 18: PC TO PC DATA COMM

• Short Circuit Protection• Output Transistor Safe Operating Area Protection

Description:-

The KA7805/KA7805A series of three-terminal positive regulator are available in the different packages and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible.

If adequate heat sinking is provided, they can deliver

over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and current.

INFRARED LED’s

18

Page 19: PC TO PC DATA COMM

Gallium arsenide is a semiconductor with an energy gap of 1.4eV at room temperature. A typical GaAs LED is made by solid-state impurity diffusion with zinc as the p-type impurity diffused into an n-type substrate doped with tin, tellurium or silicon. The external efficiency at room temperature is typically 5 percent.

A GaAs diode can also be fabricated by liquid-phase epitaxy with silicon as both its n and p dopants. If a silicon atom replaces a Ga atom, it provides one additional electron, thus the resulting GaAs in as n-type. If a silicon atom replaces arsenic atoms, an electron is missing and the resulting GaAs is a p-type. In Si doped GaAs diode, the emission peak shifts down to 1.32eV. Since the emission is in infrared region, GaAs light sources are suitable for application such as the optical isolator. The high switching speed, with a recovery time between 2 and 10ns, makes them ideal for data transmission.

The disadvantages of the GaAs emitter are emitted wavelength and the associated attenuation an dispersion. A critical issue of using an LED for the fibre optics is the coupling of light from the semiconductor to the fibre. Because of the larger refractive index of GaAs relative to air, the internal efficiency of LED can be quite low.

PHOTO-DIODES

19

Page 20: PC TO PC DATA COMM

If a conventional silicon diode is connected in the reverse-biased circuit of fig. 1, negligible current will flow through the diode and zero voltage will develop across R . If the diode biasing is now carefully removed so that the diode's semiconductor junction is revealed, and the junction is them exposed to visible light in the same circuit, the diode current will rise,

Fig. 1 Reverse-baised diode circuit.

possibly to as high as 1 mA, producing a significant output across R. Further investigation will show that the diode current (and thus the output voltage) is directly proportional to light intensity, and that the diode is therefore photosensitive.

Fig. 2 shows the standard photodiode symbol. In use, the photodiode is reverse biased and the output voltage is taken from across a series-connected load resistor. This resistor may be connected between the diode and ground, or between the diode and the positive supply.

20

Page 21: PC TO PC DATA COMM

Fig. 2 Photodiode symbol

Photodiodes have a lower light-sensitivity than cadmium-sulphide LDRs, but give a far quicker response to changes in light level. Generally, LDRs are ideal for use in slow acting direct-coupled light-level sensing applications, while photodiodes are ideal for use in fast-acting AC-coupled signalling applications. Typical photodiode applications include IR remote-control circuits, IR beam switches and alarm circuits, and photographic flash slave circuits, etc.

PHOTOTRANSISTORS

Fig. 5 shows the standard symbol of a phototransistor, which can be regarded as a conventional transistor housed in a case that enables its semiconductor junctions to be exposed to external light. The device is normally used with its base open circuit, in either of the configurations shown in fig. 6, and functions as follows.

21

Page 22: PC TO PC DATA COMM

Fig. 5 Phototransistor symbol.

n fig. 6(a), the base-collector junction of the transistor is effectively reverse biased and thus acts as a photodiode. The photo-generated currents of the base-collector junction feed directly into the base of the device, and the normal current-amplifying transistor action causes the output current to appear (in greatly amplified form) as collector current, and in fig. 6(a) R1

causes this current to generate an output voltage as shown.

In practice, the collector and emitter current of the transistor are virtually identical and, since the base is open circuit, the device is not subjected to significant negative feedback. Consequently, the alternative fig. 6(b) circuit, in which R1 is connected to Q1 emitter, gives a virtually identical performance to that of fig. 6(a).

22

Page 23: PC TO PC DATA COMM

Fig. 6 Alternative phototransistor configuration.

The sensitivity of a phototransistor is typically one hundred times greater than that of a photodiode, but is useful maximum operating frequency (a few hundred kilohertz) is proportionally lower than that of a photodiode by using only its base and collector terminals and ignoring the emitter.

RS-232 Standard23

Page 24: PC TO PC DATA COMM

DB-9 Connector Pin Functionalities

A): Signal ground (Pin 5)

This is the logical ground which is used as a point of reference for all signals received or transmitted. This signal is very important and must be present for all communications.

B): Transmitted data (Pin 3)

This line is used to transmit data from the DTE to the DCE. It is maintained at a logical 1 state when nothing is transmitted. The terminal will start to transmit when a logical 1 is present on all of the following lines:

Clear To Send Data Terminal Ready Data Set Ready Data Carrier Detect

This is the serial encoded data sent from a computer to a modem to be transmitted over the telephone line

C): Received data (Pin 2)

This circuit is used to receive data from the DCE to the DTE. The terminal will start to transmit when a logical 1 is present on all of the following lines:

Request To Send Data Terminal Ready Data Set Ready Data Carrier Detect

This is the serial encoded data received by a computer from a modem which has in turn received it over the telephone line.

D): Request To Send (Pin 7)

On this line, the DTE will send a signal when it wants to receive data from the DCE. This is set true by a computer when it wishes to transmit data.

E): Clear To Send (Pin 8)

24

Page 25: PC TO PC DATA COMM

Here the DCE will send a signal when it's ready to receive data from the DTE. (ex. When your local modem connects to an other modem via telephone lines).

F): Data Set Ready (Pin 6)

At a logical level of 1, this line indicates to the DTE that the DCE is ready to send data. (ex. When a modem has established a connection with a remote modem and is in transmission mode). This should be set true by a modem whenever it is powered on. It can be read by the computer to determine that the modem is on line.

G): Data Terminal Ready (Pin 4)

When a logical level 1 is sent from the DTE the DCE can start to send and receive data. When this line passes to logical level 0 the DCE will stop all communications. (ex. A modem would stop all communications and would disconnect from the line, you will often see "DROP DTR" in communication programs).

H): Data Carrier Detect (Pin 1)

On this line the DCE indicates to the DTE that it has established a carrier with a remote device. This is set true by a modem when it detects the data carrier signal on the telephone line..

I): Ring Indicator (Pin 9)

This line is used mostly by communications software when the modem is not in "auto answer" mode and will indicate to the the software that a remote device is calling. This is signal is optional when not using software that will answer a phone call automatically.

___________________________________________________________

MAX 232 IC

25

Page 26: PC TO PC DATA COMM

INTRODUCTION:

Here is a circuit using MAX-232, which needs only a single power supply of 5V for level conversion. Fig. 1 shows the internal functional diagram of MAX232 IC. The communication over the short distance of 2 to 3 meters is established using infrared diodes as shown in Fig. 2. The range could be increased up to hundred meters, using a laser diode module in place of infrared LEDs.

The laser module used is easily available as laser pointer. It is to be used with its three battery cells removed and positive supply terminal soldered to the casing and 0V point to the contact inside the laser module.

Assemble the two prototypes on PCBs or breadboards and connect them to COM-1 (or COM-2) port of each PC. Point the laser beam of one module to fall on the photodiode of the module connected to the other PC, and vice versa. Load PROCOMM or TELIX serial communication software and set the port parameters to 1200 n 8 1 (here, 1200 refers to the baud rate, n stands for parity-none, 8 represents bits per character, and 1 indicates number of stop bits) to establish the communication. File transfer is also possible. The software program for the purpose was written in ‘C’ language.

26

Page 27: PC TO PC DATA COMM

27

Page 28: PC TO PC DATA COMM

Fig.3 : Actual-size, single-sided PCB for the circuit in Fig. 4

28

Page 29: PC TO PC DATA COMM

29

Page 30: PC TO PC DATA COMM

Fig.4 : Circuit diagram for PC-to-PC Data Communication

30

Page 31: PC TO PC DATA COMM

CIRCUIT DESCRIPTION

TRANSMITTER: -

Data signals transmitted through pin 3 of 9-pin RS232 connector to pin 8 of MAX232 and it converts these EIA RS232C compatible levels of +9V to 0/5V TTL levels, as given in Table-1. The output pin 9 of MAX232 IC drives the pnp transistor SK100 and power the IR LEDs. Output pin 9 also drives an LED indicator (LED2) during the positive output at its pin 9. At logic ‘0’ output at pin 9, LED2 goes ‘off’, but drives the pnp transistor through a bias resistor of 1 kilo-ohm (R5), to switch ‘on’ IR LED1 and IR LED2 and also a visible LED3. Since very low drive current is used, use of high-efficiency visible LEDs, which light up at 1 mA, is needed.

RECEIVER: -The IR signals are detected by a photodiode (D1). (A photodiode is reversing biased and breaks down when IR light falls on its junction.) The detected TTL level (0/5V) signals are coupled to pin 10 of MAX232 IC. These TTL levels are converted to +9V levels internally and output at pin 7.A visible LED1 at pin 7 of MAX232 IC indicates that the signals are being received. Pin 7 is also connected to pin 2 (receiver pin) of 9-pin (or pin 3 of 25-pin) ‘D’ connector used for the serial port in the PC, so that the data may

31

TABLE I

TTL +5V to -9V RS 232

TTL 0V to +9V RS 232

RS 232 +9V to 0V TTL

RS 232 –9V to 5V TTL

MAX 232 CONVERSION LEVELS

Page 32: PC TO PC DATA COMM

be read. The optical signals received by the photodiodes are in fact converted to electrical pulses and both PCs ‘think’ that there is a null modem cable connected between them.

32

Page 33: PC TO PC DATA COMM

33

Page 34: PC TO PC DATA COMM

COMPONENTS LAYOUT

Fig.5 : Component layout for the PC

34

Page 35: PC TO PC DATA COMM

TESTING

35

Page 36: PC TO PC DATA COMM

Assemble two transceiver modules and connect each of them, using 3-core cables, to Com-1 ports of the two PCs. Place them 15 to 20 cms apart so that the IR LEDs of each module face the photodiode detector of the other.

Power ‘on’ both the circuits to operate at stabilized 5V DC. You may alternatively use a 7805 regulator IC with a 9V DC source to obtain regulated 5V supply.

Check if the MAX232 IC is working properly by testing pin-2 for 9 to 10V positive supply and pin 6 for –9V supply. MAX232 used 1F, 25V capacitors C1-C5 as a charge pump to internally generate +9V from 5V supply. Generally, defective MAX232 ICs will not show a voltage generation of +9V and –9V at pins 2 and 6, respectively. Replace ICs, if required. With both the PCs and supply to the transceiver modules ‘on’, throw some light with the torch on the photodiode. LED1 should flicker at the burst frequency rate of the transmitter. This proves that the IR signals are being detected by photodiodes and converted into RS232-compatible levels by the MAX232 and output at pin 7 of MAX232 ICs is available for the PC to read the pulses.

To test the transmitter side, disconnect the module from COM-1 (or COM-2) port of the PC, and with the device powered ‘on’, use a short wire and touch it at pin 8 of MAX232 IC. LED2 should turn ‘off’ and IR LEDs and LED 3 should turn ‘on’ if the wiring is correct. IR LEDs would also be glowing, although one cannot see them glowing. Run simple communication software like PROCOM or TELIX and send a few characters from the keyboard through COM-1 port. You should be able to see LED3 flickering for a few seconds, indicating data transmission.

Connect both PCs to the circuits and set the software to chat mode. You should be able to transfer data between the PCs.

36

Page 37: PC TO PC DATA COMM

Depending on the sensitivity setting and power/angle of IR LEDs, increase the distance to about 35 cms (12 inches) and try again for better distances.

For more power, use metal-can type IR LEDs and reduce the value of resistor R7 for more drive current. If you use a laser beam, remove the IR LEDs and the device will track up to 10 metres without any data loss.

POINTS TO REMEMBER

Aligning the laser beam is a problem, but once it is aligned carefully and fixed, the data transmission and reception would be error-free.

Ordinary photodiodes should be used for detector. If you use dark-red plastic diodes, you may have problems, as these react only to very bright natural light or infrared light.

37

Page 38: PC TO PC DATA COMM

INSTRUCTIONS FOR SETUP

In WinXP: -

Go to My computer Properties Hardware Device Manager Open the Port option (Com & LPT) Select the Communication Port (Com1) Properties Port Settings Set Bits Per Second – 1200, Data bits – 8, Parity – None, Stop bits – 1, Flow control – Hardware Press ‘OK’.

38

Page 39: PC TO PC DATA COMM

39