Learning about a one transistor gain stage.

Started by Kesh, September 04, 2012, 10:19:03 AM

Previous topic - Next topic

Kesh

I wanted to learn something about transistors, so I've followed this tutorial: http://www.st-andrews.ac.uk/~jcgl/Scots_Guide/experiment/lab/expt5/page1.html

I altered it for 9V and for my choice of transistor's hfe, and it was great doing the mathematics and actually figuring out why all those resistors go where they do and what value they are.

My question is though, is it any good for bass and guitars?

I'm also a bit perplexed by the 22u cap in parallel to the emitter resistor, and its effect on frequency response. I've not seen a gain stage using such a thing, except the fuzz face.

PRR

> is it any good for bass and guitars?

Do you have a bass or guitar?

Or conversely: do you know what properties an amplifier stage should have to be useful for bass and guitar?

> perplexed by the 22u cap in parallel to the emitter resistor, and its effect on frequency response.

That explanation is left to the student. "The 22uFd, Ce, is a 'shunt' capacitor. In principle, we could omit Ce, but if we did the amplifier voltage gain would be low. Can you explain why this would be the case?"

Remember what a cap is. Open for low/no frequency, short for high frequency, and in-between in-between. From that, you should be able to sketch the shape of the frequency response.

Have you got to computing R-C products and frequency?
  • SUPPORTER

Jdansti

Hats off to you for learning this. I need to do the same. I took one semiconductor class in college many years ago for fun (not related to my major) and I've forgotten almost everything I learned.   Time to get it back into my brain again! :)
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

Kesh

#3
whoops, double post

Kesh


Quote from: PRR on September 04, 2012, 11:28:28 PM
> is it any good for bass and guitars?

Do you have a bass or guitar?

Or conversely: do you know what properties an amplifier stage should have to be useful for bass and guitar?

> perplexed by the 22u cap in parallel to the emitter resistor, and its effect on frequency response.

That explanation is left to the student. "The 22uFd, Ce, is a 'shunt' capacitor. In principle, we could omit Ce, but if we did the amplifier voltage gain would be low. Can you explain why this would be the case?"

Remember what a cap is. Open for low/no frequency, short for high frequency, and in-between in-between. From that, you should be able to sketch the shape of the frequency response.

Have you got to computing R-C products and frequency?
I have a bass, and I've breadboarded it, and it sounds okay. As I want to build a colourless gain pedal, not huge amounts of gain. The properties I would find desirable is as flat response as possible from 40 to maybe 8K, low noise, low distortion.

Yes I know RC circuits, but I'm wondering how to find the equivalent RC circuit from that cap.

Thanks though.

Jazznoise

I'm seeing what I remember from my 2nd year in college, so bear with me!  :icon_lol:

At DC the gain is still set by Re/Rc or the ratio of the Emitter to collector resistance. Small Rc gives us a much higher gain than a big Rc.

At high frequencies the Cap is essentialy a short circuit and the dominant resistance seen by high frequencies is "little" Ree (I'm assuming Rg is there as a conceptual replacement for this) which is the internal resistance of the transistor. To calculate this we need to know the voltage and the current going through. So if we assume 9 volts and we use two 10K resistors we get a current of 9/10000=0.0009 Amps or 9 mA. We can take it that this current flow is constant through the transistor (Or, at least, we will assume it) and we can see with our 26mv voltage drop (Boltz Constant) that V/I=R and that 0.026/0.0009 gives us an Ree of 28.888 ohms or 29 ohms.

That's a very sketchy and quick way to do it and once you apply base resistors for biasing that figure will change, usualy you calculate Rb, give a voltage drop of 0.7 to get you to Ve, calculate the DC current through Re using Ohms law and then we can calulate Ree using the current.

Anyway, we can see now that 10,000/29 is a signifigantly larger gain with no DC instability. It's a gain of roughly 344 or about 40 dB. In reality we wont GET that gain and unless the signal is very small the thing will clip very easily. For this sort of gain we've much less silly ways of getting it than just hammering the crap out of a 2n3904.

Doing your RC curves is simply just a filter equation.  At 20Hz you'll want the impedance of the capacitor to 1/10th of the emitter resistor. It's just your 6.14 F C! F is 20 hz for full band, though for a Bass guitar 40hz is acceptable. 80hz for a guitar.

remember that to AC that a voltage source is also ground!
Expressway To Yr Null

Kesh

#6
Quote from: Jazznoise on September 05, 2012, 09:32:18 AM
I'm seeing what I remember from my 2nd year in college, so bear with me!  :icon_lol:

At DC the gain is still set by Re/Rc or the ratio of the Emitter to collector resistance. Small Rc gives us a much higher gain than a big Rc.

At high frequencies the Cap is essentialy a short circuit and the dominant resistance seen by high frequencies is "little" Ree (I'm assuming Rg is there as a conceptual replacement for this) which is the internal resistance of the transistor. To calculate this we need to know the voltage and the current going through. So if we assume 9 volts and we use two 10K resistors we get a current of 9/10000=0.0009 Amps or 9 mA. We can take it that this current flow is constant through the transistor (Or, at least, we will assume it) and we can see with our 26mv voltage drop (Boltz Constant) that V/I=R and that 0.026/0.0009 gives us an Ree of 28.888 ohms or 29 ohms.

That's a very sketchy and quick way to do it and once you apply base resistors for biasing that figure will change, usualy you calculate Rb, give a voltage drop of 0.7 to get you to Ve, calculate the DC current through Re using Ohms law and then we can calulate Ree using the current.

Anyway, we can see now that 10,000/29 is a signifigantly larger gain with no DC instability. It's a gain of roughly 344 or about 40 dB. In reality we wont GET that gain and unless the signal is very small the thing will clip very easily. For this sort of gain we've much less silly ways of getting it than just hammering the crap out of a 2n3904.
No, Rg is an actual resistor, used to control the voltage gain. I'm using 470R and a Rc of 8K2 to get gain of about 17.

Quote from: Jazznoise on September 05, 2012, 09:32:18 AMDoing your RC curves is simply just a filter equation.  At 20Hz you'll want the impedance of the capacitor to 1/10th of the emitter resistor. It's just your 6.14 F C! F is 20 hz for full band, though for a Bass guitar 40hz is acceptable. 80hz for a guitar.

remember that to AC that a voltage source is also ground!
Thanks, that's exactly what I need, as I wasn't sure what resistor to pair it with in the RC calculation. C3 is 22u, Re is 1K8. If I calculated right that's good for 40Hz pretty much bang on, but I may put a 47u in there for full band. Maybe need it for 5 string bass if I get one one day.

The biasing is 470K from 9V to base, and 100K from base to ground. I'm using a 2n5089 and basically went through all the steps, deciding collector current of 0.5mA, Vc of 5, deciding bias multiple of base current of 15, etc, etc, and cranking the numbers.

It sounds sweet. Quiet and no clipping that I can hear even if I slam my base around, and now instead of getting a weak input level on the passive input on my amp, I get a good one on the active input.

Very happy with how this project is going. Time to box it.

And 2 Pi = 6.14? wonky circles!

Jazznoise

#7
6.28 is Tau, which is 2 x Pi. But why say 2 pi when we have more succinct methods of saying the same thing?

Also, it reads easier when written. 6.28xFxC or 2xPixFxC?


EDIT : My bad  :icon_redface:
Expressway To Yr Null

Kesh


Jdansti

You say tomato, I say tomäto. You say 2pi, I say tau...  :)
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

PRR

> what resistor to pair it with in the RC calculation

Both.

You know that without the cap you have one gain, with the cap you have another gain. When the cap is in-between, gain is in-between, simple slope. You sketch this horizontal from DC to some low frequency, horizontal at a higher gain from infinite frequency (limited by other factors), down-to some low frequency, and slanty between.



As the cap reactance passes each resistance value, the sketched line "breaks".

In fact the response will not be sharp bends. In simpler cases the real response will be 3dB off of the kink, and you can simply put dots and curve a line. When two kinks are not far-apart (10:1 is far but not very far), they will interact some.

However, in audio we often don't-care about the lower breakpoint. The audible bass-cut is 100r+10uFd.

The above analysis is not exact. I've avoided hard work past the first or second decimal place. In audio, we almost never care. It is cheaper to use a 100uFd than to wonder if a 10uFd is just-barely enough. OTOH if we want a bass-cut (guitar usually does to avoid mudding-up its overlap with the bass player), we usually must find that value by experimentation. 10uFd might be -3dB at 82Hz, but guitarists may like 2uFd for a more-tenor tone (when working with bassist) or 25uFd for less than 3dB loss on lowest note when working without bassist.

Also I have neglected internal emitter resistance (26-30 ohms at 1mA), internal collector resistance (~~1000X higher), any load impedance, any input or output caps, amp and speaker response, color of knobs, etc.

> few of these have a factor of 2 in front of pi

In audio, pi 'always'(*) comes with a two.

RC gives a number in radians per second. Audio-dudes only understand cycles per second.

(*)I can think of a few derivations where pi appears apparently alone. (Class B sinewave efficiency is one.) Nothing we would do every day.

It might be nice if calculators had a 2pi button. (Good slide-rules did, and bad ones often got a scratch for easy 2pi.) I don't consider a pi button as a feature... I use 6,.,2,8 or just 6 depending on my mood.
  • SUPPORTER

Kesh

#11
Extremely helpful, I'm learning more everyday. Thank you.

My next issue is the ratio of base current to voltage divider bias current. (This pic has no emitter cap, but I just found it to illustrate my point.)



I read that when setting up quiescent values, I2 can be anything from 1 to 100 multiple of Ib. No explaination.

As what I'm trying to do is toward the low extreme of this, I2 = 3*Ib, I'm wondering if it is a good idea. I suspect not, but haven't a clue why.

Jazznoise

You mean a "Tau" button, right PRR?  :icon_biggrin:

What you're setting now is what we call input impedance. The ratio of the 2 resistors is important for biasing - just over half VCC is usualy what we're aiming for in a simple amplifier. Having two 5 Meg resistors there sets a small DC current but means the input signal sees a very high resistance to ground and VCC, ballpark it at 2.5 Meg.

It's really about how comfortable you are with loading the previous stage. High impedance stages can get noisey due to Johnson noise, but too low an impedance will be inefficent and if followed by a previous active stage may cause distortion as the device struggles to deliver the current. For a Bass/Guitar pickup going directly into a "normal" pre 600 - 5K Ohm stage is totaly overloaded, 100-500 K is kinda "vintage". Full band is around 1 Meg and "sparkly" a la a Super Hard On or other buffer/boosters is 2.5 - 5 Meg. This is why using a DI box for bass guitar is so normal.

A pickup is an inductor in series with a resistor. You're essentialy changing the poles of the passive filter that is the pickup and you're changing the Q value of it by changing the ratio of resistance to inductance - abit like the bypass cap!
Expressway To Yr Null

R.G.

Quote from: Kesh on September 08, 2012, 03:49:35 AM
My next issue is the ratio of base current to voltage divider bias current. (This pic has no emitter cap, but I just found it to illustrate my point.)

I read that when setting up quiescent values, I2 can be anything from 1 to 100 multiple of Ib. No explaination.

As what I'm trying to do is toward the low extreme of this, I2 = 3*Ib, I'm wondering if it is a good idea. I suspect not, but haven't a clue why.
There is a subtlety lurking here. That circuit is (or was) known as the stabilized bias circuit. It was developed to give a predictable collector current and voltage in the face of wide variations in transistor current gain and drift with temperature. The subtlety is that to keep the thing stable, the parallel resistance of R1 and R2 must be "low" compared to the emitter resistance times the current gain, and the voltage across the emitter resistor must be "large" compared to the amount that Vbe drifts with temperature.

Take a step back. Imagine that you have tied the base to a 1.5V battery to ground. The battery can supply essentially any current the base wants.

How much does the base want? It wants all it can get, and is only held back when something forces it to back off. That something is the voltage across the emitter resistor. With a 1.5V source on the base, the emitter resistor gets 1.5V minus one Vbe drop. The Vbe drop can be as low as maybe 0.45V for silicon or up to about 0.7V if we're not talking amperes of base current. It's usually approximated as 0.6V +/- 0.1.

If the collector is open, then we just have a diode/resistor, in that battery current flows through the base-emitter diode into the resistor. The resistor voltage rises and the current rises until the resistor voltage equals 1.5V minus the diode current. But if we connect the collector, current gain gets into it and the collector contributes HFE times the base current to the emitter. If the current gain of the transistor is over about 50, we can neglect the base current entirely as regards making the voltage across the emitter resistor. Or, we can assume that the Vbe is the Vbe for a HFE-times smaller base current, because that is what happens. The emitter voltage rises until Vbe gets so low it can only support the voltage on the emitter. This is an elementary feedback stabilizing system. If Vbe can only vary 0.1V, and the emitter to ground voltage is 1.0V, to a first order the change of Vbe with transistor type, HFE and thermal drift makes an insignificant change to the current in the emitter, so the bias point is stabilized.

But we don't have a battery, we have resistor string. The same kind of so-little-we-can-ignore-it reasoning applies. If the base current, which is the difference between I1 and I2, is so small that we can neglect the diffference between them, then the voltage they make at the base is determined by the resistors and not by Ib. The 10X rule applies. If I1 and I2 are over 10x the base current, you can usually ignore the base current, and the voltage you get at the base is just the resistor ratio.

QuoteI read that when setting up quiescent values, I2 can be anything from 1 to 100 multiple of Ib. No explaination.
As what I'm trying to do is toward the low extreme of this, I2 = 3*Ib, I'm wondering if it is a good idea. I suspect not, but haven't a clue why.
I2 can actually be 0. In effect, that makes R2 be an open circuit, and you then have the old (old, old, old) fixed bias circuit. This is critically dependent on the value of R1, HFE and the emitter resistor. Its "stability" comes from the ratio of the voltage across R1 compared to the change in Vbe. It is much less stable, and may require selected HFE transistors to work every time.

The higher the multiple of I1 and I2 compared to Ib, the more stable the bias point is. The thing you read, I2 being any value from 1 to 100, is correct. The higher the multiple, the more stable the circuit to variations in HFE and temperature, which is very important to a professional trying to design something that is going to have 100,000 copies made and sold. The lower the multiple, the more tinkering and fiddling will be needed with changes in HFE and temperature.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PRR

> C3 is 22u, Re is 1K8. If I calculated right that's good for 40Hz pretty much bang on

Way too small.

This one stage has three caps. The complete chain from pickup to speaker may have 10 or more caps.

If each cap is computed with 2piRC, and contributes -3dB at 41hz, then the complete path is _30_dB down at 41Hz.

As an approximation, a 42hz corner is also down 1dB at an octave higher, 82Hz. For 10 caps that's 10dB down at 82Hz. Is around a half-dB another octave up, ~~160Hz, so 5dB down here.

-5dB at 160Hz to -30dB at 41Hz is a _25_dB drop over 2 octaves, or ~~12dB/Oct.

-10dB at 82Hz to -30dB at 41Hz is a _20_dB drop over 1 octave, or ~~20dB/Oct.

Anything over around 9dB/Oct tends to be "cut-off".

Basically dead below 82 Hz.

May as well be a guitar.

The chalkboard target for most audio gear is to set your bass-corners 10 to 100 times lower than any stuff you want to pass un-harmed.

This is especially true for emitter caps. They are high uFd but low voltage. In that range, 100uFd 3V may be as cheap as any 10uFd cap. Your in and out caps may need to be higher voltage (not a real issue in 9V work), and may want to be Film to reduce leakage which upsets bias or pops when switched. These are often 1uFd or less, but not lots less, and that's a range where uFd equals money. Set your emitter over 10X low (4Hz), set your output cap 5X low (8Hz), and if you need to cut subsonics (you probably don't) then take that at the input cap set to perhaps 20Hz-30Hz.

