0
\$\begingroup\$

I am giving 3.3 V input to the optocoupler from my MCU and using 4.7 kΩ resistance in series to the input of the optocoupler will it work?

  • R1 = 4.7 kΩ
  • R2 = 4.7 kΩ
  • Optocoupler: PC817
  • Vcc = 5 V
  • CTR: MIN. 50% at If = 5 mA
  • Vce = 5 V

Circuit for reference R1=4.7K and input signal voltage is 3.3V,R2=4.7K

\$\endgroup\$
2
  • \$\begingroup\$ What optocoupler? Depends on the CTR, among other things. Also, what voltage is VCC? \$\endgroup\$ Dec 25, 2020 at 20:27
  • \$\begingroup\$ @Unimportant optocoupler: PC817, Vcc =5V, CTR: MIN. 50% at If=5mA, Vce=5v \$\endgroup\$ Dec 25, 2020 at 20:40

1 Answer 1

2
\$\begingroup\$

Driving the optocoupler's LED with 3.3V and 4.7K for R1 will result in a very low current trough the LED. If we take the PC817 datasheet one can see in "Fig.6 Forward Current vs. Forward Voltage" that for very low currents, around 1mA, the LED's Vf is roughly 1V.

So: $$If = \frac{3.3V - 1V}{4.7K} \approx 0,5mA$$

Looking at figure "Fig.7 Current Transfer Ratio vs.Forward Current" we can see that forward currents below 1mA are marked with a dashed line, presumably to indicate such currents are too low for the device to work reliably.

From the same graph we can see the best current transfer ratio is around 10mA. Looking back at figure 5 we see that for a forward current of 10mA the forward voltage is roughly 1.25V. So we calculate R1: $$R1 = \frac{3.3V - 1.25V}{10mA} = 205 \Omega $$

Nearest E12 value is 220 ohm. Of course, do make sure the microcontroller can actually safely source 10mA.

With VCC = 5V and R2 = 4K7 the optocoupler needs to sink $$\frac{5V}{4K7} = \approx 1mA$$ in order to pull Vout down to ground.

Given the forward current of around 10mA and the typical current transfer ratio at that level this should reliably work with ample margin.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks it’s working!! \$\endgroup\$ Dec 25, 2020 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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