RSP_Spectrum_Analyser_User_Manual V1.2
RSP_Spectrum_Analyser_User_Manual V1.2
User manual
1
RSP Spectrum Analyser V1.2
Hello, and welcome to the RSP Spectrum Analyser. The analyser has been written to make use of
the full range of SDRplay’s SDR radios and offers a useful instrument covering DC to 2GHz, with
resolution bandwidths as low as 1Hz with sensitivity better than -145dBm.
The analyser includes the facility to control an external signal source so that a fully synchronised
tracking generator may be realised. In addition to being able to run five separate traces, the analyser
offers the ability to capture screen shots, export data in a range of formats and includes a versatile
marker system.
Please take time to read the manual. Those of you who are familiar with spectrum analysers should
be able to get up and running very quickly. For those who are less experienced, or who have never
used a spectrum analyser before, please take the time to read the manual and experiment with the
controls. Many first-time users immediately connect an antenna and perform a 20MHz wide scan of
the local 88-108 MHz FM band – and query why they are seeing little or nothing. The answer can
be found on pages 5 to 7. If you read nothing else, you do need to read about setting the reference
level.
A dedicated Facebook user group has been created so that users can download software updates,
report problems, ask questions, suggest additional features and generally exchange information with
regard to the analyser and it’s usage.
Membership has been made private in order to avoid spam and other unwanted posts. There are
only a couple of simple questions to answer in order to join the group. Basically you will be asked
to be respectful and play nicely.
This group will be the only point of contact for support so please join, that way, you can become
involved with, and stay updated with regard to future developments.
I hope this software will be of use to you. Thank you for your support.
Steve Andrew
March 2024
2
Release notes
New tracking generator system allowing synchronised tracking, with support for AD9850,
AD9851, AD9910 and Si5351 generators with a simplified command structure.
Known problems
When using the TG option on a trace, the peaks may fail to be converted to a line display.
This error is dependant on the application’s window size and may be rectified by opening
the application’s window to full screen size.
3
Table of contents
Principal of operation 5
Reference level 6
Display scaling 22
Markers control 25
Data export 28
Options settings 30
Tracking generator 31
Additional resources 37
4
Principal of operation
When using spans from 1 kHz to 1 MHz, the radio is tuned to the centre frequency and is only re-
tuned if the frequency is changed. For spans greater than 1 MHz, the radio will be tuned in steps in
order to cover the required span, the frequency step being determined by the selected IF mode and
sampling rate:
Data from the radio stream is made available in blocks equal in length to the current NFFT setting,
that is, the number of FFT bins. Note that with spans that require a step in frequency (span greater
than 1 MHz) each frequency step will produce a block of NFFT bins, so wide spans in conjunction
with high NFFT values can result in increased sweep times.
The assembled block is processed to produce an FFT output, of NFFT bins. The FFT output is
scaled to dBm and has any input trim and/or offset applied. The scaled results are then made
available to the display system as a block of NFFT x Num_freq_steps bins.
The complete block may be processed by the average and/or peak-detect functions, prior to being
processed to produce video-ready display data.
As even a simple span of 1 MHz with 2048 kHz IF would produce a block of NFFT length, for
example, 32768 bins. This data must be processed in order to be plotted on a display that may have
1024 pixels, or buckets across the spectrum display area. Given the example values, there are
32bins of FFT data for each pixel. 32 bins have to be processed to produce a single value to be
assigned to a video bucket. There are several ways to achieve this.
The average value of the 32 bins could be taken. This will produce a lower noise level but if a
signal is present at any particular bin, it's level is going to be under-reported by a factor of 32.
Moreover, it's reported level will vary according to the physical width of the display area. Matters
are further complicated if there are other signals present within the 32 bins.
There are ways to get around the above problem. If a peak (signal) is detected within the 32 bins
then the signal is reported, if no peak is found then the level for the video bucket is usually taken as
being the value of the first bin.
A second option is to select the highest level found within the 32 bins and is known as positive peak
detection. This has the advantage that signals are always reported at the correct level irrespective of
physical display size. This method does not differentiate between noise or a signal peak so in the
absence of a signal, peak noise will be reported. This is the method used with this analyser.
Additional detection methods will be added to future versions.
Some users have queried why a trace that is in average mode seems to show a value that is lower
than expected when compared to a trace plotted in raw mode. Traces that are in average mode have
the entire FFT output averaged prior to being re-sampled by the peak detector. This means that the
detector is picking peaks in the averaged, or smoothed signal, these peaks will be lower than the
raw noise peaks.
5
Reference level
When a reference level is selected, LNA and IF gain reduction values for the selected level are read
from an internal table. Internal default gain tables are constructed when the analyser is launched.
Before editing any values, it is recommended that you save a copy of the currently loaded gain
values. If you do so, then it's an easy matter to reset the internal table to it's default state by loading
the saved table. If you do not save a table, then the only way to reset the internal table is to close,
and then re-launch the analyser.
The ability to edit and save table changes allows the user to create their own custom tables if
required. Remember that when the analyser is launched, the internal default gain tables are loaded,
so you must load a table manually.
Depending on radio type and frequency, the gain reduction for any given LNA state may vary.
Tables that show the mapping between LNA state and LNA gain reduction are included in the API
which can be downloaded and installed from the SDR Play Downloads page:
A common error is a complaint that signals with a 40-50dB SNR as displayed on SDRuno, shows a
signal barely breaking through the noise floor on the analyser. In almost all cases, AGC is enabled
on SDRuno, and the LNA gain reduction slider set at a low gain reduction value resulting in a lower
noise floor. IF gain reduction will be whatever the AGC system sets it at.
Conversely, the analyser is usually set at a high reference level of somewhere between -30 to
+10dBm, has a very high noise floor and sees little or no signal above the noise. This is usually
caused by the user attempting to use the reference level control to position the trace within the
display area, instead of using the range and offset controls provided for this purpose.
The reference level should initially be set to around -80dBm, while ensuring the ADC is not
overloaded and spurious signals are not generated. This will give maximum sensitivity and a lower
noise floor. Increasing the reference level towards 0dBm will result in an increasing noise floor, and
depending on signal level, may result a lower S/N ratio. Use the range and offset controls to scale
and position the display as required.
The following screen captures show the affect of various reference level settings for input signal
levels of -50dBm and -100dBm. Note how the Range - dB and Offset - dB controls have been used
to position and scale the display.
6
Signal level -100dBm.
This clearly shows that setting the reference level to a higher level (towards 0dBm) increases the
noise floor and reduces sensitivity. At a reference level of -20dBm the S/N ratio has been reduced to
10dB, and at 0dBm reference, the signal is around 3dB below the noise floor and is not detected.
7
Signal level -50dBm.
With the reference level set to -40dBm some signs of signal overload start to show , although the
ADC input is still within range and does not indicate an overload condition. At a reference level of -
20dBm (Cyan) the S/N ratio is 60dB, reducing to around 46dB at 0dBm reference level.
It can be seen that the correct setting of the reference level can be important and failure to do so can
result in lost information due to low sensitivity caused by high noise levels.
A final reminder, please use the Range dB and Offset dB controls to scale and/or position the
display as required. Do not use the reference level as a means of positioning the display.
8
Differential mode
Differential mode may be used for a variety of purposes, among them being spur and/or interfering
signal reduction or removal, and plotting of the return loss from an RF bridge.
Differential mode is performed by subtracting a saved reference trace from the current trace before
displaying the result. In addition, the displayed trace may be normalised by adding an offset, the
offset being the average level of the reference trace.
Before differential mode can be used, a reference trace needs to be captured. Any trace may be used
as a reference trace. When the Diff button is clicked, the trace selected as the reference trace is
placed in hold mode and the average level of the reference trace is calculated. The reference trace
may be hidden if required.
The following example shows how to use differential mode to plot the return loss from an RF
bridge and measure the SWR of an antenna.
1 – Connect a 50 Ohm load to the bridge's reference port. Leave the DUT (Device under test) port
open-circuit, or short-circuited.
2 – In this example the main trace (M) is selected as the reference trace in the Ref trace combo
box. The trace should be in average mode. Allowed the trace to settle to a constant level.
3 - Once the level has settled, select differential mode by clicking on the Diff button next to the Ref
trace combo box. The trace designated as the reference trace, in this case M, will be placed in Hold
mode and no further updates to the trace will occur. The Raw, Peak, Avg and Ref trace controls
will be disabled. The trace may be hidden if required.
4 - Select a new trace from 1 to 4. The trace will be displayed and will be very close to the reference
trace, allowing for variations in noise. Click the trace's DM button, the trace will now have the
reference trace subtracted from it before being displayed. The displayed trace should consist of
noise centred around 0dBm.
5 – Connect the antenna to the DUT port. The trace that has been placed in DM mode will now
display the return-loss in dB.
SWR may be found by referring to the table at the end of this section.
9
10
Return loss – dB VSWR Return loss – dB VSWR
1 17.391 26 1.106
2 8.724 27 1.094
3 5.848 28 1.083
4 4.419 29 1.074
5 3.570 30 1.065
6 3.010 31 1.058
7 2.615 32 1.052
8 2.323 33 1.046
9 2.100 34 1.041
10 1.925 35 1.036
11 1.785 36 1.032
12 1.671 37 1.029
13 1.577 38 1.025
14 1.499 39 1.023
15 1.433 40 1.020
16 1.377 41 1.018
17 1.329 42 1.016
18 1.288 43 1.014
19 1.253 44 1.013
20 1.222 45 1.011
21 1.196 46 1.010
22 1.173 47 1.009
23 1.152 48 1.008
24 1.135 49 1.007
25 1.119 50 1.006
RlossdB
[ ]
20
10 + 1 Vswr − 1
Vswr = Rloss dB = −20Log
Rloss dB
20
Vswr + 1
10 − 1
11
Differential mode with offset
In this example, differential mode is used to remove spurs and other interfering signals and establish
a clean, or normalised baseline.
When a trace is displayed in differential mode, the resulting trace is displayed relative to 0dBm. In
order for the signal to be displayed at it's correct level, it is normalised by adding the average value
of the reference trace to the difference.
As with basic differential mode, the first step is to to capture a reference trace. The following was
captured with the radio input connect to a 50 Ohm load.
The (M)ain trace has been used as the reference trace and is placed in average mode. Once the trace
had settled, differential mode is enabled. The trace is locked. This trace may then be hidden if
required.
Select a new trace and select average mode. Once the trace has settled, it should be similar to the
captured reference trace. Click the trace's DM button. The trace will be be displayed as the
difference between the reference trace and the selected trace. At this point, the difference is zero
apart from noise. The trace should be displayed at 0dBm. Note that all spurs, including the 24MHz
clock harmonic at 240MHz have been removed.
12
Apply the average offset by clicking on DO. The trace should now be plotted at the average level of
the reference trace.
13
Signal generator input: -80dBm at 225.0 MHz.
The frequency is now changed to 240MHz. Note the level is now plotted at around -122dBm
instead of -80 dBm. In cases such as this where an input signal is at the same frequency as a signal
in the reference trace, then the difference is plotted. Note that at any frequency the difference
includes noise, so a signal's level will vary by the noise level in the reference trace.
14
The T button enables or disables threshold mode.
In threshold mode, if the input signal exceeds the reference signal by more than 3dB then the signal
is plotted without modification. If the difference is less than 3dB then the difference is plotted.
Using threshold mode ensures that valid signals that are the same frequency as a signal in the
reference trace are plotted at the correct amplitude and are not affected by noise in the reference
trace.
The average value used as the offset may be displayed by placing the reference trace in Show mode
and clicking on the DM button. A single line should be plotted at the 0dBm level. Clicking on the
DO button applies the average offset, the reference trace should now plot as a single line at the
average level of the reference trace. This line shows the value that will be added to the difference
for any traces in differential mode with offset enabled.
15
Controls reference
The spectrum analyser controls are grouped according to function over several panels. They are:
The Start button starts the analyser. Some controls will be disabled while the analyser is running.
The Stop button stops the analyser and enables any controls that were disabled while the analyser
was running.
The Save button is used to save the current analyser settings to a custom set-up file. Users may
specify a name for the setting so that multiple set-ups may be saved, and later re-loaded. This button
is disabled when the analyser is running. Settings files are stored in the user's Documents folder
under RSP-Spectrum Analyser/SpecSettings. The folder is created when the analyser is run for
the first time. In addition default settings and current settings files are generated and saved in the
SpecSettings folder.
The Load button is used to load a previously saved set-up. This button is disabled when the
analyser is running.
The Screenshot button allows a screen shot of the main spectrum display be taken at any time by a
single click of the button, A dialogue box will be displayed allowing the user to select BMP or PNG
format in addition to either colour or black and white, in either positive or negative form. Negative
form may be used if the user intends to print the saved screenshot in order to save printer ink. The
screenshot is saved in the user's Documents folder under RSP Spectrum Analyser/Screenshots.
16
Each screenshot is numbered, with the number being incremented with each screenshot taken. The
folder is created automatically when the analyser is run for the first time. The default file name for
screen shots may be changed in the options dialogue box. The start number may also be set in the
options dialogue.
The current screen-shot file name and number are saved in the CurrentSettings file when the
analyser is closed.
Please note: If you have changed any screen or trace colours, it is possible they will be saved
incorrectly when using either of the black and white options. This is because the colour to be saved
has not exceeded the threshold required by the software when determining whether the colour
should be saved as black or white.. Colours that are too dark may be interpreted as black instead of
white. If this happens, change the affected colour by using the Options dialogue box.
Clicking on the Hide controls button hides all control panels, except for the top bar.
The Options button displays an options dialogue box, and may be used while the analyser is
running.
The Gains edit button launches the gain tables editor and may be used while the analyser is
running.
The Save data button saves the currently selected trace data to file in CSV format.
The CSV Options button displays a dialogue box that allows the user to set various CSV options to
be used when the Save data button is clicked.
The About button displays the current analyser version and any additional information.
17
Input Panel
When the analyser is launched, it attempts to find whatever devices are connected. If none are
found, a message will be displayed. If this happens, check that a device is connect and then re-
launch the analyser.
RSP Select lists the available RSP devices and allows the user to select the device to use. Devices
that are detected, but are in use by another application, including another instance of the spectrum
analyser, will not be listed. The device's serial number is also displayed. Note that the RSP1 does
not have an embedded serial number, it's serial number will displayed as 0000000001. Access to the
device selection list is disabled while the analyser is running.
Antenna selectors Ant A and Ant B, Bias T, and filter selectors BC/FM and DAB will be enabled
or disabled depending on the device selected. Full support is offered for the RSPduo operating as a
single radio. When using an RSPduo, Tuner 1 or Tuner 2 may be selected as required. BC/FM and
DAB filters may be set separately for each tuner. BiasT is available at all times.
dBm Trim may be used to add a fine adjustment to the displayed signal level, in order to
compensate for any small gain differences between devices.
Offset dB may be used to add a positive or negative offset to the level of the input signal. This may
be used to compensate for external attenuation or gain devices.
PPM Trim may be used to correct for any slight frequency differences between radios. Resolution
is 0.001 PPM. With a 24MHz crystal, +/- 1PPM will equal a +/- 24Hz error.
dBm Trim, Offset dB (including current states) and PPM Trim settings are saved when the
analyser is closed, and loaded when the analyser is launched.
The ADC panel is used to indicate when the ADC is overloaded. Under non-overload conditions,
the panel will be Green. If an overload condition occurs, the panel will turn Red. On wide spans the
ADC panel may flicker between Red and Yellow, this indicates that a previous overload condition
was cleared.
The Cal panel will turn Red if either dBm Trim, Offset dB or differential mode is selected and
indicates an un-calibrated condition. LNA gr, System gr and Current gain display the current
gain settings.
18
Span and frequency control panel
Centre freq is used to set the centre frequency of the current span. There are two ways of entering
or changing the centre frequency.
Place the mouse pointer over the decade you wish to change, The selected decade will be
highlighted. Use the mouse scroll wheel to increase or decrease the decade's value. Blank decades
to the left of the most significant digit may also be highlighted and changed.
Text entry may be carried out by clicking on the decade you wish to change. The selected decade
will be highlighted with a flashing cursor. Type the value required, use the Left and Right arrow
keys to move the cursor if required, use the Up and Down arrow keys to change the selected
decade's value. Press Esc or Enter to exit text edit mode.
If a combination of the selected sweep width and centre frequency results in start frequencies of less
than 0KHz, or end frequencies greater than 2GHz, the centre frequency will be automatically
adjusted to keeps the start or end frequencies within range.
19
Frequency A and B buttons may be used to switch between two pre-set frequencies and may be
selected at any time. When frequency B is selected for the first time, it is set to frequency A. Any
subsequent changes to frequency B will be retained when selecting frequency A. Note that when the
analyser is closed, the displayed frequency is saved to the CurrentSettings.ini file. When the
analyser is next run, the saved display value will be assigned to frequency A.
Start–MHz and End–MHz labels display the frequency limits of the currently selected sweep
width in conjunction with the centre frequency. The MHz label will be set to kHz when appropriate.
The Span buttons are used to select the required frequency span in MHz or kHz. At wider spans, the
available ranger of NFFT values may be automatically reduced, and a lower NFFT set. Note that if
switching from a wide span, with a reduced NFFT, to a narrow span, the NFFT value is not
changed. It is up to the user to selected the required value.
The IF-kHz buttons are enabled or disabled depending on the selected span. If Zero IF is selected
then 6 and 8MHz sampling rate options are made available.
The Window drop-down box allows the user to selected the required window that will be applied to
the signal prior to Fourier processing. The default is set to the Blackman window but this may be
changed if required. Several windowing types are available.
The NFFT combo-box allows the user to select the number of bins used for the Fourier transform, a
larger number of bins will result in a higher resolution, or narrower resolution bandwidth but may
result in a slower sweep time. Higher resolution is only really required at narrow sweep widths. A
higher number of bins will result in a lowering of the noise floor.
The figure to the right of the Res Bw - Hz label displays the current spectral resolution and is based
on the sampling rate and the number of bins (NFFT) selected.
The Clock spur removal button enables or disables the clock spur reduction system. When
enabled, the 24MHz clock spur, and all harmonics up to 2GHz are reduced, or removed. Note on
wide spans, there may seem to be little or no effect. Using a narrower span will show that the
remaining signal is not a clock harmonic, but some another signal close to the clock harmonic..
Sweep time – secs Displays the time per sweep. Sweep time is not displayed for spans of less than
2MHz.
20
Sampling rates, ADC resolution and IF bandwidths
21
Display scaling panel
Ref – dBm
Internal lookup-tables are used to set the optimal LNA and IF gain reductions for a given reference
level, frequency and radio type. Manual gain control is not required, and is not provided. Changing
the reference level may affect the dynamic range and sensitivity of the device being used. Do not
use the reference level as a means of positioning a trace within the display, rather use the Range
and Offset controls.
Range – dB
Sets the range in dB from the top to the bottom of the display screen.
Offset – dB
Offsets or shifts the entire display vertically.
Enable
Toggles the Offset on or off.
S Dat
Enables or disables on-screen data. The displayed data is centre frequency, span, MHz per division,
reference level and resolution bandwidth.
Reference level, range and offset settings (including enabled status) are saved when the analyser is
closed and loaded when the analyser is launched.
22
Trace Control panel
The trace control panel controls the visibility and display mode for each trace. There are five
available traces. The Main (M) trace has the same properties as any of the other four traces.
The top bar showing M and 1 to 4 is used to select the current trace by clicking on the trace number.
the selected trace being indicated with white text.
The currently selected trace is used in two ways. If multiple traces are being displayed, then the
currently selected trace is displayed on top of all other displayed traces. Secondly, the currently
selected trace is the trace that will be used for CSV data output.
The row of coloured bars indicate the current colour assigned to each trace. These colours may be
changed by using the Options dialogue.
The Hide/Show button is a toggle action and is used to hide or show the trace and it's associated
controls. If a trace is hidden, no updates to the trace will occur. Any markers assigned to the trace
will also be hidden.
The Hold/Release button is used to pause the trace. A paused trace will not be updated.
Select the trace type by clicking on Raw, Peak or Avg. Averaging is available for all spans, but
wide spans and a high number of sweeps to average may take some time for the trace to settle
down. Note that the number of samples to be averaged applies to all traces.
When running, clicking on the Raw, Peak or Avg buttons will reset the respective buffers. The TG
button is only active when Peak mode is selected and is used in conjunction with the tracking
generator.
23
Differential mode
When in differential mode, a trace may be plotted as the difference between the trace, and a trace
that has been designated as the reference trace.
Differential mode is entered by clicking on the Diff button. The Ref Trace combo box is used to
select which trace will be used as the reference trace. Any trace may be designated as the reference
trace.
When the Diff button is clicked, the trace designated as the reference trace will be placed in hold
mode, and the Hold, Raw, Peak, Avg and Ref trace combo box controls will be disabled. The Cal
warning will turn Red, indicating a possibly un-calibrated condition.
In addition to the main differential enable button, each trace has a DM (Differential mode) and a
DO (Differential offset) button. Clicking on the DM button will enable differential mode for that
trace. If DO is selected, the average level of the reference trace is added to the reference/trace
difference.
The DM and DO buttons are active at all times but have no affect on the display unless differential
mode is enabled.
The T button enables or disables threshold mode. If offset is enabled using the DO button and
threshold mode is enabled, and the difference is greater than 3dB then the trace data is plotted
unmodified. If the difference is less than 3dB then the difference is plotted.
If threshold mode is not enabled then any signal (such as a spur) will be subtracted from the input
trace for any frequency.
When differential mode is exited, all controls are re-enabled although the reference trace will
remain in hold mode and must be released manually by clicking on Rel. This action is deliberate
and prevents the accidental erasure of a reference trace.
For further information and examples of use for each mode, please refer to page 9 – Basic
Differential Mode.
24
Markers panel
The Markers control panel handles the allocation of four markers A, B, C and D. One or more
markers may be allocated to any one of the five available traces, provided the trace is enabled. In
addition, the panel controls the peak find functions and marker mathematics.
Select a marker you wish to allocate by clicking on the marker select button A, B, C or D, then
allocate the selected marker to a trace by selecting a trace from the combo box.
A marker is positioned by holding the left mouse button down and dragging the marker to the
required frequency. The marker may be set to automatically track the signal amplitude by ensuring
the F or T button is clicked so it displays T, clicking the button so it displays F allows the marker to
be placed as a free or floating marker. The marker can be locked to the signal amplitude at any time
by changing the float/track mode from F to T.
To move a marker, select the marker using the marker select buttons, and then left-click on the
display screen to drag the selected marker to the new position.
Up to four markers may be used, there is no limitation on how many markers may be allocated to a
single trace. Note that if a trace is changed from visible to hidden, any markers allocated to the trace
will also be hidden.
Marker maths calculates the difference (delta) between two selected markers. The markers may be
allocated to separate traces. Select the required markers by selecting Mkr 1 and Mkr 2 from the
drop down boxes. Frequency and Level deltas will be displayed.
Note: There is always a floating or free marker on the screen, and it tracks with mouse movement.
This marker may be used in calculations and is designated marker F. For quick measurements you
may only need one marker and the F marker.
25
Peak find
Enab peaks
Enables the peak finder and finds and displays peaks according to the set parameters. Each found
peak is marked with a small circle. If no markers have been enabled, a peak marker (inverted filled
triangle) is displayed at the selected peak. The frequency and level of the selected peak is displayed
on this panel. The peak find function may be used without any markers allocated. A maximum of
500 peaks will be detected and displayed.
First, Prev and Next buttons are used to select the first, previous or next peaks. If a marker is
allocated to the selected trace then the peak marker is not used, the currently selected marker will be
used instead. Note that the marker used must be set to T (Track) mode in order for the marker to
move between peaks.
Min peak - dB
This control sets the minimum peak height threshold. Note, this is not the peak level relative to the
noise floor, but peak levels relative to adjacent peaks. Reducing the threshold will result in more
peaks being found, but they may be nothing more than noise.
Win width
The peak finder algorithm looks for peaks in a window centred on the frequency being tested. Only
the highest peak in this window is reported. Using a narrower window may help to resolve some
fine peaks.
Min peak – dB and Win width are set to defaults of 10. You may want to change these settings to
suit the signals you are displaying. These settings are not saved at shut-down. Any changes to these
settings will update the display immediately, even if the trace is in hold mode. In some cases it may
be more convenient to place the trace in hold mode prior to performing peak operations.
26
Gain tables editor
When the analyser is launched, the default gain tables for all receiver models are created internally.
The gain tables editor allows the user to edit, save or load custom tables for the receiver in use.
When the editor is launched, the table will display the currently used gain values. The Blue column
contains the LNA state, the White column contains the IF gain reduction. Note that the LNA state
allowable maximum may vary from band to band.
Entered values are not range-checked and the user is strongly advised to refer the the gain tables
provided by SDR Play. Refer to the operating notes at the front of this manual for further
information.
Frequency bands are displayed across the top of the editor, the number of bands, and the frequency
boundaries of each band will vary depending on the RSP device being used.
Cells may be selected using the mouse or arrow keys. When an entry has been typed, terminate the
entry by pressing Enter or navigate away from the cell by using the mouse or arrow keys. Pressing
Esc will abandon the cell edit.
Clicking on Update will copy the displayed table values to the analyser's gain tables and any
changes made will take immediate effect.
Table values may be saved by clicking on the Save and Save as buttons. If a file name has not
previously been set by using Save as then the table will be saved with the file name Default.txt.
Gain table files are saved in /Documents/RSP Spectrum Analyser/GainTables.
Before editing for the first time, it is recommended that the user saves a copy of the gain tables
created when the analyser was launched. This will allow a known working table to be loaded at all
times. If a copy of the table is not made, then the only way to re-load the default values is to close
and then re-start the analyser.
Clicking on Load will allow the user to load a previously saved table. Note that the loaded table
will be displayed in the grid but will NOT be applied to the analyser's internal gain tables. After
loading a table, click on the Update button to update the analyser's tables.
27
Data save
There is an option available to allow the user to save data in CSV format.
Clicking on the Save data button causes the analyser to save data to a file in plain text CSV format.
The file is saved in /Documents/RSP Spectrum Analyser/DataDump. The DataDump folder will
be created automatically the first time a file is saved.
Clicking the SD Options button will display the following dialogue box
File name:. The default filename is DataDump and may be changed as required.
Current file number. When saved, the filename has “_N” appended to it, where N is a number that
is incremented by one with every save. The number maybe be set as required. The CSV extension
will be added to the numbered filename.
DataDump_18.csv
The filename and current file number is saved when the analyser is closed.
FFT output: FFT output is the output from the FFT function after it has been scaled to dBm.
Scaling includes any trim or offset values set in the input panel. No other processing is performed.
One text line is output for every FFT bin.
Screen: Screen buffer data is based on the displayed video data for the currently selected trace and
consists of a text line containing frequency and level information for each horizontal pixel or bucket
in the display area. Using a larger horizontal display width by using the Hide controls button, or
resizing the analyser will result in a higher number of buckets and a finer data resolution.
Data can be saved when stopped, but the analyser must be run first to activate Save button. This
primes the buffers and ensures there is valid data to be saved.
If more than one trace is being displayed, the currently selected trace will be saved. Traces may be
saved, even if they are in Hold mode. The selected trace may be in Raw, Peak or Average mode,
none of these modes affect the saved data.
28
Include index: This option will start each line of text with an index number. The index will start at
zero.
Include frequency: The frequency for each bin or bucket will be included in the text line.
Several delimiter options are provided including a custom delimiter which can be one or more
characters in length.
In addition to the above options, a header is included in each file, the header information can be
seen in the following example:
97.500000,98.500000,1.000000,-60,2048kHz,32768,698,0.001433,0,0,0,0,0,0,0,0
The above is an example of a dump in screen mode. “Num buckets” and “MHz/Bucket” will be
changed to changed to “Num bins” and “MHz/Bin” when dumping FFT data.
29
Options Dialogue Box
The options dialogue box is displayed by clicking on the Options button on the top control panel.
Colours
The user may optionally change the display colours for the traces, markers, graticule and screen
background colours. To edit a colour, click on the colour bar of the item's colour you wish to
change. A standard colour picker dialogue will be displayed, select the colour you want and close
the the dialogue. Colour changes will only take effect once the Apply button is clicked. To change
the colour of the spectrum display screen, click anywhere on the panel containing the colour bars.
The panel will change to the colour selected.
When the user clicks on Close, any colour changes are stored and then used as defaults whenever
the analyser is launched. Clicking on the Default colours button will restore the colours to their
default settings.
The Use default settings at start-up allow the user to specify whether the last session settings, or
default start-up settings are loaded when the analyser is started. If this box is checked, at next start-
up the default ini file will be loaded and the box will be cleared.
The Screen-shot file name allows the user to set a default name for screen-shot files. The Current
number box shows the current number append to each screen-shot file. This may be set to whatever
the user requires, and is incremented for each screen-shot.
Clicking on the Set defaults button sets all options to the default values.
Clicking on the Cancel button, discards any changes made and closes the dialogue box.
30
Tracking Generator
The tracking generator works by outputting a series of discrete frequencies controlled by the trace
sweep control system. As the analyser sampling progresses, the sweep controller instructs the
tracking generator to generate a discrete frequency, the frequency is set, and the tracking generator
returns an acknowledgement to confirm the frequency has been set. In this way, the generator is
always synchronised to the analyser’s sweep controller.
The tracking generator system is inactive and all controls are disabled until an Arduino device
running Trackgen firmware is detected. On launching the analyser, the software builds a list of
available comms ports but does not display them in the Comms port drop combo box. The red
square indicates that there is not currently a valid connection made with the tracking generator.
Click on the Comms port combo box and select the port that you think the Arduino is connected to
and then click on the Connect button. The analyser will attempt to connect to the tracking
generator. If a valid response is not received from the generator after twenty seconds, the
connection attempt is stopped.
If a valid response is returned, the red square will turn green, indicating that a connection has been
made to the tracking generator. In addition, the Trackgen version, and the generator type will be
displayed. Some, or all of controls will then be enabled. The Mod freq HZ, Mod %, Dev- Hz and
Modulation controls will be enabled if the generator type is an AD9910 or a custom type. If the
generator uses an AD9850, AD9851 or an Si5351 then those controls will be disabled.
The Level – dBm control is active with all generator types. It has a direct affect if using the
AD9910 shield in conjunction with the Arduino Mega2560. With all other devices, the dBm level is
sent to the Arduino and made available in parallel form on PORTD. The user may use this data to
control their own external attenuator. More information is provided in the following section.
The Rf Off and RF On is a toggle action button and is used to turn the RF output on or off when
the generator is not sweeping.
The Steps/div panels allows the user to set the number of frequency steps generated per screen
division. This setting may be changed while the generator is running although if selecting a lower
number you should click the Peak button in order to clear the data buffers
Start the tracking generator by clicking on the Start button,this will start the generator in sweeping
31
mode. The button caption will change to Stop. Clicking on the button again will stop the generator
sweeping.
The PPM Trim control is used to fine-tune the frequency of the tracking generator. The correction
data is not saved unless the Save PPM button is clicked. When the button is clicked the calibration
data is saved in the Arduino's EEPROM. This is done as saving the data for every change in PPM
trim could shorten the life of the EEPROM which is limited to around 100,000 write cycles. Note
that separate correction data is saved for each generator type so it is not necessary to re-calibrate
every time a different generator is used.
The PPM Trim control is not enabled when using the AD9910/Mega2560 combination. If using the
AD9910 module then it should be calibrated via the menu on the OLED screen before being
connected as a tracking generator.
Clicking on the Connect button while the generator is running will disconnect the selected tracking
generator and then re-connect. Clicking on the Comms port combo box will disconnect the
currently connected generator and will allow a new comms port to be selected. The Connect button
must be clicked to connect to the newly selected generator.
NOTE: The tracking generator system will only work with either the 2048kHz or 450kHz IF
options selected, it does not work when the analyser is in Zero IF mode. Increased resolution may
be obtained by increasing the number of FFT bins being used by use of the NFFT control.
The resulting stream of peaks my be converted to a line graph by clicking on the TG button on the
relevant trace on the trace control panel.
32
Arduino Trackgen firmware
Currently the Trackgen firmware is used to control the AD9850 and AD9851 DDS modules, and the
Si 5351 clock generator module. These modules are readily available on E Bay. The firmware for
the Arduino is provide in a hex-format file, intended for use with the Arduino Uno. A separate HEX
file is provided for use with the AD9910 module, used in conjunction with an Arduino MEG2560.
The Trackgen firmware HEX files can be found in the analyser's install directory. The default install
directory is:
The files are Trackgen_Uno.Hex and Trackgen_AD9910.Hex. HEX files may be uploaded to the
selected Arduino board using Xloader.exe. A Google search will provide several download sources
for this useful utility.
The choice of generator module is left to the user. The AD9850 and AD9851 modules are now
becoming relatively expensive. They do not provide the best output filtering and the output level
can vary with frequency. In addition the output frequency is limited to 45MHz and 90MHz
respectively. The Si5351 clock generator module is now available for a far lower cost than most of
the AD series modules, and provides a higher maximum frequency of 160MHz. The output is
basically a square wave and does require heavy filtering before use. The output is also rather high
and will require attenuation before the signal is fed to an SDRplay receiver. SDRplay recommends
+10dBm for short periods, with 0dBm for continuous use. This equates to a level of 0.707 Volts
RMS at +10dBm, and 0.223V RMS at 0dBm. BE WARNED !
33
The AD9910 has made high frequencies at a lower cost more attractive. With overclocking (and a
heat-sink) output frequencies in the order off 700-800MHz may be obtained. In addition, an
accurate output level control is included. There are several modules available on Ebay as well as
other sources but many of them suffer from poor filtering and/or a lack of controlling software. For
that reason the module manufactured by GRA & AFCH is recommended. The output is clean, and
the level is controllable and accurate. In addition the a CW output, it is possible to include AM and
FM modulation with AM modulation bandwidths of 100kHz and FM deviations of 100KHz. The
shield plugs directly onto an Arduino MEG2560 board and includes an OLED display screen. The
provided software makes for a very useful signal generator. The analyser’s tracking generator
software, Trackgen, has been added to the source code provided by the manufacturer so the module
can still act as a stand alone signal generator with CW, AM and FM capabilities as well as a sweep
function using the firmware provided by the manufacturer. Trackgen software provides the same
capabilities from the analyser's control panel but does not include the sweep function.
The GRA & AFCH shield is highly recommend it. When considering the alternatives of having to
build or purchase additional filtering, and some form of step attenuator and calibrating it, and
ensuring lack of signal leakage and maximum output frequency, the additional cost of an out-of-
the-box solution is worthwhile.
Further information about the AD9910 Arduino shield can be obtained from:
https://gra-afch.com/catalog/rf-units/dds-ad9910-arduino-shield
Please note: I do not have any connection with GRA & AFCH, neither do I received any form of
financial return on any modules they sell.
8 RESET
9 DATA
10 FU_UD
11 W_CLK
The Arduino firmware needs to identify which module is in use. This is done as follows.
34
If the link is changed, ensure you reset the Arduino before trying to connect with the analyser.
Output level taken from the Level – dBm control on the tracking generator panel is made available
in binary form on PORTD, pins 0 to 7. Pin 12 is briefly pulsed HIGH and acts as a strobe or clock
signal if the signal level data needs to be latched or if your external (home-brew or other) attenuator
requires it.. The data presented on PORTD is the binary value of the number in the attenuator
control and does not use a sign bit.
The Trackgen firmware uses a simple ASCII-based command interface. You can use any basic serial
terminal program such a PuTTY, or the terminal interface included in the Arduino IDE, or
Microsoft’s Visual Studio. The default settings are 115,200 Baud, 1 Start bit, 8 Data bits, 1 Stop bit
and no Parity. The commands may be in upper or lower case and should be terminated with the
newline character (ASCII 10 or '\n' ) The commands are as follows:
Return strings from Trackgen are terminated with the carriage return character – ASCII 13, or '\r'.
1 = AD9850
2 = AD9851
3 = Si535
4 = AD9910
255 = custom generator
35
When using AD9910 shield, all commands above may be used as well as the following:
Note: GETPPMTRIM, SETPPM and SAVEPPMTRIM commands are not currently supported for
the AD9910 shield. To calibrate the AD9910 shield, use the clock offset option provided on the
OLED menu before connecting to Trackgen.
Custom generator
If the custom generator option is selected then the user can either use the Arduino Uno to control
their own custom-built generator using the above command set., or use code to connect to a virtual
serial port. Using a virtual serial port allows the user to connect to software they have written
running on their PC to control a device of their choice. An example would be connecting to an
external signal generator via a GPIB or USB interface.
Virtual Serial Ports Emulator (VSPE) allows the user to create virtual serial ports in a number of
connection scenarios, including TCP and UDP connections. A free version is available for
download from https://eterlogic.com/Products.VSPE.html
Demonstration code, written in C# will shortly be available for download from the Facebook group
showing how code may be written to connect to the analyser, and allow the analyser to control your
own custom tracking generator system.
The Facebook group dedicated to the RSP Spectrum Analyser can be found at:
https://www.facebook.com/groups/1088181905846816
36
Additional resources
If you use Microsoft Visual Studio, then a very useful add-on is available from Visual Micro that
allows you to edit, compile and download code to a large range of Arduino systems. The system
integrates with Visual Studio and includes comprehensive library management, as well as a very
useful Arduino reference section that includes documentation for all the available libraries.
I highly recommend Visual Micro as an alternative to the Arduino IDE, particularly if you are
working on a project that requires a Windows application that works in conjunction with an Arduino
board. Microsoft will allow you to download a free copy of Visual Studio's Community version.
The following are links to where the software mentioned can be downloaded free of charge.
https://www.arduino.cc/
https://www.visualstudio.com/vs/community/
https://www.visualmicro.com/
https://www.putty.org/
For further information on the Analog Devices range of DDS ICs, check:
http://www.analog.com/en/products/rf-microwave/direct-digital-synthesis.html
https://gra-afch.com/catalog/rf-units/dds-ad9910-arduino-shield
As an alternative to the tracking generator, a wide-band noise source may be used, and in some
cases, may be the preferred option. Such a device can be obtained quietly cheaply from E bay,
costing between $10 and $20. It's designed to run at 12 Volts, but does get rather hot. It can be
powered with 7 Volts, where it runs a lot cooler. At 5V, the generator provides an output of around -
60dBm.
https://www.ebay.com/itm/171709817697
37
The return loss bridge is similarly available on E bay for around $10 and is rated from 0.5MHz to
3GHz. Search E Bay for: RF bridge 0.5-3000 MHz – There are several manufacturers offering the
same product.
The user can refer to the following for an example of how a noise source and bridge may be used.
http://www.sdrplay.com/community/viewtopic.php?f=7&t=1562
Warning - Be careful with what you use as a signal source. The front end of the RSP devices can be
easily damaged by using excessive levels of input power. SDRplay recommends +10dBm for short
periods, with 0dBm for continuous use. This equates to a level of 0.707 Volts RMS at +10dBm, and
0.223V RMS at 0dBm. It's far cheaper to buy, or make a simple attenuator, than it is to replace your
RSP device.
38