A complete RS232 protection with many optocouplers


CONTENTS


WHY`?

If you ever lost an onboard RS232 while testing some "apparently harmless" serial device... you may figure out how much anger and grief an interface protection could have saved...!

HOW`?

Optocouplers! They provide a groundfree signal transmission with convenient electrical and RF-properties.
DC-separation goes up to several kilovolts and in general optocouplers have a pretty small cross-capacity which is beneficial for coupling some sensible and/or dangerous high-frequency devices to each other.

It has to be considered, that the PC's interfaces usually are no way robust at all. That's why reasonable people refrain from using the onboard parallel, serial or USB ports for experimentation! Otherwise you will loose one of your ports or maybe the whole precious mainboard some sunny day, regardless of how much precautions have been taken against electric discharges and such unpleasant things... (This may be referred to as "McMurphy's Laws on standard interfaces"...)

Protection and de-grounding a serial port would be a minor task as long as the so-called "software protocol" is used; it requires only two signal lines (RxD and TxD) to communicate with the external serial device. Just to mention, that simple variant usually consists of two optocouplers and some cheap workaround to re-generate signals with some MAX232. It can be purchased off the shelf for funny pay. Surely these devices were appreciable for some software-handshaked interfaces to be protected - but in fact it is not a universal solution!

Still there are applications that strictly require all the other interface lines as well! Even a simple data transmission performed with the normal "hardware-protocol", for instance, additionally requires RTS and CTS for performing the handshake.
There are many amateur projects that make use of further interface lines as well, since the status lines are quite easy to program for "non-standard protocols" and they provide a convenient way of feeding smaller circuits with some mW of power directly from the serial port. Besides, every serial mouse is operated that way.

Thus, a wholeout RS232-protector includes all these 8 interface lines available at a standard RS232 port. To preserve a good compatibility, the electrical properties must comply with RS232 standardizations. This is, basically, logical voltages of about +/- 12 V, a limitation on output and input currents to 10 mA.

That's exactly what my circuit was designed for: All interface lines transmit via optocouplers.
Signal voltages and delay, rising times and currents comply with RS232 / EIA232 specifications.
The protector could be inserted to any serial communications link to bypass groundloop and RF conflicts. It also provides highest safety for the PC's hardware while experimentation and testing.
 


Fig.1 :
Male SUB-D-connector on a standard RS232 terminal (usually featured by a PC or terminal controller). Data direction seen from the computer's perspective: 
For a complete protection there are not less than 3 output and 5 input lines to be broadcasted in a secure way - preferably by optocouplers. 


CIRCUIT


How to optocouple RS232 lines in a compatible way
Fig.2 Simplified circuit plan with just one channel at each direction.
Note:
Signal Ground has to be connected to GND resp. GND' on each side


ADDITIONAL MATERIAL

Here you can download the layout (200dpi) and site plan.
 
 

COMPONENTS

C1,C2,C3,C4470 µF / 16 V (radial)
R1...R24470 Ohms / 0.25 W (5%)
D1...D41N4002 or equiv.
IC1,IC2,IC5ILQ74 (quad optocoupler) = CNY74-4 
IC3, IC4ILD74 (double optocoupler) = CNY74-2
Mains Transformer 
2 x ERA Type EE 20/10 "mini" 
primary 230 VAC (Europe),
secondary 1 x 12V, 0.5 W
PCB 100 x 160 (see layout)
IC-Sockets2xDIL8, 3xDIL16
D-SUB connectorsone male, one female with flatcable attached
Other(see picture!)

 

PICTURE

Full functional prototypeFig.3:
The RS232' complete protection

REMARKS

Simple but strong. Tested successfully even with a 56.600 bps modem, in a 115.200 bps laplink and with several non-standard-modes either. Contact me for credits, donations or further questions on that fine project...

LINKS

Whole lotta information on RS232, its specification and terms - ask Google for RS232

http://www.beyondlogic.org/serial/serial.htm

In defense on RS232...

Datasheets to CNY74-optocouplers (PDF)

The project was first published in FUNKAMATEUR 11/2002

Top

Index


first published 11/2002 - revision on this document 01/2004