Designing a simple common emitter amplifier - where is the error?

Thread Starter

deralbert

Joined Aug 28, 2024
17
I'm designing a simple amplifier for educational purposes. Please ignore that this amplifier is very sensitive to changes in the transistor's DC current gain. I calculated some component values, then simulated the circuit and realized my calculations were way off. Could you help me identify where I went wrong? Why is the gain not even close to what I calculated? How can I fix it?

Consider the given circuit, along with its constraints and requirements:
Screenshot_204.png
Constraints:
  1. Input \( u_e \) is a sine wave signal with the 50 mV peak-to-peak voltage and 1 kHz frequency.
  2. Transistor is 2N2222 with the SPICE model .model 2N2222 NPN(IS=1E-14 VAF=100 BF=200 IKF=0.3 XTB=1.5 BR=3 CJC=8E-12 CJE=25E-12 TR=100E-9 TF=400E-12 ITF=1 VTF=2 XTF=3 RB=10 RC=.3 RE=.2 Vceo=30 Icrating=800m mfg=NXP)
  3. Load resistance \( R_L \) = 2 kΩ.
  4. Supply voltage \( U_b\) = 12 V.
  5. Two coupling capacitors \( C_1 \) and \( C_2 \) with the capacitance of 10 μF.
  6. Temperatur voltage \( U_T \) = 26 mV.

Requirements:
  • Gain factor should be -20.

My train of thought:
First, I read in the transistor's datasheet that the DC current gain is between 100 and 300 for the following values: \( I_C \) = 150mA and \( V_{CE} \) = 10V. Since I have the supply voltage \( U_b \) = 12 V and it is recommended to set the collector voltage at the middle of the supply voltage rail, I decided to choose \( V_{CE} \) = 6 V. Further I did assumtion that \( I_E \approx I_C \).
This allows me to make the following equation:
\( U_b = I_C R_C + U_{CE} + I_C R_E \)

Next, I assumed that the voltage drop across the base-emitter is \( U_{BE} \) = 0.7 V. Further I now that \( I_C = \beta I_B \).
This allows me to make the following equation:
\( U_b = I_B R_B + U_{BE} + I_C R_E \)

Finally, I aimed for a gain of 20. Since the circuit is a common-emitter amplifier, the following applies:
\( A = -S r_{out}\), where
A = -20
\( S = \frac{I_C}{U_T} (1 + \frac{U_{CE}}{|U_A|}) \)
\( r_{out} = (R_C || r_{CE} || R_L)\) with \( r_{CE} = \frac{|U_A| + U_{CE}}{I_C}\) to model the Early effect.

My calculations:

First, calculate \( R_C \):
\( S = \frac{I_C}{U_T} (1 + \frac{U_{CE}}{|U_A|}) = \frac{150 mA}{26 mV} (1 + \frac{6 V}{100 V}) \approx 6.115 \frac{1}{\Omega}\)
\( A = -S r_{out} \implies \frac{A}{-S} = r_{out} \implies \frac{-20}{-6.115} = r_{out} \approx 3.271 \Omega \)
\( r_{CE} = \frac{|U_A| + U_{CE}}{I_C} = \frac{100 V + 6 V \cdot150 mA}{150 mA} \approx 672.67 \Omega \)

\( \frac{1}{r_{out}} = \frac{1}{R_C} + \frac{1}{r_{CE}} + \frac{1}{R_L} \implies \frac{1}{R_C} = \frac{1}{r_{out}} - \frac{1}{r_{CE}} - \frac{1}{R_L} \implies R_C \approx 3.29 \Omega \)

Second, calculate \( R_E \):
\( U_b = I_C R_C + U_{CE} + I_C R_E \implies R_E = \frac{U_b - I_C R_C - U_{CE}}{I_C} = \frac{12 V - 150 mA \cdot 3.29 \Omega - 6 V}{150 mA} \approx 36.71 \Omega \)

