Author Topic: NanoVNA Custom Software  (Read 315451 times)

0 Members and 2 Guests are viewing this topic.

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2000 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 #2001 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 #2002 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 joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2003 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 »
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 
The following users thanked this post: jspencerg

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2004 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 joeqsmith

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


How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 
The following users thanked this post: jspencerg

Offline cyp_eev

  • Contributor
  • Posts: 16
  • Country: de
Re: NanoVNA Custom Software
« Reply #2006 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 joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2007 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. 
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2008 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. 
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2009 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. 
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2010 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 joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2011 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).
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 
The following users thanked this post: cdev

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2012 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 #2013 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 #2014 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 #2015 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 joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2016 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.
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2017 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.   
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #2018 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 #2019 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.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #2020 on: April 16, 2022, 11:50:46 pm »
Is this a DPDT RF relay like the one described in QXP (the arrl experimenters magazine whose name I might be getting wrong), in or around 2009?

It allows automating the insertion or reversal of the two ports on a two port only VNA.

I am guessing the FTDI chip is likely acting as an arduino running firmata might operate and give you a means to toggle pins via USB in a manner that offers some isolation for and protection of a PC?

Using any of a bunch of different programming languages or scripting you can toggle pins programatically. No relay required but the loss is around 1 db and the response might not be as flat as the little Omron relays.

Still Very useful for doing things like providing RF switches with various short binary codes, for example, my ebay "octopod" sp8T RF switch which activates any of 8 ports depending on what binary numbers are provided by means of cmos compatible voltage on three pins. Very useful.

I hope to use this with a homemade adcock antenna to do RDF at some point soon. Need to make an 8 or 4 antenna antenna for this.

Does anybody else what to also do this with me?

I can find the QEX article about the relay, I have it somewhere, even printed it out because it looked so useful.
"What the large print giveth, the small print taketh away."
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #2021 on: April 17, 2022, 12:05:19 am »
Last time you referred to blue jacketed coax while the smaller stuff I saw was white. I'm thinking it was the rg188(from comparing spec's), but that does not seem right.  Because:  I have some rg316 with similar specified bend radius limit as the rg188. It seemed,  from watching video and comparing myself,  that the white coax you were wrapping was more flexible than rmin=.5".
So,  the rg188 is smallest you use?
Trivial stuff for you, but all new to me.
I am aquiring supplies to make transfer relay connections using rg400u
Thanks for the details.

i have two kinds, one is blue and it and the grey stuff i have came to me on pigtails purchased on ebay with u.fl connectors already on them. The coax seems too small for any of the sma connectors that I have too. Its very thin coax. Almost certainly teflon jacketed. Its sold for people to make their own 5GHz wifi antennas for FPV drones, etc. You can buy them in quantity and they are cheap and better made than I could ever make them. Soldering that small stuff is a skill that I don't have and will probably never have.

Also, this might be useful on what CTS and DTR are and when they might be used (i.e "asserted", present..) https://en.wikipedia.org/wiki/Flow_control_(data)#Hardware_flow_control
« Last Edit: April 17, 2022, 12:27:10 am by cdev »
"What the large print giveth, the small print taketh away."
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 9632
  • Country: us
Re: NanoVNA Custom Software
« Reply #2022 on: April 17, 2022, 12:13:11 am »
Re: being derisive vs elementary explanations

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.

It seems you found my simple math average was too elementary and that I was ridiculing you.  Enough so you felt the need to call me out for it.   Let's see if I answer your question in a way that makes sense but not so derisive.    It's a binary system.  You only have two states.  Even my sister, who has no clue about electronics, would know if I tossed a coin and it didn't come up heads, what it did come up with.  Actually she is smart enough I bet she could guess and get it 50% much of the time.    So let's see, it's not 3V.  What could it possibly be?  I mean do you actually need someone to point it out?  For the datasheet, what could that CTS# possibly mean on the TTL side...

Now that's derisive.   
How electrically robust is your meter?? https://www.youtube.com/channel/UCsK99WXk9VhcghnAauTBsbg
Software, documentation and test reports for the low cost NanoVNA, V2+4 and LiteVNA may be found here:
https://github.com/joeqsmith
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2023 on: April 17, 2022, 12:15:07 am »
Re: FTDI for relay activation
Hello, I'm using the ftdi cable referenced in Joe's software manual which is
https://www.amazon.com/gp/aw/d/B08BLKCXL4?psc=1&ref=ppx_pop_mob_b_asin_image

Joe's reference to its use is contained in his attached quote(partially in red)

The cts use is supposed to be simple. The crux: I've got that 3V cts wire loose, not telling program that expected hardware(transfer relay) is connected. The rts is successfully toggling 3->0->3V as needed to initiate port switching.  I want to get rid of the error light in the program.
Thanks.
 

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #2024 on: April 17, 2022, 12:29:04 am »
Joe,
I didn't ask what averaging was.  I asked if you used linear averaging and asked if you had considered exponential averaging.  You responded with a video explanation of how to average a list of numbers.

Once again,  my inability to figure out your manual is met with the assumption that I had not read it. It feels like you harshly decide when a question is not worthy and ademently refuse to add any extra explanation to what you've written in your manual.
I'm trying to figure out your instructions using a circuit device and protocol I've never used before.
Does it seem like I'm not making an effort or did my entreaty to you about documenting your program just piss you off?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf