2
\$\begingroup\$

I'm planning on using this optocoupler in a PCB I'm making. I've never used one before so I want to make sure I'm doing this correctly and got the right numbers off the data sheet.

The image below is a simplified version of how I set it up. If I read the data sheet correctly the LED has a 3mA max current and around 1.0V forward voltage. The 1.8K resistor should limit the current to about 1.5mA. Then a 100 ohm resistor on the collector to keep it well below it's maximum of 10mA with a bit of room to use higher voltages if I want to in the future.

It will always have a 3.3V signal but I'd like to have the option to use different voltage motors and servos on the other side.

Optocoupler

\$\endgroup\$
2
\$\begingroup\$

It seems you have it hooked up right.

This only puts about 1 mA thru the LED, so the output current will be similarly limited. At 1 mA you only get a current transfer ratio of 63% or 100%, depending on which variant you are actually using. Even at 100% though, that will only cause the 100 Ω output resistor to rise by 100 mV. You need a much larger output resistor for this optocoupler to make a normal digital output signal.

Also note the speed of this coupler. It is not well specified. The worst case is 2.8 µs typical at 2 mA drive and 100 Ω load resistance. You need to figure rather more than that with a larger load resistor to get a full digital output signal. If 10 µs is a significant fraction of your PWM period, then this is not good.

Overall, this is not the right optocoupler if you want a normal digital output signal or are trying to pass a PWM signal of more than a few kHz.

\$\endgroup\$
  • \$\begingroup\$ Thanks, I totally missed the output current being so low. The speed should be okay. I will just have to stick to motors/servos that use a typical servo signal at 50Hz. Is there something better to use for this other than an optocoupler? \$\endgroup\$ – JDD Nov 17 '12 at 17:51
  • \$\begingroup\$ @JDD Is there something better to use for this other than an optocoupler? A BJT / MOSFET, if you don't really need the galvanic isolation. \$\endgroup\$ – m.Alin Nov 17 '12 at 17:57
  • \$\begingroup\$ It's not really needed but Rev. A of this board had a lot of problems with the PWM signals. Probably not enough grounding. I hope the opto will be an easy fix and a chance for me to learn how they're used too. \$\endgroup\$ – JDD Nov 17 '12 at 20:29
2
\$\begingroup\$

It does not look right to me.

You have 3 Volt logic levels going in with a diode drop and you assumed 0V drop. The spec is 1.25V typ @3mA which drops slightly with lower current and visaversa.

Thus 3.3V input, If= (3.3-1.2)/1.8K = 1.2mA which is near the abslute minimum of 1mA where CTR drops below rated specs. Above 1mA is however linear. But your output CTR is 65% to 300% depending on part number. Since this includes beta of transistor it is very wide tolerance compared to optoisolators with just photodiodes. Let's assume 150% in the middle of the range for now. Thus Iout= 1.2*1.5 = 1.8mA across 100 ohm= 180 mV.

What interface requirements do you have on the output?

You can excellent CMMR and 1500V isolation with a floating optoisolator but your voltage range has gone from 3.3V to 180 mV. You can increase with Re which increase Vout but it also affects risetime for which Olin has advised you correctly to beware how this affects your commutation with PWM.

Opto-isolators are great but not so fast unless you choose parts wisely. Even if you get 150% CTR , there is a huge tradeoff for bandwidth and voltage gain.

Generally if you want highest speed but significant loss in voltage gain, use emitter follower mode. If you want voltage gain, then use common emitter with the obvious inverted logic output.

Best bet is use Common mode ferrite choke around the cable bundle without optoisolator

Alternatives

  • use optoisolators with logic level output tend to be very expensive but very high speed (<<1us).

  • Do a noise and timing analysis on commutation of PWM signals with shoot-thru effects and consider what drivers you need.

Optoisolators

\$\endgroup\$
1
\$\begingroup\$

Correct in general principle.
A few pointers:

There are two versions of optocoupler. You should say which you have as they differ enough to matter.

Current transfer ratio (aka gain) depends on current and perhaps voltage. - It's about 100% = 1 typically. So Iout is typically <= 1.5 mA and may be about half that.

The 100 Ohms (in emitter not collector, although about the same in this case) will give 0.1V out at 1 mA out. If the transistor had much more gain you could get up to 5/100 = 50 mA. But as you only have around 1 mA out you will need a much larger resistor to get a useful Vout in most cases. (~+ 0.1V may be OK here but probably not.

.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.