RF Filter for a Raspberry Pi Transmitter

Goal

I am looking for a filter to use when generating an RF signal from the Raspberry Pi (RPi).

Several projects are using the Digital Phase Locked Loop (DPLL) on the RPi to generate RF signals. One creates an FM transmitter, another does SSB, and the one that caught my interest transmits a WSPR signal. All of them use the DPLL and a digital output which produces a square wave. However, a square wave would not meet the FCC regulations on spurious emissions because of the odd harmonics that turn the fundamental sine wave into a square wave.

A sharp filter is necessary to reduce the unwanted harmonics that make up a square wave. Paragraph 97.307d of the FCC regulations for amateur radio, tells us that the unwanted (spurious) emissions from a transmitter operated below 30MHz must be greater than 43dB below the fundamental emission. (That requirement jumps to 60 dB below the fundamental emission for frequencies between 30 and 225 MHz.)

The WSPR transmitter project suggests using one of the elliptical filters described in an article by George Dobbs G3RJV. The article is available as HTML or PDF.

I also found a Universal Dual HF Band Filter Kit that might also be suitable.

So the question is, which filter should I use if I want to generate a WSPR signal, using the Raspberry Pi, on 20m?

Requirements

The 20m WSPR frequency (from the WSPRnet web site) is 14.0956 MHz. Any acceptable filter must reduce the the 3d harmonic, at 42.2868 MHz, by 43 dB. Since the expected power output from the RPi will be small (10mW) the insertion loss of the filter should be low.

The Universal Dual HF Band Filter Kit (BPF) uses adjustable capacitors and I want to know how important it is to tune the filter.

Procedure

I am going to analyze the filters using QUCS (Quite Universal Circuit Simulator). The first step will be to evaluate the filters with the nominal values specified in the design. I will check:

    • the frequency of the minimum loss

    • the 3 dB bandwidth

    • the frequency where signals are suppressed by at least 43 dB

    • the suppression of the 3d harmonic of the WSPR signal (42.2868 MHz)

Then for the BPF I will look at what happens as the adjustable capacitors are tuned. For the elliptical filter, which does not have any adjustable components, I will look at what effect variations in the toroid material will have on the filter.

The QUCS project files I created for this exercise are available at GitHub:

Nominal Filter Analysis

Universal Dual HF Band Filter (BPF)

Values for the capacitors used in the 20m version of the BPF are listed in the BPF parts list but the transformers are specified only by the number of turns on a toroid. In order to determine the inductances needed for the circuit model I used the Turns-Length calculator, at the bottom of the Specs for T50-6 RF Toroids page.

The schematic looks like this:

Schematic with nominal values for the 20m BPF

Figure 1: BPF 20m Nominal Values

Most of the schematic is clearly from the specifications. Addition bits are added as required for an S parameter simulation and to calculate values of interest:

    • P1 and P2 are the input and output power ports and must be present for any QUCS S parameter simulation.

    • Equation 1 transforms the power calculated for P1 into dB.

    • Equation 2 determines maximum gain. Of course since this is a passive circuit the gain will be zero or less. The result is rounded because fractions of a dB not particularly important for this analysis.

    • Equation 3 scans the results to find the frequency where the circuit gain is 3 dB below the maximum gain. The 3 dB point is commonly used to describe the bandwidth of a filter.

    • Equation 4 determines the frequency where the output is suppressed by at least 43 dB. Unwanted signal components below this frequency will not meet the FCC regulations on spurious emissions.

    • Equation 5 determines how far the 3d harmonic of the WSPR signal will be suppressed.

    • Equation 6 determines how much the WSPR signal would be suppressed by using this filter.

Results of the simulation are shown in Figure 2.

BFP Nominal Results

Figure 2: BFP Nominal Results

The bandpass characteristic of this filter is easy to see. The 3d harmonic will be well suppressed (-68 dB) and the WSPR signal will be in the passband. The insertion loss is significant.

