Biasing Transistors in the linear region?
xanatos
Posts: 1,120
I've been using transistors mostly as digital switches most of my life, but I want to start understanding them a little better for some of my analog projects. Here's an example:
I have a device that produces a smooth voltage ramp anywhere between 0 and 5vdc. I want to feed that to a transistor and have the transistor output anywhere between 0 and 24 vdc (obviously, I'm using a 24vdc supply on the collector side of the (NPN I'm guessing) transistor.)
Right now, I know quite well how to get the thing to give me a rapid switch at some point from 0 to full-on saturation, but that's not what I need - I need the output to follow the input, just over the greater range of the 24vdc supply.
I'm pretty sure there are op-amps that do this, but I'm looking to do it with a transistor or two, and some basic biasing calculations that will probably involve a few resistors. Who on here is a transistor guru that can point me in the right direction to get started in making a circuit or two that can do this? As well as how to select a transistor for the task - I'm not sure, but I am guessing my old faithful 2N2222 and 2N3904 devices are pretty much designed to function as switches, not as linear devices, correct?
Thanks!
Dave
I have a device that produces a smooth voltage ramp anywhere between 0 and 5vdc. I want to feed that to a transistor and have the transistor output anywhere between 0 and 24 vdc (obviously, I'm using a 24vdc supply on the collector side of the (NPN I'm guessing) transistor.)
Right now, I know quite well how to get the thing to give me a rapid switch at some point from 0 to full-on saturation, but that's not what I need - I need the output to follow the input, just over the greater range of the 24vdc supply.
I'm pretty sure there are op-amps that do this, but I'm looking to do it with a transistor or two, and some basic biasing calculations that will probably involve a few resistors. Who on here is a transistor guru that can point me in the right direction to get started in making a circuit or two that can do this? As well as how to select a transistor for the task - I'm not sure, but I am guessing my old faithful 2N2222 and 2N3904 devices are pretty much designed to function as switches, not as linear devices, correct?
Thanks!
Dave
Comments
Guru I am not, but I know where to find the info. This site has helped a lot:
http://www.electronics-tutorials.ws/transistor/tran_1.html
BTW, both referenced xistors will operate in a linear region just fine.
THANKS!
Dave
Most NPN transistors behave like most others - unless you have special requirements (such as high gain, low noise, high current, high frequency, low Vsat, low leakage, high voltage). Check the voltage current and power ratings and gain are adequate, perhaps bandwidth matters too?
For your circuit you can use a collector resistor about 5 times the emitter resistor - then the voltage drop across the collector resistor will be about 5 times the base voltage (less a Vbe drop). 0.7V in gives about 24V out, 3.7V in gives about 9V out... The emitter resistor provides negative feedback so the gain is fairly stable (but the output impedance is very high, unlike an opamp). The Vbe drop will depend logarithmically on the emitter current so will add a bit of non-linearity to the system.
The only magic thing about a switching device is that its got low Vsat at reasonable currents and is usually fairly high speed - all the other parameters can be rather poor, but even a poor silicon bipolar transistor will work surprising well!
Welcome man!
Hi Peter,
Part of my desire here is to learn more about using transistors in capacities that are not switching :-) That said, I really do need to get something working to do what I'm looking to do, and the output should be fairly low impedance as it's driving a load. I have about 40 pages of tutorial to read through, hopefully there is something in there about the emitter-follower configuration of which you speak. I've tried using op-amps in the past for similar things, but they all seemed to require way more than two resistors... The last op-amp project I tried used three 741s and about 40 resistors and capacitors and was jumpy as hell despite being on a really clean, well-designed PC Board. Is there a specific op-amp you had in mind that isn't as hairy? :-)
Thanks!
Thanks for this info. The application is not critical on accuracy (within 10% is probably OK), so a bit of non-linearity is fine. Speed is also not an issue - this will probably change literally about 10% per day on average, so that's fine as well.
Ultimately, I'm on another foray into learning something new that I've been on the periphery of for decades now... :-)
Thanks!
Try this:
Not exact but close.
Duane J
Hi Beau:
OK, this is half of a current mirror.
Like minds huh %*)
Edit: Ignore the output stage of this circuit... see below
-Phil
You can get close, with what I knew as a Augmented pair, called Sziklai_pair by Wiki.
http://en.wikipedia.org/wiki/Darlington_pair
http://en.wikipedia.org/wiki/Sziklai_pair
If you need 0-5 : 0-24 you need a gain of 4.8, and so a resistor of 5K from NPN Emitter to GND, and 19K from PNP collector, to NPN emitter, will give you 24V out for 5V on the emitter.
This will be (nominally) linear, and can source current determined by the NPN emitter resistor & the PNP device gain.
Current sink is much lower, just the pull down resistor.
The problems come in the details : if you want to go to 0V, the Vbe of the NPN needs to be offset, using either a Diode, or an identical NPN device, wired as a Diode, or a PNP device as a Emitter follower level shifter, with a pullup to Vcc
That nominally removes the Vbe effect, but it it still likely to be less than ideal, close to zero unless you have a negative supply.
So you can get reasonable DC transfer performance with 3 transistors and 3 resistors, but may decide an OpAmp + 2 resistors is easier....
(Schematic added) Q2.Q3 are the Augmented Pair, and Q1 is just a DC level shift. Assumes Vbe(pnp) is equal to Vbe(npn)
Ok, here is a revised - simplified circuit
This circuit has a dead-zone from 0v to Vbe, and it does not give 24V out for 5V in.
Thanks again, and I'm always open to more cool ideas and tricks with transistors like these.
Dave
Just a little erratum: your schematic implies the LM358 can take upto a 35V supply, whereas its rated for 32V max.
Hi Tracy,
Can't say I understand it *well*, but as I look through it I am understanding it better. I found the configuration interesting as I've used Darlington's before to really amplify signals such as from IR phototransistors. I can see what's happening in a transistor circuit, usually, as I can for this example, but what eludes me is how the proper values are selected, quite often. This is probably one reason why I got into digital electronics. Using a transistor as a switch is much simpler! :-) Recently, I worked on a circuit that had two transistors configured to create a constant-current source, such that as one transistor started to turn on more, it fed back to the other transistor, which controlled the first transistor's base and kept it basically exactly in teh same spot, current-wise. It was a clever arrangement and very visible when looking at it. The Sziklai pair is equally visible to me, however, I have no idea how it is arrived at that that relationship exists between the resistors. This is somewhat embarassing to me as when it comes to microcontrollers, I can work magic at the top end of the scale (thanks to the ideas over the years from so many of you!), but when it comes to something as simple as transistors, I feel like a complete novice! Thanks everyone for all the incredibly useful help!
The operation is nearly identical tp Peter's op-amp circuit in post #11.
Its an non-inverting voltage amplifier with a resister divider feedback.
In jmg's circuit the gain is (19K + 5K) / 5K = 4.8. So 5 * 4.8 = 24.
While yes, Q3 R1 looks like a current source that's not the way to think about it.
Q1 Q3 copies Vin to R1. However, the Sziklai pair also injects current into R1
which reduces the current from Q3 a very small value.
So what ever current passes through R1 is the same as through R2 resulting in
a voltage gain.
This is a very slick circuit!!!!!!!!!
Duane J.
Here is the circuit under consideration with the added resistors and power supplies.
Like the Sziklai it has the NPN and the PNP, but the main show is due to the power supplies and feedback through the resistors.
First there is a PNP emitter follower Q1 at the input The voltage V1 is about 0.6V higher than Vin.
V1 = Vin + 0.6
It will serves as a level shifter to compensate for the -0.6V shift that comes up in Q3.
Suppose Vin jumps from 0 up to 1 volt. Current then builds up through the base of Q3, and current in the collector-emitter circuit of Q3 follows suit. That current in turn causes Q2 to turn on (in the analog sense), and the voltage at the top of R2 rises toward the positive power supply. How far? As it rises, the voltage divider formed by R1 and R2 is causing an increase in the voltage V2 at the emitter of Q3. Negative feedback. As that voltage approaches 0.6V less than V1, Q3 turns off (again, in the analog sense), reducing the base current to Q2 and stopping further increase in Vout. It comes to an equilibrium point at a point with about 0.6V from base to emitter of Q2.
If only the current I2 flows through the resistor R2 and R1, then the standard voltage divider equation applies to find the voltage at V2. More about the approximation in a minute. But if we can ignore I1, then
V2 = Vout * R1 / (R1+R12)
Rearranging and substituting:
Vout = V2 * (R2/ R1 + 1)
= (V1 - 0.6) * (R2/ R1 + 1)
= Vin * (R2/ R1 + 1)
Which with the resistors shown gives the necessary gain of 19/5 + 1 = 4.8.
To be more accurate, V2 depends on more than just the R1/(R1+R2) voltage divider. The current through R1 is the sum of I2+I1. It is not a bad approximation to say I1=0 though, because the current I1 is related to the current I2 divided by the current gain (beta) of the output transistor Q2. A factor of ~100. It can be worked out from a next-step analysis starting with this equation.
V2 = (I1 + I2) * R1
One big effect would come from additional current drawn by an external load attached at Vout. Additional output current would also increase I1. For that reason, one might add an emitter follower at the output in order to isolate the load.
There are a host of other relatively minor effects that would be handled by a Spice analysis with good device models. However, I believe it is important if possible to have an intuition about how the circuit works and a first cut at a quantitative analysis before handing it over to the black box.
Thanks VERY much for your very thorough walk-through on that circuit. It was very helpful. I agree with you wholeheartedly about having intuitions about circuits - that is how I have operated for decades. I have never used Spice and usually can put a circuit together just from memory and educated guesses at parts and get it right on the money most times. Of course, 90% of what I do is digital, so it's not that complicated :-)
I'm really enjoying learning more of the linear/active region for transistors. Writeups like this are VERY helpful and very much appreciated!
Thanks,
Dave
Hi Peter,
I've been looking at your schematic (Post #11) with the LM358. I'm sort-of following this, but it differs from what I know of non-inverting configurations of LM358s in a couple of ways, namely the fact that the 1K resistor (R3) would effectively be in parallel to the 1.8k and 6.839k. Is this to compensate for the Vbe of the Q? I am confused... a bit. Care to elaborate? I'm very familiar now with the standard two-resistor voltage divider form (where the ratio of the resistors determines the V gain, such as 20k and 5k yielding a 4x V gain) - but that 1k resistor is confusing me. The 1.8k and 6.839k form the usual voltage divider configuration, but what the 1k does - especially with a 250 ohm load resistance - is a mystery to me :-)
Thanks for any guidance you can provide here.
Dave
The 1.8K and 6.839K is the feedback network = 4.8X
BTW, I recommend a signal diode connected from the emitter to base on the output emitter follower transistor.
Anode to the emitter cathode to the base.
This is to prevent damage to the base of the transistor, if there is a high capacitive load, which generally have a limited breakdown voltage.
Duane J
:-)
I guess what's getting me is that the 1k is effectively in parallel with the 1.8 & 6.8, but I am guessing that in this circuit it's only the fraction of current that passes through that 1.8 & 6.8 leg that is being monitored by the 358, despite the fact that the total resistance between Q1's emitter and ground is less than 1k in total with that load resistor, am I correct?
Thanks,
Dave
That is the crux of the matter. No matter what load you put on the output, even a variable load, the op-amp will drive the transistor in exactly the right amount to maintain the voltage at its two inputs equal to one another, and that means a constant voltage into the pair of feedback resistors at the emitter output junction.
I found Duane's comment about the extra reverse emitter-base diode interesting. The base-emitter junction of a NPN bipolar transistor, when reverse biased, acts like a zener diode with a breakdown of about 7 volts. If there is a reactance on the output (long cable?), and the input suddenly drops to zero, there could be a transient reverse breakdown condition in the transistor. Not for long with a 250Ω load, though. Food for thought. A high breakdown diode in series with the emitter to the load, rather from emitter to base, would be an alternative way to forestall that breakdown I think.
187 ohm and 710 ohms.
Duane J
I noticed the gain of the transistor had changed. But why? It still worked, just different. I then searched the literature, pre internet, and found others that had seen the problem. Apparently, the emitter-base is neither a zener nor an avalanche diode. Apparently the base structure is quite small and can be damaged with currents as small as 100uA.
Yes, there are transistors that specifically can be used as zeners. I think it's good practice to not let this condition occur. Hence the anti-parallel emitter-base protection diode. Most specs tell us what the voltage is but they never say what happens if we exceed it.
Duane J