Band pass filter pedal

Started by Bastis, November 24, 2015, 05:44:40 AM

Previous topic - Next topic

Bastis

#40
For some reason the op amp stopped distorting, I think I made a mistake somewhere on the breadboard. I set the whole thing up and... well it works, just not exactly as I had hoped. The volume is super low. If I play a guitar through it I hardly get a signal through at all. If I plug in an electrical piano I get a signal through, but it's way too weak. As far as I can see at the moment I don't see any mistakes on the breadboard, and I don't have more time today. Also, the filters wern't quite as effective as I was hoping for. The optimal effect would block out any frequencies higher/lower than the bandpass range. I understand that it is not possible with an analog circuit, but I was aiming for something a bit more effective. Anyway, I'll get back on it on wednesday, at least the volume part should be solvable!

Edit: But all in all, I'm super happy that it is actually working!

Edit 2: I switched the R14 resistor to a 100k one, and that fixed the volume problem.

PBE6

There's no such thing as a brick wall EQ. With digital it's easy to keep adding additional filter stages until you get something that's close enough, but that's much harder to do with physical parts. If you really want a better cut, you can double the filtering (high and low) on each section to get 24dB/oct slopes.

The signal volume shouldn't be low if you have all the filters being fed to the mixer. Double check your Vcc+ and Vref connections, sometimes it will pass a quiet or distorted signal if things aren't powered properly.

I'd also highly recommend that you make your own audio probe. Just take an old cable and cut one end off. Solder the negative leg of a large capacitor to the hot wire and clip an alligator clip to the ground wire. To use it, plug the cable into your amp/speaker and then connect the ground wire to circuit ground. Now when you touch various parts of the circuit with the positive end of the capacitor, you'll hear how the signal has been affected by the preceding circuitry. Extremely handy for finding out where things have gone wrong.

Bastis

Ah, that probe thing is cool. I just made one. Before, I just moved around the output wire, but this is much better. I tried to find where the volume started to go down, and it seems to be in the second part of the filters. It (makes sense) drops in volume after the two first resistors of the LP filter, and doesn't seem to amplify correctly from the opamp... well, I'll get back to it tomorrow. Tomorrow I'll try using a more reliable power source, I've been using a battery that might be a bit tired.

PBE6

What sound source are you using? Some sort of white noise generator would be ideal, then you can hear the effect of the filters on an even basis.

Double check the connections on the second half of your opamps using the continuity tester on your DMM, make sure there are no shorts or wrong connections. You should also check to make sure that you are getting about Vcc+/2 on the non-inverting inputs for the filters, and on the inverting input for the mixer.

The diagram looks fine, it must be a connection problem.


PBE6

#44
Ahh, just noticed something I missed with your filter component values. There are lots of ways you can choose component values to get a particular frequency, but they all have a different Q value. The Q value determines how quickly the roll-off approaches the 12dB/octave spec, although if the Q value is too high you get a resonant boost  near the cutoff frequency. A filter with a Q of 1/SQRT(2) =~ 0.71 is called a Butterworth filter and is probably ideal for this application as it has a maximally flat response in the passband (i.e. no wiggles).

