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.)
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?
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.
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:
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:
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
The schematic looks like this:
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:
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.
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).
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).
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
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.
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:
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!
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.
You can contact me about this exercise by commenting on my Google+ post.