This is the CSV file describing the test waveform I used.
Comma-Separated Values - 676.63 kB - 09/15/2018 at 19:11
Contains the C++ source code to generate the test CSV file (formatted for a Siglent SDG2042X model AWG). Compile with "clang++ -o main main.cpp siglent_awg.cpp", run with "./main".
Zip Archive - 2.80 kB - 09/15/2018 at 19:09
Bill of materials, as generated by Mouser Electronics
ms-excel - 23.00 kB - 09/14/2018 at 20:07
KiCad PCB Project & GCODE files for the board
Zip Archive - 257.96 kB - 09/14/2018 at 20:01
I measured the cutoff frequency (fc) of the bass channel by feeding a DC signal from my function generator into the circuit and setting the gain to 20dB, then slowly increasing the frequency until the output drops to .707x the amplitude at DC. This is the half-power point and the frequency at which this occurs is the cutoff frequency. I measured fc=2,36 kHz.
As expected, increasing C2 resulted in a lower cutoff frequency. Replacing C2 with a 22nF capacitor dropped fc to 737 Hz. When connecting the circuit to small speakers, however, I noticed that the higher cutoff frequency low-band sounded better. All-to-common cheap & small speakers have great difficulty with low tones, and thus the higher low frequency cutoff sounded better. The 737 Hz cutoff made the music sound dulled. If I ever build a model with more than 3 bands, this lower fc channel could be a wonderful addition.
I played around with feeding different frequency waveforms into the equalizer and examining how the filter effected them. Just as expected, the low channel effected the low frequencies much more strongly. It wasn't quite as stark as I had expected, but listening to output through speakers, you could easily notice the difference in effect between the high and low frequencies.
To measure the cutoff frequencies (there will be two because it is a bandpass filter), I changed the frequency until I found the frequency at which gain peak. I then shifted the frequency above & below this peak frequency until I measured V = .707*Vpeak. I measured:
|Frequency (C3 = 22nF)||Frequency (C3 = 10nF)|
|Cutoff Frequency - High||3,33 kHz||3,99 kHz|
|Peak Frequency||1,61 kHz||2,6 kHz|
|Cutoff Frequency - Low||707 kHz||1,55 kHz|
I replaced the 22nF C3 with a 10nF cap to raise fc. The results are displayed in the above table. I decided to keep the original 22nF value for C3 because the 10nF cap made the mid band perform very similarly to the high band.
To measure the cutoff frequency I used the same technique detailed for the low band, except a high frequency (100s of kHz to 1MHz) signal was used in place of a DC signal. I measured fc to be 2,653 kHz. I tried replacing the 4,7nF C4 with a 3,3nF cap for a higher fc. I measured fc=4,336 kHz after this modification.
When connected to speakers, it was clear that the higher fc was too harsh and tinny. The 3,3nF range could perhaps be used in a model with more than 3 bands, but not here.
There is still interference from radio stations, but perhaps eliminating the parasitic capacitances and inductances inherent with solderless breadboards is responsible and a proper PCB will fix this problem. I will know after creating a legitimate, PCB-based, prototype.
I reconfigured the three channels so they were in series, whereas before they operated in parallel and fed into a mixer. Here's the schematic:
The series configuration is an improvement because, when parallel, the weight given to each channel in the mixer is dependent on its gain. This allowed for the unintended behavior of two channels set near unity gain overpowering a third channel that may be boosting or attenuating a frequency band. Arranging the filters in series takes the product of their gains rather than summing their effects. This is the correct behavior.
I tried to increase the range over which the gain of each channel could swing by setting R3, R5, R6, R8, R11, & R13 to 1KΩ as opposed to 10kΩ, their original value. The capacitors in parallel to the potentiometers limited the maximum impedance of the potentiometer, capacitor network, and thus set an upper limit on the range over which the gain could move. Still, making the change from 10kΩ to 1kΩ had such a strong effect on performance that adjusting the bass channel to about 2/3 of its maximum gain caused noise to grow out of control. This needs to be fixed.
The new circuit is working a lot better, but I still need to make a ton of refinements. Up through now I've been designing according to the great principle of TLAR. Now time to dig in and make this guy work a lot better. Additionally, I need to add a boost converter of capacitively couple the output so that I can power the circuit from a USB port. Getting USB power complicates things because the ground line in the headphone jack needs to be the same as that of the USB port. Otherwise, if the ground line going to the headphone jack gets connected to earth ground via whatever speakers you plug in & the USB port is also connected to earth ground, you could short these two potentials, causing significant damage to the equalizer, the speaker, or the USB port.
The second design is shown in the schematic below.
The objective of this redesign was to isolate the behavior of each channel from the other two at the detriment of part count.
The performance of the new circuit was better, but almost insignificantly so. The mid and treble channels have a discernible effect, as opposed to their almost unnoticeable effect in the previous design. I didn't even need to break out my AWG to come to this conclusion, simply listening to music play through the circuit was enough to determine it wasn't up to snuff. Time for another redesign.
To design my equalizer, I started out with this circuit.
I threw it together on a breadboard and gave it a shot. As an initial test, I hooked it up to some speakers and my iPhone and listened to see how strong of an effect it had on my music. The bass channel worked very well, but the mid and treble channels didn't. Switching R4, R7, & R10 (the potentiometers) to 10kΩ improved the performance of the mid and treble channels, but they were still sub-par. Additionally, radio interference was a major problem.
To perform a more thorough analysis I created a C++ program that generated a test waveform for my Siglent SDG2042X arbitrary waveform generator to feed my circuit. The waveform was a sum of 8 frequencies. By running an FFT on the AWG's output and the output of my circuit I could see how my equalizer was effecting different frequencies. This is what the waveform looked like:
I used my scope's FFT to analyze the equalizer's effect. This prompted me to redesign the circuit with dedicated op-amps for each channel because I saw adjusting the potentiometer for one channel would effect the performance of the other two channels as well. The new circuit should eliminate that effect.