Level shifting - transistor type selection

Ian0

Joined Aug 7, 2020
13,132
On my diagram Q6 and Q7 ARE connected to the DC power supply, and if I replace them with PNPs they won't be anymore. So I am not sure if this statement is true. Likewise Q3 emitter and not collector is connected to the ground.
Well actually, they are not. The collectors have a 500Ω resistor to the positive supply, so none if their terminals is connected to any power supply. For a current mirror, the emitters connect to a supply.
The only difference between Q6 and Q4 is that Q4 emitter sits at ground potential while Q6 emitter sees more impedance, why does it matter? I though the diode connected transistor will enforce base current in both cases. Also in both cases the voltage of the base will be > than emitters therefore I really don't see what the problem is.
But there is no current mirroring effect - that's the problem. They are not doing anything. You could replace them with a piece of wire with no significant change at the output.
 

Thread Starter

mondo90

Joined May 16, 2025
125
I think the most important thing is to have the V_be of one transistor enforced by the other. With the NPN transistors in place of Q5 and Q6, where theirs emitters are controlled by a differential pair Q1,Q2 it just can not be fixed. Thanks for pointing that out.

Another aspect is, I also had to add resistors R7 and R9 otherwise the differential pair doesn't work, is that to limit the Q3 current so it doesn't alter the other differential pair voltage?
 

Ian0

Joined Aug 7, 2020
13,132
You often see emitter resistors in the diff pair. They reduce the distortion if the bridge isn't quite in balance, at the expense of gain. You can recover some of the gain by connecting a large capacitor between the emitters. However, with a properly connected current mirror it will work without emitter resistors.
 

Thread Starter

mondo90

Joined May 16, 2025
125
This is my current version:
1756930030706.png

I think the current mirror is fine now but I absolutely need to have R7 and R9 otherwise the output is a complete mess. Without them I also have a problem biasing the differential pair and a Q3 mirror.

As for the output it still looks bad despite the fact I corrected the mirror:
1756930359398.png

Yellow is Q8 collector,
Red is C2 input from diff pair,
Green is the C3 output,
Blue is Q9 base,

What can I correct to get the almost rail to rail swing instead of this small, distored gain I have here?
Green is C3 voltage
 

Ian0

Joined Aug 7, 2020
13,132
It's a mess because:
1. Your amplifier transistor has disappeared (last seen in Post #12)
2. You have no negative feedback.
 

Thread Starter

mondo90

Joined May 16, 2025
125
It's a mess because:
1. Your amplifier transistor has disappeared (last seen in Post #12)
2. You have no negative feedback.
I have removed it because I don't see it helping, I have just added it back: but the Q8 base voltage is 3.4V despite 4.3V on Q7 emitter.
1756933165492.png
More so with this arrangement C3 output voltage looks like this:
1756933074480.png

As for the feedback, isn't that a subject to take care of once the basic topology and gain is established? Feedback will further decrease gain which is already so low..
 

Ian0

Joined Aug 7, 2020
13,132
If you get it right, the gain for a current-mirror loaded long-tailed pair driving a common emitter amplifier will be 50,000
 

Thread Starter

mondo90

Joined May 16, 2025
125
If you get it right, the gain for a current-mirror loaded long-tailed pair driving a common emitter amplifier will be 50,000
If that is the case why did you suggest bringing back an extra amplifying transistor? :)

Also, every tranaistor from the mirror or diff pair introduces ~0.7v drop, so max I can get is 5 - 3* 0.7 = ~2.9 (not including biasing resistors drop) so the gain is no more than 3 << 50k
 
Last edited:

Ian0

Joined Aug 7, 2020
13,132
If that is the case why did you suggest bringing back an extra amplifying transistor? :)

Also, every tranaistor from the mirror or diff pair introduces ~0.7v drop, so max I can get is 5 - 3* 0.7 = ~2.9 (not including biasing resistors drop) so the gain is no more than 3 << 50k
Because that is the common emitter transistor that I mentioned, and you can only get a decent output swing from a common-emitter stage.
Any common emitter stage can swing almost rail-to-rail, which is why they are used.
 

Thread Starter

mondo90