To get a Butterworth filter Q with the Sallen-Key LP topology, choose your components such that R1 = R2 and C1(feedback) = 2*C2(Vref).  The formula for the frequency then becomes f = 1/(2*pi*SQRT(2*R^2*C(Vref)^2), so you can choose your cutoff points and component values.

Same goes for the HP version, except now C1 = C2 and R1(feedback) = 2*R2(Vref), and freq = f = 1/(2*pi*SQRT(2*C^2*R(Vref)^2). This should minimize the excess volume loss from low-Q filters excessively bleeding over the cutoff frequencies.

You may also want to try cutting the spectrum into slightly bigger chunks to minimize overlap and excessive volume loss, say 40-160 Hz, 160-640 Hz, 640-2560 Hz, 2560-10240 Hz. Alternatively you can use a larger feedback resistor in the mixing stage like you already did.

EDIT: fixed the frequency formulas...

garcho

#45
Quoteflat response in the passband (i.e. no wiggles)

right, and wiggles usually = distortion in your signal. most filter circuits out there are for non-audio signals; it can be confusing (at least, it often has been for me) when trying to optimize them for the audio band. good to reference as many tried-and-true audio circuits as possible when designing these thing from the ground up.

hope you record yourself playing some saxophone through this! nowhere in DIYSB does the word "guitar" appear ;)
  • SUPPORTER
"...and weird on top!"

Bastis

#46
I havn't dealt with this type of equations since high school, but I'll give it a go. At the end of the formula,  you write "C(Vref)^2", but when you compare the capacitors it's called C2. I assume it's just that you wrote C2 the first time just to clarify... If so, would this be the right way to calculate the first filter?

LP:
Freq: 250hz

R1 = 10k
R2 = R1 = 10k

... I picked up my ol' TI-83 plus calculator and tried to figure it out, with a freq of 250 and R=10000 I got that C should be 4.5... meaning that... the feedback capacitor should be... 9... Farads?!!  That can't be true of course... So I cheated and searched for an online calculator for sallen key butterworth filters instead, and came up with 90nF for the feedback capacitor and 45nF for the vRef one. That seems better. I still have to find some numbers to get close on the frequency with standard value caps and resistors... I'll keep cheating using another filter calculator...

That gives me for the LP:
Freq: 281
Q: 0.7159
R1: 10k
R2: 6.8k (Damn it, that doesn't fit into your formula.... crap!)
C1(Feedback)=100nF
C2(VRef)=47nF


Could it be that R2 is different from R1 to make up for the caps not having the exact right 2/1-ratio?


Edit: Crap... I forgot my typo on the frequencies I wanted... I'm crunching some numbers, I'll update again soon...


Edit 2: Ok, I used the filter calculator at http://sim.okawa-denshi.jp/en/Fkeisan.htm a bit more carefully this time, and with the knowledge shared from you guys I hope I managed to get something better this time. Do these filter values look more reasonable?


Bastis

#47
The new filter values did the trick! I could go back to a 10k resistor on the mixer opamp!

I'm gonna try to double the filters (only have 5 opamps so I'll just do the two lower filters for now) before planning the veroboard.

Edit: More updates: Stringing together two filters worked (as I'm sure you know, but I wanted to try it out). The shop where I buy stuff was out of TL072s, so I ordered a few TL074s for the filters, that should probably even save me some room. I'll start working on a veroboard layout. I'll get back to you when I run into trouble!

PBE6

Awesome! Yes, let us know how it goes. Sound samples would be great too.

Bastis

The pedal is built! It was by faaar the largest thing I've built on a vero board, but everything worked out in the end and I managed to squeeze it into an old can of spam. I'll record some sound samples later!

PBE6

Great, glad to hear it worked out! Looking forward to hearing the clips.

Hatredman

Now you can replace the switches on the mixer section with electonic switches and use PWM to modlutate the, creating a monster.
Kirk Hammet invented the Burst Box.

PBE6

That actually sounds really cool [emoji41]

Bastis

Hmm, a mod sounds interesting. I don't know what a PWM is though, but I assume IT can control electronic switches. Care to explain to a novice?

I played the sax through this thing and into a distortion pedal and I really liked the sound. I realised that I had to redo the distortion pedal a bit though. I'll hopefully post some examples today!

Bastis

I got some crazy hissing sounds at first, especially with my distortion pedal... I finally realized that it mostly came down to sloppy playing and a bad reed though, so after spending a few hours trying to design and breadboard a notch filter to get rid of the hiss frequencies I just played better instead. Here is a sample. First you hear the dry sound with no effects, then I go through a few settings on the filter pedal, after that I engage the distortion and play around with the settings on both the filter pedal and the distortion.

http://www.aronnelson.com/DIYFiles/up/filter_+_dist_test_1.mp3

PBE6

Sounds amazing! Some really cool tones there. Nice playing too!

Bastis

#56
Thanks! And thank you SOOOOO much for all the help. The pedal would not have been built without your help! For a future mod I'll increase the mixer opamp resistor so I can compensate volume when using only high frequencies.

Next I'll build a reverb and an envelope filter from byoc.