Why my BJT common emitter circuit didn't work as expected?

Status
Not open for further replies.

Thread Starter

bstdms

Joined Jun 14, 2023
9
I would like to build an inverting amplifier with a gain of -10 as shown in the diagram. The BJT used is PN222A.
1698298809006.png
The input signal is one side of an LVDS wave, I used a capacitor(the 220pF) to level down the baseline to ground and the signal amplitude is negative.
Here is the result I get, the green line is the input signal(after the capacitor), the blue line is the output. Apparently the BJT is not working.
1698293376316.png

Based on the calculation, VB=R2/(R1+R2)*Vcc=1.32V, in the middle of 0.7V and Vcc.
VE=VB-0.7V=0.62V
IE=(VE-0)/RE=1.3mA
Gain=-RC/RE=-10

Why doesn't this circuit work? Which value should I check?
Thank you.
Siyao
 

Attachments

Alec_t

Joined Sep 17, 2013
14,189
Your calculations aren't quite right.
You calculate Ie=1.3mA. So think about the voltage that would be dropped by 1.3mA through a 4.7k collector resistor.
Better to start by choosing a suitable collector current, then choose the collector resistance needed to drop half the supply voltage, then choose the emitter resistance to give you the required gain, then calculate the base bias resistor values.
 

MrAl

Joined Jun 17, 2014
11,247
I would like to build an inverting amplifier with a gain of -10 as shown in the diagram. The BJT used is PN222A.
View attachment 305925
The input signal is one side of an LVDS wave, I used a capacitor(the 220pF) to level down the baseline to ground and the signal amplitude is negative.
Here is the result I get, the green line is the input signal(after the capacitor), the blue line is the output. Apparently the BJT is not working.
View attachment 305917

Based on the calculation, VB=R2/(R1+R2)*Vcc=1.32V, in the middle of 0.7V and Vcc.
VE=VB-0.7V=0.62V
IE=(VE-0)/RE=1.3mA
Gain=-RC/RE=-10

Why doesn't this circuit work? Which value should I check?
Thank you.
Siyao
Hi,

Your input impedance is less than 66 Ohms and with just a 220pf cap, the cutoff frequency is around 11MHz.
This means for lower frequencies you may see only a little output signal.
Why did you change the input cap to 220pf?
 

BobTPH

Joined Jun 5, 2013
8,642
Your input impedance is less than 66 Ohms
How did you calculate that?

Also, it is not clear that the 220p cap was replacing the input coupling cap. I interpreted it as across the output of the comparator, but only the TS knows for sure.
 

MrAl

Joined Jun 17, 2014
11,247
How did you calculate that?

Also, it is not clear that the 220p cap was replacing the input coupling cap. I interpreted it as across the output of the comparator, but only the TS knows for sure.
Hi again,

I calculated about 66 Ohms AFTER the input cap, and then it is the parallel combination of the 100 Ohm and the 200 Ohm resistors, assuming the Beta is high enough to make RE large enough to not change that 66 Ohms to a value even lower.
I calculated *that* input impedance because the question I was bringing up was in reference to the effectiveness of the capacitor and not the effectiveness of the input signal. If I wanted to calculate the effectiveness of the input signal I would have calculated the entire input impedance looking into that 220pf cap, but then in order to provide a simple view of how the capacitor changed things i would have had to calculate at least two impedances: one with that 220pf cap and another with a larger capacitor.

I can see why you asked about this and I appreciate that question because usually we refer to "input impedance" to be the total input impedance looking into the actual input to the entire amplifier rather than a point inside the circuit somewhere. Thus, I believe I should have been clearer as to where this impedance was being measured.
 

Thread Starter

bstdms

Joined Jun 14, 2023
9
What exactly are you trying to do with the comparator voltage?

Normally you don't but a digital pulse into an AC amplifier.
If you want to amplify the pulse then use the transistor as a switch.
Thank you for the suggestion!
The peak-to-peak amplitude of the input pulse is only 350mV, is it enough to drive a BJT switch?
 

Thread Starter

bstdms

Joined Jun 14, 2023
9
Thanks for all the comments! My purpose of this circuit is to use the rising edge of comparator output to trigger a monostable vibrator which requires an input amplitude of at least 2.9V.

I changed the common emitter circuit based on the suggestions.
The updated version is like this:
1698934224231.png
Based on the calculations,
VB = R2/(R1+R2)*Vcc = 0.825V
VE = VB-0.65V = 0.175V
Ic ≈ IE = VE/RE = 1.75mA
Vc = Vcc-Ic*Rc = 1.55V
Gain = -RE/Rc = -10

The comparator has an output resistance of 50ohm, thus the cutoff frequency is 1/2 π *50ohm*1uF=3kHz.
The frequency of the signal is 5kHz so it should be fine.

