## Two bipolar NPN transistors in pair

9 posts / 0 new
Author
Message

Hello,

can someone please explain this circuit to me? I searched over the web and can`t find infos. Found lots of examples of NPN+PNP connected in pair, but never saw this configuration of two bipolar NPN together. IF it helps, the circuit in picture is from a digital input circuit.

Thanks

## Attachment(s):

This topic has a solution.

Last Edited: Tue. Sep 12, 2017 - 09:07 AM
This reply has been marked as the solution.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

Thank you.

This is a constant current sink, of which there are many versions:

http://www.pcbheaven.com/userpag...

http://www.talkingelectronics.co...

https://electronics.stackexchang...

The bottom NPN sets a constant voltage across the bottom resistor because its collector controls the base of the top transistor with negative feedback. This constant voltage has the value of VBE, ~0.7V, so the constant current obtained is ~0.7/RLower minus the base current of top transistor. You can remove the base current error by using a MOSFET as top transistor, and the bottom transistor can be replaced by a TL431 type shunt voltage regulator to obtain a precision constant current sink.

Note: TL431 wastes 2.5V, nowadays there are more modern versions with very low voltage, for example the ZXRE160 has a drop of only 0.6V, comparable to the NPN VBE, but highly stable and precise.

Note: sure, if you just want to drive LEDs, you don't need precision. But for instrumentation, you might need a stable current, for example to excite a sensor.

Last Edited: Tue. Sep 12, 2017 - 10:43 AM

thanks for detailed explanation

It makes it a lot easier if you embed the image, so that we can see it - like this:

Full instructions on how to do that here: https://www.avrfreaks.net/comment...

Klemko wrote:
the circuit in picture is from a digital input circuit.

The TLP291 is an Optocoupler (or Optoisolator):

So, now that you know that your circuit is a constant-current driver - think about why that might be useful in "a digital input circuit" ... ?

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

It is to enable different voltages on the input, since the diode in the optocoupler is a current driven component.

Last Edited: Wed. Sep 13, 2017 - 10:30 AM

Indeed.

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...