Specifications
CONSTRUCTION
RUPANJANA
PC-TO-PC COMMUNICATION
USING INFRARED/LASER BEAM
K.S. SANKAR
S
erial communication between two
PCs has been covered earlier too
in EFY. However, two separate ICs
(1488 and 1489) were used in those
projects (for TTL to RS-232C and vice-
versa level conversion), using wireless ra-
dio wave technology. This level conversion
required use of three different voltages,
i.e. +12V, -12V and +5V.
Here is a novel circuit using MAXIM
Corporation’s IC MAX232, which needs
only a single power supply of 5V for
level conversion. Fig. 1 shows the in-
ternal functional diagram of MAX232
IC. The communication over the short
distance of 2 to 3 metres is established
using infrared diodes, as shown in Fig. 2.
The range could be increased up to hun-
dred metres, using a laser diode module
in place of infrared LEDs.
The laser module used is easily avail-
able as laser pointer (having about 5 mW
power output). 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 com-
munication software and set the port pa-
rameters to 9600 n 8 1 (here, 9600 refers
to the baud rate, n stands for
parity-none, 8 represents bits per charac-
ter, and 1 indicates number of stop bits) to
establish the communication. File trans-
fer is also possible. The pro-
totype was tested (by the
author) between speeds of
1200 and 9600 bauds, in-
cluding file transfer between
the two PCs. The software
program for the purpose
was written in ‘C’ language.
The source code of the pro-
gram is given on page 49 for
COM-1 port.
Circuit
Transmitter. Data signals
transmitted through pin 3
of 9-pin (or pin 2 of 25-pin)
‘D’ connector of RS232 COM
port are sent to pin 8 of
MAX232 and it converts
these EIA (Electronic In-
dustry Association) RS232C
compatible levels of
+9V to
0/5V TTL levels, as given in
Table I. The output pin 9 of
MAX232 IC drives the pnp
transistor SK100 and pow-
ers the IR LEDs. Output pin 9 also drives
an LED indicator (LED2) during the posi-
tive 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’ IRLED1 and
IRLED2 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. The electrical pulses sent
by the COM port are now converted into
corresponding modulated pulses of IR
light.
Receiver. The IR signals are detected
by a photodiode (D1). (A photodiode is re-
verse biased and breaks down when IR
light falls on its junction.) The detected
TTL level (0/5V) signals are coupled to
pin 10 of MAX 232 IC. These TTL levels
are converted to ±9V levels internally (as
per Table 1) and output at pin 7.
A visible LED1 at pin 7 of MAX232
IC indicates that the signals are being
TABLE I
Max 232 Conversion Levels
TTL +5V to -9V RS 232
TTL 0V to +9V RS 232
RS 232 +9V to 0V TTL
RS 232 -9V to 5V TTL
Fig. 1: Internal functional diagram of IC MAX232
PARTS LIST
Semiconductors:
IC1 - MAX232A +5V powered
multichannel RS232
driver/receiver
IC2 - NE555 timer
IC3 - IR RXR module; Siemens
SFH-506-38 or Telefunken
TS0P-1838
T1 - BC547 npn transistor
T2 - BC548 npn transistor
D1 - 1N4148 diode
LED1-LED3 - Red LED
IRLED1,
IRLED2 - Infrared light emitting
diode
Resistors (all ¼-watt, ±5% carbon, unless
stated otherwise):
R1,R2 - 47-ohm
R3,R4 - 4.7-kilo-ohm
R5,R9 - 1-kilo-ohm
R6 - 1.2-kilo-ohm
R7 - 10-ohm
R8 - 330-ohm
R10 - 2.2-kilo-ohm
R11 - 10-kilo-ohm
VR1 - 4.7-kilo-ohm preset
Capacitors:
C1-C5 - 1µ, 25V electrolytic
C6 - 470µ, 25V electrolytic
C7,C8 - 0.01µ ceramic disk
Miscellaneous:
- 9/25-pin ‘D’ connector
(male/female)
Note: Parts List pertains to circuit in Fig. 3.
175