Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

6N138 Optoisolator Question

Status
Not open for further replies.

Jon Wilder

Active Member
I've seen the 6N138 optoisolator hooked up a few different ways. One of them being the method shown below -

**broken link removed**

I can see where the 1K limits emitter base current to the phototransistor, but if I'm looking at this correctly there doesn't appear to be anything limiting the emitter base current of the 2nd transistor. Yet I've seen it hooked up in this configuration with no limiting resistor between pin 8 and the + rail.

Is this acceptable to do? If so, is it because the 2nd transistor doesn't have a constant duty cycle? What is the advantage to hooking it up this way as opposed to leaving pin 7 disconnected and placing a limiting resistor between pin 8 and the rail?
 
Last edited:
The voltage is dropped across the 470 10.638 Milliamps then on gnd when off

Like this
 

Attachments

  • like this.PNG
    like this.PNG
    41.2 KB · Views: 1,847
Last edited:
I've no idea what limits the EB current but the data sheet shows it wired that way so it should be fine.

Mike.
 
I understand when the transistor changes to the saturated state the collector gets pulled down, which transferrs the Vdrop across the 470R load resistor and causes the output to go low, then gets pulled up high when the transistor changes state to cutoff. That part I get.

What I don't understand is the fact that in this configuration the phototransistor has the 1K limiting its "emitter-base" current, but the driven transistor doesn't appear to have anything limiting its base current.

The data sheet didn't show it this way, but I've seen it hooked up in this fashion in other circuits. Since I know the internet enough to know that lots of schematics have horrendous errors in them I don't trust them unless I can explain how they work. While I full and well understand how this circuit works, I'm just a tad worried that the base current to the driven transistor doesn't have anything to limit it and am just wondering if this is OK since it sees a "pulsed" duty cycle.
 
Last edited:
I just tried it it works Like I posted

Jon it's limited at both side the npn on the left can only pass 5 mA to the base of the one on the right and the right one can only pass 10 mA
 
Last edited:
The reason they did it this way is to get the most gain on the the side with the led or maybe for better words faster turn on and off time.

The split darlington configuration separating the input
photodiode and the first stage gain from the output
transistor permits lower output saturation voltage and
higher speed operation than possible with conventional
darlington phototransistor optocoupler.
 
Last edited:
The reason they did it this way is to get the most gain on the the side with the led or maybe for better words faster turn on and off time.

Perfect! Which explains why most MIDI circuits have it set up this way as you only have 32uS bit time with MIDI data.

I just had revision 2 of my prototype MIDI decoder boards and on a hunch decided to set up the traces for the 6N138 this way. I knew there had to be a reason for it...it was just a matter of finding out WHAT that reason was.

BTW...what was your resource for the above info excerpt that you posted?
 
I just tested it and the data sheet I used the pickit2 logic tools to see how fast it came on
 
From looking at the circuit, I believe that the reason that the 1k resistor is there, is to set how much current goes through the photo diode before the output transistor is turned on. I bet you that if you lower that resistor value, it would take a higher current on the photo diode side to turn the output low. With a 1k resistor, the current need to be about 7uA before the transistor is turned on. Basically, it controls the sensitivity or the transfer ratio of the opto-coupler. If you want it to be more sensitive, then make that value larger.

Hope this helps

VC
 
I've seen the 6N138 optoisolator hooked up a few different ways. One of them being the method shown below -

**broken link removed**

I can see where the 1K limits emitter base current to the phototransistor, but if I'm looking at this correctly there doesn't appear to be anything limiting the emitter base current of the 2nd transistor. Yet I've seen it hooked up in this configuration with no limiting resistor between pin 8 and the + rail.

Is this acceptable to do? If so, is it because the 2nd transistor doesn't have a constant duty cycle? What is the advantage to hooking it up this way as opposed to leaving pin 7 disconnected and placing a limiting resistor between pin 8 and the rail?

Hi there,

The 1k resistor is not there to limit current through the first transistor (which by the way is not a phototransistor, there is a photo diode and regular transistor there) and in fact does not do that at all. It is there to make the second transistor turn off faster. The nice effect is that the rise time of the output will be much faster and it will turn off faster, but the drawback is that it lowers the current transfer ratio significantly.
The mechanism that limits the current through the first transistor (and into the base of the second transistor) is the transistor gain itself combined with the relatively low current of the photo diode. That first transistor acts more like a current source with some maximum available current.

It's too bad they dont show more data on the selection of that resistor value (the 1k) on the data sheet. They dont do the data sheet very well with other opto's either. It's like they are afraid to show how much the CTR dies off and afraid to show how much slower the whole device is without at least some resistance at pin 7 to ground (like 10k or even 100k).
 
Last edited:
MrAl they don't even show a resistor on pin 7 in the data sheet? 2. Pin 7 open. (6N138 and 6N139 only)


This is a better look at this
 

Attachments

  • 6N138.PNG
    6N138.PNG
    36.1 KB · Views: 1,700
  • pair.PNG
    pair.PNG
    21 KB · Views: 973
Last edited:
MrAl they don't even show a resistor on pin 7 in the data sheet? 2. Pin 7 open. (6N138 and 6N139 only)


This is a better look at this

But if you look on the output of that device they have it driving a device with a Shmitt Trigger output (or so it appears). It would correct any "rounding off" of the output pulse rising edges that would occur without that resistor.

I think what Al is stating is that with the resistor installed, it decreases the rise/fall time, allowing for a nice n' sharp square wave output without needing it to drive a Shmitt Trigger output device to achieve that.
 
Last edited:
MrAl they don't even show a resistor on pin 7 in the data sheet? 2. Pin 7 open. (6N138 and 6N139 only)


This is a better look at this


Hello,


So what is your point? A resistor on pin 7 speeds up the device but lowers CTR. That's the way a lot of opto's work.
 
Look's like you see it, all it will do is make it switch nice and clean. But it's not needed if you read the data sheet for 6N138 and 6N139. I have used them with sound card of my pc for a logic tool to keep from blowing the mic input.
Worded out nice.
 
Hello again be,

On that's good to hear, im glad it worked out for you in the long run.
My experience is more with the switching circuits where i have used the 138 in commercial products.
I've also used other opto's in switching circuits that's how i found out there can be a big difference in performance using a base resistor. Some apps would never work without one because the opto would be far too slow. I might have actual scope shots somewhere.
 
Some apps would never work without one because the opto would be far too slow.

Which makes total sense why they'd use that resistor there for MIDI applications. With MIDI you're shifting in 1 bit every 32uS so there's not much room for lag there.
 
Which makes total sense why they'd use that resistor there for MIDI applications. With MIDI you're shifting in 1 bit every 32uS so there's not much room for lag there.

Hi John,

Oh yes that sounds about right then. You know what else is very strange, i have yet to find a good data sheet with spec's on how much that resistor influences the total switching time (and fall time) of the output transistor. Maybe i just missed it somehow.
 
Hi John,

Oh yes that sounds about right then. You know what else is very strange, i have yet to find a good data sheet with spec's on how much that resistor influences the total switching time (and fall time) of the output transistor. Maybe i just missed it somehow.

I couldn't find it either myself, and in all their test circuits they show nothing connected to the emitter-base pin, but also they show a Shmitt Trigger device on the output transistor so my guess is they put that there to correct for any lag in the rise/fall time of the output transistor. Just a guess there though.
 
Hi again Jon,

I finally found one...in Fairchilds data sheet for the 4N35 opto. They show 10k allowing much faster turn off time than 100k, and 100k much better than 1M ohm.
 

Attachments

  • 4N35-toff-vs-Rbe.gif
    4N35-toff-vs-Rbe.gif
    20.3 KB · Views: 671
The 6N138 and 6N139 are so good they don't need any! just kidding the data sheet said that but there switch times are better with it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top