optoisolate signal

I wish to isolate an incoming signal from my 3.3v tolerant microprocessor. The parameters for the circuit are:

*Signal voltage 5V to 48V DC. (I don't know where in this range, as it's up to the manufacturer of the signaling device) *Microprocessor is 3.3V tolerant CMOS. *I'd like circuit to be as simple as possible. *I'd like circuit to be as small as possible.

I've been trying to do this and have had some success using a zener diode to limit the incoming signal to the optoisolator to 3.3 Volts. Unfortunately, as the voltage is unknown ahead of time, the zener resistor value must be small to provide a full 10 mA to the optoisolator (NTE 3040, same as 4N27) at the low end of the voltage scale. This, of course, can make the Pz pretty high at higher voltages.

For example: A 3.3 V Zener Diode needs a resistor of 170 ohms for a signal of 5 volts to provide 10 mA to the optoisolator, having a Pz of

33 mW. The same circuit, when given a 48 volt signal will have a Pz of about 12 watts. This seems high.

I'd really like some guidance on this topic. If there's another optoisolator, technology, or approach I should use, please let me know.

-Ken

PS: Excuse me for the overly explained problem. I'm very new to this and am figuring it out as I go.

Reply to
KBB
Loading thread data ...

--
Two things:

What kind of speed are you talking about, and when you say
"isolated", do you mean that you want no galvanic connection between
the source and the µP, or do you mean that you just need to get that
5-48 volt range down to 3.3V?
Reply to
John Fields

You're right, a basic resistor-zener combo is going to be straining to do what you want.

A simple current-limiting diode would do the trick. But they're a bit hard to find.

Or if you want off-the-shelfd parts, a simple FET and one resistor will do it, or a transistor, two resistors and one diode will make a dandy constant-current source.

Oh, and, do you really need the full 10mA? If you're driving CMOS at a reasonable speed, one milliamp will be much more than plenty. That will help cut down the power dissipation at high input voltages.

Reply to
Ancient_Hacker

This is where you went wrong.

The opto-isolator needs about 10mA through the light-emitting diode to turn it on - you can work with less if you want to.

For a 4N27, that is usually done by connecting a resistor from the signal source to pin 1 of the device, while returning pin 2 to 0V. The forwad drop across the LED is 1.18V typical, 1.5V max, and you need to choose your resistor to give you 10mA into the LED from your signal source - anything from 200R for a 3.3V source to 4k7 for a 48V source.

If you want a universal input, you can do it by using the opto-isolator LED as the reference voltage source for a 10mA NPN constant current generator (62R) feeding a PNP current mirror - perfectionists might go for a Wilson curent mirror - which would deliver 10mA back through your LED, independent of supply voltage (within the limits of the transistors' voltage ratings and heat disipation capacities).

formatting link

Such a current mirror might be slow to turn on, and you might put a

100k resistor in parallel with the current mirror to provide a bit of start-up voltage across the LED.

You really don't want to use a zener diode ...

Once you've got your 10mA through the LED, the isolated photo-transistor in the 4N27 will sink at least 1mA. at a collector current of 10V. You would be more interested in the saturation voltage, which - for the 4N27 is specified as 0.5V at 2mA (for which you would need 50mA through the LED). Other parts on the data sheet guarantee

0.5V at 0.5mA with 10mA through the LED.

The 4N27 might give you something close enough to 0.5V at 0.5mA with just 10mA through the LED - which means that you might get away with a

5k6 pull-up resistor to the 3.3V rail on the microprocessor side. 10k would be even safer, but slower.

The highest practical value for the pull-up resistor is set by the collector-emitter dark current - 50nA at 25C (but see fig 10 of the data sheet for higher temperatures), which corresponds to about 33M. I wouldn't go hgher than 100k myself.

--
Bill Sloman, Nijmegen
Reply to
bill.sloman

A brute force method might work (not nearly as elegant as hanging a Wilson mirror off of it -- clever approach!).

VCC 3.3 === | | Vsig 5 - 48 - clamp diode ^ ___ ___ | ___ | \\_----|___|--------|___|---. |___/ | | opto's LED | V ->

- | | | | === GND (created by AACircuit v1.28 beta 10/06/04

formatting link

A back-of-the-envelope looks like you could use 220 for both resistors and a 1N4148 for the clamp. A 1N4001 would have more headroom but would be a bit slower. What's your signal rate?

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

John,

Speed: I'm talking slow. 500 Hz absolute max.

Isolation: I just want to ensure that a transient voltage doesn't blow the expensive microprocessor. The signaling device has a long wire that could potentially conduct static or an induced voltage. I'd rather destroy the isolator than the processor.

You question got me to thinking that I might be able to use a linear regulator to regulate incoming voltage to a known level and a resistor to limit current.

Check out:

formatting link

I could possibly use a couple resistors for a voltage divider to get the input voltage down to the correct level for this device. (2.5 to

24VDC) Of course, this is increasing the component count.

I suppose I could reduce the incoming voltage range to have a ceiling of 24 VDC. That's really no problem.

Any thoughts?

-Ken

Reply to
KBB

Hi Ken:-

1) Use an active const current circuit on the input, a very simple/cheap one will do (four < 2 cent parts max).

2) Throw that hoary old POS 4N27 with its pitiful 10% CTR at a stupidly high 10mA directly into the garbage and get a modern opto. Might cost an extra dime or two, but will be smaller, and allow...

3) Reduce input currrent accordingly, and go to tiny SMT parts. Calculate and allow plenty of margin for temperature and aging.

4) Enjoy your conservative and reliable design.

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

1) He probably doesn't have the 3.3V on the isolated side. 2) If there *was* something like a micro hanging off that 3.3V, what would happen when you have 200mA plus flowing through that input resistor from 48V? Hint: voltage regulators typically don't sink current.

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

Why opto-isolate, if you really don't need isolation? If the led and detector sides of the opto share the same ground, the isolator becomes an expensive, poorly-characterized lowpass filter.

This should work:

in--------r1------+-----+--------schmitt_gate-------to uP | | | | r2 c | | | | | | gnd gnd

where the schmitt-trigger gate is powered from 3.3 volts. Adjust the r1:r2 ratio to set the trigger level, and keep r1 big to limit the current into the esd clamp diodes of the gate; at your speeds, a few tens of microamps will be fine.

The next logical step is to eliminate the schmitt and go directly into the uP port pin, which would usually work just as well, unless you're counting bouncy edges or something.

John

Reply to
John Larkin

I love the idea of a current limiting diode. These articles got me excited:

formatting link
formatting link

This would probably be the easiest way to do this. You're right in that they're hard to find. Neither Digikey nor Mouser seem to have them. Farnell has them, but not at the rating I'd like (10 mA).

This brings me to a question. I thought I would need the full 10mA to drive the GaAs LED in the optocoupler. Is this not true? If not, how do I determine what current I do need?

I see what you're saying though. I should be current limiting as opposed to voltage limiting. This makes sense. I'd still like to avoid using multiple components, if at all possible. I really want to keep the foot print of this thing tiny. This brings me back to CLDs.

Any ideas for other sources for the CLDs?

Thanks, Ken

Reply to
KBB

Not going to happen- at 48V and 10mA something is going to be dissipating 1/2W- usually means a 1W dissipation capable component set- and that means un-tiny. Now if it's not necessary to keep your input signal ground separate from your 3.3V logic ground- you can do it with a diode and resistor- or resistor divider and Schmitt trigger. You left so much information out of your post that you invite ridiculous suggestions. Like what is the "signaling device?"- stuff like that.

Reply to
Fred Bloggs

--- Yup.

Use an LM385 as a clamp.

It has an operating current range of 13µA to 20mA and a response time of less than 100µs, and you can get 3.3V out of it like this:

5-50V>--+ | [10k]R1 | +------+--->3.3V to µP | | | [100k]R2 |+ | [LM385]---+ |- | | [160k]R3 | | GND>----+------+

When the input voltage is at 5V and the output voltage is at 3.3V, the difference in voltage will be 1.7V and that difference across the 10k ohm resistor will allow:

E 5V -3.3v I = --- = ----------- = 0.00017A = 170µA R 10kR

to flow through the LM385, which will keep it in regulation.

With a 50V input the current will be roughly ten times that, or

1.7mA which, will will still keep it in regulationl.

At 50V in, the worst case dissipation in the resistor will be:

P = IE = 1.7mA * (50V - 3.3V) = 79.39mW

and in the LM385:

P = IE = 3.3V * 1.7mA = 5.6mW,

so a standard 5%, 1/4 watt carbon film for R1 will be fine.

Now, according to National, on the lower right hand corner of page 2 of:

formatting link

the LM385's output voltage is defined as:

Eout = 1.24 ((R3/R2) + 1),

So, for an output voltage of 3.3V, ((R3/R2) +1) has to be equal to:

Eout 3.3V ((R3/R2) + 1) = ------ = ------ ~ 2.66 1.24 1.24

And, since we have that 1 in there which is only adding to the finished ratio, after subtracting it out we're left with:

R3 ---- = 1.66 R2

The current required into the the feedback input of the '385 is only

35nA, worst case, so with the current flowing in the divider network equal to: 3.3V I = ------- ~ 13000nA 260kR

and the LM385 sucking out 35nA, the error in the output voltage should be:

How about if one, or some of the rest of you all work it out, OK?

-- John Fields Professional Circuit Designer

Reply to
John Fields
[...]

You may want to worry about the static when the Vcc is not applied. You really want a device that limits the input to be between Vcc and ground.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

You need either an optoisolator or a voltage limiter -- not both. The optoisolator will give much more robust protection, and be much more robust itself.

So, follow the advice of those who told you how to limit the current into the optoisolator (as I would), or follow the advice of those who told you how to limit the voltage into the processor. Forget about doing both.

Personally, I'd try a resistor first, but a depletion-mode FET like Supertex's DN2540 or DN3145, with a current limiting resistor, would be much more likely to succeed.

John Perry

Reply to
John Perry

All a CLD is inside is a depletion-mode FET and a resistor!

Just take any depletion-mode FET good for 60 volts and 1 watt and put a

100 to 300 ohm resistor between gate and source. Voila, a constant-current diode appears between gate and drain. Adjust resistor as needed to get the current you want.
Reply to
Ancient_Hacker

...

...

OK, that's the answer to why you're asking all of these questions.

First, you say you have a signal that could be from 5 to 48 V, and your uP can only take 3.3. OK, fair enough. But in the next couple of sentences, you bring up 'optoisolator'. Just use whatever resistor value will ensure that the output transistor saturates, and if the opto can't take the resulting current at 48V in, _then_ add the zener, in kind of a tee arrangement: signal, resistor, zener, resistor, opto.

On the output side of the opto, just pull the collector up to 3.3 and go directly to the uP. :-)

Hope This Helps! Rich

Reply to
Rich Grise

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.