Joined May 16, 2025
125
Because that is the common emitter transistor that I mentioned, and you can only get a decent output swing from a common-emitter stage.
Any common emitter stage can swing almost rail-to-rail, which is why they are used.
Sure, but you were also implying that the first stage should produce 50k gain or so so I questioned if that is the case then why some more common emitter amplifiers.

I am currently getting a decent output from this:

1756971570948.png
But there is a few problems:
1. I am taking the output from diff. stage out of Q6 emitter, I don't think it is a standard way of doing it however I do it because it gives me a stable gain on bode plots across audio spectrum in contrast to Q5 collector which gain varies with frequency.
2. The gain of Q6 collector is unusable, the sin shape resembles more a square wave. The gain is nice almost rail to rail though. I though the reason of distortion is too high gain from current mirror but after I limitted the input signal to 1mV the gain is reduced while the shape stays equally distored. Why? Is that expected on this end of the differential pair?
3. After I connect the first stage signal to the final output stage via C3 resistor the gain falls significantly with distorted shape as can be seen from RHS of my screenshot above. I am not sure which part of the circuit is still not ok?
 

Ian0

Joined Aug 7, 2020
13,132
But you still haven’t got the current mirror in the right place. it’s a common emitter circuit. It works with its emitters connected to a power supply.

and I said that a long-tailed pair with a current mirror load driving a common emitter amplifier would give x50000. But you still are missing the common emitter amplifier that disappeared after post 12.
 

Thread Starter

mondo90

Joined May 16, 2025
125
What do you mean by "you don't have a current mirror in the right place"? I have one current mirror Q5/6 which you yourself suggested, it is not in the right place you say? I think it is fine there.

As for the post 12, the only missing part is transistor Q7 below
1757005235536.png

Now how does it help? As you can see from the waveform, not only it doesn't help but it also distorts the input waveform in green above.
 

Ian0

Joined Aug 7, 2020
13,132
I can cut and paste "Current mirror is a common emitter circuit. The emitters connect to a power supply. The output is on the collector" as many times as you want.
 

Thread Starter

mondo90

Joined May 16, 2025
125
I can cut and paste "Current mirror is a common emitter circuit. The emitters connect to a power supply. The output is on the collector" as many times as you want.
Are you referring to the fact that I put 2k resistors between power supply and emitters of my current mirror?
Thanks for your schematic, I like it however you utilize double power supply which I don't have, also your output resistance is 3.3k while I connect speaker of 8 ohm. So in essence your circuit is for different application.

Also, do we really need tow current mirror for the differential pair? Wouldn't the top mirror be enough?
 
Last edited:

Ian0

Joined Aug 7, 2020
13,132
Are you referring to the fact that I put 2k resistors between power supply and emitters of my current mirror?
Thanks for your schematic, I like it however you utilize double power supply which I don't have.

Also, do we really need tow current mirror for the differential pair? Wouldn't the top mirror be enough?
The position of an arbitrary point that we call "earth" makes no difference to the operation of the circuit.
The current mirror on the negative side of the Long tailed pair is straight from your original. I would have used a constant current source, not a current mirror, because the current mirror will inject power supply ripple. I use a JFET current source.
 

Thread Starter

mondo90

Joined May 16, 2025
125
Can you show me the waveform of your output? Does it faithfully reproduce the input? I tried to use your circuit with single power supply and came up with this:
1757026627484.png

But as you can see I have some problems, despite the distorted output (not shown) the Q1 and Q2 base have different DC offset which I believe results in distorted output. Why is that happening?
 

Thread Starter

mondo90

Joined May 16, 2025
125
Ok I finally made some progress:
1757038347589.png
Green is R9 voltage (Output), Yellow is Q1 base (input).
The problem in previous post was incorrect biasing which resulted in 0 current in Q1/Q2. Now I got ~9db of gain which is still much less than yours, BUT your input is 1mV vs 0.5V in my case, so I think I maxed out my 5V supply.

However, R9 is supposed to be a speaker, therefore I need to get rid of the DC offset. I tried to add a capacitor in series, how to do it best? I was hoping I will get the output centered on 0V just as you got it.
 

MrChips

Joined Oct 2, 2009
34,828
You want to drive an 8-ohm speaker?
Then you don’t do it like that.
Go back to your complementary pair emitter follower push-pull output.
 
Top