The result looks like this:
1698934657512.png
The green line is the input of the amplifier(outputted from the comparator, a square wave with 350mV peak-to-peak amplitude), the red line is the signal after the capacitor 1uF, and the blue line is the amplifier output.

I don't know why the signal was distorted after the capacitor. Without connecting to the amplifier the red signal was in the same shape as the green signal but biased to the ground. I expected the output to be a square wave with around 0-3V amplitude.

Also, thanks for the suggestion from @crutschowI, a BJT switch would be better than a common emitter amplifier, but I don't know how to realize that because the input amplitude is only 350mV which seems not able to drive the BJT switch. Do I need to add bias to the input signal? It would be appreciated if I could get some hits.

Thank you.
Siyao
 

LvW

Joined Jun 13, 2013
1,749
The comparator has an output resistance of 50ohm, thus the cutoff frequency is 1/2 π *50ohm*1uF=3kHz.
The frequency of the signal is 5kHz so it should be fine.
...............................
I don't know why the signal was distorted after the capacitor. Without connecting to the amplifier the red signal was in the same shape as the green signal but biased to the ground. I expected the output to be a square wave with around 0-3V amplitude.
Your calculation of the cut-off frequency is not correct.
Instead of only 50 ohms (what is the source of this low value?) you must consider the dynamic input resistance r_in at the base node which is slightly lower than 1kOhm: r_in=R1||R2||(hie + hfe*RE).

More than that, the used expression for the gain (-Rc/RE) is a rough approximation only. For RE values as low as 100 ohms the influence of the transconductance gm=Ic/Vt should be taken into accout: Gain=-Rc/[(1/gm) + RE]
 
Last edited:

crutschow

Joined Mar 14, 2008
33,962
Since you just want maximum gain to operate as a comparator and give a nice, square-wave output, eliminate RE and bias the base to about 0.5V (just below cutoff) with an R2 value of about 10kΩ.
(Calculating the value of R1 is left as an exercise for the reader).
Add a 100Ω resistor in series with the base (after the bias network) to increase the low base impedance.

The droop in the square-wave is due to the input capacitor being too small.
Using the fundamental frequency to calculate the capacitor value required is for a sinewave, not a square-wave.
A square-wave has much lower frequency components than its fundamental frequency, so you need to design for a frequency about 1/10th or less of the fundamental, depending upon how much droop you can tolerate.
A square-wave typically has significant Fourier frequency components from 1/10th to ten times the fundamental frequency.

You can calculate the droop by using the formula for the RC exponential voltage change versus time.

Below is my simulation result for a circuit with those modifications for a 50Ω source.

1699059515379.png
 
Last edited:

MrAl

Joined Jun 17, 2014
11,247
Since you just want maximum gain to operate as a comparator and give a nice, square-wave output, eliminate RE and bias the base to about 0.5V (just below cutoff) with an R2 value of about 10kΩ.
(Calculating the value of R1 is left as an exercise for the reader).
Add a 100Ω resistor in series with the base (after the bias network) to increase the low base impedance.

The droop in the square-wave is due to the input capacitor being too small.
A square-wave has much lower frequency components than its fundamental frequency, so you need to design for a frequency about 1/10th or less of the fundamental, depending upon how much droop you can tolerate.
A square-wave typically has significant Fourier frequency components from 1/10th to ten times the fundamental frequency.

You can calculate the droop by using the formula for the RC exponential voltage change versus time.

Below is my simulation result for a circuit with those modifications for a 50Ω source.

View attachment 306648
Hi,

Not sure what you mean by a square wave having frequency components LOWER than the fundamental frequency.
Did you mean frequency components HIGHER than the fundamental? That's what we see in square waves.
The actual frequency components are the odd harmonics 3,5,7,9,11, etc., and the relative amplitudes are 1/3,1/5,1/7,1/9,1/11, etc.

Here's a plot along with the function where we can see the harmonics are increasing and the fundamental is the lowest frequency present.
If you add a DC component you may be able to call that a lower frequency component, but that would not be typical. More typical would be to just call it the DC component.
If you shorten the duty cycle you eliminate some of the harmonics. For example you can eliminate the 5th harmonic.
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
33,962
Not sure what you mean by a square wave having frequency components LOWER than the fundamental frequency.
Did you mean frequency components HIGHER than the fundamental?
Nope.
By that I mean you need a frequency response must lower than the fundamental to pass the square-wave through a circuit.
Obviously if the low frequency cutoff is near the square-wave fundamental, then there will be severe droop and it won't look much like a square-wave.
So there are frequency components much lower than the fundamental for a square-wave.

See the sim below for a 1kHz square-wave through a 1kHz (green trace), 100Hz (yellow trace), and 10Hz (blue trace), 1-pole, HP filter.
Obviously the all the components above the fundamental, but only those below the fundamental but above the filter corner are passed.
To pass the flat-top portion of the square-wave without any droop would require a DC response, of course.

