## Sunday, 19 February 2017

### How to make a Twin T Notch Filter

Analogue Electronics can be hard!  If an engineer doesn't do much design or calculations all the time the skills can be lost.  I have personally probably forgotten far too much.  Helpfully there are reference materials both online and in books to help remind ourselves what we need to do!

I need to design and implement a band stop filter.  This because I need to make some circuit measurements and the 13.56 MHz signal (inherent to the circuit being measured) is swamping the input stage of a spectrum analyser.  I would like to be able to measure all the signal above 30 MHz without it being affected by out of band noise.  This is a common problem when using sensitive electronic instrumentation...what appears on screen is not always correct due to unknown out of band noise.

 A Twin T Notch Filter Circuit
The go to circuit of choice in these situations is known as the Twin T Notch filter.  It's a great filter circuit that is easy to implement because of its low component count.  The websites below discuss the theory behind band stop filters and Twin T Notch filters:

https://en.wikipedia.org/wiki/Band-stop_filter

http://mysite.du.edu/~etuttle/electron/elect15.htm

The quick way to design such a filter is to set the required parameters and then use the formula given. The parameters for my filter are:
• Must use preferred component values
• Must not filter signals above 30 MHz
• Must have at least 30 dB of rejection at 13.56 MHz
The formula for calculating the component values is:

Now we can either plug some numbers into the formula above and try and get close to where we want to be or we can use an online calculator tool.  I am all for quickness and see little point in doing mathematics when I don't have to!  Here is a very useful site for calculating Notch filter component values:

http://sim.okawa-denshi.jp/en/TwinTCRtool.php

Credit should definitely be given to the engineers and Okawa-Denshi Electronics Design in Japan!

The useful thing about simulators is the component values can be selected based upon those available and not some pie in the sky value...some less helpful calculators prescribe using component values which either do not exist in the real world or require the skill of a police detective to obtain!

I also have found that when using online circuit calculators it is important to fix at least one of the component values before you start calculating things.  I entered 13.56 MHz as the centre frequency for the filter and set the value of C1 to 10 pF and C2 and C3 to 4.7 pF as these are real world (preferred) values in the E6 series.

Useful site for preferred values:

http://www.matrixtsl.com/courses/ecc/index.php?n=Capacitors.PreferredValuesCapacitors

The online calculator did it's thing and provided the circuit below:
The Centre frequencies were:
• Flow = 13.555950 MHz
• FHigh = 13.679649 MHz
The frequency response of filters is often shown as a special type of graph known as a Bode plot. This is shown below:

I have no doubt that if properly constructed this circuit would provide the filter response I'm looking for - It has 40 dB of rejection at 13.56 MHz, it doesn't filter the signal for frequencies above 30 MHz but the resistor values whilst available are not values I have readily to hand.  Because of that I'm going to tweak the capacitor values and run the calculator again.

I have changed the values of C2 and C3 to 22 pF which follows the rule that C2 and C3 must be roughly double C1....Here is the circuit that the calculator came up with:
Again...this circuit would probably work but I'm still not happy with the resistor values.  They are hard to obtain.  I'm going to increase the values of the capacitors again and see what happens.  The values I have chosen are C1 = 15 pF, C2 and C3 = 82 pF
The resistor values are now much more common and available.  Lets hope the filter response is good enough.

The Centre frequencies were:
• Flow = 13.496806 MHz
• FHigh = 13.654780 MHz
The corresponding Bode plot:

From the numbers given and by interpreting the Bode plot this circuit meets my requirements. If I wanted I could fit a 22 pF capacitor in the C1 position and a similar result will be obtained.  That will also change the resistor values as well:

I'm liking these values the most as I am certain I have all of these components available.  I wasn't sure if I have a 15 pF capacitor. It's not a value I use much - easily obtained from any good component vendor but always best to use what you have!

The resistor values are now much more common and available.  Lets hope the filter response is good enough.

The Centre frequencies were:
• Flow = 13.374485 MHz
• FHigh = 13.587897 MHz
The corresponding Bode plot:

