Author Topic: NanoVNA Custom Software  (Read 520282 times)

0 Members and 7 Guests are viewing this topic.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #725 on: November 15, 2020, 06:35:43 pm »
I wanted to try running something a bit closer to the 4GHz limit of the V2plus4.    Shown are the S21 plots for the V2+4 compared with one of my old VNAs.   

Cal:  Showing both units after calibration.  The Nano is using the cables supplied with the unit.  The cal kit was changed as mentioned previously.   The Nano looks pretty good.  Consider in the previous plots the amount of noise above 3GHz.   

Notch: Showing a 3.8GHz notch filter (stub).   The two VNAs track fairly close except for the notch where we see a 4dB difference. 

MidWest: Let's have a look at Midwest Microwave DC-18GHz 40dB attenuator. 

See Posts below for corrections:
https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg3341186/#msg3341186
« Last Edit: November 25, 2020, 01:28:02 am by joeqsmith »
 
The following users thanked this post: Grandchuck

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #726 on: November 15, 2020, 10:04:03 pm »
Using the V2+4 to look at a small preamplifer.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #727 on: November 16, 2020, 12:06:03 am »
No real point to this exorcise other than just playing with the Nano and testing my software.   I'm sure a few of you wonder if I have a CB radio.   :-DD  I don't.
   
Looking at a small power amplifer.  The total attenuation between the amplifier and Nano is 60dB.   The step attenuator was then set to 0dB and a amplifier was bypassed to get a relative measurement from the Nano.   The step attenuator was then set to 30dB (90dB total) and the amplifier installed.   The total gain is about 80dB which is close to the limit of the Nano.  Note the 1dB steps.  Starts to compress above 7dB.   
 
The following users thanked this post: Grandchuck

Offline Kean

  • Supporter
  • ****
  • Posts: 2164
  • Country: au
  • Embedded systems & IT consultant
    • Kean Electronics
Re: NanoVNA Custom Software
« Reply #728 on: November 16, 2020, 01:20:31 pm »
Note the spur is close to 99.85MHz. 

Not a local broadcast station is it?
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #729 on: November 16, 2020, 02:57:42 pm »
Note the spur is close to 99.85MHz. 

Not a local broadcast station is it?

It's possible it's an external source. 0.3dBm is up there pretty high. Seeing the three states is also really odd.  I would expect it to be random.   A thru was installed to collect this data.  The v2+4 does have a metal case, vs the v2+'s plastic.  I could install the V2+ into a shielded case and see if anything changes.   If I had the battery pack, I could also try it stand alone.  Maybe something from the PC getting in through the USB cable.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #730 on: November 16, 2020, 06:28:59 pm »
Case is made from PCB, soldered together.  Lined with Teflon.  Ferrite added internal and external on the USB cable.  Case grounded by large braid.   Section of semi-ridged used for through.  No calibration performed.  Showing the raw data.   

Swept the V2+ from 90 to 110MHz.   Started test with cover open to get a baseline.  At roughly half way through the test (750 sweeps), the enclosure was sealed off.  There appears to be no difference.   
 
The following users thanked this post: xrunner, Kean

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #731 on: November 17, 2020, 03:09:26 am »
I used a small USB battery to power the v2+, then used the menus to program the start/stop.  Turned off all other traces.  Couldn't sort out how to get a good scale and reference. So cal'ed it with a thru only and set it to 0.1dB/div.  Sure enough, I can see the spike randomly show up.  Tossed it all into the shielded box and watched it through the screen.  Still does it.   Should be easy enough to reproduce. 

You may have seen they claim the v2+ is rated for 3GHz, where the v2+4 is rated for 4GHz.  I have been meaning to go back and repeat the 40dB attenuator test with the v2+ and see what difference there is.   It actually looks like my v2+ is slightly better with this test than the v2+4.   I doubt anyone is expecting them to perform as well as my vintage Agilent.   

Seeing a claimed 4GHz system off by 20dB below that, well...  Pretty much what I have been saying about keeping the original Nano below 300MHz, goes for the Plus.  Stay below 3GHz, don't expect to do anything narrow and if you use the V2+, stay with a smaller number of points (maybe these lockup problems can be corrected with firmware).   It's pretty good for only $120.       
« Last Edit: November 17, 2020, 03:12:35 am by joeqsmith »
 
The following users thanked this post: Grandchuck

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #732 on: November 22, 2020, 04:33:28 am »
The 3GHz upper limit of the v2+ and v2+4 improves the TDR.  512 steps per unit length or 0.025.  After 200 samples, the standard deviation is 0.0018".   The histogram and unit length per sample are much more stable now.   It would be interesting to see how it would perform with a commercial airline rather than my homemade one.  Still, a big improvement over the original Nano.   

« Last Edit: November 22, 2020, 04:30:21 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #733 on: November 22, 2020, 06:32:18 pm »
Looking through some older data for the original Nano, it appears I had ran a test using increments of 0.010".    I replicated this test with the V2P and the results were nearly identical.    I repeated the test with the V2+ set to 900MHz and 101 data points like the original Nano.   

It's very possible that the mechanical hardware is the limiting factor. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #734 on: November 22, 2020, 07:19:27 pm »
Tried a few tests with the +4.  Added a digit to the standard deviation which is a bit lower.  We can see the p-p is also slightly better.   Could just be a matter of running the slide. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #735 on: November 22, 2020, 08:07:18 pm »
Continuing to play with the software and slide. 
Sweeping the V2+4 100K to 3GHz and incrementing the slide by  0.100".   Looking at the return loss, we can see how the travel effects the reflections.  As the number of sweeps increases, so does the distance from the V2+4 to the end of our airline.     
 
The following users thanked this post: Grandchuck

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #736 on: November 23, 2020, 12:57:22 pm »
They claim the lower limit of the V2+/+4 is 50KHz. 

Looking at a 5.6pf between port1&2.   The V2+ was swept from 50KHz to 5MHz.  No calibration was performed.  The USB has proven to be unreliable with this unit and I am using 101 data points (like the Nano).  Strange as the V2+4 has never hung.  Maybe a bad unit? 

Notice how bad the noise is as we go below 500KHz. 

The second plot is looking at the same capacitor but I have now calibrated the unit and am sweeping from 2MHz to 10MHz.  The jig adds a bit of error but no matter.  Notice it really doesn't settle until 6MHz or so.  Below 500KHz or so there's a lot of error.  Difficult to calibrate noise out. 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #737 on: November 23, 2020, 01:43:06 pm »
The attenuator measurement doesn't look right; here is what I'm getting with a 40dB attenuator 3-4GHz, calibrated with the cal kit supplied with the V2 plus4, and no averaging:



Please check your measurements with NanoVNA-QT, right now even nanovna-saver does not implement the isolation calibration correctly. If you are not sure how to implement it, check the code here: https://github.com/nanovna/NanoVNA-QT/blob/master/libxavna/calibration.C#L63
« Last Edit: November 23, 2020, 01:44:42 pm by OwO »
Email: OwOwOwOwO123@outlook.com
 
The following users thanked this post: joeqsmith

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #738 on: November 24, 2020, 12:07:56 am »
I tried to run the software again and it basically seems to hang.  When I select various menus nothing happens.   After several seconds it will flash up the menu, then it goes away.   

The software doesn't show a version number anywhere on it.  There appears to be no text files included with it that provide any details about the software.   I am running Windows 10.  LabView talks just fine to the device (when it doesn't hang).  So it doesn't seem hardware related.    If you have better software or know of a way to get this version working, let me know and I will try it. 

*****
Playing around a bit more, I finally was able to get it to select the communications port.  It started sweeping but came up with this error.   
« Last Edit: November 24, 2020, 12:16:41 am by joeqsmith »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11699
  • Country: my
  • reassessing directives...
Re: NanoVNA Custom Software
« Reply #739 on: November 24, 2020, 06:39:43 am »
have you updated the driver to the one given/suggested by the SW documentation? CH340 iirc. that message appeared to me when i disconnected Nano while the SW is sweeping.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #740 on: November 24, 2020, 01:17:20 pm »
have you updated the driver to the one given/suggested by the SW documentation? CH340 iirc. that message appeared to me when i disconnected Nano while the SW is sweeping.

As I have mentioned a few times, the V2P appears to hang when using the USB.  Again, maybe firmware or a defective unit.  It's possible this could have caused the error but it happened pretty fast and normally when it see it I am using large data sets.

I have attached a screenshot of the driver.   Is this what you are using?  It's what they had when I downloaded the software.  When I first plugged in the device, Windows recognized it but their software was hanging.  When I changed to this diver, I saw no difference. 

Again, their software hangs with both the V2+ and +4.   

I tried to follow the undocumented code and it does appear that the could be the problem.  I ignore the leakage terms with my software.   It may be faster to add this to my software than spend time trying to get their software working.   I didn't have any luck with the original Nano's software as well.  I have not tried this new software on a different PC. 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11699
  • Country: my
  • reassessing directives...
Re: NanoVNA Custom Software
« Reply #741 on: November 24, 2020, 03:53:17 pm »
yes thats the same driver but i'm on Win7.. havent played much with large dataset but i just tried 5000 points, it took a while before the sweep starts, but i dont wait until completion. communication interruption (esp USB) is likely due to the driver or the USB IC or the how your PC is setup. too many USB devices and data transfer may affect that channel too? is there such thing as dropped USB packets?  :-//. it could be out of the HW designer's hand as well or the NanoVNA-QT. you may ask the original programmer (xaxaxa) maybe? lets hope OwO frequently reply to Q&A.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #742 on: November 24, 2020, 05:41:47 pm »
I still have a Windows 7 PC that I could try. 

I am seeing the V2+ crash with even 400 points.  But again, I am running it non-stop for hours on end.  It does appear to have something to do with the number of points.  The average time between crashes seems to increase with the number of points selected.   The V2+4 has yet to crash with my software.     I've been unsuccessful in finding a way to cause the V2+ to crash at will.     

That VNA's communications is very slow.  It's hard to believe it's a driver or hardware problem as LabView talks to it V2+4 just fine even with 800 points selected.  LabView isn't known for it's ultra fast speeds.   

Adding support to my software to include the crosstalk error terms isn't a big deal.  It would still be nice to be able to compare the data from my software with the included software.   

The one thing I noticed in their software was the ability to change the power level.   I didn't see anything in their documentation about how to change this setting.   Like the checksum, it may just be another undocumented feature.   I would like to add support for it.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #743 on: November 25, 2020, 01:15:16 am »
I added support for the leakage and repeated the test with the 40dB attenuator sweeping 3 to 4GHz.     I then repeated the test sweeping up to 4.4GHz as before. 

Looks MUCH better!   Thank you very much for that little hint OWO! 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #744 on: November 25, 2020, 05:00:30 am »
I loaded the software onto my Windows 7 PC and it seems to work fine.  This PC has an old i7 2630QM processor where the Window 10 PC uses a Xeon E5-1650 v4.

Attempting to sweep down in the 50KHz range where the worse noise is but their software appears to limit it to 100KHz.   

Before digging into their source code, I tried adjusting the Ouput Power but it appears to have no effect.   My guess is that it's not supported and that's why there is nothing in the documentation about how to set it.   

****************
Talking with a friend today about the USB problems with this V2P hanging.   Apparently they ran into a similar problem with Windows 10 USB selective suspend causing them problems.  They suggesting disabling all of the USB power saving features.  I tried it and the V2P has been collecting 400 point datasets for a bit over an hour and a half now without a fault (using my software).   This is the longest I have seen it run with this amount of data but I'll let it continue to run just to make sure.   
****************
It made it to two hours and I aborted the test.   I restarted collecting with 800 data points.  It finally hung at 2200 cycles.  It collects at roughly 17 sweeps per minute with 800 points.   So roughly 129 minutes until it failed. 
*****************
The next attempt to run am 800 point test, the unit crashed after 210 sweeps.   I tried it one last time and it made it to 4500 sweeps or around 4 hours before it crashed.

When the Nano crashed, it still shows the USB menu but doesn't respond to any USB commands.  The PC still see's the port.   The only way I have found to recover from it is by power cycling the Nano V2+.   

After several attempts to get the VNA View (VNA QT) software to run on this PC, I did eventually get it to sweep.  There isn't any way to tell how many sweeps it has ran.  I'll check on it over the day and see if it has hung or not.

*****************
I ran their software for roughly seven hours and the V2P never crashed using the same PC, driver, cables, Nano.  I started my software and the Nano crashed within a half hour.  So it's not the USB power savings features in 10.   

My software is pretty simple.  When it causes the Nano to crash, it's just asking for a single data point and reading it.   


« Last Edit: November 27, 2020, 02:23:20 am by joeqsmith »
 
The following users thanked this post: djadeski

Offline Darko8

  • Newbie
  • Posts: 8
  • Country: si
Re: NanoVNA Custom Software
« Reply #745 on: November 26, 2020, 12:49:00 pm »
Hi,

I checked few pages of this long forum thread, but I could not find any application attachment or link. Is this application going to be released or is it just for internal use? Or maybe I missed link/attachment?

I would gladly try it on my new SAA2 v4 which I got yesterday :)

Regards, Darko
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #746 on: November 26, 2020, 07:18:37 pm »
Hi,

I checked few pages of this long forum thread, but I could not find any application attachment or link. Is this application going to be released or is it just for internal use? Or maybe I missed link/attachment?

I would gladly try it on my new SAA2 v4 which I got yesterday :)

Regards, Darko

Reading has become a lost art. 

I have no plans of making my software available.  However, I understand there are a few open source packages that are well supported and excellent to use.  You should join one of the many groups for the Nano as I am sure many people would provide you with any help you need getting it setup.  There was one person that dropped me a couple of bread crumbs on the V2+ interface.  It sounded like they were working on their own program for it as well.   Check them out. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #747 on: November 27, 2020, 04:51:53 pm »
I ran a few more tests trying to sort out why my software can get only the V2+ to hang.  First, I would never expect firmware to get into a state where it would require a power cycle to recover.   I have no desire to have to unplug my appliances or countless other embedded devices.   But it seems like there is something that I am doing that causes it, at least with this PC.

If you have a V2+ (not the +4), and know a bit about Labview,  I have attached a simple program that sets the Nano to sweep from 1-900MHz, 800 points, 1 sample per point.  It then just reads data from it until you press Stop.   It may need to run for several hours as I've seen the V2+ run anywhere from 15 minutes to 5 hours before it locks up.   Once it locks up, there is nothing I can do to recover outside of power cycling the Nano.

I have also built the program as an EXE.  These are created with 2011 so if you wanted to run the EXE you would need the 2011 runtime.    If you use something other than COM4, just stop the app, select the port and run it.  You should see roughly 3.8 seconds per frame. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #748 on: November 27, 2020, 09:22:52 pm »
I had ran it one last time for over three hours with my software and the V2+ did not hang.   |O

It makes no sense that their software wouldn't cause the problem but maybe it has something to do with them plotting the data real time and it just slows it down enough.

I changed that test code to try to force the fault.   You can play around with more data, and throttle it.  The  Nano will stop sending data but it seems I can always get it to recover.   Maybe it has to sit in this mode for a long time before it hangs. 

Back to testing with their software.  Note the 98MHz glitch I saw with my software.  Totally random.
« Last Edit: November 28, 2020, 03:09:37 am by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11696
  • Country: us
Re: NanoVNA Custom Software
« Reply #749 on: November 28, 2020, 03:23:32 am »
I think I may have stumbled onto a way to recover from the lockup.   If you run that last program, bump the elements to 2, it should lock.  Most likely it will recover just by starting and stopping the Labview software.  When I see the V2+ lock, resetting Labview has no effect.   I have have had this program cause it to lock this way as well by doing what I describe. 

I mentioned earlier that the port appears to still be open.   Requesting a read from the FIFO with the number of elements set to zero will recover from a soft lockup.   Seems very easy to replicate.   

Imagine telling someone driving down the highway that they need to pull off to the side of the road and disconnect their battery terminal to reset the ECM fault.   

I've added this simple change to the main program and will let it run overnight.  With any luck it may be a work around. 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf