Okay, so in this video, we're going to look at this Agilent 33220A,
which is a 20 megahertz function generator, and what that means is this machine is designed to
put out waveforms, and what kinds of waveforms that really depends on what we're trying to do.
You can see here with the front user interface, there's buttons for sine wave, square wave,
ramp, pulse, noise, and arbitrary, which can be whatever we want essentially.
These controls up here let you type in specific numbers,
and this knob here lets you control other aspects of the device. So
what you'll need to use for this is a different kind of cable. Although it's a bit similar,
this cable here which has a b and c on one end, and these two little clips on this end,
and this plugs right into the output port of this machine here. You can ignore the sync port,
that's for other purposes, but what we want is the output. It works the same as the oscilloscope,
just push it in and turn, and it locks into place. Okay so let's start the machine up.
Okay so when it's fully started up like this, you can see it's defaulted,
it'll always default to this one kilohertz sine wave, and what we can do now is... What I'll do
now is I'll take the oscilloscope over here that we're using before,
and I will hook it up to the output of this function generator so we can see what's going on.
Okay, now I have the output of this function generator hooked up to the input of this
oscilloscope. So now what I can do is I can press output, which output enables the output of this
machine. So if I press that, it turns on, but you can see here this oscilloscope doesn't really show
much of anything. That's because the signal that the function generator is putting out is pretty
low. So on the screen you can see that there's three different tabs here. One for frequency,
amplitude, and then offset. So to change the frequency on this, you can either use the
wheel like before, or you can type in a number that'll appear on the display here. So I can do
like one, two, three, four, and then down here I have the divisions of time. So I can set it to,
for example, hertz which will set it to one, two, three, four hertz, or one about one kilohertz.
We've got this 1.234 kilohertz signal coming out of this. We can look at our scope and see that
there's still not much of a signal showing up, and that's because the scope is set to one volt
per division and the signal that's being put out is too low in this mode. See, right here the scope
is at one volt per division. So each box is one volt, but if we look at our function generator
and click on the amplitude tab, you can see that it's only put out 100 millivolts peak-to-peak.
So what we could either do is change the oscilloscope to vertical axis, to zoom in
some more, and we can see our signal there, or leave it at one volt, and we'll go back to our
function generator, and type in a number here. In this case, I'm going to say I want the peak
to peak to be three volts. So type in the number three, and then you can see our divisions of volts
here, or the the representation of volts. So I'm going to say three volts peak to peak, and you
heard that click, and then look at the scope, and you can see the signal show up now. So I can make
further changes now. I still have the amplitude selected and I take the knob and just turn it.
You can see that as I turn this knob. it's changing the amplitude of the signal coming out.
I can also click on the frequency button here, takes me back to frequency,
and I can type in like one kilohertz. That's changed to one kilohertz on the
oscilloscope. Then, the same as before, I can take the knob and just
increase it, and get even higher signal, or get a lower signal the other direction. Once you reach
the number one in any one of these positions, it'll stop the incrementing.
So what you can do at that point, is use the left and right keys here to go to the next
number place and start decrementing that, and it will start lowering the signal even more.
You can also change the type of wave that's being put out. Right now, it defaults to square with
a sine wave, but you can click square wave. It'll switch to a square wave. Same for ramp,
pulse, noise. There are some arbitrary ones in here. So I go to waveform, select built in,
and then cardiac, and it will make a fake heartbeat on this oscilloscope.
More than likely, you're just going to be using sine wave, square wave, and ramp,
or even pulse. Those are those are the four that you'll probably be using the most in electronics,
and the third option here for offset, that will move... that will give a dc offset to this graph.
So right now, it's got a zero dc offset. So it's just going to be pretty much a pure ac signal, but
if I click on offset, and then turn the knob or type in a number, you'll see the
graph move up and down on the oscilloscope as I introduce a dc component to our ac signal.
To turn off the signal, you just press output again, and that will
cause all the output signals to stop. For the most part, that's pretty much what you need to do,
but you will notice that whenever I turn this off and turn it back on...
You can see the output has changed back to one kilohertz, and the
amplitude is one hundred millivolts peak to peak. So it always resets to this.
Finally, one of the most useful features of a function generator, which you may or may not use,
but it's still pretty useful to know anyway... If you don't want to learn anything else learn
about sweep. Sweep is probably the most useful function of function generators. What sweep does,
is it programs in a certain beginning and end and it will automatically increase the frequency,
and then decrease the frequency depending on what others in those limits. So that might sound kinda
complicated. So I'll try and I'll demonstrate it. So I'll turn the output, and you can see
here I have it set to sweep, and you can see the frequency is increasing, and then going back to
the original setting. I'm increasing again. I can use the options on here, for example, like I can
change what the start frequency is going to be, and also change the stop. So this is the ending
frequency. So it's going from, in this case, 100 hertz to one kilohertz, and then going back to the
beginning again.I can change the sweep time. So I could just, for example, make it really fast.
So it's a little bit too fast to see,
and then make it even slower than that. So where this is particularly useful, is when
you're dealing with filters. If you're building a filter of any kind, the sweep functionality
is your friend, because that will tell you, it'll show you what frequencies the filter responds to.
Again, to get out of that, you can just press sweep and it'll go back to its normal setting.
One other thing to keep in mind is that, unlike your oscilloscope,
the output of a function generator is usually floating. There is no earth reference, and what
that means is that if you're going to attach this probe, and onto your circuit somewhere, you also
have to attach this onto ground, because there has to be some kind of way for electricity to flow in
the circuit through this machine. So you just want to make sure that you hook up the ground point to
the common ground of your circuit, and this point to the input of your circuit. Something that you
may or may not have noticed is that I have this setup right now. I have my function generator
set to 1 kilohertz and the amplitude is set up to 2 volts peak to peak, but the oscilloscope
doesn't show that. The oscilloscope shows four volts peak-to-peak, like it shows right here.
That might see a little strange, like why is this? We said it we only want two volts peak to peak,
why is it giving us four? It has to do with this symbol right here. You can see there
there's a 50 ohm symbol next to that output jack, and what that effectively means is that,
in between the bmc and the function generator, is the equivalent of a 50 ohm resistor,
which is considered to be the output impedance of the function generator.
So by default, our function generator is trying to compensate for that. So if we can check that,
we go to this button down here called utility, click on that. In here there's the output setup.
It's the third one over. Click on that, and you can see right down here there's a symbol
for 50 ohms, and the tab we're currently on is for load. So this function generator is assuming that
we have a 50 ohm load connected to our function generator. That would make sense, for example,
if I go back to this right here, what I have is these two resistors, 100 ohm resistors,
and I've wired them in parallel so they're the equivalent of a 50 ohm resistor.
If I hook this other end up to the function generator so that current flows through this,
you can see that on the oscilloscope, the peak-to-peak voltage drops by half. So now it
is two volts peak-to-peak. So the reason this is happening, is we're creating effectively a voltage
divider between the output impedance of the function generator and our load here of 50 ohms.
Our oscilloscope is attached right in the middle of this voltage divider. So because
the two resistances are the same in the voltage divider, it's going to drop our voltage by half,
but we can make it a little bit more complicated,
and say that we only have one 100 ohm resistor in place of this 50 ohm load.
So now when I attach the oscilloscope or the function generator back up to this, it's going
to make it a little bit more complicated with the voltage drop. Now the peak to peak is going to be
about 2.5 instead of two or four. So this can be still a little bit tricky when it comes to
dealing with the output of this, because we still want to have a two volt peak to peak signal,
but now our function our oscilloscope is showing that it's about a little over 2.5 volts. So we
want to compensate for that, and one way you could do it is to just turn the knob here, and try and
eyeball it until it's about where we want it to be, either by raising or lowering the voltage,
or the amplitude. So that's pretty close. So 1.5 volts peak to peak will give us two volts peak to
peak through this resistor divider, but there is a easier way to keep track of this stuff, especially
if you have a more complex resistor divider in place. It can be kind of difficult to exactly
narrow down what the offset needs to be for it to give the correct peak to peak voltage, so
that's where we go to utility. Click on utility, output setup, and right here we have our load.
So here we can set load of our function generator and in this case we want to set to 100 ohms.
Press done. Now you can see our peak to peak voltage has changed. So now it so it shows 2.667
on the display here, and our oscilloscope shows 2.64, pretty close. So now what we can do is,
our function generator is taking into account what our load is. So now we can just program in we want
two volts peak to peak, and it will automatically adjust the output to match that. So now our
peak to peak voltage is two volts. What about what happens if we have no load? For example,
I've unhooked the other side of this resistor so now there's no current flowing through it.
So effectively our circuit has basically infinite impedance on this side.
So our peak peak is showing 4 volts now.
Well to get around that, there's another option inside of the function
generator. We go back to utility and go to output setup. Down here this other tab
see it says hi-z. Now if you press that, see up here it says high z load. Press done.
Now our output has changed to four volts. What high z does is, it tells the function generator
that the impedance of our circuit is so high and might as well assume it's infinite, that there's
there's no current that's going to be flowing through it. So it's going to take that into
account, and now we can see that our four volt peak to peak matches what our oscilloscope shows
of 4 volts peak to peak. So now I can take our function generator and just set back to 2
volts peak to peak, and we'll compensate for that. Again, this only works if there's no load attached
to the circuit or it's a very high impedance load. If I reattach the other end of our resistors here,
you can see that it's gone back down in this case, one volt peak to peak,
because it's going through a 50 ohm resistor again, but it still thinks it's putting out two
volts peak to peak. So you have to adjust it again based on the load that you have attached to this.
So like before, we've made a lot of changes to this thing, and one way to undo it is to go in
back into utility output setup, then turn off high z load, set it back to 50 ohms, and press done.
Or the alternative is just turn it off and turn it back on,
and these function generators will revert back to how they initially turned on. So in this case,
100 kilohertz amplitude, 100 millivolts peak to peak and our output is going to be 50 ohms.