The B7 Class-A Discrete Opamp - Updated 7-5-04

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

tk@halmi

Well-known member
Joined
Jun 3, 2004
Messages
999
Location
Oregon, USA
Hello,

This was fun making. I hope you will have fun with it too.
http://mysite.verizon.net/res75okq/sitebuildercontent/sitebuilderfiles/B7-discrete-opamp-7-5-04.pdf

Cheers,
Tamas

7/5/04 - Edited the link to the updated document.
 
My goals for a discrete opamp were the following:
Provide 6dB to 26dB gain with a bandwidth of 100kHz
n Be stable at x2 gain in non-inverting mode

Tamas,

Would this DOA be good as a unity gain buffer? Or is it only stable at x2 gain and above?

elco
 
Elco,

I have tested it for x2 gain and up only. I wanted to make sure that the slew rate does not suffer too much. It is difficult to make opamps unity gain stable, have good slew rate and have high bandwidth.
If you always used that specific opamp at unity gain you could make C1 a higher value, like 47pF or 56pF. I will figure out the exact value and come back with it.

Also, there is a trick that John Hardy recommended when I asked him about the same thing regarding the 990. He said that his opamp has very low input noise and he would recommend putting a simple voltage divider using two resistors. Then set the opamp at x2 to make sure it is stable and get unity gain that way.

Using 1k feedback resistors the input noise of the B7, according to the simulation, is about 3.1nVsqrt(Hz) at 1KHz. I am thinking it is 4 or 5nV in reality. Depending on your application the voltage divider may work.

Cheers,
Tamas
 
Tamas,

That is a fantastic design, thanks for sharing it with us!

BC639/BC640 are my favourite transistor pair- they can take a lot of abuse for their size :green:

I'm sure once it's put on a PCB any stability issues can be ironed out and capacitor values can be tweaked according to board layout and external circuit conditions- like you mentioned with the 100pf cap. I like using those white "breadboards" too- quick and easy to work stuff out on!

Great work.

:thumb:

Mark
 
That's great, Tamas. Thanks for posting it. Another project - if I just didn't have to work...

:green: :thumb: :thumb:
 
Thanks Everyone, and Thank You Fred for the kind words!
I have learned so much from people here in the past year. This is just a small thing I was hoping to contribute.
 
If there is one thing I've learned from GDIY, it's that you cannot have too many discrete op amps. :green:

That looks like a slick design. I'll have to try it out.
 
Nice design.

Differences between this and many other op-amps:

The input bias current will be high, around 20 microAmps. Input bias current offset will tend to be around 5 uAmps. You can't use large-value input resistors without large DC offset.

This is a key problem in audio. If you set the transistor current high to reduce voltage noise, you get large DC current and large current noise. Since most chip-amps go too far the other way (super-low current), it is good to have this design. But it may not drop-in all op-amp applications.

Slew rate looks like over 50V/uSec, plenty fast.

If you want to spend more than $3, one of the super-pair transistors like LM394 may be good for the input pair. The bias current will be a little less than with the average MPSA18, and input current and voltage will be much better matched. But the super-parts cost $5-$15.

Short-protection: you will find it hard to drive 600 ohms to 21 volts with TO-92 transistors without elaborate protection. It makes sense to find TO-5 or TO-126/220 transistors that are fast enough for this design.

However to reduce breadboard accidents, try this super-simple add-on:
Tamas-short.gif


The current will be limited to about 0.6V/10 ohms, or about 60 mA. Into a dead short this gives 24V*60mA= 1.44 watts. A TO-92 will not survive that for long, but it may not blow in an instant. A TO-220 will take 1.5 watts for hours without heatsink.

You could instead add 200 ohm resistors in the collectors. Then the worst-case transistor dissipation is 12V and 60mA or 0.72W, which some big TO-92 devices will take for a while. In a dead short (and without the diodes shown above) the transistor dissipation falls to almost zero and resistor dissipation rises to 2.88 watts: use 0.5 watt resistors and the smoke will make it clear that you have a problem. But under normal 600 ohm loading the resistor dissipation will be much less than 0.5 watts (possibly less than 0.125 watts). This technique does reduce the 600 ohm output voltage several dB.
 
Hi PRR,

Thank You for the comments and the help. It is much appreciated.

I will add the diode protection circuit and drop in an MJE171/MJE181 pair to see how that works. Also, could I just double/triple up the BC639/640 transistors using a common emitter resistor to improve power handling?

The LM394 is about $6 at most places so I am going to give it a try. What current would you recommend through those transistors?

I have inadequate measurement skills currently. Can I measure the slew rate by doing a rise over step type of deal on the oscilloscope?

And this last question to abuse your good will. Are there tricks that can improve stability? I know of the following only:
1. Compensation network at a high impedance node such as the second voltage amplifier base to emitter.
2. Bypassing the emitter resistor on the second voltage amplifier with a small capacitor (and why sometimes this has the opposite effect?).
3. Bypass network around the feedback, a resistor and a capacitor in series to reduce HF gain.

Thank You,
Tamas
 
Hey Tamas,
Only just saw your post. What a most excellent thing to do for the community, thank you for posting it here. Nice work too :thumb:
Cheers :guinness:

John.
 
> Are there tricks that can improve stability?

In short: no.

National Semiconductor paper AN-A: The Monolithic Operational Amplifier: A Tutorial Study sections 3 and 4 show the basic problem. A classic transistor op-amp has two gain stages and an ouput buffer. There are three high-frequency roll-offs. A simple universal (not custom-compensated) op-amp must have just one roll-off within the range that feedback is effective (gain bandwidth divided by closed-loop gain). In monolythic op-amps, and most discrete power transistors, the output device(s) gets weak at 1MHz-10mHz and you can't do anything to help it. The low-current input stage is also liable to have low bandwidth.

The solution used on the 101/741 is to put a 3pF-30pF cap across the -second- stage, in such a way that it also loads the first stage. The combined response of the first and second stage is a one-pole (6dB/octave) roll-off crossing unity gain at about 1Mhz, just before the output stage starts to get weak. Now you can apply almost any kind of feedback without much trouble.

That 1Mhz is where the reactance of the 30pF cap equals the dynamic impedance of the input stage emitters. A 101/741 input stage works about 10uA, emitter impedance is then about 3K, or 6K for two transistors. 30pF equals 6K at about 1MHz.

In this scheme, adding an emitter resistor in the second stage is just wasting gain. The 30pF cap from colector to base will set the overall AC gain of first and second stages, so the emitter resistor just reduces DC/LF gain. It is possible a cap across the emitter resistor adds a bump in the gain and phase response; I expect this would be very critical and dependent on the external feedback network.

Given this form of compensation, the slew rate is set. That 30pF cap must charge from the input stage current. 20uA (peak) times 30pF gives 666,667 volts per second, or 0.6 volts per microsecond. If a bipolar op-amp like this is compensated for unity gain at 1MHz, it will slew 0.6V/uS. If you increase input stage current or decrease compensation cap size, you could have 6V/uS with 10MHz GBW, but your output stage must now be solid out past 10mHz.

You can change this relationship with input stage emitter resistors. But that decreases DC gain and increases noise.

In bipolars, gain and current are in fixed relationship, and bipolars have very high gain at a given current. Tubes and FETs have lower gain for a given current, and can be designed for higher slew rate at the same GBW. It isn't clear to me how this differs from adding resistance to a bipolar.

Deane Jensen had an interesting idea: chokes in the input stage emitters. Inside the audio range they have no effect on gain or distortion, but cause gain to fall at high frequency. Problem is that the second stage will also fall at some high frequency. If compensated traditionally, you would have 12dB/Oct at some point and certain stability trouble. Adding a resistor in series with the cap or in shunt with the chokes could fix this.

If you don't need super-low input currents, then it is usually not too hard to get huge bandwidth in first and second stage. Oddly the real problem is the output stage. It looks like "unity gain" but consider: if the large output emitter-followers have an Ft of 10MHz, and a Beta of 50, then they have a constant input impedance only up to 10MHz/50= 200KHz! Above that point their input impedance drops. The second stage gain is roughly proportional to output stage impedance so it wants to drop. The compensation cap internal feedback fights that, but can only do so much.

Let's do numbers. A mike preamp's op-amp might want to be vari-gain from 1 to 100, without changing the compensation. Say we want at least 40dB (100:1) of feedback "over the audio range", meaning to 20KHz. The gain bandwidth product at 20KHz must be 100*100*20,000= 200MHz. If the transistors work at Beta of about 50, and we want Beta to stay constant out to 200MHz, the transistors' Ft must be 200MHz*50= 10 GHZ!!!

That was absurd for most of the discrete-part era, and still unlikely. There are Ft=8GHz parts but generally small, low-power, low-voltage, or very expensive. And at just 200MHz the simple equivalent circuits are complicated by stray capacitance and even lead inductance.