1699065529963.png
 
Last edited:

MrAl

Joined Jun 17, 2014
11,247
Nope.
By that I mean you need a frequency response must lower than the fundamental to pass the square-wave through a circuit.
Obviously if the low frequency cutoff is near the square-wave fundamental, then there will be severe droop and it won't look much like a square-wave.
So there are frequency components much lower than the fundamental for a square-wave.

See the sim below for a 1kHz square-wave through a 1kHz (green trace), 100Hz (yellow trace), and 10Hz (blue trace), 1-pole, HP filter.
Obviously the all the components above the fundamental, but only those below the fundamental but above the filter corner are passed.
To pass the flat-top portion of the square-wave without any droop would require a DC response, of course.

View attachment 306656
Hello again,

Oh I see what you are talking about now. You are talking about the cutoff frequency of a high pass filter. I agree with your conclusion.
That's a different concept though then the 'frequency components' of a square wave. There are none lower than the fundamental, that's a fact. A Fourier analysis will show this unequivocally.

The reason the square wave does not get through the HP filter is because the fundamental cannot get through without attenuation.
If you do a separate experiment (which BTW was a very good idea) you can try to pass the fundamental through a HP and see the attenuation, then pass some of the harmonics through the same filter and see less attenuation. The more attenuation you see on the fundamental, the more effect it will have on the square wave. As you know, you cannot pass any frequency through a HP without some attenuation, and the cutoff frequency is the key point, but not because there are lower frequency components.

This is actually a test of the filter not of the components of the square wave. It was used on audio amplifiers some years ago not sure if it still is. Rather than do a frequency sweep, you could pass a square wave to get a quick idea of how the audio amplifier attenuates some frequencies.
 

crutschow

Joined Mar 14, 2008
33,962
There are none lower than the fundamental, that's a fact. A Fourier analysis will show this unequivocally.
That may be be technically true for a Fourier analysis, and you can arm-wave all you want about that, but then how do you explain needing a low frequency bandwidth to pass an undistorted square-wave?
Your explanation for this doesn't make sense, since my sim with a 100Hz corner HP filter, clearly passes the 1kHz fundamental (which is the maximum Fourier sinewave frequency for the square-wave) without significant attenuation, but the square-wave is still distorted (as expected).
 
Last edited:

MrAl

Joined Jun 17, 2014
11,247
That may be be technically true for a Fourier analysis, and you can arm-wave all you want about that, but then how do you explain needing a low frequency bandwidth to pass an undistorted square-wave?
Your explanation for this doesn't make sense, since my sim with a 100Hz corner HP filter, clearly passes the 1kHz fundamental (which is the maximum Fourier sinewave frequency for the square-wave) without significant attenuation, but the square-wave is still distorted (as expected).
Hello again,

I don't know why you have a problem with this. The Fourier analysis says everything you don't have to design a filter to prove that. It's the other way around, you TEST a filter knowing the Fourier components and that can tell you what components the filter is attenuating especially with a passive filter like a typical RC type. This isn't Arm Waving, whatever that is either, and I wasn't wiggling my toes nor keeping my fingers crossed either :)

I already explained how to explain why you need a lower frequency SETTING for the filter. It's because if the fundamental gets attenuated, you lose part of the original signal and that is what causes the distortion. The filter is just a filter, it has nothing to do with the frequency components of the signal going in. It's called a filter because it filters out some of the harmonics, but it never adds any unless it is nonlinear, which a regular RC filter is not.
You can see this better if you apply the fundamental and the frequency components separately as I suggested. A high pass filter will attenuate the lowest frequencies and pass more readily the higher frequencies, which should be obvious that's why they call it a high pass filter.

The test for audio I was talking about used this concept so as to provide a quick, rough idea about how the audio amplifier was behaving. If it cut some of the lower frequencies of a perfect square wave input then the output would be distorted just as you show in your plots (very nice BTW). That gives you a very quick idea what is going on, but that is what is going on inside the audio amplifier so it's a test of the amplifier.
There are a bunch of waveshapes that could come out of the audio amplifier and each one indicates a different aspect of how the amplifier is working with respect to high, low, and midband frequencies.

I'm sure you know all about the -3db cutoff point of a regular RC filter. If the -3db point is not set low enough, the fundamental (and perhaps other frequencies of interest) will not be able to get through as well as the higher frequencies and that causes some sort of distortion of the square wave. The square wave will never contain frequencies below the fundamental though that is probably why it is referred to as the "fundamental".

It's true though with a nonlinear filter you can get all kinds of other frequencies on the output, but even then the input will not contain all of them just the ones you put in. A simple example is a full wave rectifier which outputs all even harmonics from a pure sine input, most notably the second harmonic which is two times the fundamental frequency.
 
Status
Not open for further replies.
Top