_____________________________________________

> the ratio of base current to voltage divider bias current.

I always start with "10".

No, I start with bias-divider current 1/10th of collector current.

If hFE is 100, they come to the same thing.

I was trained on "assume hFE>50". There was a time you would not assume higher unless you could justify an increased cost.

Now that hFE=400-800 are as cheap as any, you could maybe use a number "20".

As Jazznoise says, this also influences Input Impedance.

Go back. Assume you set divider current equal to collector current. Input impedance tends to be as low as output impedance, maybe lower. (Try some values.) While that is not "wrong", _usually_ (today) we like high input impedances and low output impedances.

Especially when the source is a passive pickup. We have little signal power to spare, the power margin may be different at different frequencies. Guitar pickups are wound for pleasing output with typical cables and around a Meg of impedance. 470K will do, 100K tends to take the zing out of the string. (47K is used in some fuzzes to mellow the sound before hashing it up again.)

> the low extreme of this, I2 = 3*Ib

If you nail some parts down and tweak, this will work once and forever.

If like Expat or RG or E-H or RCA/GE, you plan to make a million of them, with cheap 10% resistors and any transistors the purchasing manager dredges from bins, you need more cushion for part variations.
  • SUPPORTER

PRR

> the ratio of base current to voltage divider bias current.

Another old concept: Shea's Stability Factor (simplified by Cowles) "S" is Rb/Re. "For most amplifier work, S will have values near the geometric mean of Beta and 1, or square-root Beta."

i.e. if Beta is surely not much less 100, set Rb/Re near 10.

In the bias-divider plan, Rb is the equivalent resistance of the two resistors as seen by the base.

In most cases Rb1 is much bigger than Rb2 (perhaps 33K:10K), so little error results if you just take Rb2. Then with Rb2=10K Re=1K, S is 10, and that fine for Beta from a little below 100 to well above 100 (i.e. you can use a loose-sort specification and use almost any transistor that missed spec for some high-price fussy application).

Rb/Re does NOT work in many-many perfectly practical plans. Collector Feedback is very stable but has no Re (or if it has Re to set audio gain, its value has neglible effect on DC stability).
  • SUPPORTER

Kesh

#16
Thanks guys, I'm learning so much from this thread. And thanks especially for PRR pointing out that we musn't think in terms of just one cap for filters. That would have been a big goof for a pedal maker, seeing as how people like to chain them.

In the end I derived Vb in terms of all the resistors (though Rc doesn't figure yet), Vcc, Vbe and beta, and differentiated with respect to beta, as a measure of *instabilty*. Taking the reciprocal, the dominant term for stability against a proportional change in beta is beta * Re/Rb, as mentioned above. (Shea's stability factor is the other way around where low is stable, yes?)

If I write Re as Rc/gain, ie output impedance over gain, and call Rb input impedance, I get stability as proportional to beta * Zout/(Zin * voltage gain), so we pay for voltage gain and impedance decreases with beta, constructing better, more stable buffers or boosters when we have higher hfe.

Assuming I did the maths right  ;D

Curious about why sqrt beta and not just some fraction of beta for Shea's. Do high beta transistors tend to vary more with temp or in fabrication?

WAIT. I messed up.

I was calculating base VOLTAGE instability, when Ib is way more important, seeing as how it gets amplified by beta.

Time to go back to my pencil and paper  :icon_redface:

slacker

Quote from: Kesh on September 09, 2012, 06:19:33 AM
And thanks especially for PRR pointing out that we musn't think in terms of just one cap for filters. That would have been a big goof for a pedal maker, seeing as how people like to chain them.

I was just going to say the same thing, I'd never thought about that before. Any thread with Paul and R.G. contributing is always going to be worth a read.

Gus

look at this thread for some things to think about with boosts http://www.diystompboxes.com/smfforum/index.php?topic=98928.0 

The interaction of the passive bass and cable and input resistance of the boost.  This can cause an EQ.  Pay attention to your cable cap between bass and boost.

Why do you want to boost a bass? is the amp broken? most amps have more than enough gain for a signal from a bass
If you want to boost a bass you might want to cut lows so your sound does not turn to mud at louder volumes.  Think about the output level of a bass and the size of the magnetic core wire in the strings

If you want to use a NPN or PNP and have a higher input resistance you could bootstrap the input.  Look at the beginner project at this site or some of the stages in a Univibe or other circuits that use bootstrapping

Kesh

I don't want much boost, my main aim is to up impedance to the active input of my bass amp. For no reason other than to learn how.

I want a bit of boost, as I will probably have a volume control on the circuit and want to have the flexibility to go above or below unity.