RC Filter calculator

bobson dugnutt

Active member
I've been doing a bunch of pedal design stuff lately, which of course means a good chunk of my time is spent figuring out various RC filters. Sometimes it takes some back and forth to get the cutoff frequency and values in the range I want, and it's tedious! There's a few calculators online that help but they tend to not handle units and any time saved is spent mentally converting units.

...so I built my own little calculator thing :)


Not only does it understand units, but it attempts to return the results using breadboard-friendly units. It even works pretty ok on phones, so you can pull it up when you're at the bench without a computer nearby.

I've tested it some but there's probably a few issues here and there. Let me know if you manage to break it!
 
Nice. One thing though, could you change the formatting of the hz readout into hz, khz, MHz etc? That'd make it much easier to read. I've been using the trancecat one for years but I like the implementation of the units on yours, nice touch.
 
I'm not sure it's accurate. I ran a test of 47k/47nf on yours and trancecat. Trance showed a 720hz cutoff (where it should be) and yours showed 846569hz. If I put in 47uf I get 846hz, which is closer but obviously not the right info.
 
There's a bug that I'm actively working on around that, was a bit hasty throwing this together this morning. Should be fixed soon! I just noticed it myself
 
I'm not sure it's accurate. I ran a test of 47k/47nf on yours and trancecat. Trance showed a 720hz cutoff (where it should be) and yours showed 846569hz. If I put in 47uf I get 846hz, which is closer but obviously not the right info.

Ok so I've fixed a couple bugs; one in which it wasn't handling decimals correctly (you'd think this far into my career I could write a proper regex but no), and fixed another where I was multiplying instead of dividing for a couple cases. Your case with 47k/47nF should now work, altho the output in that case should be 72Hz (I sanity checked this with a few other calculators to be sure).

Sorry about that! Glad this was caught early, and I'm still planning on adding units to the frequency readout tonight :)
 
This looks great, thanks for sharing! Please update us when you think it's bug free. Cheers!
 
Yeah man, much better. Maybe make the readout slightly larger? Sorry to compare but I'm so used to seeing trancecats and I their readout formatting is a bit clearer but your functionality is better.
 
Dude, This is really nice! Having the ability to put in units is awesome! How hard would it be to make 2 more? one if you know the resistance and target frequency, it calculates the capacitor value and one that does the same thing for the resistor value. This would be real helpful when tweaking the feedback loop of an op amp. I tried with 4.7K and 720 Hz and it gave me 0nF for the cap.
 
Dude, This is really nice! Having the ability to put in units is awesome! How hard would it be to make 2 more? one if you know the resistance and target frequency, it calculates the capacitor value and one that does the same thing for the resistor value. This would be real helpful when tweaking the feedback loop of an op amp. I tried with 4.7K and 720 Hz and it gave me 0nF for the cap.

It does that now; leave one of those values blank and it'll fill it in :)

The issue you're talking about is the rounding acting up, I'll take another pass at that!
 
Back
Top