字幕表 動画を再生する
Let's build a common emitter amplifier circuit because that's one of my favorites.
Let's start with F2. We want an
NPN transistor.
Let's zoom out a little bit.
Right click. You actually want to pick a realistic transistor not just an
ideal model.
Pick new transistor. These are very common transistors. 2N2222...
I've got a couple of those in my parts box so that sounds great.
Okay we'll
add a resistor on the collector.
A resistor on the emitter.
A couple of resistors to form the DC voltage bias.
Let's add a capacitor so that we are only
amplifying AC. Let's
add another capacitor so that there's an AC path to ground.
And let's add a resistor there so we can have some control over the gain.
Start drawing some wires now...
Ok almost done... and never ever forget ground.
Now we're going to want two separate voltage sources here.
F2... go to voltage source...
Let's put a voltage source here. It should be referenced to ground.
Do that with the source here and
at the top of our voltage divider.
Now this is where DC voltage sources come into play.
Let's give it a dc voltage of 9V. We're going to power our amplifier
with that. And like I said we need a second voltage source.
We need an input signal that we're going to amplify. Voltage source here...
Escape... Reference it to ground...
F3 to draw wires... excellent.
Okay let's add some component values. I have built
so many of these things that I know by heart that this little trick will work.
Make all the resistors 10k except for this one.
Let's make the one that controls the gain a very little value...
1 ohm. We want a lot of gain. And we make the capacitor values
pretty high, 1uF so that we let as much AC through as possible so
we get a large
AC gain. And don't worry if you don't know values from memory like I do
this is just to show you how to construct the circuit in the simulator
and simulate it then tweak it and just see what happens.
Now this time we don't want to do an AC analysis sweep of many frequencies
we just want to see how this amplifier performs at one specific frequency. Let's say
400Hz because that's roughly a male voice.
Right click, Advanced.
We're not going to put in the small-signal value over here.
We are going to use the Function. Sine... DC offset is
0 volts. Amplitude is
very small let's make it 20 millivolts. Frequency is
400 Hz... and we can just leave the rest blank.
Okay time to set up the simulation.
Edit simulation command. We're not doing AC analysis anymore.
Now we want to do a transient analysis.
Now what the transient analysis does is it starts up the circuit at certain
default values.
For example nine volts over here and
0 volts for the initial sine wave over here. And then
it calculates every single voltage in the entire circuit, every voltage and
every current at every node at a fraction of a second later.
And then it'll do it again a fraction of a second later. It'll just keep doing that
over and over and over again
until you get graphs of voltage and current versus time
for every single voltage in the circuit. And the only value we really need to
change here is the stop time.
This determines how long we're going to run the simulation for.
So let's run it for 100 milliseconds which is actually quite a
long time.
Okay... put the box wherever I want.
Now Simulate, Run...
And this is the output of our amplifier let's see what happens.
So check it out. On the output
we have a voltage swing of about
1 volt peak to peak. On the input we have
that tiny little 20 millivolt input signal.
So the amplifier is working great. We have a DC offset... I mean we can easily remove
that with a capacitor over here...
but the amplifier is working exactly as expected. Now let's have some fun
tweaking the circuit.
Let's say I don't want 1 volt peak to peak let's say I think that's just
too much and
I only want to have 0.5V peak to peak.
Let's reduce the gain of this amplifier.
So I go over here, changing this resistor value will do that.
Let's change that to 100 ohms.
Okay simulate again.
Output... well it looks like we've got 5.6V minus 4.6V so
we still have 1V peak to peak so that didn't reduce
the gain of the amplifier like I wanted. So we're going to have to go over here
again
and tweak the value. Change it to
1 kilohm.
Simulate again and see what happens.
And now we're much closer. We've got about 5V to 5.35V.
It looks like we've overshot our target by a little bit so
let's change it to 800 ohms.
Run the simulation again... and sometimes you just have to do this in engineering.
Just keep doing things over and over again until you get the result that you
want.
Okay looks like we've got about 0.45 volts on the amplifier
now
and that's roughly where I want it to be so let's let's just leave it at that.
And if you're curious let's poke around at some of the other voltages
in the circuit. Over here we would expect this to be a flat line
nine volts and yes it is.
In the middle of our voltage divider... 10k here 10k there...
were dividing evenly by two
so this should be 4.5 volts.
Yes it is! 4.5 volts and we've got our little 20 millivolt
AC swing laid on top of it. And we can just keep looking at all kinds of
currents and voltages in the circuit to
see whatever we want to see and analyze whatever we want to analyze
and make adjustments accordingly.
Okay that covers the basics of circuit simulation so give it a try!