The circuit above is used to detect an event at a certain input voltage. Nevertheless according to the temperature, the event is not detected at the same temperature as the VBE(ON) changes with the temperature.

enter image description here

enter image description here

Does anyone know how to compensate this circuit against temperature change ?

  • 2
    \$\begingroup\$ That's a terrible circuit if you need accuracy, especially for something going into production. Use a comparator and a reference. (Or a TL431 as Neil suggests.) \$\endgroup\$
    – John D
    May 31 at 17:40
  • \$\begingroup\$ Jess, using a BJT (whose Vbe varies about -2 mV/K) as a comparator isn't sensible. If you make a comparator out of a differental pair (especially if you get the BJTs for it from a package that has both BJTs on the same die) then this is much better. You still need a reference. \$\endgroup\$ Jun 1 at 0:40

2 Answers 2


The simplest approximate way to compensate a transistor VBE is to place another diode, or better still a diode connected 2N2222, in series with R1. Unfortunately, that also cancels the 'reference' element of VBE that you are using.

Instead, consider using a TL431 or TLV431, using its adj terminal as the 'base', and it will behave like an NPN transistor, with a temperature stable 'VBE' of 1.25 V for the TLV431, or 2.5 V for the TL431.

The classic way is to use a temperature stable reference voltage into one terminal of a comparator.

  • \$\begingroup\$ For the TL431, do you mean equivalent 'VBE' of 2.5V? \$\endgroup\$ Jun 1 at 6:08
  • 1
    \$\begingroup\$ @SimonFitch Thanks for catching that. I was typing TLV431 without paying much attention, and obviously missed hitting the V properly. Now fixed. \$\endgroup\$
    – Neil_UK
    Jun 1 at 9:05

You are using the Vbe as a reference, so cancelling it out won't do you much good.

An IC comparator with a reference, either divided from the power supply if that's good enough for you, or an IC reference, is one good solution.

Here's a simple discrete circuit that improves the temperature sensitivity by about 6:1 by adding a differential pair and using the power supply voltage as a reference:

enter image description here


Your Answer

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

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