The usual "answer" is to accept less feedback than we would like, maybe only 6dB at 20KHz at gain=100. Now we only "need" 4MHz GBW, and indeed a LOT of audio is built with op-amps about this speed. But we also now know that feedback interacts with distortion, and 6dB feedback is probably more grating to the ear than no feedback at all. We "get away with it" because we don't always crank the preamp to the max, levels at 20KHz are generally low, and in many cases most of the distortion products fall outside the audio range. But it is one reason why "similar" designs can sound quite different on strong complex sounds.

As for your amp: try increasing input emitter resistors to 500 ohms. Or decrease input stage current to about 0.1mA per side (which will also reduce input current and DC error). That may make it "unconditionally stable" down to unity gain (no capacitive loads). The increase in noise voltage will be small for most audio purposes. If you need lowest noise and do not need unity-gain operation, reduce these emitter resistors to 100 ohms or less. Use the highest-Ft output devices that suit your power and cost goals. (Beware: Ft is usually quoted at some medium current where it is "best"; it can be much less at lower current.)

Paralleling small/fast/cheap transistors for outputs is a standard trick. Use separate emitter resistors or one of them will hog all the current and fry.
 
[quote author="AP"].... surely, the output stage is class-B? (It was when I went to school...)

Alan[/quote]

Without the diodes D1 and D2 it would be clearly class B. However, the diodes bias the transistors sufficiently to conduct without signal applied to the buffer. Interestingly increasing the current through the diodes in the second stage opens up the output transistors even more. In this circuit the output transistors conduct 10ma to 15ma all the time, the exact value depending on the current supplied by the current source and the limiting action of the emitter resistor on Q3. These values were obtained by measurements made on the circuit itself. It is a Class-AB output and so are most opamps made, but modern circuits use different output biasing techniques. When they cross from A to B depends on the magnitude of the signal they have to pass and the load on their output.

As I understand these days most designs use Vbe multipliers to dial in the bias for the output stage, for more precise control.

Tamas
 
I worked on this a little more over the long weekend.
- Lowered the noise and distortion in the input stage
- Changed output devices to ones that can dissipate lots of power
- Added minimal short circuit protection

I just extended the original document. This is the same one as at the head of the thread now.
http://mysite.verizon.net/res75okq/sitebuildercontent/sitebuilderfiles/B7-discrete-opamp-7-5-04.pdf

Next I will tackle a simple FET input - MOSFET output opamp.

Cheers,
Tamas
 
Tamas
In your PDF you say

"Some issues have surfaced, one of them being the higher than usual DC offset on the output of the opamp."

... can I have a shot at this (it is a very, very long time since I designed this sort of stuff, so I am grossly rusty...)

You say yo have a target current of 7-8 mA in the second stage. That gives a 1.26V drop across R6, for a nominal 7.5mA current.

So assuming a nominal 0.6V Vbe for Q3, that gives 1.86V across R1, meaning 1.24mA 'tail current' through Q1.

So with 1.75mA to share between them, Q1 and Q2 are not in balance, and particularly with the larger emitter resistors decreasing the gain of the pair, there will need to be slightly different voltages at the bases to establish a 0V output. Accordingly, to cause that, negative feedback is going to have to supply current to the -ve input to try and sort things out - ergo, a voltage offset at the output.

-ve feedback has a stabilising effect on the DC conditions, but without infinite gain, canot repair everything - just like it cannot straighten out a non-linear class-B output stage transfer function....

(Just my .02Euros worth...)

Regards
Alan

PS. The imbalance in the front end will also increase open-loop distortion.

PPS. I believe that D3 and D4 will not do the job you suggest....

PPPS. I would still be unhappy at the way the output transistors are biassed - there is two diode drops (nominally 1.2V) responsible for the biassing, and two Vbe s to turn on. I would expect the o/p stage quiescent current to be rather variable, device to device (and not be in class-A under *ANY* conditions with some parts...).

Personally, I would use maybe three diodes, or a transistor and a couple of resistors to give a greater voltage diff between the bases, and be certain of swamping out device Vbe spreads...
 
from the updated B7-document:

Some issues have surfaced, one of them being the higher than usual DC offset on the output of the opamp.

First of all, sorry if this kind of duplicates the previous post. I read the updated document and typed some - and only then found out there was already an 'offset-reply'. It's more or less along the same lines so FWIW:

Adding another 1k5 resistor above the collector of Q2 of the diff pair might help, but I guess that's more 'in principle' than that it would really differ - with these high supply rails there's only a relatively small collector-voltage difference.

Another 'in principle' could be to mimic/copy the loading of the left half of the diffpair also on the right half (by adding a DC-loading dummy version of the Q3-stage), but that would start to spoil the nice & compact character of your design.

But to put this all into perspective, how much offset are you measuring ?

Bye,

Peter
 
Back
Top