Now that we have our component values we need to calculate the power requirements.  In this case I want to be able to put as much electrical power through the filter as possible.  The signal strength of the 13.56 MHz signal in my case will be at least 20 Watts.  Therefore each component must be capable of withstanding that power level without being burnt out.

I happen to know that the 13.56 MHz signal will be coming from a signal generator and amplifier at +30 dBm.  If we convert +30 dBm into Watts we find that it is 1 Watt.  So all components need to be rated for one Watt or better. Just for fun here is the formula:

dBm = 10 * Log10 * 1 * 10^-3 (Watts)

We need to rearrange to get Watts:

10^-3 (Watts) =10^(dBm/10))

If we now plug the values in we get:

10^-3 (Watts) =10^(30/10))

Which is equal to 1000 * 10^-3 Watts or 1000 milli-Watts which is 1 Watt

So all of the resistors need to be 1 Watt rated or better.  I'm going to need a small enclosure with connectors for this circuit and that means I'm probably going to need a printed circuit board.

I have used these diecast boxes in the past for this purpose - they are useful because they come with BNC connectors already fitted:
They are made by Pomona Electronics and are available from most good electronics vendors like RS components and Farnell Electronics.  My only complaint is the cost - £28.04 - yikes!

The datasheet for the box is here:

http://www.farnell.com/datasheets/63791.pdf?_ga=1.89445531.125022660.1487507564

The dimensions of the Box are below:

Rather unhelpfully the inner dimensions are not provided - I hate it when that happens. However it isn't too much of a concern, reasonable estimations can be made.

If the printed circuit board is 36 mm x 33 mm and when populated is less than 25 mm high it will fit the above box well enough.

Here is how the layout came out:

I have chosen to use surface mount components throughout and 2512 size resistors so that the power requirements are met.  The board should easily fit inside the enclosure chosen.  The dimensions shown are in mm - for those that might be interested.

Just for fun here is how the PCB will look when populated:

 ISO view of the Notch Filter PCB
 The top side of the Notch Filter PCB
 The side view of the Notch Filter PCB
Just for fun and because I wanted to practice my 3D drawing and modelling skills I have drawn up the Pomona 3231 Box.  It is available for download at the 3D warehouse if people are interested. Here is the PCB inside the box:

 Top view of the PCB in the 3231 Pomona Box

 ISO view of the PCB in the 3231 Pomona Box
Finally all that is left to do on this is create a bill of materials and calculate the total cost for this Filter.  I normally buy my components from Farnell Electronics but anywhere would do.

 Component Value Quantity Footprint Part Number Cost (£) Notes Resistor 390 Ohms 5 2512 2476478 0.604 3 Watt resistor from Farnell Resistor 27 Ohms 5 2512 2476450 0.604 3 Watt resistor from Farnell Capacitor 82 pF 10 0603 722078 0.015 C0G from Farnell Capacitor 22 pF 10 0805 1759489 0.0323 C0G from Farnell PCB N/A 10 N/A N/A 14.04 10 PCBS from Elecrow Pomona 3231 Case N/A 1 N/A 1234948 28.04 From Farnell

Unfortunately I could not get an 0805 82 pF capacitor which is annoying but I can fit an 0603 part. The total cost for the above is £43.34 - That is enough components and PCBS to make one complete unit with plenty of spares.  The cost of a single unit alone is £29.70 which I think isn't too bad.  Those pomona cases are very expensive - I might investigate a cheaper solution at some point.

The good news is all of the resistors I found are 3 Watt parts which means the filter will be able to work with high power signals!

The more astute readers may know that it is possible to buy a notch filter from various RF vendors.  I did consider these options and for those that may be interested the following websites have them on sale:

I couldn't find one that specifically sells a 13.56 MHz Band Stop Filter although I suspect such products do exist.  I doubt that I would be able to buy one for less than £30

If I do decide to make one of these I will test it and provide the results and photos.  Hopefully this was of interest to someone - Take care always - Langster!