# lmf100 switched capacitor questions

#### huricaine

##### Member
I recently purchased an lmf100 IC to create a deep-notch notch filter. The problem is, I do not fully understand the datasheet, it looks like theres a lot to it!

There is an example circuit I can try and go by but I have no idea how I choose the clock frequency to choose my center frequency. My center frequency is 150hz.

If anyone knows about these I would be greatfull for the help.

#### jjw

##### Member
The clock frequency can be selected: 50x or 100x center frequency.

#### huricaine

##### Member
I am changing my approach to a bainter notch filter. In my original post I said I want to remove 150hz but I actually need 50hz removed. Does anyone understand the equations about the filter? I don't understand angular frequency and what s stands for?

#### audioguru

##### Well-Known Member
I made a distortion analyser many years ago using an LMF100 as a notch filter and it works perfectly.

#### huricaine

##### Member
I made a distortion analyser many years ago using an LMF100 as a notch filter and it works perfectly.
Do you have a circuit I can use for 50hz and 1khz?

There is lmf100 and lmf90. Lmf100 I got on accident it can be used a more then one way and lmf90 is the 4th order notch filter IC do you a schematic for the lmf100?

#### audioguru

##### Well-Known Member
Do you have a circuit I can use for 50hz and 1khz?
I used the notch filter circuit shown in the datasheet from National Semi figure 23. It has the 50/100 pin #12 grounded so the notch frequency is simply the clock frequency divided by 100.
You did not say why you need to notch 50Hz. If it is to eliminate mains hum then it might work poorly since mains hum has the harmonics 100Hz, 150Hz, 200Hz, 300Hz etc. present.

do you a schematic for the lmf100?
Datasheets for ICs show how to use them. I get datasheets from www.datasheetarchive.com .

#### huricaine

##### Member
It's for measuring 3rd harmonic distortion of 50hz

#### audioguru

##### Well-Known Member
Like my circuit, you need a fairly high Q of the filter to notch 50Hz but fully pass 150Hz
Did you build the circuit shown on the datasheet and measure it?

#### huricaine

##### Member
Not yet, I am going to build and test it tomarrow. Did that example circuit have a high enough q to fully pass 150hz?

#### atferrari

##### Well-Known Member
Hola huricaine

I implemented a variable bandpass filter using the LMF100.

I was not really hard to get it working; I just followed the datasheet providing the necessary clocks.

Do no omit the smoothing filter at the output.

BTW: are you using a micro to command the filter?

#### audioguru

##### Well-Known Member
Did that example circuit have a high enough q to fully pass 150hz?
I did not calculate its Q but a Q of only 1 or more will be fine.

#### huricaine

##### Member
Hola huricaine

I implemented a variable bandpass filter using the LMF100.

I was not really hard to get it working; I just followed the datasheet providing the necessary clocks.

Do no omit the smoothing filter at the output.

BTW: are you using a micro to command the filter?
I planned on using an atmega Micro to both do the simple math of dividing the harmonics by the original sinwave signal to give me a percentage and also display it on an LCD screen. Will that work? And also to switch between different component connections to change center frequency.

#### huricaine

##### Member
I did not calculate its Q but a Q of only 1 or more will be fine.
Okay I'll use that.

#### huricaine

##### Member
I put the lmf100 notch example together on a breadboard yesterday and messed with it again today however I am not having luck.

Here's what I have:

Using a 555 as an oscillator with a simple 5v regulated supply lm7805 for now

I'm using astable design for the 555

For the IC I used a simple voltage divider from the reg 5v supply using a pair of 4.7k resistors and overkill 2200uf caps in parallel to the resistors. I have the 555 puting out around 2.2v rms 5khz signal as a clock signal for a notch of 50hz.

I checked the circuit over and over and see no mistakes, and have the bypass caps on the ICs power pins to gnd.

I can't figure out the problem yet. I don't get the null at any frequency. I'm trying to find some sort of mistake or issue..

#### atferrari

##### Well-Known Member
I planned on using an atmega Micro to both do the simple math of dividing the harmonics by the original sinwave signal to give me a percentage and also display it on an LCD screen. Will that work? And also to switch between different component connections to change center frequency.
I recall using one micro from 18F family. Doing some acrobatics with Xtal frequency and pre/post scalers I got both clocks.

The capacitors for the different ranges in the smoothing filter were progressively put in parallel to one permanently connected. (Decision made in software.)

#### jjw

##### Member
For the IC I used a simple voltage divider from the reg 5v supply using a pair of 4.7k resistors and overkill 2200uf caps in parallel to the resistors.
Do you have more than one cap parallel to resistors?
There should be one cap parallel to resistor which is connected to ground.

#### audioguru

##### Well-Known Member
The output high voltage from an ordinary old 555 with a 5V supply is about +3.7V which might not be high enough to clock an LMF100 Cmos IC. You should use a Cmos clock circuit (LMC555 or TLC555) or a couple of Cmos inverters making an oscillator).

#### huricaine

##### Member
Ye
Do you have more than one cap parallel to resistors?
There should be one cap parallel to resistor which is connected to ground.
Yes I used two, one from each rail to ground..

#### huricaine

##### Member
The output high voltage from an ordinary old 555 with a 5V supply is about +3.7V which might not be high enough to clock an LMF100 Cmos IC. You should use a Cmos clock circuit (LMC555 or TLC555) or a couple of Cmos inverters making an oscillator).
Yea I just noticed that the example shown had +\-5v I wasn't thinking about using 10v split...

Something Important I figured out in the datasheet said that
for this example, the notch frequency is a thousandth the clock frequency instead of 100th...I assume its because both clock pins aren't tied together...so that means I need to change my clock from 5khz to 50khz.

Also, it says this notch only attenuated 40db which what I'm now worried about