# Why would you attach a Diode to the base of a BJT?

I was looking at a DC BJT setup for sourcing current and came accross this

I have never seen a diode attached to the base of BJTs before and was wondering what it might be used for? I believe it might be used for compensation due to effects in temperature, but I haven't seen much info on this or why you wouldn't bridge the voltage at the base of Q1 with a resistor instead. Does anyone have any suggestions to why you might do something like this?

-

It is there to keep the transistor's current less susceptible to temperature changes.

In the case of Q1:

Suppose that instead of having R1 and D1, Q1base was connected directly to ground.
Emitter current would be: $$I_{e} = \frac{20V - V_{be}}{R_{2}}$$

You can see Ie is susceptible to variations in Vbe, which has a known dependency on temperature (T), so you might as well express it as: $$I_{e}(T) = \frac{20V - V_{be}(T)}{R_{2}}$$

But with the diode, if they are matched and thermally bonded: $$V_{diode}(T) = V_{be}(T)$$

So now: $$I_{e} = \frac{20V+V_{diode}(T)-V_{be}(T)}{R_{2}}$$ Which simplifies to: $$I_{e} = \frac{20V}{R_{2}}$$ Independent of Vbe, and its variations with temperature.

The diode is effectively providing the little voltage offset that would be needed to compensate for Vbe changes with T, in order to maintain a constant current.

-
Thanks for the advice and for showing some simple equations for explaining temperature compensation. Usually I am used to biasing with resistors so its interesting to see it with diodes. –  user1207381 Dec 12 '12 at 18:42

It's a form of temperature compensation. As long as the diode and the transistor are at the same temperature, the variation in the diode's VF tracks the transistor's VBE, keeping the collector current more constant.

-

The diode is there to provide roughly the same voltage drop as the B-E junction of the transistor does. Often this is done with a second matched transistor in what is called the current mirror configuration:

Look at this closely and see how Q2 will source the came current on its collector as whatever is drawn by I1. This is used in ICs without the resistors. It works because two transistors next to each other that ran thru the same process are well matched.

-

The diode is used to create an accurate bias point which is about 0.7V above the common return voltage. This bias point is relatively immune to changes in the supply voltage. Whether the positive voltage is 9V or 20V, the top of the diode will be at 0.7V. If we replaced the diode with a resistor, the bias point would not have this property. Its voltage will vary with supply voltage. Double the supply voltage from 9V to 18V, and its voltage will double also.

Why does the circuit want to keep the bias at exactly one diode drop above ground? What that will do is put the emitter of Q1 (top of R2) at approximately ground potential, because of the diode drop across the BE junction of the transistor. Thus the emitter is a "virtual ground". It's not clear why that is important without more information about the circuit: where it is used, for what purpose, and any rationale notes from the designer.

That is, why can't the base of Q1 just be grounded, resulting in a bias point that is just 0.7V lower. Maybe there is no reason. Designers do not always do things for rational reasons, but rather for "ritualistic" reasons. It looks as if the designer wanted the voltage drop across R2 to be precisely 20V. Note how R2 is specified as 4.99K, which is ridiculously precise. A 1% tolerance 5K resistor could be anywhere between 4.95K and 5.05K. A 4.99K resistor isn't something you can actually go out and buy, so you cannot actually build this circuit as specified, unless you use a variable resistor and use your digital potentiometer to tune that resistor to 4.99K. The -20V supply has to be just as precise for such a precise value of R2 to make sense. The current through R2 (and hence the collector current of Q1) will vary with the negative supply voltage.

-
4.99K ohm resistor is an odd value, however, our coworker is incorrect in its available in many forms from .1% to 5% tolerance. Check out Mouser electronics, Digi-Key or Newark to purchase. Dan –  user26640 Jul 22 '13 at 17:19