Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I am looking into a implementing a low-cost RS-232/422 opto-coupled receive circuit. The aim is surge protection and tolerance to DC offsets.

The challenge is that the inputs should be completely floating and work over a wide temperature range, say -40°C to 85°C. Speed up to 4800 baud. Logic null input 1.6V - 25V.

I considered simply chaining a 5kOhm with the diode input but the resulting forward current is too small to produce a useful current transfer ration with inexpensive opto-couplers. (Especially at high temperatures.)

How does this solution look to everybody? Am I overlooking something?

schematic

simulate this circuit – Schematic created using CircuitLab

My understanding is that this should cut in abruptly at (Vin1-Vin2)=Vf of the optocoupler with a rise and fall time of about 10µs and be fairly tolerant to CTS degradation and voltage surges on the Vin side. - Is this right?

Is it likely to be a problem, that the input impedance is 10kOhm at high input voltages rather than the standard 5kOhm?


Edit 1

schematic

simulate this circuit

share|improve this question
    
Can you clarify exactly how bomb-proof this needs to be? There are some pretty robust RS485/422/232 transceiver IC's out there as RS485 and 422 get used extensively in industry where transients and stray voltages (and lightning strikes) are quite common. –  John U Aug 11 at 8:22
    
@JohnU To be honest I don't quite know what protection limit is required. I need to think hard on this for a while. I thought I could avoid doing so by just going for optical isolation but even at 4800 baud this seems non-trivial... –  ARF Aug 11 at 13:55
    
Unless you have some very funky/extreme use case I'd put money on being able to find standard driver IC's which will stand up OK. Opto-isolating comms like this can be done (my boss designed a board that did exactly that for 485 + analogue video) but it's not trivial and you've got to really need to do it. TBH if you need this doing, there are probably bigger issues at hand that you need to understand. Or if you get stuck you could probably licence the design my boss did ;) –  John U Aug 11 at 15:36

2 Answers 2

A 4800 baud rate is probably not achievable with this circuit- the Tf is typically 100usec and Toff is approaching 200usec.

http://www.chaoyi1688.com/UploadFiles/FCK/20110921140322_fgdgdt.pdf

Maybe if you terminate it into a resistor of a few hundred ohms and use a comparator..

share|improve this answer
    
I thought that with the R_L=R3=500ohm, the switching speed would be of the order of 1µs which is about 1/10 of the 4800 baud period length. –  ARF Aug 10 at 17:58
    
Regarding the suggestion of a comparator: will this satisfy my requirement of a floating input? What happens is the DC offset of the inputs exceeds Vcc of the comparator? –  ARF Aug 10 at 18:08
    
In my first comment I meant to type "switching speed of the oder of 10µs". Sorry for the accumulation of comments. –  ARF Aug 10 at 18:20
    
I think you'll find the switching speed will be similar to that with a 10K load. –  Spehro Pefhany Aug 10 at 18:55

Regardless of speed considerations, the circuit will not work for RS422. RS422 input levels can be as small as +/- 200 mV, and this will not even tickle your optocoupler.

For RS232, the minimum allowable input voltage range is +/- 3V. At 3 volts in, assuming an optocoupler Vf of 1.2 volts the diode current will be 120 uA. This is far outside any reasonable extrapolations of the data sheet, but such low current levels will almost certainly cause very slow operation. This represents worst-case operation, at -55 C. At higher temperatures the Vf decreases and the input current goes up, but a typical 25C curve gives a Vf of 1 volt, with a current of 200 uA, which isn't a game-changing improvement.

At these low currents CTR is very low, in the range of 10% worst case, although like I say this is an off-the-charts extrapolation.

If you want to try to make this thing work, the first thing to do is get rid of R2 and replace D1 with a simple signal diode such as a 1N4148. The forward drop of the photodiode clamps the input voltage to a much lower voltage than the zener level. Even a 25 volt input will only draw 5 mA, which is less than 1/10 of what the optocoupler can happily handle, and about .5% of the 1 usec pulse limit. Doing this will get your worst-case input current up to about 360 uA, and it still won't get near the speed you want. Note that the timing curve in Spehro's answer is operating at 10 mA, so anything you do with the levels your circuit will operate will be a good deal slower.

I suggest you look into a cascode configuration. Given the lack of transistor specifications in the data sheet I cannot even try to suggest circuit values or estimated response times.

share|improve this answer
    
Thanks for the explanation. I looked into the cascode configuration, however, I don't quite see how this will help. Assuming an input signal with an unknown, possibly "large" DC offset, e.g. between 12V and 15V (or also -12V to -15V) and a target output signal between 0V and 5V, I don't see how to implement a cascode configuration that will work without knowing the DC offset at design time. –  ARF Aug 10 at 22:29
    
RS232 doesn't care about offset - it only cares about zero crossing. I suspect that the offset you're talking about is common-mode voltage, and that is dealt with (that is, ignored) by the input isolation of the optocoupler. If the offset really is on the signal with respect to the optocoupler v2, you have a pathological situation and something is really wrong. In that pathological case, you'd want to put a capacitor on the input and filter out the DC. –  WhatRoughBeast Aug 10 at 23:02
    
Ok, I was truely confused. I did not realise the opto-coupler was still in the picture. Did you think of something like the schematic in my edited question? I still don't see how this could help im principle (ignoring numbers for the moment...). –  ARF Aug 10 at 23:30
    
Looking at the edited schematic, it won't work. In that configuration the collector current is essentially equal to the emitter current, in this case less than 1 mA. So the change in output voltage will be less than .5 volts. –  WhatRoughBeast Aug 10 at 23:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.