Author Topic: NanoVNA Custom Software  (Read 533218 times)

0 Members and 6 Guests are viewing this topic.

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #700 on: November 12, 2020, 06:48:24 am »
V2 can not resolve frequencies beyond 10kHz accuracy because the frequency step of the ADF4350 is 10kHz, not because there is significant phase noise (you can't look at the output on a spectrum analyzer because the signal is pulsed and the pulse period is not fixed). The quick switching of the ports does affect ability to measure very narrowband devices (less than 1kHz bandwidth), but this wasn't considered an issue because you only have 10kHz resolution at the upper frequencies anyway. If it can even track the drift of a crystal it's beyond my expectations, since it was not designed for this use case at all.
Email: OwOwOwOwO123@outlook.com
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #701 on: November 12, 2020, 11:44:25 am »
V2 can not resolve frequencies beyond 10kHz accuracy because the frequency step of the ADF4350 is 10kHz, not because there is significant phase noise (you can't look at the output on a spectrum analyzer because the signal is pulsed and the pulse period is not fixed). The quick switching of the ports does affect ability to measure very narrowband devices (less than 1kHz bandwidth), but this wasn't considered an issue because you only have 10kHz resolution at the upper frequencies anyway. If it can even track the drift of a crystal it's beyond my expectations, since it was not designed for this use case at all.

While being able to detect some drift may exceed your expectations and you may not consider your designs inability to be used for narrow band work an issue but I do.  It makes the product far less useful.  I assumed you would have understood the market well enough to know what requirements would be important.  Had you used the original Nano for your design criteria and met or exceeded every aspect of it,  I think you would have a great product.   It's also possible that I am not part of the targeting market.     

After being so impressed with the original Nano,  I bought yours to have a little fun with and maybe do a little promotional video for it.  It's a low cost analyzer and in this case performs like one.  I'm out a bit of cash and a couple of days work is all.  Could be worse.
« Last Edit: November 12, 2020, 12:05:03 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #702 on: November 13, 2020, 01:33:23 am »
How bad is the V2P, following showing my old boat anchors, the original NanoVNA and the V2P.   Same fixture and 3.686MHz crystal. 

The two vintage analyzers are fairly close.  The original Nano is off by around 0.2dB.  I may have messed up the cal.   Then we have the new V2P.   The span of the V2P is set to 2KHz rather than 1KHz like the other three VNAs so at least you could see something.     

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #703 on: November 13, 2020, 04:02:10 am »
Your span is 2kHz. That means the step size is 20Hz. This is not supported, as the ADF4350 step is 10kHz, and even in the si5351 region stepsizes < 1kHz are not supported (because of the high measurement bandwidth). It looks like I will have to include a check in the firmware preventing setting the span this narrow, to prevent people from accidentally setting the parameters to give meaningless readings.
Email: OwOwOwOwO123@outlook.com
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #704 on: November 13, 2020, 04:08:45 am »
Anyway this is the first time I've heard of building a filter with ordinary crystals (more common is using an off-the-shelf SAW filter). 1kHz passband @ 150MHz is 0.0007% fractional bandwidth. Basically no physical filter can achieve that except for electroacoustic filters, and even those are generally built to give a wider, flat passband instead. So far no one else has talked about this issue so I think it's an extremely niche use case that happens to be better suited to the V1 Nano. Personally I think it's a matter of using the right tool for the job, just as a cheap LCR meter will beat any VNA measuring impedances > 10k ohms. I could design a VNA that will work for very narrowband measurements, but to do that and *also* measure up to 3GHz, have high dynamic range, and still be able to adjust the sweep speed up would mean it would cost at least 10x what it costs now.
« Last Edit: November 13, 2020, 04:13:05 am by OwO »
Email: OwOwOwOwO123@outlook.com
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #705 on: November 13, 2020, 01:34:42 pm »
It looks like I will have to include a check in the firmware preventing setting the span this narrow, to prevent people from accidentally setting the parameters to give meaningless readings.

I'm not aware of any error checking in the firmware outside of the undocumented checksum.   You should add that information BTW.   Adding range checks is fine but I would suggest you send a return message when each command is set so the software knows that something went wrong.   I created a simple regression test for the original Nano when the firmware was in such turmoil.  With the V2+ not supporting any boundary checks, I decided against implementing any sort of automated  tests. 

Anyway this is the first time I've heard of building a filter with ordinary crystals (more common is using an off-the-shelf SAW filter). 1kHz passband @ 150MHz is 0.0007% fractional bandwidth. Basically no physical filter can achieve that except for electroacoustic filters, and even those are generally built to give a wider, flat passband instead. So far no one else has talked about this issue so I think it's an extremely niche use case that happens to be better suited to the V1 Nano. Personally I think it's a matter of using the right tool for the job, just as a cheap LCR meter will beat any VNA measuring impedances > 10k ohms. I could design a VNA that will work for very narrowband measurements, but to do that and *also* measure up to 3GHz, have high dynamic range, and still be able to adjust the sweep speed up would mean it would cost at least 10x what it costs now.

I really don't know what the communications hobbyists, like the amateur radio operators, are up to.  I had received comments that the Nano was designed for tuning antennas and that was really it's only intended use.   That seems to represent the majority of the amateur group. 

Someone asked me about home made crystal filters and it's common enough that there have been several articles published about them over the years.   I created a thread to talk about them and to your point, it wasn't very popular. 

https://www.eevblog.com/forum/rf-microwave/fun-with-crystal-filters/msg3036196/#msg3036196

Right tool for the job in my case was helping my friend flipper learn a little about VNAs before they leaped into buying one.   The original Nano works well for that.  As I have shown in several test cases, as long as I stay below 300MHz, it throws up some very impressive data for $50.   For 3GHz, I haven't done anything outside of measuring the included loads. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #706 on: November 14, 2020, 12:12:13 am »
Let's have a a little fun with some higher frequency bandpass filters.  While the original Nano can actually make some measurements in excess of a GHz, it does a poor job at best so I'll leave it out of the mix.   

For starts, this is a TOKO dielectric 915MHz band pass filter, PN# 4DFA-915E-10.    Both my old boat anchor and the NanoV2+ were swept from 700MHz to 1.1GHz.  Looking good.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #707 on: November 14, 2020, 12:17:07 am »
Sweeping both VNAs from 890MHz to 940MHz.   Again, looks decent. 

Let's have a look at something with a bit sharper skirt.   In the last attachment, Yellow is the TOKO part we just looked at.  Red is a 9 element interdigital filter.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #708 on: November 14, 2020, 12:21:15 am »
Let's start by sweeping from 800MHz to 1.4GHz.    Ignore the floor, really it doesn't look too bad.   This filter has a fairly flat pass band.  Maybe a tenth.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #709 on: November 14, 2020, 12:31:53 am »
Odd, not sure what the security issue is.

Sweeping from 1.01GHz to 1.135GHz.   I had ran the Nano a few times. 

***
Just for fun, I have attached the data using the original NanoVNA. 
« Last Edit: November 14, 2020, 12:53:07 am by joeqsmith »
 
The following users thanked this post: Grandchuck

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #710 on: November 14, 2020, 08:47:56 pm »
I recently finished repairs of a "working" 100W JFW attenuator.   I changed it to use a 20dB, 150W network.   While the original attenuator was rated for 1GHz,  the new network was spec'ed to a dB up to 3GHz.  I tried it and even with the poor launch (new part is not a perfect fit), it's basically a dB out. 

So hows the Nano V2+ compare?  Not too bad. 

Data was collected using the supplied cables.  I replaced the supplied thru with a higher grade part that can be torqued.  The load was replaced with the second best Mini-Circuits ANNE I had sorted.     

https://www.eevblog.com/forum/rf-microwave/fixed-attenuator-repair-mods/

One thing I have ran into twice now with the V2+,  if I set the samples to 400 and less, the unit appears VERY stable.  I've never seen it crash after several hours of operation.   Setting it to higher values, for example 800 was used for this test, seems to cause problems where the unit will no longer communicate.  I have to power cycle the V2+ in order to recover.    Outside of that,  I haven't seen anything else I would consider a bug when using the USB. 

****
Make that three times now.  The unit basically stops sending all data.   Looking at capture.png, I was sweeping from 300KHz to 4.58GHz (unit becomes unstable above the frequency).  Sending 800 data points per sweep, it hung after 22 sweeps.   I would guess I have ran it at least 3 hours solid at 400 points.  It does not appear to be tied to the frequency range.    This graph BTW, is looking at the thru.  The unit has a but of noise at the low end it increases as we move beyond 3GHz. 
« Last Edit: November 14, 2020, 09:23:49 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #711 on: November 14, 2020, 11:38:27 pm »
I dialed back the sample points to try and get a better look at the noise.


Noise1:  1200 sweeps 300K to 4.58GHz.
Noise3:  To zoom into the area of the low band, changed the start and stop to 99.847MHz to 99.852MHz
Note the spur is close to 99.85MHz. 

Noise4/5:  Even with 100 samples and such a narrow sweep, the spur isn't always captured.  It looks like one particular frequency.  It's amplitude varies a fair amount. 


Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #712 on: November 15, 2020, 12:28:36 am »
Narrowing the span much further, reducing the number of points to 4, turning off the color mesh, we can clearly see this is a single data point.  Oddly of the 3800 sweeps, there appears to only be three states. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #713 on: November 15, 2020, 03:10:06 am »
Running similar tests with the V2+4.  First thing I noticed is that using the same 800 data points has yet to cause it to hang.    I also found that this particular unit would go unstable at a much lower frequency.   4.4GHz seems to be stable.

Noise7:  Sweep 300K to 4.4GHz, 800 points per sweep.   Notice the very low frequency noise is gone.  We can also see the unit drifting a bit as it warms up.  Something is happening around 900MHz.

Noise8: Looking below 1GHz.  Pretty decent.   
Noise9: Sweeping from 850 to 950, looking at raw data, we can see some short of shift happening at 910MHz.  Shouldn't cause any problems.


I like the speed of the V2+4 and having the ability to pull more samples without crashing.   I was sweeping in small segments with the original Nano to increase the resolution in order to look at narrow band parts.   Now I have all these samples and can't put them to use.   I want my cake and to be able to eat it too!! 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #714 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #715 on: November 15, 2020, 10:04:03 pm »
Using the V2+4 to look at a small preamplifer.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #716 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.   

Offline Kean

  • Supporter
  • ****
  • Posts: 2219
  • Country: au
  • Embedded systems & IT consultant
    • Kean Electronics
Re: NanoVNA Custom Software
« Reply #717 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #718 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #719 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.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #720 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #721 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #722 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #723 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: 11812
  • Country: us
Re: NanoVNA Custom Software
« Reply #724 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.     


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf