Author Topic: NanoVNA Custom Software  (Read 533447 times)

0 Members and 1 Guest are viewing this topic.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1975 on: April 12, 2022, 10:06:17 pm »
Re: questions
I had wondered why you were attempting to integrate a transfer relay.

Quote
1. Are there any non-reciprocal dut's I could study?
Yes, there are non-reciprocal DUTs.  Mixers, directional couplers, matching transformers to name a few.   You could study them from a text book and then attempt to gain a deeper understanding by experimenting with them.   You could even build your own devices.   Experimenting with a 4:1 transformer would be simple enough.   You would certainly see a difference.

Quote
2. Do you use full two-port measurements to judge quality of a dut that is supposed to be reciprocal w.re.to s12 and s21?
No.  I do use the reciprocal to judge the quality of my calibration. 

Quote
I'm wanting to investigate inductors
 
I made a video where I used the original NanoVNA to make several measurements including Ls, Cs & Rs all without a transfer relay.

Make sure you have a reason to use the transfer relay.  Adding one will only add to the error and may create problems. 
« Last Edit: April 13, 2022, 01:55:52 am by joeqsmith »
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1976 on: April 13, 2022, 05:09:42 pm »
Thanks for suggestions. Perhaps I would not have undertaken the relay project if I'd realized limited applications.  I'm invested in getting it together and seeing how well I can do with it.

I've watched a lot of demonstrated activities using inductors. Inductors seem more interesting and varied than behaviors of capacitors. Lots of variables.

Yes, I'm trying to figure out, build and always use setups which will minimize errors.  This is a challenge I like to work on using my limited but growing electronics bench.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1977 on: April 14, 2022, 12:59:50 pm »
Re: realized limited applications

You may find your time is better spent reading than buying parts.  Trying to build something with little understanding of what you are doing or why makes little sense to me.   Then again, I rolled two custom xfer relays with zero success along with wrote some software to support them just for the fun of it. 

Most of the videos I have watched on VNAs were from CMT, Picotest, RS.  These are normally more generic.   The last one I watched prompted me to make that rebuttal video.  Recently this person commented  how their V2Plus4 uses sine wave.   It was only the bad clones using square waves.   I suggested they post here and show us some data but they pulled their comment. 

Most of the test loads I had looked at were standard purchased parts.  They come with data sheets.   I advice you to start out measuring parts that you know what their specs are before diving into the unknown.  For variables, I think it just depends how deep you want to dive in.   We had a little contest some time ago about constructing an oscillator on a breadboard for the fun of it.  I asked about when the person who started the thread considered a jumper wire an inductor, capacitor, delay line.   Some of the demos I made for the V2Plus4 were nothing more than some blank FR4 material and copper foil. 


Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1978 on: April 14, 2022, 04:18:02 pm »
Yes,  aquiring unnecessary stuff if a waste. I found a 30-year old oscilloscope that is way more than I need,  but it's capabilities are there when I learn and think of new ways to use it.
I thought your oscillator solution reflected your experience gained from wire wrapping work.  I'd think those constructions were often bumping against frequency limits (complications)  due to resonances,  etc.
Of course,  pursuing the simple questions can lead to elegant insights.  I'm not looking beyond getting some personal learning. 
Looking forward to your sharing more of your experiments.
 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1979 on: April 14, 2022, 04:26:22 pm »
Hello, for the transfer relay this datasheet help to choose the configuration of it.* Agilent-33311B-Datasheet.pdf (806.18 kB - downloaded 191 times.)
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1980 on: April 14, 2022, 07:11:24 pm »
Re: Transfer relay
Thank you but I aquired a new/old transco relay on ebay. I've almost received all ordered parts necessary to put it together. I've got a plan. Time to see if it works!
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1981 on: April 14, 2022, 07:20:56 pm »
Joe,  I truely appreciate the programs you've created and shared.   I wish there were a way to entice you to document the features.  I'm making efforts to puzzle choices out as I (try) testing new setups. However,  measurement returns aren't perfect(nature of rf, connections etc) which really hinders being able to decide whether I'm on the right track.  This wandering in the dark likely means I'll never recognize some really important features.
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1982 on: April 15, 2022, 12:22:39 am »
This would be a cool experiment.  Could this be done with the nanovna's?
https://coppermountaintech.com/determining-resonator-q-factor-from-return-loss-measurement-alone/
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1983 on: April 15, 2022, 05:19:33 pm »
Re: cool experiment

Again, I am not sure what you are asking.  Obviously these low cost VNAs can measure S11 & S21.   So I read the paper thinking maybe there was something there that would make you ask.  It seemed straightforward enough.    Lets spend a few minutes and toss something together.

I don't have a 1uH, so wound up a coil on a chapstick dispenser.  For the 113pF, I used a 100pF // with a trimmer.  For the 2k, I used a 2k21. For the 12pF coupling caps, I used 22pF.   

I have a James Millen Grid-Dip meter model 90651, serial number 16.  Released in 1949.  Shown with the 6.4-16MHz orange coil.  The trimmer was set to provide a dip at 14MHz.

Tank was then attached to the Lite.  No calibration was performed.   Measuring Q with S11,  13.290M / 980k = 13.56. 

Obviously, a swag at best but I see no reason why anyone couldn't follow this paper and replicate the test with the low cost VNAs.

***
Just to give some idea on the error,  assuming the RLC meter and resonance frequency of the Lite are close (which they are)  1.055uH @ 13.29MHz gives an XL of 88.1.  From this we can calculate C at 136pF.  With the 2k2, we should have a Q of 25.  We came up with about half that....  Lots of error compared with the paper, but again no calibration and our coupling network is a bit off...   
« Last Edit: April 15, 2022, 05:50:39 pm by joeqsmith »
 
The following users thanked this post: jspencerg

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1984 on: April 15, 2022, 05:52:07 pm »
Dang, you're fast.  Thanks for pic's. Being able to replicate, do calculations and compare results will be good learning experience for me.  Will study provided details later.
I was just reading about sample averaging. Recall you stated you used running average of last 100(?) samples.  That is a linear weighting scheme?  Did you consider using an exponential weighting scheme?  Using LV  seems a real advantage in implementing signal processing.
Could you also explain the 'smooth' function you have?
Thanks.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1985 on: April 15, 2022, 06:28:42 pm »
Ok, so no questions about the cool experiment.  I figured you had a reason to ask but guess not. 

Smooth uses an FIR.  The old software for the original NanoVNA does not support the average feature.  The following shows how to calculate an average: 



Offline cyp_eev

  • Contributor
  • Posts: 17
  • Country: de
Re: NanoVNA Custom Software
« Reply #1986 on: April 15, 2022, 08:58:15 pm »
This would be a cool experiment.  Could this be done with the nanovna's?
https://coppermountaintech.com/determining-resonator-q-factor-from-return-loss-measurement-alone/

That article is somehow confusing. They are also using S21 for the calculation..

However, I often use the magnetic field probing for determining the Q factor, contactless.
There are many applications where the Q factor is critical. For example I use that probing  for testing or fine tuning RFID card readers.
The company I am working for are also producing  MRI antennas. I can remember we had some problems with some PIN diodes with too high leakage current in some detuning circuits.
It was not possible to measure in circuit, but the additional resistance of that diodes droped the Q factor of the antennas. So we could finaly sort those "bad apples" out, by checking the Q factor.

The probe basically consists of two small magnetig loops, placed in parallel planes, but slightly shifted. The "challange" is to shift and keep them as near as possible one to another, but keep a high decoupling between them. The probe I am showing in the experiment has > 80dB decoupling. It uses RG178, diameter aprox. 20mm and 18mm spacing between the 2 planes. The Another picture is showing some similar H-Probes made of 0.047" rigid cable.

For this kind of measurments I wrote my own software. I am also not a big fan of the graphical method, thats why I used the group delay.
Q = π𝜏f

For this demo I soldered a resonator consisting of a 39pf C and a few uH L, resonating at aprox. 37.6 MHz
Both methods (graphical and gruopdelay) are practically showing same results:  Q= 37570/250 = 150 and Q =152
The 2nd method is faster, but is not working well for low Q factors, when the groupdelay is getting "noisy".
Of corse the results also depend on the loading effect..
 
The following users thanked this post: 2N3055, jspencerg

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1987 on: April 15, 2022, 09:35:41 pm »
That article is somehow confusing. They are also using S21 for the calculation..
They are comparing the two methods against calculated values.

Interesting fixture. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1988 on: April 15, 2022, 10:30:12 pm »
Lite was calibrated and a second test circuit was made.   Coupling caps are a little low now (11pf) which at least partly explains the amplitude difference.  C was trimmed to the same center freq in the paper (13.62M).  S21 3dB delta now 720k.  This gives us a Q of 18.92. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1989 on: April 15, 2022, 11:31:29 pm »
If we calculate Q from the S11,  the minimum I measured was -1.25dB.   This works out to -0.58dB.  Using the cursors, to find the delta, 718k.  With a center of 13.57MHz, we get a Q of 18.9.   

That covers all their math. 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1990 on: April 16, 2022, 05:04:50 pm »
Re: Experiment
Wow. I've got a lot of catching up to do. Your B-field sensors sound very cool.  I want to study on that.

I've been sorting out control of the transfer relay.  I've got the rts to control a relay to control switching current for the transco. Used off-the-shelf relay with 3V input.  Relay draws .26W, so using external 3V to power the switch(might tap the 5V coming from FTDI).
Not sure what to do with the cts lead coming off the FTDI. It always stays at 3V, is connected to nothing.  Program gives the XferRly err light as soon as vna links.  Port switching signals/operation work correctly during 2-port calibration. What do I need to do to get rid of the error light?
Thanks.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1991 on: April 16, 2022, 05:57:25 pm »
Re:  I wish there were a way to entice you to document the features.

...
Not sure what to do with the cts lead coming off the FTDI. It always stays at 3V, is connected to nothing.  Program gives the XferRly err light as soon as vna links.  Port switching signals/operation work correctly during 2-port calibration. What do I need to do to get rid of the error light?
...

You have just demonstrated why I will no longer invest time on documentation.   Read the following from the published documentation, or not.

Quote
The transfer relay is controlled by the state of the RTS pin.  When RTS is de-asserted, Port 1 and 2 of the VNA will route to Ports 1  and 2 of the transfer relay.  When RTS is asserted, Port 1 and 2 of the VNA will route to Ports 2  and 1 of the transfer relay.   The software expects the transfer relay to always assert the CTS pin or it will set the transfer relay error (XferRly Err).

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1992 on: April 16, 2022, 06:37:44 pm »
Re: cts
I've printed out that section and read it many times.  I've never used this before, and apparently don't understand w.re.to "asserting". I see the rts change from 3 to 0V, which I assumed was the meaning of (de)asserting. As stated,  the cts lead from the FTDI plug stays at 3V, so why does error light come on since program expects it to stay at 3V??

Re: Averaging
You so quickly go from being helpful to being derisive.  I know what averaging is.  Linear averaging weights all n samples equally.  I was asking if you had considered the exponential scheme which weights the newer samples more than the older in the n sample calculation.
« Last Edit: April 16, 2022, 06:49:07 pm by jspencerg »
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1993 on: April 16, 2022, 06:46:53 pm »
Re: Checking PIN diodes
This wireless method was what Copper Mountain discussed,  but did not use in their experiment.  Thanks for showing actual application of wireless measuring.  So many questions:
What is point of break in coaxial sheath?  Was break location by trial or by principle?
I'll have to study on coupling before I can appreciate other details.  Thanks for showing results from both programs.
« Last Edit: April 16, 2022, 06:48:34 pm by jspencerg »
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1994 on: April 16, 2022, 07:04:20 pm »
Re: Copper mntn exp
Thanks for posting graphs used to pick data.  That's how I imagined it. Demonstration very helpful.
I've seen video of dip meter use.  IMHO, the old analog instruments got amazingly good measurements.  An instructive elegance in seeing how the results were produced without digital magic.
Read some and perused most of old manual on potentiometer design principles after using some 50+year old wire-wound models I salvaged.   They figured how to design and use the devices to full effect before advent of (more) active control. Solid engineering.
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1995 on: April 16, 2022, 07:48:04 pm »
Re: FIR smoothing
How many terms does the filter use?  Please specify algorithm,  ie Hanning, after Tompkins&Webster, etc.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1996 on: April 16, 2022, 07:58:20 pm »
Re: why does error light come on since program expects it to stay at 3V??

Your suggestion that it expects 3V is something YOU came up with.   Read it again then read the FTDI manual. 

https://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf 


Re:  being derisive
I'll take care of it.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11814
  • Country: us
Re: NanoVNA Custom Software
« Reply #1997 on: April 16, 2022, 09:27:04 pm »
...
For this demo I soldered a resonator consisting of a 39pf C and a few uH L, resonating at aprox. 37.6 MHz
Both methods (graphical and gruopdelay) are practically showing same results:  Q= 37570/250 = 150 and Q =152
The 2nd method is faster, but is not working well for low Q factors, when the groupdelay is getting "noisy".
Of corse the results also depend on the loading effect..

For fun attempting to replicate your test except following the paper.   I am using a 39pF ATC capacitor.   Your couple of uH makes no sense with the 37.6MHz.   Looks like we need something around 450nH.  I cut one that measures 509nH.   Whole setup seems to resonate around 35MHz.  Close enough.

Calibrated the Lite around the peak (34.57MHz) with a 1MHz span.   Delta at -3dB is 167.5kHz or a Q of 206.   

Looking at the group delay, I  get roughly 2us or a Q of 217.   

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #1998 on: April 16, 2022, 11:05:36 pm »
Yes, if you mean (any) resonance-finding experiment.

The nanovna 2 excels at this kind of measurement. However its not a "grid dip meter" obviously that is based on ancient technology. But the effect is the same and it has the potential to be much more precise. (if you adjust the stimulus parameters to give you high detail in the range you want to look at.

(The graphs I get when using it thethered - via USB are gorgeous.)

It certainly will show you what frequency any combination of components resonates at. (If it does resonate at any frequency)

The picture of the experiment shows the input and output used to test the resonance as simple short wire probes. In the real world one could couple the RF into the DUT in a great many ways, each having their unique qualities. Yes, one would measure the Q of any kind of filter in that way. Coupling to things like coals with a small loop or similar (choosing the length to be a good impedance match) is what I would expect to work best.
A "shielded loop" of semi-rigid coax is a common inductive RF probe, quite useful for such measurements.


This would be a cool experiment.  Could this be done with the nanovna's?
https://coppermountaintech.com/determining-resonator-q-factor-from-return-loss-measurement-alone/
« Last Edit: April 17, 2022, 12:23:19 am by cdev »
"What the large print giveth, the small print taketh away."
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1999 on: April 16, 2022, 11:23:00 pm »
Re: FTDI datasheet
I've had that and read it.  Just reread relevant section.  I'm not getting any clues.  It's not a manual.  I've referenced some ttl documents in trying to understand your manual. I totally lack experience and context about these signals.  I'd appreciate some elementary explanation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf