A number of folks last week saw odd behavior from their temperature controller when they had their lighting indicator attached. According to the op-amp datasheet, the expected short-circuit current for the models we were using was about 26 mA. So, if you had a green LED (~3V to turn on) in series with a resistor, this limit would be reached with a resistance less than $R = V/I = (15-3 V) / 26 mA = 462 \Omega$. Thus, if you used a 100$\Omega$ resistor, then the op-amp's output would probably cap out around $V = IR = 26 mA * 100 \Omega = 2.6 V$ dropped across the resistor, corresponding to an output around 5.6 V.
This doesn't explain every problem people had but it does illustrate that circuits work as designed, not as how we intend.
In this lab, you will build a series of circuits to receive an input signal, amplify and/or selectively modify it, and then amplify it to play over a speaker. This will give you the chance to combine most of what you've learned about analog circuits so far to make a functional device. Let's start with a block diagram of the desired circuit. This is a way of showing what you want different parts of a circuit to do functionally, as well as the path that signals will take.
Each block represents a group of components that will be used together to achieve a specific task. This circuit will take an audio signal,
After getting each of the component parts working, you can then start combining them with a better understanding of what they should be doing, which helps in tracking down any problems.
This lab will involve quite a few op-amp circuits, which is why you'll want to use the TL074CN chip, which contains four op-amps in a single chip.
Note that the power is connected along the middle pins instead of opposite corners
DON'T PANIC
Are the letters large and friendly enough?
Your report will not be due until after the last day of lab
This part is the most straightforward, as you've already made a handful of amplifier circuits. Most audio signals are a few hundred mV in amplitude, so you should check how much you'll need to amplify the signal to make the speaker play it audibly.
Your op-amps should be sufficient for driving the speaker provided you put a resistor inline to limit the current to a few mv. You should build an op-amp follower circuit that you've constructed before and connect the speaker its the output.
Create a diagram of your circuit, either with pen and paper, a drawing program, or an online tool (see https://www.falstad.com/circuit/ or https://www.diagrams.net/)
More info about diagrams.net is on the wiki home page
To begin, start with the function generator as your input, and verify that you can play an audible noise from your speaker.
Describe, sketch, or include a screenshot of the output you observe.
Compare the audio from your amplifier circuit to the result you get from connecting the speaker directly to the function generator. Are they reasonably similar?
As further testing, we'll use a more complex waveform to verify that we've got good enough fidelity.
This is only an option if you have a DGS812 function generator, not an 822. Check the model # on the top left corner of the function generator. Go the function generator's Menu, and scroll down to the Arbitrary option. Select the Engineering menu and scroll down to the Voice option (Left side, ~5th row from the bottom). You'll need to set the frequency to about 1Hz. Not 1kHz, not 1MHz, but once per second. Unfortunately some variants of our function generator may not have this option, so you may be stuck with a sweep regardless.
Using a sine wave as a base, press the Home button, select Sweep from the left-hand side of the screen, and then choose Linear or Log. You can then alter the frequency range, I'd suggest something from 100 Hz to 10kHz or so, but note that these speakers will have the strongest response in the 1-4kHz range or so.
Compare the audio from your amplifier circuit to the result you get from connecting the speaker network directly to the function generator.
Are they still reasonably similar?
You may notice that your perception of how loud a sound is depends on the frequency. There are two contributing factors here:
Because of this, you may need to use your scope to tell if your circuit is working, and then adjust components to make an audible difference.
As long as you've got the basics working, you're set for now! Time to work on the next stage.
Now that you've got the basic set up, it's time to amplify your signal, so that you can get something louder from your speaker. The function generator (and general audio outputs) just is not made for driving devices that need a significant amount of current.
To this end, we'll modify the signal chain to include an amplification stage
It is recommended that you use an op-amp circuit for this part (e.g. either an inverting or non-inverting amplifier), but if you really felt like it you could build a transistor amplifier.
It isn't your imagination: the instructions here are less detailed than previous labs. This is intentional; we want you to apply what you've already done to create something functional. If you aren't sure how to design the perfect circuit for your situation, start with one you've built before and tweak the components from there.
Not sure if the op-amp you have is functional at all? Try building a follower with it (connecting $V_+$ to a signal and $V_-$ to $V_{out}$). If the output doesn't match the input, start checking the power connections/voltages. If the output stays at one of the rail voltages all the time it's possible that either there's a problem with your feedback loop or that the chip is dead.
In a moment we'll start doing something to alter our signal, but for now we'll prepare for that step by building a circuit to combine audio signals.
We can actually do this with a variant of an op-amp inverting amplifier circuit called a summing amplifier, shown below:
If there were only one input ($V_{in1}$), then the output of the circuit would be the same ($V_{out} = -1*V_{in1}\frac{R3}{R1})$. If we add another input and resistor, then the voltage across that resistor $R_2$ will still be $V_{in2}$ as the op-amp's golden rule ensures that the $V_-$ input will be held at 0V. This means that we'll end up dropping more voltage across $R_3$, and as a result we find that $V_{out} = -1*(V_{in1}\frac{R3}{R1} + V_{in2}\frac{R3}{R2})$ If all of the resistors are the same, then $V_{out} = -1*(V_{in1} + V_{in2})$. Note that this can be extended indefinitely, we can add more resistors and more inputs to just keep adding voltages.
Design and build a summing amplifier circuit on your breadboard. You'll want to amplify the signal on the second input($V_{in2}$) as you'll use your previously amplified input as $V_{in1}$.
While we haven't used the feature before, our function generators have two separate outputs! To switch between channels, use the menu on the bottom of the touchscreen.
Using your amplifier as one input and the second function generator output as the other, test your mixer circuit. Does it live up to its name?
We're going back all the way to labs 2 & 3 here, and now the task is to build a filter that will attenuate some part of your audio signal. The goal is to mix this signal back in with the original, so if you build a low-pass filter you'll end up with amplified bass frequencies. Likewise, if you make a high-pass filter, you can selectively amplify higher frequencies (such as vocals in songs). You should probably aim for your filter to operate somewhere around 1 - 4 kHz, our speakers have a crappy response outside of this range and the result might not be audible.
Choose a filter, then design and build it on your breadboard. Don't hook it up to the mixer before testing it.
Using a sweep from your function generator, does your filter behave as you'd expect it to?
Depending on the design of your circuit, you may or may not need a follower between your filter output and the summing amplifier. As a rule of thumb, if the input resistor $R_2$ isn't at least 10x larger than the resistor in your filter you should add a follower. Otherwise you may end up drawing enough current from the filter to start to change its behavior.
Listen to the output of the mixer with and without input from the filtered signal (disconnecting/connecting $R_2$ in the summing amp is a good way to achieve this. Can you hear a difference? If not, you should either amplify the filtered signal more (i.e. decrease the resistance on its input to the mixer circuit) or change the filter frequency.
Depending on your design it might be hard to notice changes by ear. This can be a good time to look at the FFT of the signal to the speaker
Up until now, we've made do with just an op-amp for our output. It works, but it isn't ideal. So, we'll create an amplifier circuit that will increase the power delivered to our speaker.
Now, we've made a few amplifiers with Op-amps and BJTs so far, and there have always been tradeoffs. The design we'll use here is meant to deliver substantial power without heating up the transistor massively. The first stage is a comparator circuit like we built last week. However, instead of comparing the input to ground, we'll use a 100 kHz ramp here.
You'll want the amplitude of your ramp to be on par with the signal you're comparing it to. Too high or low and you'll end up with “dead spots” where the comparator output is stuck high or low for a long period of time, which will distort the audio output.
The result will be that the output we'll get is a series of square wave pulses, but the width of each pulse will be proportional to the amplitude of the input over a short duration. Unsurprisingly, this technique is known as Pulse Width Modulation. We're essentially converting our analog signal into a digital one, albeit a 1-bit version.
![]() |
An LM311 comparator-based speaker amplifier. Note that the capacitor is polarized; the longer leg should be towards the higher voltage in the circuit. This sort of circuit is known as a Class D amplifier, if you want to know more. |
The other part of the circuit uses a BJT transistor as a switch, either driving it fully on or off. When we use a large capacitor along with our speaker as a filter, we recover a fairly decent (but much louder) analog response. The signal will look horrible at this point still, since part of the filtering here is in the physical movement of the speaker. Since the material that makes up the speaker cone cannot respond with infinite speed, it acts as a form of (physical) low-pass filter. With an experiment reminiscent of the first year harmonics lab, you could figure out the resonant frequency of the speaker itself, which could (possibly) help in fine-tuning the setup.
Now, it may very well turn out that things did not work at first when you connected them. This is okay, it happens to all of us at some point. If you need to troubleshoot, you should keep some notes on what you find and changes you make.
If you're still having trouble, here are some options you can try when troubleshooting your setup:
The basic system, while functional, has room for improvement. By the end of this lab, you should choose at least one meaningful way of modifying your circuit. Some examples include:
As part of your report, you should create a full circuit diagram of your audio processing circuit. This means that instead of the blocks we used to describe the general behavior, you should make a schematic showing all of the parts and their connections used in your final implementation.