Author Topic: NanoVNA Custom Software  (Read 527099 times)

0 Members and 9 Guests are viewing this topic.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1225 on: August 28, 2021, 05:31:28 pm »
I transmitted CW 2.4 GHz using my makeshift Vivaldi antenna at port 1, receiving the reflected wave (doppler effect for movement of my chest wall) with a simple stub at port 2.

Let's see how it behaves at the frequency you are using.  Again, setting the center to 2.4GHz with a 1MHz span and 31 points.    Notice now that my software reports a sweep time of roughly 80mS (again, I lot of uncertainty in this measurement).    Looking at the Signal Hound, the time between sweeps is roughly 78mS.  The time the VNA is sweeping is about 17.3mS.   Or 1.8KSPS.  Much faster as we would expect from the manual.   Notice that the duty cycle is roughly the same and we are still discarding 75% of the data.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1226 on: August 28, 2021, 05:47:47 pm »
Looking at zero span (CW), the the VNA appears to leave the output active.  The time to collect the data appears to be the same as with swept.   Guessing it has no effect on the actual sample rate.   

***
The V2Plus4 was again set to 2.4GHz, 1MHz span, 31 points.  The Signal Hound is set to zero span mode.   We can now get a better idea what the data stream looks like.  It appears that they are running at 2KSPS but as you can see, there is repeating pattern.   I'm sure OWO would know the cause of this.  That or I would need to have a look at the firmware.   

« Last Edit: August 28, 2021, 06:51:21 pm by joeqsmith »
 
The following users thanked this post: ALW

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1227 on: August 28, 2021, 07:20:11 pm »
With the Signal Hound set to 40 MS/s, zero span, it appears that the pattern is not always 4 X 500us period pulses followed by the runt and short.    Where the markers are, note there were six.   

The Signal Hound has a decent library allowing you to control it with an external PC.   I've had mine for a few years now and really like it.   I made a little demo of it decoding one my my DMMs radios.   I mention it as it may be a better solution for what you are attempting to do.   


Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1228 on: August 28, 2021, 07:37:18 pm »
If you want to see some of the earlier work where I was reverse engineering the interface, 30 minutes of agony.   



Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1229 on: August 29, 2021, 07:38:17 am »
Thank you, very helpful insights. Need to read it a cpl of times to understand it, will do some measurements using a SDR as a spectrum analyzer. The data stream in the FIFO seems to be at 400 SPS with CW 2.4 GHz 101 pts, interesting how it switches even in CW mode. Need to do some scrounging there.
 

Offline harrimansat

  • Regular Contributor
  • *
  • Posts: 229
Re: NanoVNA Custom Software
« Reply #1230 on: August 29, 2021, 12:44:15 pm »
If you want to see some of the earlier work where I was reverse engineering the interface, 30 minutes of agony.   



Which kind of receiver are you using?
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1231 on: August 29, 2021, 04:51:27 pm »
Thank you, very helpful insights. Need to read it a cpl of times to understand it, will do some measurements using a SDR as a spectrum analyzer. The data stream in the FIFO seems to be at 400 SPS with CW 2.4 GHz 101 pts, interesting how it switches even in CW mode. Need to do some scrounging there.

I think you will need to be very clear about what you are asking.   With my software set as you suggest, it takes about 250ms to update.   2.5ms/sample or 400Hz.   Pretty much what the manual states at 400 samples per second.  We are a 1/4 the amount of data, so 1/4 the time.   Again, this may have little to do with the actual sample rate.  It really depends what you are trying to ask. 

One thing to be aware of is when using CW, the interface is not very reliable.  I never sorted out the root cause but suspect there is a problem with my software. 


Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1232 on: August 29, 2021, 04:59:50 pm »
Which kind of receiver are you using?

 :-// :-//  I am not sure what you are asking.  If you are interested in more detail, I suggest actually watching the video you linked. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1233 on: August 29, 2021, 05:03:13 pm »
ALW, check what my software is reporting for sweep time with your setup.  Is it a stable 250ms or does it jump around to 500, 750 ms? 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1234 on: August 29, 2021, 05:42:51 pm »
As you said, the SW is a bit bitchy in CW mode. It looks like, if I click on pnts first, CWfrequ 2nd, sweep time is around 250 ms. If I click the other way round (last click on pnts), the reference subtraction in the polar plot is not working anymore and the sweep time is indicated at around 450.
However, I figured that out early on that you need to do a click on CW frequ as last action in order to have CW working. I use your ref-sub feature for all my radar tests, and it messes completely up if you do not follow that rule.
When going to your raw data tab, it looks that clicking on "points" activates a frequ sweep mode, abandoning the CW mode previously selected.
(That is one of the reasons why I suggested earlier to indicate somehow if we are in "center span" "min/max" or "CW" mode)
Interestingly, the S21 data recorded seem to come with 5 ms interval. This may mean, that the 2.5 ms is for S11 and S21 combined
« Last Edit: August 29, 2021, 05:53:00 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1235 on: August 29, 2021, 05:55:21 pm »
The order is by design.  The manual warns about the importance of ordering but I don't think I go into the details for CW.

Selecting the points will program the VNA with whatever the current start and stop frequencies are.   Selecting CW will override the step size, forcing it to zero.   If you select anything other than CW last, that step size will be overwritten.   

Assuming that you enter CW correctly and you are seeing around 250ms, how much does it jump around if you watch it for 30 seconds or so?  +/-50ms or +250ms or more? 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1236 on: August 29, 2021, 05:57:54 pm »
251-265 ms
However, immediately(1st 10 s) after switching to the task it is more span. Seems to relate to cpu load somehow
I played with the num of points a bit and it is reasonably always a factor of 2.5 give or take 5%. When you activate the raw data tab that slows it down a bit.
« Last Edit: August 29, 2021, 06:17:06 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1237 on: August 29, 2021, 07:06:26 pm »
That's much better than I was expecting compared with my PC.   There is a newer version that I had corrected the units case (K vs k)  and I will go ahead and addresses this problem with CW to make it a bit more robust.

Attached, I have further aggravated the problem prior to adding the change.    With these being very minor changes and yours being stable, I won't worry about releasing it. 

Quote
(That is one of the reasons why I suggested earlier to indicate somehow if we are in "center span" "min/max" or "CW" mode)
Interestingly, the S21 data recorded seem to come with 5 ms interval. This may mean, that the 2.5 ms is for S11 and S21 combined

It will always be in the last mode selected, unless you change the number of points.  As I mentioned, there is also the segmented sweep to consider.   A simple way would be to change the fonts colors to reflect the mode currently selected.   Basically as shown. 

Quote
IMPORTANT!!!!
There is an order to selecting the data.  The software will always program the V2+ to the last setting you made.  If you change Fcenter, the software will use the center and span to calculate the new range.  If you change Fmin, the software will use the min (start) and max (stop) to calculate the range.   If you were to program the min and max first, then change the span, the V2+’s start and stop would change. 
Also, changing the number of points will cause the software to recalculate the sweep range based on the min (start) and max (stop). 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1238 on: August 29, 2021, 07:09:46 pm »
Let me know if you want to try it.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1239 on: August 29, 2021, 07:24:24 pm »
Interestingly, the S21 data recorded seem to come with 5 ms interval. This may mean, that the 2.5 ms is for S11 and S21 combined

The V2Plus sends everything for each data point.  It's not like the original NanoVNA in that regard where you can pick a choose what you want.   

The software does not discretely write every sample it receives.  Rather it places the entire swept data set into a queue.  Once an  entire error free data set has been received, the software then writes it to the file and plots it to the screen.   So for 101 data points, I am expecting the software to write out 101 data points for both channels every 250ms. 

***
Setting the software for 2.4GHz CW, 101 data points and recording for 1 minute, should provide 60 * 4 *101 = 24,240 points.

