Keyboard Shortcuts
Likes
- HBTE
- Messages
Search
Re: TinySA construction
In my previous post I suggested that the power of the noise is proportional to bandwidth.
toggle quoted message
Show quoted text
100x the bandwidth gives 100x the noise power, so a 20dB rise in the noise floor. Erik's post agrees with that understanding, except in the units we use?when we think of energy. Power is energy per unit time, it's reasonable to casually use either term here. Erik wrote: >? So you with a noise source of a certain temperature (e.g. certain amount of total energy that is leaving >? the source over all frequencies) the amount of energy you measure goes with the log of the bandwidth. That statement agrees with my post, except that "energy" is generally assumed to be in units of Joules. It is only when converted to a ratio expressed in dB that "log" enters into it. The amount of noise energy (in Joules) is proportional to the bandwidth. >? The LNA is not really low noise. Using a good low noise LNA (with a NF of 1) >? you can gain 18dB noise floor, of course the dynamic range will not change so you will lose at the high side. . That's good to keep in mind when measuring low level signals. It might be worth adding an optional $1 MMIC up front somewhere. Nothing in the Si4432 datasheet seems to spec a noise figure for the LNA.
?
Would be interesting to unhook the Si4432 rx input, put a 50 ohm resistor across it.
See how low we can get the RSSI readings at various bandwidths and PGA/LNA gain settings.
Thermal energy of a 50 ohm resistor is -174dBm/Hz.
The Si4432 data sheet claims a "sensitivity" of -121dBm. That 50 ohm resistor would have -121dBm of energy at a bandwidth of around 200khz, but the Si4432 will see the noise floor rise long before that bandwidth is reached. Note that 174dB - 121dB = 53dB, a ratio of 10**(53/10) = 199526 Datasheet says spurious emissions at the RX pin of up to -54dBm.
But these are spurs that Erik's technique of taking multiple scans while moving the IF freq within the SAW filter passband will mostly cure.?
The spurs may jump about as the the PLL dividers change to give a new LO frequency. Page 37 of the datasheet says:? ?"The AGC algorithm adjusts the gain of the LNA and PGA
so the receiver can handle signal levels from sensitivity to +5 dBm with optimal performance."
The "sensitivity" is spec'd at -121 dBm.
On page 50, we see that the LNA gain can flip between 5dB and 25db, the PGA between 0 and 24dB
So a variation of up to 49dB, depending on the LNA and PGA gain settings, as controlled by the AGC.
At one static setting of the LNA and PGA gain, I'd expect the maximum dynamic range available
to be around? (5+121)-49=77dB between maximum signal and the noise floor. Which makes me wonder how Dave saw what I assume was a difference of 120dB between
the noise floor and a signal.? But I may well be analyzing this incorrectly.
The Jan 17 tinySA.ino sets the LO Si4432 output to max power of 20dBm.
Most of us are using level 7 mixers such as an SBL-1 or ADE-1, where a 7dBm LO is ideal.
Reducing LO power will likely improve mixer performance.
This could be done by using the 'X' command to write to the 3 LSB's of register 0x63
Jerry, KE7ERas described on p50 of AN440.? Since "000" is -1dBm and each increment by 1 increases the power by 3dB,? so bits of "011" will set the LO power to -1dBm + 3*3dB = 8dBm. The command "P6 3" of tinySA.ino appears to set both Si4432's in transmit mode for use as a signal generator.? In this case, I'd expect the LO to be at 7dBm and the signal out of what is normally the RX Si4432 to be about 10dB below that. So the 3 LSB's of reg 0x63 should be at "011" for 8dBm as above, and at 000 for a minimum power level of -1dBm for the RX Si4432.? However, command "P6 3"? appears to put them both at maximum power of 20dBm, which may work if it doesn't blow away the diode ring mixer, and will certainly emit a large signal. However, the output from the mixer will be a square wave instead of a sine wave, and thus have far stronger odd harmonics going into the 250mhz LPF filter. The comment "Set low power" at line 1866 is incorrect, as is "Both on RX' at line 1863. On Sat, Feb 8, 2020 at 10:32 AM, <erik@...> wrote:
Noise level is bandwidth dependent. |
Re: TinySA construction
¿ªÔÆÌåÓý±õ²Ô»å±ð±ð»å¡ ? ? Dr. William J. Schmidt - K9HZ J68HZ 8P6HK ZF2HZ PJ4/K9HZ VP5/K9HZ PJ2/K9HZ ? Owner - Operator Big Signal Ranch ¨C K9ZC Staunton, Illinois ? Owner ¨C Operator Villa Grand Piton ¨C J68HZ Soufriere, St. Lucia W.I. Rent it: Like us on Facebook! ? Moderator ¨C North American QRO Group at Groups.IO. ? email:? bill@... ? ? From: [email protected] [mailto:[email protected]] On Behalf Of erik@... ? Jerry, |
Re: TinySA construction
Jerry,
Noise level is bandwidth dependent. Noise represents a certain energy and the amount of energy you get into your energy level detector depends on the bandwidth of the signal allowed to enter the energy detector. This is different from a normal signal that has limited bandwidth, these signals are either in or out the bandwidth of the detector and thus either seen or not seen. The noise energy formula is: Pn (average level) = 10 log10(k * T * BW) + NF Where: k is Boltzman constant. T is temperature in Kelvin B is bandwith in Hertz. NF is the Noise Factor (the internally generated noise level) So you with a noise source of a certain temperature (e.g. certain amount of total energy that is leaving the source over all frequencies) the amount of energy you measure goes with the log of the bandwidth. The PGA changes the overall level and if the noise input is more then the PGA itself produces, the PGA will amplify the noise. If the noise is lower you will only see the internally generated noise from the PGA. AGC sets the PGA The NF of the SI4432 is not specified but it is possible to detect a signal at -121dBm when using a bandwidth of 2.6kHz So lets rewrite the formula: Noise floor = 10 * log(k * T * 1000) + NF + 10 * low BW, T = 290K Noise floor = -174 + NF + 10*log (BW)? BW = 2.6kHz Noise floor = -174 + NF + 10 * 3.4 -121 = -174 + NF + 34 So we find:?NF = 19 The LNA is not really low noise. Using a good low noise LNA (with a NF of 1) you can gain 18dB noise floor, of course the dynamic range will not change so you will lose at the high side. . Hope this explains what is happening. -- HBTE Files section:?/g/HBTE/files Erik, PD0EK |
Re: TinySA construction
Dave,
toggle quoted message
Show quoted text
Thanks for the report, very interesting!? A lot going on here. Had to think about this for a day or two before coming up with an intelligent response. I'm looking forward to playing with some hardware when I get a chance. Erik is right, increasing bandwidth should increase the noise proportionally. But I don't understand all what's going on here yet. From what you say, I assume that with the PGA gain set optimally for a bandwith of 2.6khz? and with the display calibrated to show a sine wave input at 0dB, the noise floor was -120dB. As we increase the bandwidth up from 2.6khz, does the noise floor rise immediately, or is there some value of bandwidth above which the noise floor starts to rise? Assume the noise floor starts to rise at a bandwidth of 4.5khz (for example).? If we increase the bandwidth by a factor of 100 to 450khz, does the noise floor rise by 20dB, so it is now 100dB below the sine wave?? ? Is it necessary to re-adjust the PGA gain for optimal results at 450khz? I'd think PGA gain could remain unchanged, the Si4432's LNA, mixers, PGA, and ADC are all seeing the same input, that bandwidth change is totally in the digital domain. Datasheet says the RSSI is a measure of signal power in dBm,? the power of the signal has not changed but the amount of noise has increased 100 fold, or 20dB. Where is the noise mostly coming from?? Is this a limitation of the Si4432, due to noise in the LNA up front?? What affect does changing the LNA gain have? >? increasing the PGA gain reduced the noise floor.? I need to do some more test but it seemed the magnitude >? of the peak did not change, just the noise floor moved down as far as the -120dB floor as the gain increased. Sounds like the RSSI reading (computed digitally) is adjusted to compensate for changes to the PGA gain.? Though the RSSI reading for the signal did not change with PGA gain, we are still in danger of saturating the ADC's if the PGA gain is raised too high.? Increasing the PGA gain puts the signal closer to the max of what the ADC can handle, allowing a larger dynamic range between signal and noise floor.? Assuming we don't saturate the diode ring mixer or our external 250mhz LPF or SAW filters or the internal LNA an mixer,? increasing the signal amplitude should have the same positive effect on the difference between signal and noise floor. With AGC on, the tinySA would still pretty much work, except there will be a delay from when the signal passes through the PGA to when that signal reaches the RSSI detector.? This delay may not be accurately accounted for when adjusting the RSSI reading to compensate for changes in PGA gain.? ?So turning off AGC and manually? adjusting PGA gain only at times when the RSSI is not being read gives better results. Jerry, KE7ER On Fri, Feb 7, 2020 at 12:27 AM, m0wid wrote: Thanks Jerry for the heads up on Register x69.? I spent a happy evening last night playing with the various options here, and also investigating the effect of time from making a change in frequency to seeing a stable response on the RSSI value. |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
Keep in mind, that rant is coming from a retired hardware oriented guy.
toggle quoted message
Show quoted text
I'm well aware many are happily coding in C++, some on huge projects where some auto-commenting scheme might well help them navigate it all. But when I write code to exercise new hardware, or do much of anything on an ATMega328P class processor, I want the fine grained control I get with C. I know exactly what's going on underneath.? Usually. Jerry, KE7ER On Fri, Feb 7, 2020 at 08:02 AM, Jerry Gaffke wrote:
Hmmm, Visual C/C++ code needs to be auto-commented with boilerplate |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
Hmmm, Visual C/C++ code needs to be auto-commented with boilerplate
toggle quoted message
Show quoted text
so you can figure out what the code is doing? One of the reasons I prefer straight up K&R C. My apologies for the snark, but I am not a fan of C++ When I want code that's smarter than I am, I code in python. Where good code needs comments is in how it interacts with other stuff. In this case, what the heck is going on inside those Si4432's. And how the code is working with the architecture of the tinySA. Jerry, KE7ER ? On Thu, Feb 6, 2020 at 03:49 PM, jafinch78 . wrote:
Reminds me too that I need to read into the what looks like a new (or at least to me) commenting scheme in Visual C#/C++ 2010 Express to auto comment sections of code to detail more elaborately.?? |
Re: TinySA construction
I don't have this DSP stuff figured out much either.
toggle quoted message
Show quoted text
But about a year ago, got through half of this intro to DSP from Steven W. Smith, found it very accessible: ? ??? Highly recommended, and can't beat the price. Need to review what I read, as it is mostly forgotten now. And then finish the book. Jerry, KE7ER On Fri, Feb 7, 2020 at 12:27 AM, m0wid wrote: Thanks Jerry for the heads up on Register x69.? I spent a happy evening last night playing with the various options here, and also investigating the effect of time from making a change in frequency to seeing a stable response on the RSSI value. |
Re: TinySA construction
One word of warning in changing AGC and LNA settings.
Make sure you test both low level signals (noise floor related) and strong signals, preferable in a two tone setup to confirm you do not deteriorate the IIP3 as this can create all kind of unwanted intermodulation signals in a more complex input signal setting. -- HBTE Files section:?/g/HBTE/files Erik, PD0EK |
Re: TinySA construction
On Fri, Feb 7, 2020 at 12:27 AM, m0wid wrote:
the narrow bandwidth and adequate delay time increasing the PGA gain reduced the noise floor.Noise level is directly related to bandwidth. The narrower the bandwidth, the lower the noise floor. ? -- HBTE Files section:?/g/HBTE/files Erik, PD0EK |
Re: TinySA construction
Thanks Jerry for the heads up on Register x69.? I spent a happy evening last night playing with the various options here, and also investigating the effect of time from making a change in frequency to seeing a stable response on the RSSI value.
Turning off the AGC removed most of the spurs visible.? For the particular signal I was examining LNA off and PGA of around 6dB seemed best on a wide bandwidth setting.? What was most interesting was zooming in so the bandwidth reduced to 2.6kHz.? Then it seems necessary to extend the time interval between frequency change and taking the RSSI reading to around 15ms, presumably to allow the FIR filter to stabilise out.? For wide bandwidths the 2millisecond delay that is present in the set frequency function can be reduced to around 500microseconds.? I do not yet understand how these filters work so if anyone can point to a clear laymans explanation that would be much appreciated. What was counter-intuitive to me was that at the narrow bandwidth and adequate delay time increasing the PGA gain reduced the noise floor.? I need to do some more test but it seemed the magnitude of the peak did not change, just the noise floor moved down as far as the -120dB floor as the gain increased.? Fascinating.? Again if someone can explain what happens that would be wonderful. I think it should be possible to set up preferred gain and delay times for the various bandwidths for an auto mode, but leave a manual mode so the user can fully optimise.? It also looks as though spur reduction algorithms may not be needed, though this needs more investigation work as I have tested at just one frequency so far.? I think Eric is preparing for something similar as he has adjustable delay for the 'M' command for use with the serial port. Not having used a SA before this has been truly enlightening.? For me having a local display in standalone mode is much better for than using the PC.? Really looking forward to getting the code with touch included. 73 Dave |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
Correction, should read:
toggle quoted message
Show quoted text
? but if tinySA.exe does NOT terminate with each command with a '\n' then my code won't work with it. On Thu, Feb 6, 2020 at 07:55 PM, Jerry Gaffke wrote:
but if tinySA.exe does terminate with '\n' then my code won't work with it. |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
Having said I fixed the compile bugs, guess I should post it.
toggle quoted message
Show quoted text
Version tinySArpi01 is now found here:??/g/HBTE/files/KE7ER I have not yet tried it out on Si4432 hardware. One thing I realized rather late, Erik's code will resync with each command character, since that is a single letter and all the arguments are numerical.? I had been assuming he was using the Arduino Serial library timeout feature to terminate commands. So can be much more robust than I had thought. Terminating each command with a '\n' as I do is more typical of an interactive debugger, but if tinySA.exe does terminate with '\n' then my code won't work with it. Probably doesn't matter, I am primarily concerned with running everything on an RPi where there will be no need for a serial link. If nothing else, it should be useful as an alternative reference when trying to figure out the basic functionality of Erik's tinySA.ino.? ?Code for displays and encoders and? extra VFO's and such has been stripped out. Compiled on a Nano, this code takes about 28% of flash, 41% of RAM. I doubt my code is taking much more than 100 bytes of RAM, so most of that 41% is probably going to the Arduino libraries. Jerry, KE7ER On Thu, Feb 6, 2020 at 04:11 PM, Jerry Gaffke wrote:
My code will be easier to follow, as much cruft has been removed. |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
My code will be easier to follow, as much cruft has been removed.
toggle quoted message
Show quoted text
But there aren't all that many notes yet, and they are mostly about how I thought a? command line interface should work.? Erik's command line interface code is likely robust enough, many of my concerns were due to a lack of understanding how the Arduino Serial library worked. After a few further edits, that code now compiles for both the Nano under arduino,, and for the RPi using the arduino-like wiring-Pi library.? But I haven't tried wiring up any hardware yet, that will wait till I have a block of time available to play with it. I do intend to document better all those SI4432 register writes in future versions of the code. ? Jerry On Thu, Feb 6, 2020 at 03:49 PM, jafinch78 . wrote:
On Sun, Feb 2, 2020 at 09:23 PM, Jerry Gaffke wrote: |
Re: Tiny low cost home build spectrum analyzer
#spectrum_analyzer
On Sun, Feb 2, 2020 at 09:23 PM, Jerry Gaffke wrote:
Copious notes at the bottom of the file on what all is going on, Awesome!? Thanks for sharing!? Reminds me too that I need to read into the what looks like a new (or at least to me) commenting scheme in Visual C#/C++ 2010 Express to auto comment sections of code to detail more elaborately.?? I have to watch this tutorial again slowly and see and/or read into what was being done to create the comments.? Received the nanoVNA, two TUF-2+ mixers and the $14.95 PhotonH in the mail today.? Eagerly awaiting the other components. The SBC build will be a handy porta pack design once all the details are ironed out.? On another note, noticed reading into the nanoVNA that TAPR-VNA4 is referenced to be used with the nanoVNA.? |
Re: TinySA construction
Dear colleagues, |
Re: TinySA construction
I will update the build instructions including the saw filter matching circuit.
-- HBTE Files section:?/g/HBTE/files Erik, PD0EK |
Re: TinySA construction
Daniel,
You were trying to make a PCB to mount ready made modules?? I think I remember an older post. I thought about that and yes, the mixers have a 90degree problem.. I opened the shield on my ADE-25 module.. all that is inside is the mixer, big waste of board space. I ordered some unmounted mixers and attenuator chips, I need to order some SAW filters like Erik's, I bought a module that has only one SAW and the module is huge. I am thinking? a custom board for that much. Using Si4432 modules makes sense. 73, Gary WB6OGD |
Re: TinySA construction
Daniel,
toggle quoted message
Show quoted text
The closest to "final" is Erik's build instructions of Jan 17: ? ??/g/HBTE/files/Tiny%20Spectrum%20Analyzer Note that he is using a Protoneer Arduino Nano board, and recommends a Maple Mini: ? ??/g/HBTE/message/878 Whatever Arduino board you use, it must somehow drive the SPI bus at 3.3v, not 5v. Most Arduino boards are 5v at the header pins. And different Arduino boards will require different pins available, so an adjustment to the tinySA.ino firmware may be needed. One change I would make to Erik's build instructions: The connection between the two saw filters should include a conjugate matching network, not a direct connection. ? ??/g/HBTE/message/663 ? ??/g/HBTE/message/666 If the SMA connectors are getting in the way for some reason, you could solder 50 ohm coax directly to the boards. One possible method of shielding I am looking at is the use of? sardine tins, with a piece of un-etched PCB being used as the top cover, connectors coming up through that PCB. One sardine tin for each module. Filtering on power supply and SPI leads going in. If this is all too confusing, it might be best to wait a month or two? till the design has evolved a bit further. Jerry, KE7ER On Wed, Feb 5, 2020 at 12:24 PM, danielu@... danielu@... wrote: Gary and colleagues, |
Re: TinySA construction
Gary and colleagues,
I tried to put the two SIs in a PCB, the SAW filters and the 5V / 3.3V power sources together with the shields and 50ohm lines. I stopped because a combination seems to appear: PCB/ 90deg.SMA connectors/ready-made modules.? Is there a final version for the schematic diagram? Daniel Ungureanu YO8SAK |
Re: TinySA construction
We should be able to see that 120dB range if feeding the SA a sine wave.
toggle quoted message
Show quoted text
I see nothing in the datasheet suggesting not. With a whole spectrum of signals that are as strong or stronger than the signal of interest, then stopband suppression becomes an issue. On Wed, Feb 5, 2020 at 10:51 AM, Jerry Gaffke wrote:
The RBW implemented in the Si4432 will not have sufficient stopband suppression to see this, |