Forums

Optocoupler 4N25 Help

Started by "David E. Basile" October 29, 2006
I'm trying to hook up an Optocoupler and I'm not having any luck. It is a
4N25 and the output always stays high. I took a schmatic from another site
to set it up and maybe it's not right for my application.

I have the output of my device 12v going to a 4.7k resistor to pin 1 and pin
2 is grounded. I have 5v tied into a 10K resistor and tied to pin 5. Pin 4
is grounded. As I monitor pin 5 and my device goes from 0-12v pin 5 always
stays at 5 volts. The schematic was for another type of pic so I'm
"assuming" the resistors are the correct values and my voltages are the same
as the schematic.

Am I doing something wrong? Is it possible the Optocoupler is bad? Is
there a simple way to test it?

TIA
David
Hi. The 4.7k resistor looks to be to large a value. According to
the data sheet for an NTE3040 (the NTE flavor of the opto you have)
the IR LED has a forward voltage of 1.1 and forward current of 10MA,
which calls for a 1/4 watt resistor of ~1200 ohms when used with a
12v source. I'd guess the LED isn't lighting.

BTW here is a good calculator for matching a resistor to an LED:

http://led.linear1.org/1led.wiz

--- In b..., "David E. Basile" wrote:
>
> I'm trying to hook up an Optocoupler and I'm not having any luck.
It is a
> 4N25 and the output always stays high. I took a schmatic from
another site
> to set it up and maybe it's not right for my application.
>
> I have the output of my device 12v going to a 4.7k resistor to pin
1 and pin
> 2 is grounded. I have 5v tied into a 10K resistor and tied to pin
5. Pin 4
> is grounded. As I monitor pin 5 and my device goes from 0-12v pin
5 always
> stays at 5 volts. The schematic was for another type of pic so I'm
> "assuming" the resistors are the correct values and my voltages are
the same
> as the schematic.
>
> Am I doing something wrong? Is it possible the Optocoupler is
bad? Is
> there a simple way to test it?
>
> TIA
> David
>
>
>
>
>
>
>
David,
Looking at the data sheet I have for the 4N25, I THINK you may have a
problem with the bias on the led portion.IF I have done my math
correct, with a 4k7ohm resistor, you will only have a current of
approximately 2.2ma on the led portion and the data sheet calls for
10ma based on a max Vf of 1.5 V . (typical is listed at 1.18V which
is still only 2.3ma)

As for testing, you can use a vom to in diode test mode to check the
led portion, and monitor the output as you are to verify the detector
operation.

If you want, I can forward the datasheet to you.

Art

8 PM 10/29/2006, you wrote:
>I'm trying to hook up an Optocoupler and I'm not having any luck. It is a
>4N25 and the output always stays high. I took a schmatic from another site
>to set it up and maybe it's not right for my application.
>
>I have the output of my device 12v going to a 4.7k resistor to pin 1 and pin
>2 is grounded. I have 5v tied into a 10K resistor and tied to pin 5. Pin 4
>is grounded. As I monitor pin 5 and my device goes from 0-12v pin 5 always
>stays at 5 volts. The schematic was for another type of pic so I'm
>"assuming" the resistors are the correct values and my voltages are the same
>as the schematic.
>
>Am I doing something wrong? Is it possible the Optocoupler is bad? Is
>there a simple way to test it?
>
>TIA
>David
>
> ... I have 5v tied into a 10K resistor and tied to pin 5...

Assuming you mean +5v through 10k to pin 5, your circuit and values
should be fine. You might have a bad part.

Two simple tests might be to measure the voltage drop across the 4.7k
from your +12v device; it should be about 10.75v, representing a forward
LED current of about 2mA. If it is zero, the LED isn't conducting.

You can check the phototransistor by connecting 100k from +5v to 4N25
pin 6. The output, pin 5, should go low.
Tom
Thanks to all that replied. I have the data sheet an will need to review it
AGAIN :-). Appreciate the help.

David

_____

From: b... [mailto:b...] On Behalf Of
Art Eckstein
Sent: Sunday, October 29, 2006 2:40 PM
To: b...
Subject: Re: [BasicX] Optocoupler 4N25 Help

David,
Looking at the data sheet I have for the 4N25, I THINK you may have a
problem with the bias on the led portion.IF I have done my math
correct, with a 4k7ohm resistor, you will only have a current of
approximately 2.2ma on the led portion and the data sheet calls for
10ma based on a max Vf of 1.5 V . (typical is listed at 1.18V which
is still only 2.3ma)

As for testing, you can use a vom to in diode test mode to check the
led portion, and monitor the output as you are to verify the detector
operation.

If you want, I can forward the datasheet to you.

Art

8 PM 10/29/2006, you wrote:
>I'm trying to hook up an Optocoupler and I'm not having any luck. It is a
>4N25 and the output always stays high. I took a schmatic from another site
>to set it up and maybe it's not right for my application.
>
>I have the output of my device 12v going to a 4.7k resistor to pin 1 and
pin
>2 is grounded. I have 5v tied into a 10K resistor and tied to pin 5. Pin 4
>is grounded. As I monitor pin 5 and my device goes from 0-12v pin 5 always
>stays at 5 volts. The schematic was for another type of pic so I'm
>"assuming" the resistors are the correct values and my voltages are the
same
>as the schematic.
>
>Am I doing something wrong? Is it possible the Optocoupler is bad? Is
>there a simple way to test it?
>
>TIA
>David
>
David
The LED inside the opto requires more current to turn on the
photo-transistor, which you are monitoring by looking at pin 5. Replace
the 4k7 on pin 1 with a 680 ohm. The led requires at least 10mA. You
are hitting it with 12/4.7 = 2.5mA. Not enough.
neil
David E. Basile wrote:

> I'm trying to hook up an Optocoupler and I'm not having any luck. It is a
> 4N25 and the output always stays high. I took a schmatic from another site
> to set it up and maybe it's not right for my application.
>
> I have the output of my device 12v going to a 4.7k resistor to pin 1
> and pin
> 2 is grounded. I have 5v tied into a 10K resistor and tied to pin 5. Pin 4
> is grounded. As I monitor pin 5 and my device goes from 0-12v pin 5 always
> stays at 5 volts. The schematic was for another type of pic so I'm
> "assuming" the resistors are the correct values and my voltages are
> the same
> as the schematic.
>
> Am I doing something wrong? Is it possible the Optocoupler is bad? Is
> there a simple way to test it?
>
> TIA
> David
>
>
>
>
>
>
>
>
Thanks Neil. Man I love this list!!!

David

_____

From: b... [mailto:b...] On Behalf Of
n...@ihug.co.nz
Sent: Sunday, October 29, 2006 9:06 PM
To: b...
Subject: Re: [BasicX] Optocoupler 4N25 Help

David
The LED inside the opto requires more current to turn on the
photo-transistor, which you are monitoring by looking at pin 5. Replace
the 4k7 on pin 1 with a 680 ohm. The led requires at least 10mA. You
are hitting it with 12/4.7 = 2.5mA. Not enough.
neil

David E. Basile wrote:

> I'm trying to hook up an Optocoupler and I'm not having any luck. It is a
> 4N25 and the output always stays high. I took a schmatic from another site
> to set it up and maybe it's not right for my application.
>
> I have the output of my device 12v going to a 4.7k resistor to pin 1
> and pin
> 2 is grounded. I have 5v tied into a 10K resistor and tied to pin 5. Pin 4
> is grounded. As I monitor pin 5 and my device goes from 0-12v pin 5 always
> stays at 5 volts. The schematic was for another type of pic so I'm
> "assuming" the resistors are the correct values and my voltages are
> the same
> as the schematic.
>
> Am I doing something wrong? Is it possible the Optocoupler is bad? Is
> there a simple way to test it?
>
> TIA
> David
>
>
>----------------------
>
>
>
> ... 2.5mA. Not enough.

I suppose he'll tell us, but I expect that 2.5mA is sufficient to switch
a 0.5mA load (5v/10k).

The Vce/Ic chart on page 7 http://www.fairchildsemi.com/pf/4N/4N25.html
shows a 2.5mA If curve; it projects that a 0.5mA load will yield Vce of
0.3v. Nothing wrong with that, I bet.
Tom
You're correct of course Tom, but they also show all their test figures
at an If of 10mA and the CTR's are also quoted at 10mA. From personal
experience, I always run the leds at 10-20ma.
neil
Tom Becker wrote:

> > ... 2.5mA. Not enough.
>
> I suppose he'll tell us, but I expect that 2.5mA is sufficient to switch
> a 0.5mA load (5v/10k).
>
> The Vce/Ic chart on page 7
> http://www.fairchildsemi.com/pf/4N/4N25.html
>
> shows a 2.5mA If curve; it projects that a 0.5mA load will yield Vce of
> 0.3v. Nothing wrong with that, I bet.
>
> Tom
>
>
>
>
>
>
>
Tom...on a different subject...have you ever had a play with the MCC USB
DAQ modules?
Tom Becker wrote:

> > ... 2.5mA. Not enough.
>
> I suppose he'll tell us, but I expect that 2.5mA is sufficient to switch
> a 0.5mA load (5v/10k).
>
> The Vce/Ic chart on page 7
> http://www.fairchildsemi.com/pf/4N/4N25.html
>
> shows a 2.5mA If curve; it projects that a 0.5mA load will yield Vce of
> 0.3v. Nothing wrong with that, I bet.
>
> Tom
>
>
>
>
>
>
>