Letting it record and timing it by hand, using that converter I provided and importing to Excel, it seems to work out. 

« Last Edit: August 29, 2021, 07:36:13 pm by joeqsmith »
 
The following users thanked this post: ALW

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1240 on: August 29, 2021, 08:14:06 pm »
Let me know if you want to try it.
Sure I want to try it! I like the coloring of the font.

As for my application, I will try to record a pendulum movement with video and with the nano radar for getting the time base tested.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1241 on: August 29, 2021, 08:28:59 pm »
Let me know if you want to try it.
Sure I want to try it! I like the coloring of the font.

As for my application, I will try to record a pendulum movement with video and with the nano radar for getting the time base tested.

2.04 is on-line.  Minimal testing but the changes were fairly minor.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1242 on: August 29, 2021, 09:01:18 pm »
Rather than a pendulum,  I am just moving the connectors.  I start out fairly slow then increased my speed.   You may need a fairly fast camera and a few hundred hz pendulum. 

Depending what you have on-hand for equipment, maybe just use an ARB in burst mode.  Or just connect the two ports with a switch and pulse it.   I think those GaAs parts I used would switch well below 10ns.   Certainly fast enough for this experiment.

I have that first gen transfer relay that would work fine for this.  I could easily collect the data for you if you knew how you wanted to run it. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1243 on: August 29, 2021, 09:24:48 pm »
I placed the GaAs xfer relay between the two ports and controlled it from the Arb.  Starting at 100mHz and stepping 100mHz to 1Hz.  Then incrementing by 1Hz to 10Hz.  Then incrementing by 10Hz, and so on.   Using 500MHz 101 data points to stay well within the range of the switches.   

Its a simple test so if you find the data useful, I can run it how ever you want.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1244 on: August 29, 2021, 09:35:48 pm »
Switching at a fixed 100Hz 50% DC.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1245 on: August 29, 2021, 09:44:06 pm »
Switching at 500Hz. 

***
Should add that I had changed to 401 data points to collect this data. 
« Last Edit: August 29, 2021, 09:46:46 pm by joeqsmith »
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1246 on: August 29, 2021, 09:55:58 pm »
Didn't look at the rest yet, it's late here. But your 100Hz data look like 2 points up, 2 points down. That means we are sampling at 200 Hz / 5 ms interval, correct? Will call it a day now, thanks a lot for the help.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1247 on: August 29, 2021, 09:58:05 pm »
The Signal Hound was measuring a sample rate of around 500us (2kHz).   At 1kHz we can see it starting to alias as we would expect. 

It does all appear to make sense.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1248 on: August 29, 2021, 10:31:37 pm »
Didn't look at the rest yet, it's late here. But your 100Hz data look like 2 points up, 2 points down. That means we are sampling at 200 Hz / 5 ms interval, correct? Will call it a day now, thanks a lot for the help.

Notice on the 500Hz dataset, we have 2 points up, 2 points down or 4 X 500Hz or 2KHz, or 500us which is what we had measured with the Signal Hound.   


****
From the manual, we know they at least mention you can get 400 points per second out of it.  It needs to at least be able to sample at 400sps to achieve that. 

https://nanorfe.com/nanovna-v2-user-manual.html
« Last Edit: August 29, 2021, 10:51:18 pm by joeqsmith »
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1249 on: August 30, 2021, 08:21:24 am »
your stepped switch interval was very helpful. I marked the switch event row number and did the math (see attached table). The sampling rate of the NanoV2+4 FW is 200 Hz, which I was also told in https://groups.io/g/NanoVNAV2/messages?expanded=1&msgnum=2336

Your 100 Hz switch shows 2 points up, 2 down, also in agreement with a 200 Hz sampling rate. With the 500 Hz switching you are switching faster than recording, showing some harmonic of the two rates I guess.

The tx behavior you see with the spectrum analyzer is a different chapter IMHO.

Thanks!
« Last Edit: August 30, 2021, 08:50:29 am by ALW »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf