Author Topic: NanoVNA Custom Software  (Read 527004 times)

0 Members and 6 Guests are viewing this topic.

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #400 on: September 23, 2019, 04:34:51 pm »
The bottleneck of the dynamic range is actually the common mode inductance of the two edge mount SMA connectors, and this can't be improved much other than separating the two ports as far as possible.
I am not sure about this one, but whatever... as you they say. At least put connectors on the long edge of the device.

Quote
All low cost USB VNAs on the market currently suffers from this problem and is why they are all limited to a dynamic range of around 70dB < 1GHz and 50dB at 3GHz.
Not all. Here's one with 90dB dynamic range with close enough connectors, thou those do not seem like edge mount:  https://www.sdr-kits.net/introducing-DG8SAQ-VNWA3 95dB: https://www.megiq.com/products/vna-0440

If the ADC is sampling at 1Msps and the VBW is 1kHz, a 60dB ADC dynamic range leads to a 90dB measurement dynamic range, which is more than sufficient.
Oversampling is solution, agreed. Thou at 1Msps you run into ADC aperture jitter problems that adds phase noise to measurements unless you run all stm32 clocks from XO, let's say at 24MHz w/o any PLL.

[edit] I do not buy "common mode inductance of SMA connectors". Most likely they blame connectors while actual problem is internal leakage/reflections. Look how close are connectors for Keysight P5008A which have 140dB dynamic range and better than 140dB crosstalk figures up-to 26GHz.

Where do we sign-up for beta testing?
« Last Edit: September 23, 2019, 05:08:51 pm by ogden »
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #401 on: September 23, 2019, 05:11:44 pm »
Quote
All low cost USB VNAs on the market currently suffers from this problem and is why they are all limited to a dynamic range of around 70dB < 1GHz and 50dB at 3GHz.
Not all. Here's one with 90dB dynamic range with close enough connectors, thou those do not seem like edge mount:  https://www.sdr-kits.net/introducing-DG8SAQ-VNWA3

Quote
Covering 1 kHz to 1.3 GHz and powered from a PC USB-bus, the VNWA 3 offers a dynamic range of 90dB up to 500 MHz and better than 50dB above 500 MHz.

That sounds about right. It's either common mode inductance or radiated leakage from the exposed center pin depending on your point of view (they are two sides of the same phenomenon which is that E fields wander to the outer face of the coaxial shield). It's pretty well known to anyone designing network analyzers. IIRC the xaVNA full two port version had some solder between the SMA connector body and a shield can to reduce this leakage path, but even then it only got to something like 60-70dB dynamic range at 3GHz. Below 1GHz it's easy to hit 90-100dB dynamic range. The solution is a specific kind of surface mount SMA connector where the center conductor is fully enclosed.
Email: OwOwOwOwO123@outlook.com
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #402 on: September 23, 2019, 05:20:55 pm »
I had a play with a certain full two port VNA prototype once, and was surprised how much of the leakage I can remove just by grabbing the outer body of the SMA connector. The leakage floor can go down by 20dB (to 90dB dynamic range) at >3GHz if you grab both connectors. OTOH if you touch both connectors to a piece of metal (just the outer body - the center pin is unconnected) you can see the leakage shoot up 10-20dB. From that it's pretty obvious the leakage path has to do with currents travelling on the outer face of the coax structure.
Email: OwOwOwOwO123@outlook.com
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #403 on: September 23, 2019, 05:28:33 pm »
Quote
All low cost USB VNAs on the market currently suffers from this problem and is why they are all limited to a dynamic range of around 70dB < 1GHz and 50dB at 3GHz.
Not all. Here's one with 90dB dynamic range with close enough connectors, thou those do not seem like edge mount:  https://www.sdr-kits.net/introducing-DG8SAQ-VNWA3

Quote
Covering 1 kHz to 1.3 GHz and powered from a PC USB-bus, the VNWA 3 offers a dynamic range of 90dB up to 500 MHz and better than 50dB above 500 MHz.

That sounds about right. It's either common mode inductance or radiated leakage from the exposed center pin depending on your point of view (they are two sides of the same phenomenon which is that E fields wander to the outer face of the coaxial shield).

No. Mainly it's because of harmonics mode above 500Mhz because signal source is DDS. Of course leakage could be contributor as well. Main problem of those "DIY" or "commercial low cost" VNA's that can't reach 90dB isolation - insufficient shielding and failure to follow even basic RF design/layout rules. Screaming example of how not to design VNA is already mentioned MiniVNA Tiny. I really hope design of next gen nanoVNA will not fall into same traps.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #404 on: September 23, 2019, 06:46:31 pm »
I had a play with a certain full two port VNA prototype once, and was surprised how much of the leakage I can remove just by grabbing the outer body of the SMA connector. The leakage floor can go down by 20dB (to 90dB dynamic range) at >3GHz if you grab both connectors. OTOH if you touch both connectors to a piece of metal (just the outer body - the center pin is unconnected) you can see the leakage shoot up 10-20dB. From that it's pretty obvious the leakage path has to do with currents travelling on the outer face of the coax structure.

 That's PCB design (layout/shielding), not connector "common mode" problem. Get access to proper VNA like Keysight or R&S to see that touching connectors do not change ANYTHING. Also you are advised to check  Signal Path youtube episodes of VNA teardowns - those instruments are riddled with connectors and cables, yet still reach significant dynamic range.
« Last Edit: September 23, 2019, 06:49:04 pm by ogden »
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #405 on: September 23, 2019, 07:16:03 pm »
No, I do not need to spend $$$ to see what is easily shown with a simple test board. The professional test equipment do not use this style of edge mount SMA connector, and that is exactly why low cost network analyzers have trouble reaching high dynamic range. I have prototypes and test boards that show plain evidence of connector leakage, and I can assure you the NanoVNA team know what they are doing.
EDIT: V2 has far better PCB layout design compared to V1, and I can guarantee you the bottleneck is not going to be internal leakage.
« Last Edit: September 23, 2019, 07:20:05 pm by OwO »
Email: OwOwOwOwO123@outlook.com
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #406 on: September 23, 2019, 07:23:39 pm »
See here:
Notice the mounting of the connector. Details like this do matter and with just one bad leakage path you are not going to get >50dB dynamic range at 3GHz no matter how good your PCB design is. The xaVNA full two port is a testament to this as it has very little internal leakage (proven by removing all connectors) but the dynamic range with connectors and inside its enclosure is not that great. Ironically the dynamic range is improved when you remove the board from the aluminum enclosure (the creators even admit this); do you know why this is?
Email: OwOwOwOwO123@outlook.com
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #407 on: September 23, 2019, 08:25:00 pm »
The professional test equipment do not use this style of edge mount SMA connector, and that is exactly why low cost network analyzers have trouble reaching high dynamic range.
They mostly use flange mount connectors for internal modules, yet performance of those do not differ from edge-mount/edge-launch SMA connectors when latter are properly shielded. Manufacturers obviously just pick right connector and do not invent shielding transition for connector which is not made for such. Whatever. - Why don't use angled trough hole mount connectors then?

Quote
I have prototypes and test boards that show plain evidence of connector leakage
Nah. I see plain evidence that horizon is flat, so what? [kidding] - Unlikely you have chamber and equipment for leakage measurements.

Quote
EDIT: V2 has far better PCB layout design compared to V1, and I can guarantee you the bottleneck is not going to be internal leakage.
Good to hear that. How many PCB layers? Where do we sign for beta testing? :)
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #408 on: September 23, 2019, 08:38:27 pm »
The xaVNA full two port is a testament to this as it has very little internal leakage (proven by removing all connectors) but the dynamic range with connectors and inside its enclosure is not that great.
Indeed. It is clear that he missed to put (legs of) connectors in the shield. Port1 and port2 have connector center legs, some components and quite a transmission line length in common cavity which is main enclosure. That is "no no". I will say it last time - shielding can of particular channel shall cover everything including legs of the connector. [edit] Unfortunately xaVNA is also example of how not to design VNA.

Quote
Ironically the dynamic range is improved when you remove the board from the aluminum enclosure (the creators even admit this); do you know why this is?
Reflections. They forgot to put RF/microwave absorber foam inside aluminium enclosure.

« Last Edit: September 23, 2019, 09:21:02 pm by ogden »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #409 on: September 23, 2019, 09:02:42 pm »
Commercial VNA's do not have any TX or RX component or trace or even connector leg exposed into enclosure or outside world. RF PCB is covered by CNC-machined shield of many submodule cavities from both sides.

https://youtu.be/HxBcQDooAYs?t=1333

Relevant article:
https://www.edn.com/electronics-blogs/the-practicing-instrumentation-engineer/4418080/Shields-are-your-friend--except-when-
« Last Edit: September 23, 2019, 09:34:11 pm by ogden »
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1762
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #410 on: September 23, 2019, 09:15:03 pm »
Hi,

I am still new to VNA measurements and started yesterday to do a calibration of my device.

I have the latest FW installed and I can understand some of the steps in calibration, but not all:

OPEN --> connect open header to CH0
SHORT --> connect storted header to CH0
LOAD --> connect 50 Ohmn terminator header to CH0
ISOLN --> what do I have to do here?
THRU --> my guess is I straight connect CH1 to CH0?
DONE --> finish!

Why do I have to do a RESET first? So that measurements are done without any previous calibration? Makes sense, I guess...

Am I correct that CAL should be performed using the same cables that will be used for measurement? Makes sense, because the length will/can determine phase shifts, right?

If these questions are too basic for this thread, I can ask them in a separate topic - I don't want to hijack this nice thread, but I thought that it does generally fit in here.

Thanks,
Vitor

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1626
  • Country: nz
Re: NanoVNA Custom Software
« Reply #411 on: September 23, 2019, 10:01:40 pm »
Hi,

I am still new to VNA measurements and started yesterday to do a calibration of my device.

I have the latest FW installed and I can understand some of the steps in calibration, but not all:

OPEN --> connect open header to CH0
SHORT --> connect storted header to CH0
LOAD --> connect 50 Ohmn terminator header to CH0
ISOLN --> what do I have to do here?
THRU --> my guess is I straight connect CH1 to CH0?
DONE --> finish!

Why do I have to do a RESET first? So that measurements are done without any previous calibration? Makes sense, I guess...

Am I correct that CAL should be performed using the same cables that will be used for measurement? Makes sense, because the length will/can determine phase shifts, right?


Yes always try and calibrate at the end of the test cable _and adapters_ you will connect to the DUT. Not always possible of course - if you don't have cal kits for Male and Female you will need to use an adapter. Then you are exposed to any phase and amplitude effects of the adapter. It is possible to correct for that and different methods can be used which have different levels of accuracy.

The Reset clears the data arrays on the device. It's generally a good idea as the firmware isn't perfect, and it also allows you to ignore the ISOLN step if you want to. Otherwise it would probably apply the ISOLN correction from the last cal you did.

For ISOLN you are supposed to put a terminator (load) on both ports. That correction is only applied to the thru measurements - S21.

For a 1 port measurement (CH0) you only need to do Short, Open and Load then Done.

If using the original NanoVNA app _on a PC_, then it is important to do it in the sequence Short Open Load for the best accuracy. Because the Short button also does a Reset. So if you do the Open first and the Short second, then the Open sweep is discarded. This results in a 0.3 dB error approximately.
Middle chart in this link shows this issue: https://github.com/hendorog/nanovna_test/blob/master/NanoVNA%20test.ipynb
 

Offline radioactive

  • Regular Contributor
  • *
  • Posts: 173
  • Country: us
Re: NanoVNA Custom Software
« Reply #412 on: September 24, 2019, 01:45:26 am »
Ok,  dumb question (but serious).  I've never owned or used state-of-the-art equipment, but what kind of application requires the ability to measure better than 50dB of return loss?  Best I've used is probably 70dB.  If I can achieve 20 dB S11 over a wide operating frequency,  I'm pretty happy.  I can understand if you are doing some kind of advanced science experiment, that you would need >90dB of measurement range, but aside from that,  what practical use is it?  Examples?
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #413 on: September 24, 2019, 03:07:17 am »
They mostly use flange mount connectors for internal modules, yet performance of those do not differ from edge-mount/edge-launch SMA connectors when latter are properly shielded. Manufacturers obviously just pick right connector and do not invent shielding transition for connector which is not made for such. Whatever. - Why don't use angled trough hole mount connectors then?
Yes so that is my point too; with these common edge mount connectors there is NO way to fully shield it, but all low cost VNAs (under $500) on the market uses these. The through hole SMA connectors have a worse problem - the center pin is long and sticks out which creates an antenna.
Be realistic and don't suggest milled enclosures. You know that is a no-go at this price point. We have to work with commodity parts with reasonable cost, so specialized connectors designed for shielding are also a no-go. If you think you can do a better job then go design and sell your own VNA.

That picture you posted is not the full two port version; the only pictures that exist of it are in a few kickstarter updates. You can see the shielding that covers the two SMA connectors, but even that's insufficient entirely because of that tiny slot between the connector body and the shield can. That is where they added a blob of solder in production.
Email: OwOwOwOwO123@outlook.com
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #414 on: September 24, 2019, 03:10:30 am »
The V2 PCB is 4 layers. The schematics will be posted soon, at the same time as the launch on taobao, but you can DM me if you want to see it right now.
Email: OwOwOwOwO123@outlook.com
 

Offline OwO

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: NanoVNA Custom Software
« Reply #415 on: September 24, 2019, 03:40:38 am »
Indeed. It is clear that he missed to put (legs of) connectors in the shield. Port1 and port2 have connector center legs, some components and quite a transmission line length in common cavity which is main enclosure. That is "no no". I will say it last time - shielding can of particular channel shall cover everything including legs of the connector.
How exactly do you put those things inside a shield? As I said earlier simply putting the shield over the connector legs is not sufficient (found experimentally), and you actually have to form a connection between the connector body and shield can body. It's easy to say "you must achieve this" but have you actually tried designing a fully shielded VNA while keeping BOM cost below $100 and have it be manufacturable? Point me to a VNA below $500 that does it correctly as you say. Or are you saying all low cost network analyzers on the market are crap?

Edit: so we are arguing the same point, which is that leakage from the SMA connector center pin trace is significant (assuming the PCB is designed correctly and everything else is shielded). Where I disagree is I think none of the edge mount SMA connectors on the market are actually fully shieldable, and that is why high end test equipment do not use edge mount connectors. If you can find me a picture of a shielded edge mount connector on a PCB that would be great.
« Last Edit: September 24, 2019, 03:48:37 am by OwO »
Email: OwOwOwOwO123@outlook.com
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #416 on: September 24, 2019, 08:08:27 am »
Indeed. It is clear that he missed to put (legs of) connectors in the shield. Port1 and port2 have connector center legs, some components and quite a transmission line length in common cavity which is main enclosure. That is "no no". I will say it last time - shielding can of particular channel shall cover everything including legs of the connector.
How exactly do you put those things inside a shield?

For example - by using trough-hole mount angled connector (attach), mounting it from bottom side so legs can be fully covered by shield lid. If angled SMA for any reason cannot be used and you want to use ultracheap edge mount by all means - order shielding can lid with cutout for connector legs (read below).

The through hole SMA connectors have a worse problem - the center pin is long and sticks out which creates an antenna.

It is no concern considering that you put it's legs under shield. That 1mm does not do much for planned frequencies anyway, owner or naked nude virgins can cut it if any concerns. Siglent did not care about it in front connector board of VNA (picture you posted).

Quote
As I said earlier simply putting the shield over the connector legs is not sufficient (found experimentally), and you actually have to form a connection between the connector body and shield can body. It's easy to say "you must achieve this" but have you actually tried designing a fully shielded VNA while keeping BOM cost below $100 and have it be manufacturable? Point me to a VNA below $500 that does it correctly as you say.

NanoVNA-F. Only thing to improve - add EMI shielding braid between connector shield and can, or just generous amount of solder.
« Last Edit: September 24, 2019, 12:07:25 pm by ogden »
 

Offline hwalker

  • Contributor
  • Posts: 45
  • Country: us
Re: NanoVNA Custom Software
« Reply #417 on: September 24, 2019, 03:41:37 pm »
OWO,
I haven't seen any info about what screen size the NanoVNA 2 will be using. Hugen has posted in the past about prototyping with a 3.5-inch LCD and I would expect something that size or larger to keep up with the nanoVNA-F that is now being sold.  Do you have any information you can share?

TKs, Herb
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3897
  • Country: ua
