This SDR receiver uses a balanced, complex mixer to convert the tuned portion of radio spectrum directly to complex baseband. The degree of unwanted sideband rejection achieved by the mixer is mostly down to the quadrature balance of the LO. The degree of common-mode breakthrough rejection achieved is mostly down to how well balanced the mixer implementation is. Some effort has gone into achieving this by careful analogue design.
It is possible to make improvements to the IQ gain balance and LO quadrature in the digital domain but I have not found this to be necessary. Improvements to the common mode breakthrough performance is somewhat more difficult to achieve digitally and the usual solution to this is to not go directly down to baseband (zero-IF) in one step. Common-mode rejection is therefore constrained by mixer balance in this design.
However, there are other performance aspects of a mixer (not just this one) that require filtering to improve. Mixers will convert harmonics of the LO frequency as well as the fundamental and how much these harmonics are attenuated again depends on the mixer topology. The balanced complex mixer used here is actually pretty good in this respect and has reletively little conversion gain for even harmonic inputs, however it does convert odd harmonics quite well. An input at the 3rd harmonic of the LO will convert with something like -10dB releative to a fundamental signal.
The solution is to filter signals entering the mixer. Whilst low-pass filtering would be adequate to solve the harmonic mixing issue, the use of bandpass filters will further improve performance by reducing the amount of unnecessary LF entering the mixer: Signals below the LO frequency are unnecessary and only harm the dynamic range of the system. The pre-selector filter presented here will do just this. Please note that this pre-selector is NOT designed to combat overload from large broadcast or local signals; these are quite specific to where the radio is operated and it is good practice to build a separate filter (e.g. band stop) to tackle any particularly large signals in your location. As stated on the main page, the maximum input level for this receiver is of the order of -23dBm; signals louder than this will either need to be removed with a filter or everything lowered with attenuation.
The filters are switched by means of a SPI data stream. Owing to the fact that there are very few spare IO pins left on the STM32F429I Discovery board, the filter switching shares the same SPI port (clock and data) as the DDS chip. A separate chip select pin is needed and this is now available on port PG9.
The SPI serial data will pass into one or more 8bit shift registers (such as the 74HCT595). If a single control byte (or 8 individual control bits) is sufficient for a given filter then a single shift register can be used. If more control information is required, a longer SPI data transfer can be sent, this time into a daisy-chain of 2 or more shift registers. This is how Ross Mackay's 7-band VLF filter is accommodated in cascade with an HF filter.
Despite my plans to produce a matching filter module for this radio, a number of builders have asked whether it would be possible to support a filter that they already own. In keeping with my need to support ONLY one release of software, I have decided to integrate support for various filters into the one software build. The filter type (A, B, C etc) is selectable from the radio configuration menu. There is a bypass option for every filter type, even if the connected filter does not support it. (You can add a bypass mode with additional switches.) The software contains a list of descision frequencies for each filter type and a corresponding list of SPI data values to send when the tuned frequency is <= a given decision freq. The SPI bytes are sent MSbit first. Some filter types (such as cascaded filters) may require 2 or more SPI bytes to be sent.
As of code V0.91: the following filters are supported. The list shows the decision freqs and the corresponding SPI byte values that are sent:
1.6e6(0x02), 2.6e6(0x04), 4.3e6(0x08), 7e6(0x10), 11.5e6(0x20), 18.6e6(0x40), 31e6(0x80), Bypass(0x01)
36e3(0x02,0x01), 61e3(0x04,0x01), 102e3(0x08,0x01), 172e3(0x10,0x01), 287e3(0x20,0x01), 481e3(0x40,0x01), 807e3(0x80,0x01), 1.6e6(0x01,0x02), 2.6e6(0x01,0x04), 4.3e6(0x01,0x08), 7e6(0x01,0x10), 11.5e6(0x01,0x20), 18.6e6(0x01,0x40), 31e6(0x01,0x80), Bypass(0x01,0x01)
2e6(0x00), 4e6(0x01), 8e6(0x02), 16e6(0x04), 31e6(0x05), Bypass(0x80)
5e5(0x00), 1.6e6(0x01), 2.3e6(0x02), 3.3e6(0x03), 4.8e6(0x04), 6.9e6(0x05), 9.9e6(0x06), 14.3e6(0x07), 20.5e6(0x08), 31e6(0x09), Bypass(0x80)
1.6e6(0x01), 2.5e6(0x02), 4.7e6(0x04), 7.5e6(0x08), 14.5e6(0x10), 21.5e6(0x20), 33e6(0x40), Bypass(0x01)
36e3(0x02,0x01), 61e3(0x04,0x01), 102e3(0x08,0x01), 172e3(0x10,0x01), 287e3(0x20,0x01), 481e3(0x40,0x01), 807e3(0x80,0x01), 1.6e6(0x01,0x02), 2.5e6(0x01,0x04), 4.7e6(0x01,0x08), 7.5e6(0x01,0x10), 14.5e6(0x01,0x20), 21.5e6(0x01,0x40), 31e6(0x01,0x80), Bypass(0x01,0x01)
Note: As of 23.5.18 I have concluded that I will not be completing my filter board as there is little point: The JaniLab (HA8LFK) 7 band filter is small and does a pretty much identical job. Just connect a 74HCT595 shift register and you are away. As with many of the commercial filters, it will be necessary to add a separate bypass switch (e.g. a single pole relay) to access freqs below 1.6MHz and of course to allow bypass mode to work.
In order to minimise the amount of logic required on the my filter board, I use the 8 shift register output bits directly to select one of 7 bandpass filters. The 8th selection will act as a bypass, so that other (or even external) filters can be cascaded without the need to manually disconnect the (internal) filter board(s). This means that no decode logic is required and the shift register outputs can go directly to the relay drivers.
The relays I plan to use are Chinese copies of the SIP-1A05 SPST reed-relay. These are made by Pan-Chang and are available cheaply on ebay. The relay driver will be the ubiquitous ULN2803 darlington driver IC, which usefully has integral flywheel diodes.
I did spend some time looking at PIN doide switching, CMOS switches and MEMS switches. Each of these technologies has one or more problems, ranging from high cost, poor LF performance or circuit complexity. For use on HF, relays are still a great choice and at these ebay prices, are pretty much unbeatable. The main down side for a small radio receiver such as this one is the physical size of the relays.
This is a general-coverage receiver that spans ~20kHz to 30MHz. As such, the preselector filter will need to cover this range in 7 bands. Since each of these filters is in itself quite wide band, it is not possible to use conventional bandpass filters (ok this is not strictly true). Instead I have chosen to use a cascade of a high-pass and a low-pass filter. Doing this gives me the freedom to have a different filter order for the LPF and HPF sections which is useful for the following reason:
The low-pass filters in the preselector have the specific job of eliminating as much 3rd and higher harmonic content from the mixer input. The required filter order depends on how closely spaced the filter bands are and my goal is as follows: When operating at the lowest end of a given filter band, the 3rd-harmonic rejection should be acceptable (e.g. at least 20dB). I have chosen to use 6th-order Butterworth low-pass filters. The high-pass filters on the other hand are just there to 'mop up' unwanted LF which would otherwise contribute to receiver overload. I have chosen to use 2nd-order Butterworth filters for the high-pass stages.
Butterworth filters have been used to minimise passband ripple and to provide maximum resilience to LC component tolerances.
To be continued...Last updated: 3.12.2018