Author Topic: NanoVNA Custom Software  (Read 548803 times)

0 Members and 10 Guests are viewing this topic.

Offline erikka

  • Regular Contributor
  • *
  • Posts: 190
  • Country: nl
Re: NanoVNA Custom Software
« Reply #125 on: August 21, 2019, 07:07:26 am »
Is your plan to port it to the NanoVNA?
No, as I do not own a nanoVNA, but its sub 50$ price makes it tempting.
All HW dependencies in my SW are in the USB_EZ_interface files. Main part is setting the VNA do to a scan (the "Sweep" function)  and retrieving the data (the "ReadWrite" function), just like the nanoVNA commands
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #126 on: August 21, 2019, 12:27:40 pm »
Maybe someone else will port it over.  It looks like it would be a decent interface as is, or as a minimum a good start to one.   Actually, what they have for the Nano wouldn't be too bad if they would fix the readout.   

A while ago, I was playing with a TI 32-bit ADC and put this box together for it.   The plan is to run a longer narrow sweep (same setup as the last test) from a cold start with the nano in this box.

SP
« Last Edit: August 21, 2019, 06:42:55 pm by joeqsmith »
 

Offline erikka

  • Regular Contributor
  • *
  • Posts: 190
  • Country: nl
Re: NanoVNA Custom Software
« Reply #127 on: August 21, 2019, 03:16:38 pm »
The NanoVNA is rather immune to EMC as the DSP IQ demodulator is only sensitive to one very narrow frequency (couple of Hz around the measurement frequency). However when scanning the complete range you may run into spurs from the CPU or SI5351 clock right at the measurement frequency and that translates to impedance deviations
I added a "spectrum analyzer" in my own SW where I disabled the test signal output of the SI5351 and only run the demodulator LO and measure the power present on the selected frequencies. You have to modify the measurement SW in the VNA for this as there is no longer a reference signal to compare to.
This spectrum analyzer mode will quickly show if there are relevant spurs interfering with the impedance measurement. And its useful as a (rather bad) spectrum analyzer
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #128 on: August 21, 2019, 05:37:38 pm »
Plots representing over 5 hours of data, using the same settings.  Unit was calibrated while inside the case, everything torqued.  It appears there could be some gains to letting it warm up for a little while.   Standard deviation is just under half.           

All of this data was taken using the Nano's internal calibration.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #129 on: August 21, 2019, 05:46:49 pm »
If we only look at the 4 - 150MHz region, basically removing the two ends were it starts to have trouble, the noise is much closer to a gaussian distribution and the standard deviation is 5x lower.   I may try repeating this test using my own calibration routines and see if I can flatten it out.   

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: NanoVNA Custom Software
« Reply #130 on: August 21, 2019, 06:28:04 pm »
I am very impressed!   :-+
 
The following users thanked this post: joeqsmith

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #131 on: August 21, 2019, 07:02:46 pm »
The mechanical relay and some new end launch connectors just arrived for the second attempt at a transfer relay for the Nano.  The plan is to keep the case size the same.  Maybe this one will work good enough to show.   

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 4051
  • Country: ua
Re: NanoVNA Custom Software
« Reply #132 on: August 21, 2019, 07:18:29 pm »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #133 on: August 21, 2019, 08:16:35 pm »
Do you talking about these 600+ USD mechanical relay?
https://www.pasternack.com/sma-electromechanical-transfer-switch-18ghz-35watts-24-32volts-f-pe7150-p.aspx

The mechanical relay and some new end launch connectors just arrived for the second attempt at a transfer relay for the Nano. The plan is to keep the case size the same. Maybe this one will work good enough to show.   


From the datasheet:
Length 2.63 in [66.8 mm]
Width/Diameter 2.16 in [54.86 mm]
Height 1.36 in [34.54 m

Looks like it may not fit.    :-DD :-DD   That said, the Mini-circuits part I linked was half the price.  Both would get the job done.   

As I mentioned, I have an old transfer relay that I could easily drop in and use but my goal wasn't to just show an old relay connected to the Nano like the video I had linked.  That video doesn't show anything about how it is actually used and I doubt many people would want to see me just connect a relay.   I would like to sort out something cost effective that could be replicated.   

That cost effective part is up in the air.  $600+, seems a bit excessive.   :-DD

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: ro
Re: NanoVNA Custom Software
« Reply #134 on: August 22, 2019, 07:47:08 am »
@joeqsmith - nice thread

my unit just got here - I've only had time to take it apart ( i's missing the RF section shields ) and run some basic checks

I'll look over the python interface for linux, but the next weeks will be overloaded.
(an idea - make it as an attachment for a RPI3 + LCD -> make a hand-held unit with a nice display - i can duplicate the board without the LCD and make it fit the RPI extension header footprint)

 

Offline DL9SAD

  • Newbie
  • Posts: 1
  • Country: de
Re: NanoVNA Custom Software
« Reply #135 on: August 22, 2019, 01:31:08 pm »
Hi Joe,
is it possible to get Gerber-files ior KiCad sources of your attenuator PCBs ?
I watched youe video about MiniVNA and was very imptressed. Great job !

Martin DL9SAD
 

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 334
  • Country: us
Re: NanoVNA Custom Software
« Reply #136 on: August 22, 2019, 02:46:06 pm »
While the gain on the SA612 mixers are temperature compensated, it is not perfect temperature compensation.  Furthermore, unless they used C0G capacitors and the like, the capacitance is also likely to have temperature variation as well.  So for best results, plugging it in and waiting for the device to thermally equilibrate is best for the most accurate results.

Also, you can check out my VNA at

http://www.github.com/profdc9/VNA

It is similar to the NanoVNA, but you can assemble it yourself, and it may offer some advantages in accuracy because I actively lock into the intermediate frequency.  But it still requires a thermal warmup period.

 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #137 on: August 23, 2019, 01:23:45 am »
Isolation is better but still poor compared with the Nano.  However, it may be good enough to do something with.   I was hoping that the isolation specs would have been ultra conservative.  If you want good isolation, it seems you are going to have to pay for it.   :-DD   

I was looking at the poor input match of the Nano but doubt I will try to do anything with it.   I ran a cal using a 1-150MHz sweep, then repeated the T-check without the switch as before.   It smooths it out a bit, which we would expect with more data points but it's a wash.  Errors I suspect are me not taking care to torque it.   But that mismatch is really bad for running these two port tests.   My guess is most people don't care.  After all, its a $50 analyzer, not $50,000.   

I think the thing to do is run the T-check over a 50MHz sort of range using the my full 2-port calibration and see what we come up with.     

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 4051
  • Country: ua
Re: NanoVNA Custom Software
« Reply #138 on: August 23, 2019, 08:42:38 am »
is it possible to get Gerber-files ior KiCad sources of your attenuator PCBs ?

some pcb for attenuators and filters, may be it will be useful for you:
https://oshpark.com/profiles/K8VFO
 
The following users thanked this post: cdev

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #139 on: August 23, 2019, 08:26:20 pm »
Picture showing the test setup.   

The components for the bias Ts have been added to the transfer relay.   I engraved the copper plate because the steal case is very thin and easy to cut through.   

Using the new transfer relay as shown,  I ran a full 2-port cal from 1 to 500MHz and then ran a T-Check.   It's pretty poor but believe it or not, this is much better performance than I saw with the first prototype.   

For those playing along, I am using an OMRON G6K RF DPDT relay.  These are about $20 USD in singles.   As I mentioned earlier, it behaves like a $20 relay, not a $600 relay.   

****

Added picture of the setup mentioned.
« Last Edit: August 23, 2019, 10:50:09 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #140 on: August 23, 2019, 08:32:59 pm »
I repeated the full 2-port calibration, this time sweeping from 10 to 50MHz.   I'm just wanting to work in a less error prone region.   

The attached shows the results of repeating the T check.   Even with this narrow span, we can see it's still +/-8% error.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #141 on: August 23, 2019, 08:41:54 pm »
This is looking at S21 after the 2-port cal, using the thru standard.     

A new reference feature was then added to the software to allow me to easily measure the gain from a 0dB reference.   The second plot is showing the two MidWest Microwave 10dB attenuators attached (shown in the setup picture).   You can find information on these here:

https://www.mouser.com/ProductDetail/Midwest-Microwave-Cinch-Connectivity-Solutions/ATT-0290-10-HEX-02?qs=kRS0rR9cfpUxbNsiwYNf9w%3D%3D

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #142 on: August 23, 2019, 08:54:24 pm »
I haven't measured how much input power the Nano can handle before it starts to compress.  Looking at the output signal with a calibrated SA, it was fairly close -9 to -13dB called out in the manual.   It's far from flat.     

The transistor will have a gain of 14dB or so.  -20dB should keep me from out of the non-linear region.   

Replacing the thru section of the cal standard with our test transistor and increasing the bias, we can measure the the gain. 

Offline TheSteve

  • Supporter
  • ****
  • Posts: 3781
  • Country: ca
  • Living the Dream
Re: NanoVNA Custom Software
« Reply #143 on: August 23, 2019, 08:58:44 pm »
I don't know the specs but the price seems right and they are from a serious RF company. Could they possibly be useful?
https://www.ebay.com/itm/Anritsu-MM700022A-Microwave-Switches-Lot-of-2/173844545453
VE7FM
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #144 on: August 23, 2019, 09:06:26 pm »
I don't know the specs but the price seems right and they are from a serious RF company. Could they possibly be useful?
https://www.ebay.com/itm/Anritsu-MM700022A-Microwave-Switches-Lot-of-2/173844545453


Maybe.   Someone would need to look up the datasheets for them.    If you read the posts, again I have a transfer relay that I could easily bolt on but that's not the goal.   

As I mentioned, I have an old transfer relay that I could easily drop in and use but my goal wasn't to just show an old relay connected to the Nano like the video I had linked.  That video doesn't show anything about how it is actually used and I doubt many people would want to see me just connect a relay.   I would like to sort out something cost effective that could be replicated.   

****
Cleanup....

I'm not sure how you would use them.  This is more like what you would want if you were looking for used.  Again, you would need to find the datasheet.  Then being used, it may no longer meet the specified performance.
https://www.ebay.com/itm/RF-Transfer-Relay-with-Suppress-Switch-CS-37S10-DM/163664843937?hash=item261b2f54a1:g:74QAAOSw9Mtcwcod
« Last Edit: August 23, 2019, 09:10:50 pm by joeqsmith »
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1778
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #145 on: August 23, 2019, 09:54:25 pm »
Just a dumb question, sorry if it is stupid.

From what I understood, you want to switch S1 and S2 for different measurements, without having to screw the cables on/off.

Wouldn't a cheap DiSEqC-switch as used for satellite TV reception do the job? The controller that implements the DiSEqC switching could be replaced by some simple logic (press button or whatever).

These switches are optimized for 950MHz-2150MHz, but will handle lower frequencies for sure. They come in all shapes and forms (2 in - 1 out up to 16 in - 1 out or even 16 in - 16 out).

https://en.wikipedia.org/wiki/DiSEqC

Again, sorry if this does not make sense, if so, please explain in a friendly way.

Regards,
Vitor

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1778
  • Country: pt
    • VMA's Satellite Blog
Re: NanoVNA Custom Software
« Reply #146 on: August 23, 2019, 09:55:11 pm »
Sorry: just remembered that TV/CATV/SAT is 75 Ohm and not 50 Ohm.

Regards,
Vitor

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #147 on: August 23, 2019, 10:01:34 pm »
My old antique 70's HP VNA may be a relic but it has some nice features, like a DC-3GHz step attenuator.  Sadly, I don't have one just laying around.

Wanting to get some idea where things start to compress (nano + amp)  one attenuator was removed from the drive but it had little effect.   The second 10dB attenuator was then swapped out for a 3dB part and the test was repeated.  We can see it's now about 2dB low.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #148 on: August 23, 2019, 10:27:49 pm »
I suspect the compression is not the DUT but the Nano being over driven.  The Nano would be putting out somewhere below 10dB which shouldn't be a problem for our DUT.   I didn't see in the Nano's manual where they talk about at what point it starts to go nonlinear.   I doubt people care about it. 

To sort it out,  this is the crappy setup.  The whole thing is really a bad outside of a great setup for learning the basics.  It's not something you would want to try and use.   To see if the Nano is compressing, I would like to add a 10dB attenuator after the bias T and see if we get our 16dB back. 

So this nightmare of error prone mess was placed between the DUT and transfer relay.  Ideally I would characterize it, but I really just want to know it we get our gain back.   The large part is a commercial bias T followed by a Midwest BNC style 10 dB attenuator. 

I ran this with the thru and stored that as my reference then repeated the test using our DUT.

Hard to say how the different flavors of Nanos behave or what would be a safe region to use.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11933
  • Country: us
Re: NanoVNA Custom Software
« Reply #149 on: August 23, 2019, 10:35:42 pm »
Just a dumb question, sorry if it is stupid.

From what I understood, you want to switch S1 and S2 for different measurements, without having to screw the cables on/off.

....

Again, sorry if this does not make sense, if so, please explain in a friendly way.

Regards,
Vitor

Yes, I want to flip the cables without disturbing the test setup in order to measure all four S parameters.    This is the job of the transfer relay.   If you want to use two coaxial SPDT relays, you will need to sort out how to combine the signals.  The stub may burn you as well.   

Looking at the picture showing the inside of my HP test set, you can see the transfer relay and step attenuator.  Sitting between them is a SPDT relay.  This relay will terminate the unused pin rather than float it.    Point being if you are going to buy some used relays to make some sort of test set, make sure you locate and read the datasheets first. 
« Last Edit: August 24, 2019, 05:13:16 am by joeqsmith »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf