Join Barron Stone for an in-depth discussion in this video ✓ Solution: Audio equalizer, part of Electronics Foundations: Semiconductor Devices.
- This is how I worked my way to a solution for the audio equalizer challenge. I started by thinking about what each part of the equalizer needed to do, and then picking op-amp circuits as building blocks to accomplish those tasks. For the two filter blocks, I decided to use a basic op-amp filter circuit that consists of an RC low-pass or high-pass filter connected to an op-amp unity gain buffer. And for combining the two equalizer signals back together at the end, that's a perfect application for an op-amp summing amplifier.
With those two blocks in place, I just needed to figure out how and where I wanted to include the ability to control the gain for each equalizer band. One possibility that I considered was using rheostats, which are manually controllable variable resistors, as each of the input resistors on the final summing amplifier stage. While that seemed like a viable solution at first glance, I quickly realized that I would run into problems when I lowered either input resistance too much. For example, if I turned the rheostat for the bass signal all the way down to zero ohms, mathematically, that would make the voltage to resistance ratio for the bass input channel infinity, which would make the output of the summing amplifier go down towards negative infinity.
Now, in reality, the op-amp can't produce infinite voltages because its output is limited by the supply voltage. But that means if the op-amp is trying to output negative infinite voltage, it'll be saturated by the supply voltage, and that still doesn't do me much good. If I wanted to use the summing amplifier stage to control the gain of each signal, I would need to add some additional limiting resistors in series with those rheostats to make sure the circuit gain stayed within a reasonable range. At this point in the design process, I realized that the summing amplifier solution was going to be a bit more complicated than I originally thought.
So I decided to look for another easier way to control the signal gains. The other option I considered, was to replace the unity gain buffer that follows each of the RC filter circuits with a variable voltage amplifier. I decided to go with this route because I was already familiar with using variable gain op-amp filters. So it'd be a lot easier for me to design and build. To figure out the component values that I would need for this circuit, I focused on the RC low-pass filter first, which has a target cutoff frequency of 500 hertz plus or minus 50.
After some trial and error, based on the different components I had available in my parts kit, I settled on using a 3.3 kiloohm resistor and a 100 nanofarad capacitor. According to the equation for an RC filter's cutoff frequency, those component values would give my filter a cutoff frequency of about 482 hertz, which was well within the required plus or minus 50 hertz range. Shifting my focus over to the variable amplifier circuit, the challenge requirements did not specify the gain range for the bass and treble signals, that was left up to me.
I like when my amps go up to 11, so I decided to set that as my target for the maximum gain. I had a few extra potentiometers in my part kit that I could use as variable resistors and adjust anywhere from zero to 10 kiloohms. Since that variable resistor had a maximum resistance of 10 kiloohms, I needed to use one kiloohm for the other resistor value to achieve my target gain. With those component values, when the variable resistor is lowered all the way down to zero ohms, the amplifier will act like a unity gain buffer with a gain of one.
And when the variable resistor is cranked up to 10 kiloohms, the amplifier's output will be cranked up to 11. That completed the design process for the low-pass filter block for the bass equalizer channel. And since the high-pass filter block had the same target cutoff frequency, I simply swapped around the location of the 3.3 kiloohm resistor and 100 nanofarad capacitor in the low-pass filter design to turn it into a high-pass filter. This RC high-pass filter will have the same cutoff frequency as its low-pass counterpart of 482 hertz, which falls within the required range for the challenge.
With both of the filter blocks planned out, all I had left to do was design the summing op amp circuit and then connect the three blocks together. For the summing amplifier stage, I wanted the two input signals to be added together equally. So I started by making all of the resistors the same value, 10 kiloohms. By using the same resistor values for both of the input resistors and the feedback resistor, the equation for the output voltage of the summing amplifier simplified down to being just the negated sum of the two input voltages.
Since audio signals use alternating current that's constantly changing, at any point in time, the voltage at either of the input terminals will fall somewhere within a certain minimum and maximum range. For example, the AC signal might have a peak-to-peak voltage range from negative three volts to positive three volts. Since those two signals are being added together, the output voltage can end up being anywhere within the range twice that size, going from negative six volts to positive six volts. When I was testing my circuit, that began to cause some problems.
I was using a nine-volt battery to generate the positive and negative 4.5-volt supply rails to power the op amps in my equalizer circuit. That meant the op amps would only be able to produce at max output signals that were within plus or minus 4.5 volts. Since I was already amplifying my bass and treble signals by a factor of 11, I found that sometimes when my input signals were at full volume, the sum of the bass and treble signals would exceed that plus or minus 4.5-volt range on the power rails and caused clipping.
To prevent that, I needed to reduce the amplitude of the signal coming out of the summing amplifier. I reduced the feedback resistor from 10 kiloohms to five kiloohms. Doing that cut the amplifier signal gain in half so that the possible range of the output signal would be the same as the input signal ranges. I don't have to worry about the bass and treble signals adding together to create a signal that's larger than either one of them. For practicality, since five kiloohms is not a standard resistor value, I used a 4.7-kiloohm resistor instead, which is the next smaller common resistor value that I had in my parts kit and close enough for this purpose.
After I finished designing each of the subsections in my equalizer circuit, I built a prototype with the design on my breadboard, but before using my new equalizer circuit with an actual audio signal, I decided to test it first to see how it responded to different frequencies. Before I use my newly built equalizer circuit with an actual audio signal, I want to test it out first to see how it responds to different frequencies. So I've connected my function generator to produce a 200-millivolt peak-to-peak sine wave as the input signal, and I have that input signal displayed on my oscilloscope in yellow on channel one, and the output from the mixer is displayed in blue on channel two.
Right now I have the function generator producing a 50-hertz sine wave, which is well within the range of bass frequencies. When I turn the gain knob for the low-pass bass filter, I can see that the amplitude of the output signal changes quite a bit. But if I turn the treble knob, the output doesn't change very much. There's not much high-frequency content in this signal to go through the high-pass filter. Now, to test my circuit at a high frequency, I'll adjust the input frequency to be around five kilohertz, which is well within the treble range.
And I'll adjust the horizontal scale on the oscilloscope to get a better view of the signal. Now, when I turn the treble knob, it has a significant effect on the signal, and I am getting some distortion in it due to the circuit. But turning the bass knob doesn't have much effect on the output, and allows some DC offset to get through, but the overall amplitude is basically the same. Now that I've tested my equalizer circuit with individual frequencies, it's time to see how well it performs with some real music.
I'll use a three-and-a-half-millimeter headphone jack to connect to the input of the circuit, and that's connected to my MP3 player on my cellphone. And I'll connect the output of the circuit to this speaker which has a built-in amplifier. If I want to focus on bass frequencies, I can adjust the bass knob to emphasize those.
And if I want to hear treble frequencies, I can turn the other knob. I can hear a difference between the treble and bass, so I know my equalizer is working, but frankly, it sounds bad. There's static and noise and popping sounds in the music, it's getting some source of unwanted noise. And I realize now that I forgot to include decoupling capacitors on the breadboard's power bus.
The noise on those power lines is affecting the op amps and creating those pops and static sound in the output. Fortunately, that's an easy fix. I'll just add a few 100-nanofarad capacitors to the power bus, and I'll put them between power and ground as close to the power lines supplying power for the op amps as I can. For safety, I disconnect power to my circuit before making any changes. Now I'll reconnect power.
And I can hear a difference. No matter how well I think I've designed a circuit, when I actually build and test it, I usually find new unexpected problems to overcome. But those challenges are part of the fun when working with electronics.
- Semiconductor materials
- Diode applications
- Rectifying a signal
- Detecting the signal peak
- Protecting against large signals, reverse current, and flyback voltage
- Special purpose zener diodes, Schottky diodes, and photodiodes
- NPN and PNP bipolar junction transistors
- Using a BJT as a switch
- Field effect transistors
- Differences between BJTs and MOSFETs
- Operational amplifiers
- Op-amp applications
- Comparing signals
- Buffering signals
- Amplifying signals
- Filtering signals
- Combining signals