Close

More about the firmware

A project log for Handheld 3GHz Spectrum Analyzer

Includes RF detector up to 6GHz and a datalogger

roelhroelh 08/17/2014 at 21:020 Comments

The Si4431 and Si4012 each have a private serial connection to the ATXMEGA, it is also not shared with other devices. This gives the possibility to easily move their code from a 'main loop' to an interrupt routine, if this should be needed. An ATXMEGA has plenty SPI and other serial connections, that makes this easy. At the moment, interrupts are not used in this section.

The firmware divides the total frequency span in a certain number of pixels (100 for this display).

It then depends on the selected bandwidth (RBW) how many measurements will be done for each pixel. The Si4431 can be set to a RBW between 2.5 and 600 KHz. This does not mean that this is the spacing between the measurements, a certain overlap is needed. The measurement that gives the highest value will be taken as the value for this pixel.

At a certain frequency, measurements with low bandwidth do take more time, but the difference in time is quite small (not as big as the bandwidth difference would suggest).

Note that in peak detect mode, the detected peak will record the frequency of the highest measurement within the highest pixel, so the frequency resolution of the peak measurement is much better than just one pixel.

For RF up to 600 MHz, IF is set to (RF +250MHz) and LO is 250 MHz, so the input RF frequency is LO - IF (fundamental mixing).

For RF between 600 and 1700MHz, IF is set to (RF/2 - 40MHz), and LO is (RF/2 + 40MHz), so the input RF frequency is LO + IF (fundamental mixing).

Above 1700 MHz, 3rd harmonic mixing is used. IF is set to (RF/4 - 60MHz). LO is (RF/4 + 20MHz), so the input RF frequency is (3*LO) + IF.

For each frequency, a second measurement is done, with the LO 40MHz higher (and IF adjusted to give the same RF). The lowest value of both measurements is taken. This will suppress mirror frequencies. For 3rd harmonic mixing it also will suppress fundamental mix results, and for fundamental mixing it will suppress results from higher harmonic mixing.

When the spectrum is crowded, this will not always give the desired result, and a control should be added to change this 40MHz distance.

Of course, the above system to derive LO and IF frequencies will have to change when the SAW filter is going to be used.

Discussions