rs-232 gavalnic isolation

Hi,

I'm trying to use 4N36 opto-couplers to isolate Rx and Tx signal on a RS-232 line. I need only these two signals. Cables are only 3 feet so cable lenght should not be an issue. On each channel, I use two 4N36. I connect both LEDs back to back which are driven through a 1K resistor on one channel side; on the other side, I connect both transistor in a push-pull fashion, positive and negative supply voltages are supplied by RTS/DTR at DTE side and CTS/DSR at DCE side.

This circuitry works up to 19200 baud but barely. I would like to go faster, preferably up to 115K baud....

Is there a way to speed up the transmission? Or I should look for faster opto-couplers!

Joer

Reply to
Joer Breton
Loading thread data ...

Unless you are doing something with the floating NPN transistor bases they will be very slo-o-o-o-ow coming out of saturation.

I'd recommend experimenting with connecting the NPN's cross-coupled with a resistor from the collector of NPN#1 to the base of NPN#2 and vice versa. Pull-ups from each collector, of course.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson
[...]

The totem pole configuration is slow due to Miller effect and lack of a base resistor in the phototransistor.

The following method speeds things up by eliminating the Miller Effect and using a low value of load resistance.

Add a 100k Rbe from the phototransistor base to emitter, and 200 ohm to gnd. Another 200 ohm goes from the emitter to the base of a fast npn. The output signal is taken from the npn collector, connected to VCC through 1k.

(You could also ground the emitter of the phototransistor and connect the collector to VCC through a 200 ohm load. Drive a fast pnp as above.)

Illuminate the diode as needed to gain the desired signal polarity. This should give 2uS response.

The Fairchild 4N36 datasheet shows a 2uS response using Rbe and a 100 ohm load.

See "Figure 20. Switching Time Test Circuit and Waveforms" in

formatting link

Also, Vishay has some fine app notes at

formatting link
See

"More Speed from Optocouplers"

formatting link

"Faster switching from Standard Couplers"

formatting link

"How to Use Optocoupler Normalized Curves"

formatting link

etc.

Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

Found another one that might be helpful:

California Eastern Laboratories Optocoupler Applications

formatting link
Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

As in...

formatting link

Quickly thrown together. I didn't have a 4N36 in my model library so I just tried a 4N25A... but it easily does 200K baud.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

...Jim Thompson I also am working with the 4N36 and happen to be in need of speed.

I tried simulating your circuit, Jim, and found it was quite sensitive to drive level. Too low, and the switching delay increases. Too high, and the risetime suffers. You can look at the base voltages and see why this happens. The speedup caps are a real problem, and it won't work without them.

The drive level range is too narrow. I'm not sure you could guarantee finding two optocouplers that matched well enough to use in this arrangement.

However, there is another simple arrangement that does guarantee fast switching. It tolerates huge variations in drive level and opto CTR, with negligible change in performance. And it uses no speedup caps:) Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

Simulation shows a usable range of about 5,000:1

Decidedly non-critical wrt components. Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

I like the multiple-sourced 6N136 photodiode + transistor type optoisolators for applications that require moderate speed. They're inbetween (in price and performance) the phototransistor type and the high speed logic-output type.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

The Fairchild 6N136 is $0.47/1k and runs 1Mbit/sec:

formatting link

The 6N137 is $0.58/1k and runs at 10Mbit/sec:

formatting link

So for bits per buck, the 6N137 wins.

The 4N36 is now on lifetime buy. But if it's a weekend when the stores are closed, and a 4N36 is the only thing you have, there is a simple way to dramatically speed the response. It allows the system to tolerate huge variation in drive level, supply voltage, CTR, etc. It is remarkably insensitive to component values and should work with any optocoupler that provides access to the base. I don't have time to post it to my web site right now, but would be happy to later if anyone is interested.

Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

Of course Mike, someone is interested. If you ever have time, I would like to see this "mysterious" circuit of yours.

In the mean time, I'm experimenting with simple base-emitter resistor but it reduces to gain of the transistor too much and I got only RS-232 to drive the LED so only +-5mA are available...

Joer

Reply to
Joer Breton

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

This is outstanding! But just one question, how much current do you feed into the LEDs. With RS-232 I can get about 5mA without pushing too much.

Joer

Reply to
Joer Breton

Check out the Jameco price ....

formatting link

Luhan

Reply to
Luhan

As I said... "Quickly thrown together." Not really tested other than as shown.

I've shown you mine.

Show me yours ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

You can use that 4N36 grade but you have to chuck the conventional speed-up nonsense and go with using them in CB photodiode mode driving a transimpedance amplifier. For RS-232 working on +/-12V, ordinary dual JFET types like the LF412 or TL082 are readily available and suitable for the job providing you add some diode clamping negative feedback for something like +/-5V output excursions. This will speed up the response and make the circuit impervious to LED coupling efficiency. If your DCE requires/uses NULL signal level, then all the candidate circuits discussed are problematic. Also, if all you know how to do is use electronics for switches, you are over your head.

Reply to
Fred Bloggs

In that case, I better find opto-couplers with built-in diode detector and amplifiers like 6N137 ;)

Joer

Reply to
Joer Breton

Jim,

This is a very interesting subject and I wish I had time to show the response of all the different configurations I tried.

But as you pointed out, the problem with optocouplers is the high base resistance. This slows the discharge of the base-collector capacitance and allows Miller effect to slow the switching speed.

Various solutions have been proposed, such as adding a 100k base resistance, using two optocouplers in a totem pole configuration or in a cross-coupled latch, etc.

These do not address the basic problem of too much charge in the base junction, and they add new problems of their own, such as sensitivity to drive level, component tolerances, supply voltage, and variations in Charge Transfer Ratio (CTR).

The solution is to minimize the amount of charge injected into the transistor so it is only what is needed and no more. This can be done by adding a clamp transistor to shunt excessive base drive to ground.

The negative feedback speeds the circuit response and makes it highly insensitive to drive level, supply voltage, and component tolerances.

Here's the schematic:

formatting link

G1 and Q1 represent the diode and transistor in the optocoupler. Transistor Q2 is fast so it switches rapidly. Transistor Q3 turns on a bit later than Q3 and clamps any excessive diode current to ground.

Here's the waveforms. Refer to the schematic to see the nodes:

formatting link

I don't have time to show the original optocoupler response, but the difference after adding the clamp is very dramatic. I'll add this to my ozone generator and post the results later.

Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

Your modeling makes me uneasy. Show me the results with a manufacturer's device-level model, rather than behavioral.

But I will agree, storage is a likely culprit. Food for thought.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Hi Joer,

I hope you got my reply to Jim that describes the circuit. The CTR on a

4N36 is around 100%, so 5mA to the LED may give you just enough drive. You can also increase the resistor values in the emitter without affecting the response too much.

Try simulating the circuit in your favorite version of SPICE to get a feel for how sensitive the component values are. You have to make large changes to see any effect.

I found this configuration was a dramatic improvement over the original optocoupler and other variations mentioned here. Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Reply to
Mike Monett

Why not use Analog Devices "i-Couplers" They have a version with 1 TX and 1 RX. Only a single 8 pin SOIC needed. Low power, plenty fast.

regards, DR.

Reply to
Darcy

I just got your reply to Jim with your schematic, Mike. Sorry! So many replies, so little time!!!

I understand you shunt the base as soon as there is enough output drive from the transistor Q1 but... I'm a bit confused here, what is the diode G1? I see none in the 4N36. On the other hand, opto-couplers with diode as detector are already faster.

Joer

Reply to
Joer Breton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.