1
\$\begingroup\$

i'm using this simple schematic (using a TLP184) in order to get the status of a reed/dry contact using an optocoupler

enter image description here

There is no way to get it working, also if the connector pins are opened, from pin 4 and GND i get 2.5V.

I'm missing something? Maybe it's a silly mistake, but i can't figure out on how to solve this.

\$\endgroup\$
16
  • \$\begingroup\$ Where did you get the idea to use a resistor from emitter to ground? \$\endgroup\$
    – jonk
    Commented Aug 17, 2020 at 8:21
  • \$\begingroup\$ I've tought that the resistor can be a pulldown resistor, so i've connected it from emitter to ground. \$\endgroup\$
    – VirtApp
    Commented Aug 17, 2020 at 8:23
  • 1
    \$\begingroup\$ @tlfong01, changed R7 and R9 to 330ohm, nothing changed \$\endgroup\$
    – VirtApp
    Commented Aug 17, 2020 at 8:50
  • 1
    \$\begingroup\$ "if the connector pins are opened, from pin 4 and GND i get 2.5V." - With no LED current the transistor should be off and you should get 0V across R12. So either there is a wiring error, or your optocoupler is faulty. \$\endgroup\$ Commented Aug 17, 2020 at 8:59
  • 1
    \$\begingroup\$ Yes, i have a multimeter and also an oscilloscope and i've measured the voltage between pin 4 and GND and i'm getting 2.5V. in any case, i'll try another TLP184 \$\endgroup\$
    – VirtApp
    Commented Aug 17, 2020 at 9:00

3 Answers 3

1
\$\begingroup\$

If you know the CTR and that is like hFE except due to coupling loss may be CTR=25% worst case, a first glance tells me looking and V/R ratios it not reliable. 5/3.3V * (1k+1k)/4.7k needs CTR>100%.

Also you need voltage gain, so with the lousy current gain with load on collector using 10Rin to get voltage gain to compensate for low CTR using common emitter, NOT emitter follower.

So invert switching on output after this if needed with logic.

Look at it as a simple NPN switch with Rb =1K and Rc>= 10k. But instead of Ic/Ib=10 , consider Ic/Ib= 0.1 then it will work.

There is no need to to use rated LED current but for long term you must use at least 10% max current. (Prevent aging)

After reading spec CTR Min is 30% Vce(sat) @ If=1mA

Use common emitter with collector R= 10km for voltage gain.

As long as Ic/Ib >30% with loss of gain when saturated. It should work.

Spec is If=1mA CTR saturated =30% min. Ib=5V-Vf=1.2V/200 = 3.8V/2K=1.9 mA. X 30% into 3.3V = Rc= 5.7k Min

\$\endgroup\$
2
  • \$\begingroup\$ This follows this post schematics, but instead 230V on the led side, i want to use 5V. electronics.stackexchange.com/a/208596/207570 - your answer is not very clear to me, i didn't understood what changes i have to do to my circuit. \$\endgroup\$
    – VirtApp
    Commented Aug 17, 2020 at 9:44
  • \$\begingroup\$ Use common emitter with 4k7. As long as Ic/Ib >10% with loss of gain when saturated. Spec is If=1mA CTR saturated =30% min \$\endgroup\$
    – D.A.S.
    Commented Aug 17, 2020 at 9:47
1
\$\begingroup\$

Check that node GP135 is not connected to an MCU with an internal pullup on the GPIO. That could explain your 2.5V reading (and not much else would!). Test with no other connections than the resistor first.

Otherwise, though I concur with Tony that the current through the LED should be about double for reliability (or use 10K for the load), it should certainly work typically on the bench.

\$\endgroup\$
0
\$\begingroup\$

After trying to make it work with the old configuration, my final design were modified in order to follow a standard optocoupler circuit configuration as following image: i've tested it and it seems to be working well.

enter image description here

\$\endgroup\$

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.