Software to Automate LC Filter Reference Plots?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

thermionic

Well-known member
Joined
Jun 3, 2004
Messages
1,671
Hi,

Recently, I’ve been spending time optimising various LC equalisers. The hard design work is done (not my design) and the circuitry works well / sounds good. My query here is for the purpose of perfecting the centre points.

It occurred to me that it *should* be relatively easy to make a simple X / Y plot using a basic piece of software, the idea being – in my case – that I already have a fixed value for the inductor, with the software enabling me to draw a line and see a corresponding cap value for the desired centre frequency.

I’m currently using the following tried-and-tested formula:

Centre Frequency = 1 / (2pi * sqrt(L x C))

In the above example, L represents my inductor value in Henrys and C equals the cap value in microfarads. In my case, I already have the inductor in place on the PCB and I’m looking to print off a handy paper reference for each of the bands when I’m selecting caps.

For example, I might plot frequency along the Y axis, and capacitor value across the X axis.

The problem is it’s nearly 20 years since I studied this in school…

I’ve been looking at a few freeware graph plotting programmes, but the selection seems enormous and the couple I’ve tried find faults in my syntax…(I should’ve paid more attention at school). The syntax for the above formula works fine with Google calculator and mirrors results from the calculator here: http://www.opamplabs.com/cfl.htm

I realise that I could take values from manual calculations and plot a graph on paper, but I was wondering if anyone could suggest a software option (preferably one the person has tried!) to save time.

Many thanks in advance.

Justin
 
For stuff like this, a spreadsheet is your best friend. Try OpenOffice if you don't want to pay MicroSloth for their MalWare or if you're on Linux. If you're on a Mac, you'll have to ask someone else.

A P
 
Doesn't anyone use the trusty old nomograph anymore?

nomograf.jpg


See? The work was done for you... about 70 years ago :grin:
 
Thanks.

I have the nomograph from way back, but I was hoping to find a simple way to plot individual lines for specific inductors with better resolution than the nomograph.

edit: I have SpecQ (a freeware maths programme) and I think the issue here is my ability to understand how to input the data correctly... The formula may work ok if I cut-and-paste into Google, but SpecQ doesn't seem to like my syntax...

If any of the mathematics hobbyists out there are able to point me in the direction of a simple programme, maybe with some tips on inputting the data, that would be helpful.

http://www.speqmath.com/

IMHO, this should be very simple, if you get the data input correctly... And then I can print off a nice big graph which can be pinned to the wall in front of my bench whilst I select caps :grin:

Justin
 
> Centre Frequency = 1 / (2pi * sqrt(L x C))
I already have the inductor ... I’m selecting caps.



C = 1/(39.4783 * F^2 * L)

Example:

I have 1mH and want 1KHz:

C = 1 / (39.4783 * 1000Hz^2 * 0.0001H)

C = 1 / (39.4783 * 1,000,000 * 0.0001H)

(39.4783 * 1,000,000 * 0.0001H) = 39,478.3

C = 1/39,478.3 = 0.000,025,33Fd

C = 25.33uFd

Check:

F = 1 / (6.28318 * sqrt(0.001H * 0.000,025,33Fd))

F = 1 / (6.28318 * sqrt(0.000,000,025,33))

F = 1 / (6.28318 * 0.000159154)

F = (1/0.000,999,993)

F = 1000.006,686Hz == 1KHz for any practical purpose.

> The problem is it’s nearly 20 years since I studied this in school

More than 20 years here.
 
> Doesn't anyone use the trusty old nomograph anymore?

That's cheating.

I cheat a lot.

> better resolution than the nomograph.

In this case, even my old eyes have no trouble reading 1KHz and 1mH as "25 or 26". I can even squint "halfway between 25 and 26", but there is no point. 26 and 26 are 4% apart. Because of the sqrt term, a 4% change in C is only a 2% change in F. And since musical notes are 6% apart, there is rarely any audio need for even 2% filter accuracy.

--------------

Note another thing. If you try to use one L value over the whole audio band, it has (for 1mH) an impedance from 0.17 ohms to 170 ohms. Usually the filter network includes resistors; these two must scale over a 1,000:1 range. If these resistors are pots, that just won't happen.

--------------

Yet another thing. Your formula assumes that resistance is neligible. When you have real resistance in the tank, the frequency shifts. For very narrow filters like IF cans, you can overlook this. For filters with Q of 4 or 1, such as general audio EQ, the resistance causes a significant shift. In the example above, if I assume the 1mH coil has just 5 ohms resistance, the resonant peak is 934Hz, not 1,000Hz. That makes even 10% accuracy in "cap picking" a waste of time.
 
Thanks PRR.

After spending a couple more days on the project, I've decided that I was being pretty pedantic looking for an accurate graph, for the reason you state here:

Yet another thing. Your formula assumes that resistance is neligible. When you have real resistance in the tank, the frequency shifts. For very narrow filters like IF cans, you can overlook this. For filters with Q of 4 or 1, such as general audio EQ, the resistance causes a significant shift. In the example above, if I assume the 1mH coil has just 5 ohms resistance, the resonant peak is 934Hz, not 1,000Hz. That makes even 10% accuracy in "cap picking" a waste of time.

My FFT analyser supports your assertion! At first, I thought I'd done something wrong, but then it dawned upon me.

:guinness:


Justin
 
Back
Top