¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Spur Reduction #tinysa


 

Hi.

Is there any information available about how the spur reduction works in TinySA???

The ILI9341 display has arrived and I have it working with my ESP32.? With the faster updates on the local display it is easy to see spurs as they move if the RF frequency changes, and was wondering about adding spur reduction into the Arduino code.

Even if it is too complex for an Arduino, it would still be interesting to understand how it works.

Many thanks

Dave M0WID


 

Spur reduction uses small shifts of the first IF.
As the Spurs move around and the real signals are stationary any algorithm that is able to detect this will work

Simplist is a minimum hold algorithm
Or a running average.?

This is not yet implemented in the local code

--
HBTE Files section:?/g/HBTE/files
Erik, PD0EK


 

That almost works, see attached.

At each point in the sweep I take readings at the nominal IF, then with the IF at an offset each side, and take the lowest value of the three readings.

Need to see how to speed the sweep up though, and avoid the different peak values.? The offset here is 50kHz.



73

Dave M0WID


 

Best is to take as offset twice the RBW, as long as 6*offset is less then IF BW
--
HBTE Files section:?/g/HBTE/files
Erik, PD0EK


 

Thanks.? Will give it a try this evening.? I think I need to fit the matching parts to the 434MHz filters to flatten out the response and try and get a consistent peak reading as the IF changes.

Have you found any information on the time constant for the RSSI signal, or if it can be reduced in one of the registers?? I had a very quick scan of the register descriptions but didn't see anything.? It seems to take much longer than the specified 200uS to stabilise after a frequency change.

73

Dave M0WID


 

The RSSI is read on request as there is no guaranteed good latched value (no way to automatically capture a defined time after a PLL change).?
The is no delay in the tinySA code between setting the SI4432 frequency and the RSSI reading.
--
HBTE Files section:?/g/HBTE/files
Erik, PD0EK


 

Perhaps I misunderstand, but this doesn't seem quite right:
>? The is no delay in the tinySA code between setting the SI4432 frequency and the RSSI reading.

In the tinySA.ino code of Jan 17, I see the following under the 'M' command:

###################
? ? ...
? ? for(int i = 0; i < steps; i++ )? ?{
? ? ? ...
? ? ? setFreq (VFO, modfreq);
? ? ? ...
? ? ? if (i>0)? ? ? ? ...
? ? ? ? serialBuff[serialIndex++] = ((byte) (sensor));
? ? ? ...
? ? ? while (micros() - old_micros < (delaytime * 100L)*2/3 ) {
? ? ? ? delayMicroseconds(100);
? ? ? }
? ? ? ...
? ? ? sensor = SI4432_RSSI();
? ? }
? ? ...
? ? serialBuff[serialIndex++] = ((byte) (sensor));?
? ? ...
##########################

So the RSSI read occurs delaytime microseconds after the frequency is set.

Still curious about that weird *2/3 factor used on the delaytime.

Jerry, KE7ER



On Mon, Feb 3, 2020 at 07:42 AM, <erik@...> wrote:
The RSSI is read on request as there is no guaranteed good latched value (no way to automatically capture a defined time after a PLL change).?
The is no delay in the tinySA code between setting the SI4432 frequency and the RSSI reading.


 

Correction:
So the RSSI read occurs delaytime*100*2/3 microseconds after the frequency is set.

And perhaps the 2/3 factor is due to the processor specific execution time of this loop:

? ? ? while (micros() - old_micros < (delaytime * 100L)*2/3 ) {
? ? ? ? delayMicroseconds(100);
? ? ? }

Jerry


On Mon, Feb 3, 2020 at 08:16 AM, Jerry Gaffke wrote:
So the RSSI read occurs delaytime microseconds after the frequency is set.


 

Jerry,

The scanning loop for the local display is different from the scanning loop for PC data, I was referring to the local display scanning loop
--
HBTE Files section:?/g/HBTE/files
Erik, PD0EK