Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CE Amplifier in Spice.

Status
Not open for further replies.

lord loh.

Member
Here is a SPCIE CE amplifier which just does not give me a proper trace.

I am sure I did not manage to give proper resistor values.

I am plotting V(n001) and V(n003)

Can some one correct this for me.

Thanks in advance.
 
What do you want the transistor to do?
1) It is only an inverter with a voltage gain of slightly less than 1.
2) Its base resistors have extremely low values so will load-down most sources.
3) It doesn't have an input coupling capacitor so its source can upset its DC bias.
4) Its base voltage is very low so the transistor is nearly cut-off.

It's the very 1st time I opened Switcher CAD III and it never heard of that very old transistor. When I ran a sim of Vn001 I didn't know what it was doing, with many green waves all over the screen. Vn003 showed only 5VDC.
Why can't it explain what are those Vn's?
 
I thought the file would be compatable with all SPICE versions.

I am trying to make an amplifier.

V(n001) is the base node. The signal at the base is 20 microvolts. The source is set to have 0 DC offset therfore I omitted the coupling capacitor.

V(n003) is the output

All I got was two straight lines.

I am new to SPICE and wanted to try a few biasing circuits and simple transistor amplifier. I used the BC548 because I had used it in thye real world for switching purposes. I never made an amplifier. :( :(
 
I got the darn thingy to work:
1) I added a 10uF input coupling capacitor so the source doesn't short the DC base bias voltage to ground.
2) I changed the horizontal display timing to Left= 0s, Tick= 200us and Right= 1ms so it shows waves of the 4kHz.
3) I changed the input peak signal voltage to 1V.

It looks like Vn003 is the emitter voltage and Vn004 is the collector voltage. As I guessed, the transistor circuit has a voltage gain of slightly less than 1 and is incorrectly biased with its DC base voltage too low causing its collector voltage to be high near cutoff and showing its positive-going waveform clipped at +5V.

Goody! That's the 1st sim that I have ever run! :lol:
 
Thanks Audio Guru.
I managed to get an output too...

And I find it hard to believe that an electronics god runs his first simulation... Really !!!

I did not realize the capacitor at the input was this indispensable.

Thanks again...
 

Attachments

  • cad.gif
    cad.gif
    15.6 KB · Views: 654
lord loh. said:
And I find it hard to believe that an electronics god runs his first simulation... Really !!!
I don't trust sim programs. For example, your sim shows the input and output as being in phase, but it should show them out-of-phase.
I sim'd your circuit and it showed the phases correctly, so I don't know why yours is wrong.
I fiddled with your circuit to get lots of voltage gain and even though the transistor wasn't saturated nor cut-off, it showed awful distortion which I expected.
 
audioguru said:
lord loh. said:
And I find it hard to believe that an electronics god runs his first simulation... Really !!!
I don't trust sim programs. For example, your sim shows the input and output as being in phase, but it should show them out-of-phase.
I sim'd your circuit and it showed the phases correctly, so I don't know why yours is wrong.
I fiddled with your circuit to get lots of voltage gain and even though the transistor wasn't saturated nor cut-off, it showed awful distortion which I expected.
He has the tranny biased into saturation, so it acts like a lump of silicon. Note that it comes out of saturation at the extreme negative portion of the input waveform, allowing the transistor to invert that portion.
One of the key things to remember - if you don't know what the output should look like, you won't know if it's wrong.
 
Hi Ron,
Yes of course. I've never seen before a transistor's base dragged-up by the input and the collector following the emitter up with it. The collector resistor might as well be connected to ground instead of to the positive supply, for the same lack of current gain.

I've also never seen before a transistor circuit like that one, with more current in the divider for the base than in the entire transistor circuit.

Is there a way to have a graticle across the entire display like a'scope?
 
audioguru said:
Hi Ron,
Yes of course. I've never seen before a transistor's base dragged-up by the input and the collector following the emitter up with it. The collector resistor might as well be connected to ground instead of to the positive supply, for the same lack of current gain.

I've also never seen before a transistor circuit like that one, with more current in the divider for the base than in the entire transistor circuit.
Likewise.

Is there a way to have a graticle across the entire display like a'scope?
Right-click on the plot background ans select "Grid".
 

Attachments

  • grid.png
    grid.png
    6.8 KB · Views: 619
I managed to get some gain.

The traces to be seen are

V(n005) - Output
V(n003) - Input
I(R1)-I(R2) - The Base Current
I (R5) - Base current again.

But the base current does not seem to be constant. It is a wave. This means a constant shift of the operating point. I tried to Bypass the R2 with a capacitor, but the gain reduced terribley as all the signals were grounded.
 

Attachments

  • draft1_134.zip
    627 bytes · Views: 200
  • cad-ii.gif
    cad-ii.gif
    12.1 KB · Views: 624
lord loh. said:
I managed to get some gain.
Good, you bypassed the emitter resistor which removed the negative feedback from it. So you traded good linearity for gain.
Try increasing the input level and see gross distortion at the output.

I also got more gain by increasing the value of the collector resistor then changing the base voltage so the transistor doesn't clip. With a higher input level then the distortion is obvious. The top half of the waveform is severely compressed.

