3
\$\begingroup\$

I am designing a digital output circuit.

I got confused about the position of the current limiting resistor of the transistor.

I would like know where it should be. (After or before the pull up resistor.)

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I used the similar scheme for case an analog input signal. It works as comparator. Just from voltage divider output should be under 0.5V then optotransistor opened. If input digital, it is not necessary. \$\endgroup\$ – user263983 Nov 27 '20 at 13:54
  • \$\begingroup\$ @user263983 the input is digital from STM32 \$\endgroup\$ – walid24 Nov 28 '20 at 15:59
  • \$\begingroup\$ Doesn't R110 already limit the current? What does R109 actually do? Why did you decide to add it? \$\endgroup\$ – user253751 Nov 28 '20 at 19:07
12
\$\begingroup\$

In your circuit, U23 is not a source of current into the Q25 base; it works by shunting base current away from the transistor. The base current is supplied solely by R110, so it's value should be calculated to deliver the current required to saturate the transistor.

In fact, R109 should be removed because it hurts the circuit. When U23 is on, R109 and R110 form a voltage divider, so the Q25 base voltage never is below (0.46 V + U23 Vcesat). This is not low enough to guarantee that Q25 turns completely off. Assuming Q25 has a nominal gain of 100, it takes only 50 uA of base current to drive it into light saturation.

\$\endgroup\$
  • \$\begingroup\$ any other note about the circuit \$\endgroup\$ – walid24 Nov 27 '20 at 13:13
  • 1
    \$\begingroup\$ Not without knowing more about the system. Depending on what Dout2 does, you might be able to eliminate Q25 and drive Dout2 directly with U23. \$\endgroup\$ – AnalogKid Nov 27 '20 at 14:08
6
\$\begingroup\$

It makes no sense on either before or after the pull-up and can be removed.

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

That circuit will not work as expected. Resistor R109 and R110 makes voltage divider and Vbase of Q25 never lower whan 0.7 V. So Q25 is on all time. You may put R109 after R110, it will work, but not really nessesary.

\$\endgroup\$
  • \$\begingroup\$ "open" suggests "off" in EE terminology. I think you should say "closed", as it suggests "on" like in case of switches :) \$\endgroup\$ – Mitu Raj Nov 27 '20 at 14:17
  • \$\begingroup\$ @ Mitu Raj Thanks \$\endgroup\$ – user263983 Nov 27 '20 at 17:59
  • 1
    \$\begingroup\$ Sure... but that was already explained before you posted this. Not much use in duplicating pre-existing answers. \$\endgroup\$ – Chris Stratton Nov 27 '20 at 18:15
  • \$\begingroup\$ Quit repeating earlier, better, and more complete answers for a few internet points. \$\endgroup\$ – TomServo Nov 28 '20 at 2:05
  • 1
    \$\begingroup\$ As well, the opto is not really adding anything to the circuit. According to the schematic, the gnd is the same both sides of the opto - thus no galvanic isolation. Maybe there's a mistaken belief that the opto provides some 'protection'? \$\endgroup\$ – Kartman Nov 28 '20 at 3:24

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.