Finally, calculate \( R_B \):
\( I_C = \beta I_B \implies I_B = \frac{I_C}{\beta} = \frac{150 mA}{200} = 750 \mu A\)
\( U_b = I_B R_B + U_{BE} + I_C R_E \implies R_B = \frac{U_b - U_{BE} - I_C R_E}{I_B} = \frac{12 V - 0.7 V - 150 mA \cdot 36.71 \Omega}{750 \mu A} \approx 7.725 k\Omega\)

Simulation:
As you can see, the amplified signal (blue) is even weaker than the input signal (green).
Screenshot_205.png

Screenshot_206.png
 

Attachments

Last edited:

BobTPH

Joined Jun 5, 2013
11,463
As a sanity check, look at your Rc and Re.

Is it possible to bias collector at 6V given those values?

The (highly inaccurate) ballpark estimate for the gain of that configuration is -Rc / Re.

Which is about -0.09 which matches your results well enough.
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
In fact, the values of \(R_C \) and \(R_E\) seem very suspicious to me. But I still don't understand why. The maths seems to be right which means I've applied the physics behind it incorrectly.
 

MrChips

Joined Oct 2, 2009
34,626
Your Rc and RE values are ridiculously low.

Start with Rc. This determines the output impedance of the amplifier. For example, choose Rc = 2k Ω.
If you want a gain of 20, use this approximation:

Av = Rc / RE

Hence RE = Rc / Av = 2k / 20 = 100 Ω

Take it from there and determine RB.
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
Take it from there and determine RB.
Thank you. With the provided values
\( R_C = 2k \Omega \)
\( R_E = 200 \Omega \)

I calculated the following:
\( I_C = \frac{U_B - U_{CE}}{R_C + R_E} = 2.837 mA \)
\( I_B = \frac{I_C}{\beta} = \frac{2.837 mA}{200} = 14.286 \mu A \)
\( Ub = I_B R_B + U_{BE} + I_C R_E \implies R_B = \frac{U_b - U_{BE} - I_C R_E}{I_B} = 771.141 k \Omega \)

With this values the result is already better, but still not good enough:
Screenshot_208.png

Is the gain formula \( A = -S r_{out} \) I used not applicable in my case? Why did you choose 2 kΩ for \( R_C \)? In this case, the current \( I_C = 2.837 mA \), which is significantly below the value given in the datasheet for the 2N2222. Or did I misunderstand the value from the datasheet (e.g., this value is not applicable for some reason)?
 

Ramussons

Joined May 3, 2013
1,567
Your Rc and RE values are ridiculously low.

Start with Rc. This determines the output impedance of the amplifier. For example, choose Rc = 2k Ω.
If you want a gain of 20, use this approximation:

Av = Rc / RE

Hence RE = Rc / Av = 2k / 20 = 100 Ω

Take it from there and determine RB.
Actually, the gain will be Rceff / Re, where Rceff will be the parallel combination of the Collector Resistor and the Load.
If we choose Rc as 2 K, then Re will need to be 50 Ohms for Av = 20.
 

BobTPH

Joined Jun 5, 2013
11,463
the value given in the datasheet for the 2N2222.
What value given in the datasheet? There is no value in the datasheet that would tell you what collector current to use in the amp.

Typically, you want the collector resistor to drop half the supply voltage. So it depends on those two values. In this case 2K and 6V.

So the current is calculated as 6/2000 or 3mA.

Do that, with a 50 Ohm Re and you will get quite close to 20 gain. Use the datasheet to find the Beta at 3mA collector current if it has such a chart. Or better yet, find it via the simulation.
 

MrChips

Joined Oct 2, 2009
34,626
Sorry, I did not yet specify the load.
If the load is 2k Ω, then yes, make RE 50 Ω.
Or instead, reduce Rc and adjust all other values as required.
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
What value given in the datasheet? There is no value in the datasheet that would tell you what collector current to use in the amp.
Screenshot_209.png
Is this something different? I thought, \( I_C = 150 mA \) and \( V_{CE} = 10 V \) is what I want for the \( \beta \) between 100 and 300.
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
I am trying to answer my question from the first message in a structured way.

First: Indeed, example values for \( I_C \) and \( U_{CE} \) are provided in the datasheet. However, these values are primarily relevant for testing the HFE/Hfe and may not be significant unless you are operating the transistor near those specific conditions. This means that I am not required to target this specific collector current or voltage drop across the collector-emitter.

Second: As I have observed empirically, using the transconductance (I denoted it as \( S \), you may be more familiar with \( g_m \) ) to calculate the gain is not effective. Currently, I am unable to pinpoint the exact reason why \( A = -S r_{out} \) does not apply here, but I suspect the issue lies with the presence of the degeneration resistance \( R_E \).
Instead, derive the gain formula from \( A = \frac{u_{output}}{u_{input}} \) and use that. In this particular case, the gain is \( A = \frac{ \beta (R_C || R_L)}{ r_{BE} + ( \beta + 1) R_E } \).
If you are interested in the derivation of this formula, see the note at the end of this message.

Note that I am ignoring the Early effect. The calculation of the values for \( R_C, R_E, R_B \) can be done in seven steps:
  1. Determine the maximum AC load voltage \( U_{L, AC} \) and the maximum AC load current \( I_{L, AC} \).
  2. Select an arbitrary \( I_C \) that is sufficient to ensure the DC (class A) current through the transistor is several times (e.g., 10 times) larger than the maximum AC load current.
  3. Assume the voltage drop over \( R_C \) to be at the middle of the supply voltage rail to maximize the output swing and to achieve the symmetrical clipping for the output signal: \( U_{R_C} = \frac{ U_b }{2}\). Then calculate \( R_C \).
  4. Calculate \( R_E \) from the gain formula \( A = \frac{ \beta (R_C || R_L)}{ r_{BE} + ( \beta + 1) R_E } \).
  5. Calculate \( I_B \) using the DC current gain \( \beta \).
  6. Assume the voltage drop over the base-emitter \( U_{BE} \) to be 0.7 V (a typical diode forward voltage). Then calculate the voltage drop over \( R_B \) using the Kirchhof voltage law.
  7. Calculate \( R_B \).

Be prepared to tweak \( R_E \) a bit during simulation to get a slightly better gain.

In my case:
  1. \( U_{L, AC} = 25 mV \cdot |A| = 25 mV \cdot 20 = 500 mV \). Then \( I_{L, AC} = \frac{U_{L, AC}}{ R_L } = \frac{500 mV}{2 k \Omega} = 250 \mu A\).
  2. Select \( I_C = 12 \cdot I_{L, AC} = 3 mA \).
  3. \( U_{R_C} = \frac{ U_b }{2} = 6 V \). Then \( R_C = \frac{ U_{R_C} }{ I_C } = 2k \Omega \).
  4. \( A = \frac{ \beta (R_C || R_L)}{ r_{BE} + ( \beta + 1) R_E } \implies R_E = \frac{\frac{ \beta (R_C || R_L)}{A} - r_{BE} }{ (\beta + 1) }\). With \( r_{BE} = \frac{U_T \cdot \beta}{I_C} =1.733 k \Omega \) the resistance \( R_E = 41.128 \Omega \).
  5. \( I_B = \frac{I_C}{\beta} = \frac{3 mA}{ 200} = 15 \mu A \).
  6. \( U_{R_B} = U_b - U_{BE} - I_E R_E = U_b - U_{BE} - ((\beta +1) I_B) R_E = 12 V - 0.7 V - 201 \cdot 15 \mu A \cdot 41 \Omega = 11.176 V \)
  7. \( R_B = \frac{U_{R_B} }{ I_B } = \frac{11.176 V}{15 \mu A} = 745.067 k \Omega \).

Simulation results (the input signal is green, the output signal is blue):
Screenshot_213.png

Screenshot_215.png

Note: A detailed derivation process can be found in this excellent video: lec23d Common Emitter Amplifier with degenerate resistance - part 2 voltage gain analysis made by Mr. Mostafa Abdelrehim.
I briefly looked through two books, Electronic Devices (10th edition, ISBN 13: 978-1-29-222299-8) and Microelectronic Circuits (8th edition, ISBN: 9780190853464), but unfortunately, I didn't find a sufficiently detailed derivation of this formula in these books.
 

BobTPH

Joined Jun 5, 2013
11,463
Why are you using the beta for 150mA when you chose a collector current oh 3 mA? From the chart it should be between 50 (1mA) and 75 (10mA).
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
Good point. That's because the current gain is fixed in the Spice model of 2N2222, at least in the model I'm using.

As I mentioned in my first message here, the model is defined as follows: .model 2N2222 NPN(IS=1E-14 VAF=100 BF=200 IKF=0.3 XTB=1.5 BR=3 CJC=8E-12 CJE=25E-12 TR=100E-9 TF=400E-12 ITF=1 VTF=2 XTF=3 RB=10 RC=.3 RE=.2 Vceo=30 Icrating=800m mfg=NXP) . We see: BF=200.

I should maybe set \( \beta = 62.5 \) (in the middle between 50 and 75) and recalculate all values, but the calculation steps should remain the same.

One question. In your previous message you wrote "What value given in the datasheet? There is no value in the datasheet that would tell you what collector current to use in the amp". Do you overlooked the table with the specified values for the DC gain? You didn't respond directly to my message with the DC current gain table, so I'm asking.
 
Last edited:

Thread Starter

deralbert

Joined Aug 28, 2024
17
I recalculated the values for \( R_E \) and \( R_B \). These values are \( R_E = 40.682 \Omega \) and \( R_B = 235.353 k \Omega \).
\( I_C \) does not depend on \( \beta \) in my "calculation scheme" and is still 2 kΩ.
Several intermediate values for \(\beta = 62.5 \): \( r_{BE} \approx 541.667 \Omega\) and \( I_B \approx 48 \mu A\) and \( U_{R_B} \approx 11.297 V\).
Screenshot_216.png

The rest of the model for 2N2222 is the same asin the standard model. I changed only the BF parameter.
Screenshot_217.png
 

BobTPH

Joined Jun 5, 2013
11,463
No, the beta does not tell you what collector current to use, it tells you what base current to use to get the desired collector current.

The way I determine the collector current is by setting the collector voltage to 1/2 the supply voltage. So:

Ic = Vs / 2Rc
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
Good, but the collector current and the base current are connected through the \( \beta \) factor. This means that if I know one of the currents, I can always deduce the other using \( \beta \). I believe it is valid to determine the collector current in the way you are doing it, as well as in the way I am doing it.
 

MrChips

Joined Oct 2, 2009
34,626
Good, but the collector current and the base current are connected through the \( \beta \) factor. This means that if I know one of the currents, I can always deduce the other using \( \beta \). I believe it is valid to determine the collector current in the way you are doing it, as well as in the way I am doing it.
Wrong.
You do not determine collector current from base current. It is the other way around.

As already been pointed out. Choose Rc first. Choose Vc. Now you know Ic. To get this collector current requires sufficient base current flowing.
 

Thread Starter

deralbert

Joined Aug 28, 2024
17
As already been pointed out. Choose Rc first. Choose Vc. Now you know Ic. To get this collector current requires sufficient base current flowing.
This is almost what I did in message #12. The only difference is that I first selected the collector current and then determined \( R_C \) using \( R_C = \frac{U_b}{2 \cdot I_C} \). After that, I calculated the base current \( I_B \) from \( I_C \).

Why is it so important to choose \( R_C \) first, then calculate \( I_C \), and finally \( I_B \)? Why I can not at first choose \( I_C \), then determine \( R_C \) and then determine \( I_B \)? Both ways seems to work to me.
 
Top