Seven Element Elliptical Filter

Component values are from Table 1, Recommended Values, of A Short Guide to Harmonic Filters for QRP Transmitter Output, by George Dobbs (HTML / PDF).

Elliptical Schematic with nominal values

Figure 3: Elliptical Filter, 20m, Nominal values

The simulation and equations in Figure 3 are the same as Figure 1.

The results of the simulation look like this:

Figure 4: Elliptical Filter, Nominal Results

Probably the first thing you notice is that this not a bandpass filter like the one analyzed above. This a low-pass filter, but still acceptable for use here because all of the harmonics we need to suppress are above the fundamental square wave frequency (14.0956 MHz)

This filter has very low insertion loss and the 3d harmonic is well suppressed (-74 dB).

Sensitivity Analysis

Universal Dual HF Band Filter (BPF)

The BPF provides adjustable capacitors that can be used tune the filter. The parts list does not provide a part number for the capacitor, but the vendor only sells two adjustable capacitors, so we can guess that it is the Sprague GKG40015 with a range of 7-40 pF.

Figure 5: BPF Capacitance Sweep Schematic

The key difference between this schematic and the one used for the nominal analysis, above, is the Parameter sweep simulation. Parameter sweep repeats another simulation, SP1 in this case, using a different value each time SP1 is run.

Another important difference in the schematic is that equations using the xvalue() and yvalue() functions have been eliminated. Those functions will not work with the data produced a Parameter sweep simulation, so we will have to read the values we are interested in from a graph, or use an external program to process the data. For this exercise I am just going to use the graph.

The values for C4 and C5 (the variable capacitors in the design) are replaced with a variable. The variable value is simple and it's sweep can be specified directly using settings in the Parameter sweep simulation block.

Figure 6: BPF Capacitance Sweep Results

Figure 6 shows us that adjusting the variable capacitors is going to be quite important. The pass band can be moved almost 3 MHz and, if miss adjusted, emission of the fundamental frequency could be greatly attenuated.

Another thing we can learn from Figure 6 is that GKG40015 does not provide enough capacitance to cover the whole 20m ham band (14.000 MHz to 14.350 MHz).

Seven Element Elliptical Filter

There are no adjustable parts on this filter, but variation in the toroids is likely either due to variations in the material (+/- 5%) or due to winding. I don't know how characterize the variation due to winding, so ignore it for now and look at just the material variation. The material variation is specified as a percentage of Al, inductance per turns-squared.

Figure 7: Elliptical Filter, Toroid Sweep Setup

Equation Eqn2 in Figure 7 calculates the inductance for L2, L4 and L6 based on the Al value settings in the Parameter sweep block. My assumption is that all three toroid cores will be from the same batch and the Al values will therefore match.

Figure 8: Elliptical Filter, Toroid Sweep Results

The variation in Al (inductance per turns-squared) yields an inductance variation of approximately 0.01 uH. That shifts the corner frequency of the filter, but the WSPR frequency is well within the pass band and the 3d harmonic is still well suppressed.

Conclusions

We could learn a lot more about these filters by using sweep analysis on capacitance values and identifying worst case combinations of values. Still, the information from these first analysis is adequate to make a choice for a WSPR transmit filter.

The elliptical low-pass filter is better choice for this application because:

    • It does not need tuning.

    • The insertion loss is lower.

    • It may not be possible to tune the BPF so that the 20m WSPR frequency is in the pass band.

While working on this page I found that Kits and Parts dot Com, the vendor for the Universal Dual HF Band Filter Kit, also has a Universal Low Pass Filter kit that can be used to implement the Elliptical filter I have been analyzing. That makes the choice very easy!

Disclaimer

I am not associated in any way with Kits and Parts dot Com, they are just a vendor I found when looking for information on filters I could use to turn the square wave output from the RPi into a clean enough signal to transmit.

Feedback

You can contact me about this exercise by commenting on my Google+ post.