Main Page | Report this Page
 
   
Science Forum Index  »  Electronics - Basics Forum  »  optocoupler trouble...
Page 1 of 1    
Author Message
ted...
Posted: Fri May 30, 2008 9:45 am
Guest
I'm getting strange results from an optocoupler (aka optoisolator, and
this is the kind with transistor output). In brief: nothing I do
seems to make the transistor "conduct", except very feebly.

Here's my setup:

Diode anode: 0V/1.07V, 0.4mA
Diode cathode: ground

Transistor collector: connected to a 330 Ohm resistor which is
connected to 4.92V.
Transistor emitter: ground
Transistor base: open

When the diode anode is at 0V, the transistor collector is, as one
would expect, at 4.92V.
But when I give the diode anode 1.07V, the transistor collector drops
to just 4.88V. I want it to go down to 0V and I don't understand why
that's not happening.
ted...
Posted: Fri May 30, 2008 10:06 am
Guest
Thanks. I'm going to try answering your question about the datasheet,
though I'm not quite sure what I'm looking for. Is it the "DC Current
Transfer Ratio"? For that it says 20%, at I_F=10mA and V_CE=10V.
ted...
Posted: Fri May 30, 2008 12:08 pm
Guest
Quote:
You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

Thanks, and would you please explain why 2500 ohm is the correct
resistance, indeed why the resistance at that point makes any
difference to what the voltage is going to be at the collector pin?
(I was under the impression that when the transistor is "on", it has
no internal resistance...)
Tim Wescott...
Posted: Fri May 30, 2008 2:53 pm
Guest
ted wrote:
Quote:
I'm getting strange results from an optocoupler (aka optoisolator, and
this is the kind with transistor output). In brief: nothing I do
seems to make the transistor "conduct", except very feebly.

Here's my setup:

Diode anode: 0V/1.07V, 0.4mA
Diode cathode: ground

Transistor collector: connected to a 330 Ohm resistor which is
connected to 4.92V.
Transistor emitter: ground
Transistor base: open

When the diode anode is at 0V, the transistor collector is, as one
would expect, at 4.92V.
But when I give the diode anode 1.07V, the transistor collector drops
to just 4.88V. I want it to go down to 0V and I don't understand why
that's not happening.

How much current to the diode? Applying a fixed voltage to a diode will
get you a wide range of currents.

0.4mA in the diode is a recipe for minuscule currents in the transistor.
What does the optocoupler data sheet say? You need about 15mA to pull
the collector down close to zero (you won't get it all the way), that's
a lot for an optocoupler with a plain transistor.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott...
Posted: Fri May 30, 2008 3:27 pm
Guest
ted wrote:
Quote:
Thanks. I'm going to try answering your question about the datasheet,
though I'm not quite sure what I'm looking for. Is it the "DC Current
Transfer Ratio"? For that it says 20%, at I_F=10mA and V_CE=10V.

Yes. That says that the collector current will be 1/5 of the diode current.

You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Eeyore...
Posted: Fri May 30, 2008 3:52 pm
Guest
ted wrote:

Quote:
I'm getting strange results from an optocoupler (aka optoisolator, and
this is the kind with transistor output). In brief: nothing I do
seems to make the transistor "conduct", except very feebly.

Here's my setup:

Diode anode: 0V/1.07V, 0.4mA

You're only putting 400uA through it ?

There's your problem. Try something more like 10-20 mA depending on the
precise device.

Graham
Eeyore...
Posted: Fri May 30, 2008 3:53 pm
Guest
ted wrote:

Quote:
Transistor collector: connected to a 330 Ohm resistor which is
connected to 4.92V.

330 ohms ? You're hoping for high speed operation are you ?

If you don't need that use 4k7.

Graham
Eeyore...
Posted: Fri May 30, 2008 3:56 pm
Guest
ted wrote:

Quote:
Thanks. I'm going to try answering your question about the datasheet,
though I'm not quite sure what I'm looking for. Is it the "DC Current
Transfer Ratio"? For that it says 20%, at I_F=10mA and V_CE=10V.

It means if you put 10mA into the LED the transistor will conduct 2mA with
its collector-emitter voltage held at 10V.

It also means (assuming the CTR hasn't wildly dropped off) if you put
400uA into the LED the transistor will conduct 80uA.

Why are you using such a low CTR ?

Graham
Eeyore...
Posted: Fri May 30, 2008 3:57 pm
Guest
Tim Wescott wrote:

Quote:
ted wrote:
Thanks. I'm going to try answering your question about the datasheet,
though I'm not quite sure what I'm looking for. Is it the "DC Current
Transfer Ratio"? For that it says 20%, at I_F=10mA and V_CE=10V.

Yes. That says that the collector current will be 1/5 of the diode current.

You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

With 10mA LED current NOT 400uA.

Graham
Bob Eld...
Posted: Fri May 30, 2008 5:02 pm
Guest
"ted" <strnbrg59 at (no spam) gmail.com> wrote in message
news:0da35bb4-12a5-4b99-84a2-977ebfa4d906 at (no spam) m36g2000hse.googlegroups.com...
Quote:
I'm getting strange results from an optocoupler (aka optoisolator, and
this is the kind with transistor output). In brief: nothing I do
seems to make the transistor "conduct", except very feebly.

Here's my setup:

Diode anode: 0V/1.07V, 0.4mA
Diode cathode: ground

Transistor collector: connected to a 330 Ohm resistor which is
connected to 4.92V.
Transistor emitter: ground
Transistor base: open

When the diode anode is at 0V, the transistor collector is, as one
would expect, at 4.92V.
But when I give the diode anode 1.07V, the transistor collector drops
to just 4.88V. I want it to go down to 0V and I don't understand why
that's not happening.

The diode in an optocoupler is an Infrared LED. It takes more than 1.07
volts to turn on. You can see this with the feeble current of 400uA you
measure. Run the diode on 5 to 10 mA. The voltage should be nearly two
volts.

If this thing has to run fairly fast, place a 10 K resistor from the base of
the transistor to ground. The open base will slow operation appreciably.
Wim Lewis...
Posted: Fri May 30, 2008 6:24 pm
Guest
In article <eaab71c3-4815-4de7-9af7-c974c8d1222d at (no spam) s50g2000hsb.googlegroups.com>,
ted <strnbrg59 at (no spam) gmail.com> wrote:
Quote:
You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

Thanks, and would you please explain why 2500 ohm is the correct
resistance, indeed why the resistance at that point makes any
difference to what the voltage is going to be at the collector pin?
(I was under the impression that when the transistor is "on", it has
no internal resistance...)

It has a *pretty low* internal resistance, as long as the current flowing
through it is less than some value. That value depends on (for a normal
transistor) the voltage/current on its base, or (for a photo-transistor)
the amount of light hitting it.

"On" and "off" are just shorthand. "On" is a short way of saying
"there's plenty of base current (or light), which means that the
transistor will allow as much current as I'm likely to give it".
"Off" is a short way of saying "there's not much base current (or
light), so the transistor will allow so little current through that
I can ignore it." In between "on" and "off", the transistor is in
what's called the "active" region, and it acts like a controllable
current-limiter.

That's what the "current transfer ratio" on the optocoupler data sheet
is talking about: it's the ratio of input current (through the LED) to
output current (through the output transistor). If you put 1 mA through
the LED, it emits X amount of light; part of that light hits the
transistor; as a result the transitor allows Y amount of current ---
the ratio 1mA:Y is the current transfer ratio.


The 2500 ohms Tim Wescott mentions is because there's a limit to
how much current the LED in the optocoupler will take: if you max
it out at 10 mA (which is an educated guess at what the limit is;
the data sheet will say for sure), then the transistor half will
be allowing 2 mA (that's 10 mA multiplied by the current transfer
ratio). If you can only draw 2mA of current, the resistor has to
be at least 2500 ohms in order to swing 5V (2500 ohms * 2 mA = 5V).


--
Wim Lewis <wiml at (no spam) hhhh.org>, Seattle, WA, USA. PGP keyID 27F772C1
Eeyore...
Posted: Sat May 31, 2008 3:08 am
Guest
ted wrote:

Quote:
You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

Thanks, and would you please explain why 2500 ohm is the correct
resistance, indeed why the resistance at that point makes any
difference to what the voltage is going to be at the collector pin?
(I was under the impression that when the transistor is "on", it has
no internal resistance...)

No, it is NOT 'ON' or 'OFF' as in infinite or zero ohms.

A transistor will conduct a CURRENT determined by its input drive (in this
case the LED current).

This is fundamental basics and you clearly need to read up about how
transistors operate and how to use them.

Graham
Eeyore...
Posted: Sat May 31, 2008 3:10 am
Guest
Wim Lewis wrote:

Quote:
" In between "on" and "off", the transistor is in
what's called the "active" region, and it acts like a controllable
current-limiter.

Like a 'transfer resistor' in fact from which the word trans_istor is derived.

Transistors were not originally designed as switches but as linear devices.

Graham
Tim Wescott...
Posted: Sat May 31, 2008 11:36 am
Guest
ted wrote:
Quote:
You should check the maximum diode current, too -- that 10mA is
certainly suggestive of what you ought to be able to do. Figure 10mA
in, 2mA out, means you'll need to use at least a 2500 ohm resistor to
pull the collector all the way down.

Thanks, and would you please explain why 2500 ohm is the correct
resistance, indeed why the resistance at that point makes any
difference to what the voltage is going to be at the collector pin?
(I was under the impression that when the transistor is "on", it has
no internal resistance...)

Because with a 0.2 current transfer ratio and 10mA to the diode, the
transistor will only sink 2mA. If you want to drop 5V, you need at
least 2500 ohms of resistance to do it.

As pointed out elsewhere, transistors are never really "on" in every
sense. They are only fully on in the sense that they are voltage
limited, which depends on the circuit they're in. In this state any
more drive to the transistor will not result in any more voltage drop at
it's output -- but in your case that means you can't ask the transistor
to sink more than 2mA.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Sun Nov 23, 2008 11:47 am