Optocouple Question

Thread Starter

slysyuk

Joined Aug 28, 2008
3
Could someone clever help me out.

I have a 5Vdc signal which needs to switch 24Vdc and two 24Vdc signals that need to switch 5V using an optoisolator.
The circuit is designed around the 4N33 and although I have read the datasheet and produced the test circuit in the datasheet, I cant seem to get it to switch.

The 5Vdc feeds the input and 24V is connected to the collector via a 1K resistor, this should produce around 24mA which I feel is too small, so the resistor was changed to 370Ohm to produce around 60mA, but still no joy.

Ideally it would be great to be able to have an external LED on both the input and output stages to ensure that those signals are present as a visual aid.

Can anyone offer some advice?

Thanks so much in advance.

Sly
 

Externet

Joined Nov 29, 2005
2,200
Hello Sly.
Optoisolators do need to be fed with proper current limiting resistors, and their inputs from sources capable of supplying the rated current. The data sheet specifies the range of operation
The output side circuit should observe the current handling capability of the optotransistor, typically cannot drive a relay by themselves, and an extra stage may be needed.

Some optocouplers have a exposed base connection that can tailor / affect control on the switching parameters.
Use application notes as clues if you are not succeeding, and as you say, leds in the inputs and outputs will allow to easily tell what is going wrong.
Miguel
 

mik3

Joined Feb 4, 2008
4,843
The 5Vdc feeds the input

Sly
I guess you burnt the chip because you didnt use a resistor at the input.
With 5V at the input. according to the datasheet, you should use a 85 ohm resistor to obtain the maximum current at the output.
 

Thread Starter

slysyuk

Joined Aug 28, 2008
3
Thanks guys,

OK, I do have a Resistor on the 5V, currently 100Ohm as thats the closest i had.
I calculated the R = (VCC-Vf)/If
Where VCC = 5V
Vf = 1.2V (datasheet)
If = 60mA (datasheet)

Am I right in thinking that if the 5V is applied to the LED, then the output should switch so I have the required outut voltage.
At the moment, it appears to be inverting.
I was hoping that if 5V is ON, then Output is 24V.

Does that make sense?
 

mik3

Joined Feb 4, 2008
4,843
Thanks guys,

OK, I do have a Resistor on the 5V, currently 100Ohm as thats the closest i had.
I calculated the R = (VCC-Vf)/If
Where VCC = 5V
Vf = 1.2V (datasheet)
If = 60mA (datasheet)

Am I right in thinking that if the 5V is applied to the LED, then the output should switch so I have the required outut voltage.
At the moment, it appears to be inverting.
I was hoping that if 5V is ON, then Output is 24V.

Does that make sense?
Yes, you are right the output is inverting.Thus when you have 0 V at the input the output is 24V (almost) and when you have 5 V at the input the output is close to zero.
 

SgtWookie

Joined Jul 17, 2007
22,230
If you need the output to be non-inverted, you can use the output to drive the base of an NPN transistor or Darlington transistor; this will then invert the signal a 2nd time, resulting in a non-inverted signal.

You will need a resistor to limit current through the transistor base, of course - as well as a resistor on the collector - unless a relay's coil will serve as a load. Be sure to use a diode across a relay's coil to absorb the reverse EMF, otherwise your transistor will be subjected to very high voltage peaks which will most likely destroy it.

You might consider a TIP120 Darlington.
 

mindmapper

Joined Aug 17, 2008
34
It looks like you put in 60mA If to get 60mA Ic (collector current). In the datasheet you can see that the CTR (current transfer ratio) is 500% for the 4N33. If you use 20mA If you can get 100mA Ic witch is fair enough since you limit it to 60mA by the resistor. Its better to use more If than you really need since you will saturate the transistor better in that case.

If the transistor don't get really saturated, you run the risc of getting to much Pd power dissipation. If you use another transistor to invert the signal, decrease the Ic current through the coupler.
 

rezer

Joined Aug 26, 2008
10
The 4N33 uses a darlington pair on the detector side. You should have no problem driving a relay with this. Of course, this will depend on what type of relay you are using. Calculate your current requirements based on the ohmic value of the relay coil, assuming Vce saturation. As long as the coil isn't lower than 160Ω, you are fine (Don't forget your flyback diode across the coil!).
Also, depending on the mfg, the Ic/If ratings may be a little different. For instance:
QC is rated at 150mA/80mA and Siemans if rated at 125mA/60mA respectively.

http://www.datasheetcatalog.com/datasheets_pdf/4/N/3/3/4N33.shtml
 

Thread Starter

slysyuk

Joined Aug 28, 2008
3
Thanks guys for your replies.

I am right in thinking that in theory the opto should not be inverting or should I be biasing the emitting on the output stage?

I will try adding and addition NPN to invert the signal too.

Thanks in advance.
 

mindmapper

Joined Aug 17, 2008
34
The detector in the coupler could be treated like an ordinary transistor. In your case like an darlington bjt.
If you connect the emitter to gnd and the load on the collector, the signalvoltage will be inverted (common emitter stage).
If you connect the load on the emitter (between emitter and gnd) and the collector to Vdd, the signalvoltage will not be inverted (common collector stage). The current (Ic) will not be inverted in any case. When you have If you will have Ic.

Since you do not tell what you really want to do it's hard to tell the best why to do it. You will only get very general advice in that case.
 
Top