But the base current does not seem to be constant. It is a wave. This means a constant shift of the operating point. I tried to Bypass the R2 with a capacitor, but the gain reduced terribly as all the signals were grounded.
Of course the base current, emitter current and collector current change with the input signal, according to Ohm's Law. If the currents were constant then there wouldn't be any output, wouldn't it?
 

Attachments

  • transistor_distortion.png
    transistor_distortion.png
    31.2 KB · Views: 634
I thought one only traded the bandwidth for gain... But now I see that one has to trade linearity as well :(

But I guess it is okay if the input signal is low...

And you have placed a 33uF capacitor to bypass the emitter resistor... and further reduce the negetive feedback.

And no matter how I arranged the resistor values, I always got compression in the +ve cycle...

Is there a way around without distortion...

Thanks a lot audio guru....I learnt a lot...and am looking forward to learn more from you.... :)
 
Hi Bharath,
Simple transistor amps like this one produce a lot of distortion when their gain and output level is near max. Even at low levels and/or low gain the distortion is quite high.
You can make a very low distortion transistor amp by doing what is done in opamps and audio amp ICs:
1) Use a constant current source for the collector resistor.
2) Or use or a "bootstrapped" pair of resistors and a capacitor for the collector resistor.

Since their impedance is very high then the voltage gain is also very high. Then more negative feedback can be used to reduce the gain down to what you want and drastically reduce the distortion.
Their only problems are reduced bandwidth due to the small capacitance at the transistor's collector and the high impedance needs a buffer added like an emitter follower. Even the emitter follower can be included in the negative feedback loop for extremely low distortion and wide bandwidth. :lol:
 
A diff amp has much lower distortion than a CE amp, due to the fact that the change in transconductance (emitter resistance) is somewhat complementary in the two transistors. Harmonic distortion at the levels shown simulates as better than -40dB (see FFT). On c2 (not plotted here), 2nd harmonic distortion is better than -60dB.
 

Attachments

  • diff_amp_fft.png
    diff_amp_fft.png
    16.5 KB · Views: 660
  • diff_amp_waves.png
    diff_amp_waves.png
    16.6 KB · Views: 608
  • diff_amp_sch.png
    diff_amp_sch.png
    11.9 KB · Views: 703
Hi Ron,
I'm surprised that the gain of the differential amp is so high at 50. It looks like the Total Harmonic Distortion is about only (!) 3% and 0.3%.
 
audioguru said:
Hi Ron,
I'm surprised that the gain of the differential amp is so high at 50. It looks like the Total Harmonic Distortion is about only (!) 3% and 0.3%.
Guru, ya lost me. :cry:
50 what? And what are those two THD numbers, and how did you come up with them?
 
I have seen FFT graphs in swCAD could never interpret them. What are they for?

What do I see in a FFT graph? and what are the graphs plotted against?

I studied Fourier series, and figure out that a Fourier series of a function is the function expressed as a sum of it's sinusoidal components with progressively reducing amplitudes and increasing frequencies.

So harmonic distortion occurs when one of the harmonics that are required to build up the neat signal is missing or is attenuated disproportional to the other harmonics.

Also Audioguru, I do not figure out what bootstrapped resistor mean? (I tried google and got no explaination)...

A million thanks to auidoguru and Ron H
 
Ron H said:
audioguru said:
Hi Ron,
I'm surprised that the gain of the differential amp is so high at 50. It looks like the Total Harmonic Distortion is about only (!) 3% and 0.3%.
Guru, ya lost me. :cry:
50 what? And what are those two THD numbers, and how did you come up with them?

You have an input of 40mV peak producing 2V peak output, the gain is 50.

You show the 2nd and 3rd harmonics at -40dB which is 1/100= 1% each plus the remaining harmonics add up to another 1% so the total for the harmonics is about 3% distortion.

Harmonics at -60dB each produce 0.1% distortion so their total is about 0.3% for the other side of the diff amp.
 
lord loh. said:
I have seen FFT graphs in swCAD could never interpret them. What are they for?
They show all harmonics of a signal. look at the sine-wave input signal which doesn't have any harmonics. Look at the cool display of harmonics in a triangle wave.

So harmonic distortion occurs when one of the harmonics that are required to build up the neat signal is missing or is attenuated disproportional to the other harmonics.
Distortion adds harmonics to the original pure signal and are extra, not missing.

Also Audioguru, I do not figure out what bootstrapped resistor mean?
This article describes methods to reduce distortion in transistor amps.
**broken link removed**
I explain how it works in a pic attached.
 

Attachments

  • bootstrapped_transistor.png
    bootstrapped_transistor.png
    30.2 KB · Views: 341
audioguru said:
lord loh. said:
I have seen FFT graphs in swCAD could never interpret them. What are they for?
They show all harmonics of a signal. look at the sine-wave input signal which doesn't have any harmonics.

This is what I saw when I tried to get the FFT of a Sine wave... I expected a single peak. :( Or have I made a mistake...

Thank you.
 

Attachments

  • fft.gif
    fft.gif
    12.4 KB · Views: 289
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top