Re: NanoVNA Custom Software
« Reply #418 on: September 24, 2019, 05:34:57 pm »
ISOLN --> what do I have to do here?

connect two 50 ohm terminators on both connectors.
If you don't have two, then connect one to CH1 and leave CH0 open.

THRU --> my guess is I straight connect CH1 to CH0?

yes

Why do I have to do a RESET first?

To clear old calibration and avoid mistake.

Am I correct that CAL should be performed using the same cables that will be used for measurement? Makes sense, because the length will/can determine phase shifts, right?

yes
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #419 on: September 26, 2019, 01:04:29 am »
I had some time to play with the tool chain again.   I was able to rebuild Hugen79's source and program the image into the Nano using both a Windows 7 and Windows 10 system.  The VNA reports the same version and as expected has the same problems as the image I downloaded.   I was concerned about having a header with exposed pins hanging off the side and used these lower profile pins.   I thought about running it vertical and notching the case but decided to go this route instead.   

I spent some time reading the GNU license a few times along with the FAQ because I am sure that will come up at some point.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #420 on: September 26, 2019, 03:11:27 am »
I tried several tests and it seems with my particular Nano,  it will always fail at the frequencies leading to 900MHz.  When sweeping below 900M, it seems to be VERY stable.   When sweeping above 900M, it appears I can change the start to any value and the data will become corrupt.   It seems to have nothing to do with my software (will happen stand alone).  It tried to straddle 300M, 600M and 800M with a 100M span and saw no problems.  It appears unique to 900M.   

It will be difficult to understand how they derived some of their code with the sparse comments.   It's also impossible for me to know if anyone else is seeing this problem.   I randomly tried a few things and it appears that the problem could be improved.   Shown with the original code (about 200 sweeps, several corrupt data sets) and last mods (roughly 1000 sweeps, first data set corrupt only.).     Note that I had replaced the filter with a thru and I am not using any sort of calibration.   Everything is set to the defaults with an 850 start and 950 stop.  If your's has this same problem it is easy to reproduce.  Just watch the screen for a few minutes.   

I'll see if I can narrow the problem down further so maybe the real firmware guys can correct it.  Then again, if it's just this one unit, it's hardly worth going after.   

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3897
  • Country: ua
Re: NanoVNA Custom Software
« Reply #421 on: September 26, 2019, 05:17:24 am »
joeqsmith, I can suggest you to try the original NanoVNA firmware written by edy555:
https://github.com/ttrftech/NanoVNA

It works different. It seems that hugen79 removed some part of calibration calculations for some unknown reason. Also it uses different gain and frequency modes.

At a glance, original firmware from edy555 works with a much less noise. Also it seems more stable and has no flickering.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #422 on: September 26, 2019, 06:24:10 am »
Just looked at (original) nanovna PCB to find out that decoupling capacitor is way too far from power pin, connecting trace is thin. This is popular decoupling error of many hobby projects using particular chip. In this application it may be critical. I suggest to add decoupling capacitor (sideways standing) between two red dots marked in attachment pic. I can't promise any performance improvements, yet you can try - who knows. There are few more improvements regarding si5351 which I would rather tell only in PM.

[edit] In case you are soldering sharpshooter, you can try to put decoupling cap directly between power and ground pins, they are pin7 & pin8.
« Last Edit: September 26, 2019, 06:39:00 am by ogden »
 
The following users thanked this post: xrunner

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: NanoVNA Custom Software
« Reply #423 on: September 26, 2019, 06:49:18 am »
I'll see if I can narrow the problem down further so maybe the real firmware guys can correct it.  Then again, if it's just this one unit, it's hardly worth going after.

It seems like hardware problem (that may be fixable in software or not). Noticeably there are many traces w/o glitch. Then suddenly one or more traces have huge noise. We see that problem occur above 800MHz only when there are huge VCO tuning jumps. Seems like PLL is struggling to lock for some reasons in overclocking freq range or software do not wait long enough for PLL to lock, continue with measurement disregarding unlocked PLL. I have not seen source code - are there any PLL lock checks at all? I say that huge VCO freq jumps shall be followed by direct PLL lock status polling and only small steps shall be done using timeouts.
« Last Edit: September 26, 2019, 07:06:48 am by ogden »
 



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf