Author Topic: NanoVNA Custom Software  (Read 527033 times)

0 Members and 14 Guests are viewing this topic.

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1250 on: August 30, 2021, 08:26:35 am »
Sample rate 200 Hz puts my radar heartbeat recording into a healthy corner,  at about 120 beats per min showing my excitement about the radar working (I started getting worried, if it was a 500 Hz sample rate I may have needed intensive care :-DD)
« Last Edit: August 30, 2021, 08:51:58 am by ALW »
 
The following users thanked this post: joeqsmith

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1251 on: August 30, 2021, 09:19:41 am »
your stepped switch interval was very helpful. I marked the switch event row number and did the math (see attached table). The sampling rate of the NanoV2+4 FW is 200 Hz, which I was also told in https://groups.io/g/NanoVNAV2/messages?expanded=1&msgnum=2336

Your 100 Hz switch shows 2 points up, 2 down, also in agreement with a 200 Hz sampling rate. With the 500 Hz switching you are switching faster than recording, showing some harmonic of the two rates I guess.

The tx behavior you see with the spectrum analyzer is a different chapter IMHO.

Thanks!

It's certainly possible it's aliasing the crap out of it at 500.     

100Hz is a period of 0.010 seconds.  2 points per level or 4 points per period.   10ms / 4 is 2.5ms per sample, or 400Hz (1 / 2.5ms).  Not 200. 

Also, the 400 samples per second called out in the manual makes no sense with a 200Hz sample rate. 

When you ask a question on the internet, be careful about what you are asking and who you are asking.  Like an under sampled system, it's very easy to be led astray.

***
Knowing its 4 points per period, you know its 4 X 100Hz, or 400Hz. 
« Last Edit: August 30, 2021, 09:50:17 am by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1252 on: August 30, 2021, 09:21:24 am »
Let me know what you think about that color selection.  Try all the various modes.  If you think it would be helpful, I may add it to the software for the original.

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1253 on: August 30, 2021, 09:22:38 am »
In your stepped switching expt you switched at 100 mHz meaning your switching interval (event to event, no matter if up or down) was 10 s initially, then 5 s, then 3 1/3 s and so on, correct?

Yes, I love your font color indicator. Now I would have known right away what mode I am in right now, would have steepened my learning curve of your SW massively :-) . Another thought I had: one could simply change all the numbers according to the last defining input. E.g. CWmode: fmax=fmin=fcenter, span = 0. Max/Min mode: Fcenter=(fmax+fmin)/2, span = fmax-fmin etc.


« Last Edit: August 30, 2021, 09:33:51 am by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1254 on: August 30, 2021, 09:27:12 am »
In your stepped switching expt you switched at 100 mHz meaning your switching interval (event to event, no matter if up or down) was 10 s initially, then 5 s, then 3 1/3 s and so on, correct?

I think so but don't quote me on it.  Was more just to give you some idea what could be done if you wanted to try and collect some data this way.  There may not even be enough data to make heads or tails out of it.   I didn't get any feedback from you, so I forged ahead with the fixed rates. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1255 on: August 30, 2021, 09:32:37 am »
Yes, I love your font color indicator. Now I would have known right away what mode I am in right now, would have steepened my learning curve of your SW massively :-) . Another thought I had: one could simply change all the numbers according to the last defining input. E.g. CWmode: fMax=fmin, span = 0.

Not a fan of having the software overwrite the controls.  Random button pushers will end up having to reenter their settings often.

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1256 on: August 30, 2021, 09:43:15 am »
Getting your point, but I guess we are coming from different worlds in this regard. In the medical device industry we are trying to make a user interface as intuitive and foolproof as possible. We need to take the buttonpushers (and worse) along. The insulin pump must be also usable by grandma... Big companies have entire usability departments dedicated to this.

Here, I believe it is just 3 different ways to enter the same parameters in the end. Those parameters are interdependent, and it would be more logic and intuitive if the entries would reflect those dependencies IMHO.

But, having said that, grandma will probably not use the VNA...
« Last Edit: August 30, 2021, 09:49:02 am by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1257 on: August 30, 2021, 11:55:02 am »
Getting your point, but I guess we are coming from different worlds in this regard. In the medical device industry we are trying to make a user interface as intuitive and foolproof as possible. We need to take the buttonpushers (and worse) along. The insulin pump must be also usable by grandma... Big companies have entire usability departments dedicated to this.

Here, I believe it is just 3 different ways to enter the same parameters in the end. Those parameters are interdependent, and it would be more logic and intuitive if the entries would reflect those dependencies IMHO.

But, having said that, grandma will probably not use the VNA...

For my software, there is no big company or usability department.  It's a home project intended to be used by engineers (EEs) starting out in RF.  Of course, there are the radio hobbyists who write me about their troubles trying to read their SWR before they enter their next contest (advancing the art).  They are an aging group and I am sure include some grandmas as well.    :-DD 

In my case, there is no "need" to support anyone as there are no customers.   There's no business, no profits and a fair amount of lost time.   It's a hobby.    Comparing it to any business in any sector makes no sense.   

If you read the manual for the V2Plus4, to set the sweep range you  have a Start and Step frequency.  That's it.  Yes, CW, start/stop, center/span all get converted into these two numbers.   Yes, the UI could just present these two numbers and be done with it.   The software also supports a handful of VNAs.   Each is unique in how they are controlled but I could convert them to use the start and step.   To be clear, I could but won't. 

UIs are a very subjective topic.  MBAs love this stuff because it's not requiring any technical skills.  Everyone will have an opinion about how it should work, look, scale.....   Personally, I see it as a black hole and for a home project, it's not my area of interest.   One more reason I use LabView.... 

That said, I have not bought test equipment because the company appeared to hire all new staff with new managers and failed to look at all of their previous products and how they worked.  The new groups are made up of only the best people and have great new ideas.  They want to show the right way to do it because the old way is just old.    So, I fully agree when it comes to a real company, they better have there act together.

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1258 on: August 30, 2021, 02:40:16 pm »
You were right. I did my "pendulum" experiment with a slowly swinging iron suspended from the ceiling with a 1m chord as radar reflector. The graph shows the S21 phase in red, the analysis of video of the swing of the iron (using a program called kinovea) in blue. So the time base for the blue curve is the video frame rate of 30 fps. Result: The sampling rate of the NanoV2+4 is 400 Hz at 2.4 GHz CW with 101 points per "sweep", as advertised in the manual.
(The superimposed swing in the radar phase comes from a circular swinging movement of the iron, the blue curve shows only 1D)

So I guess in your stepped interval expt switching frequency was referencing to a full switching period (on/off).
« Last Edit: August 30, 2021, 03:03:18 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1259 on: August 30, 2021, 03:23:03 pm »
Glad that things are starting to make some sense. 

Quote
So I guess in your stepped interval expt switching frequency was referencing to a full switching period (on/off).

100Hz is a period of 10ms.  It's a 50% duty cycle, so for 5ms the switch is on and 5ms its off.   Think of it as a single pole single throw switch across port 1&2.   System was not calibrated as we are interested in time. 

It will be interesting to see how people will  feel about you suggesting you are pointing a microwave radar system at them.   :-DD  Will suggesting it's -20dB have any effect?  Of course the same people who claim you caused all their heath problems, will jump on their cell phones for hours at a time with their wireless ear buds plugged in.   :-DD

****
Once you are certain of your findings, you may want to reply in the groups.io.   It may help prevent spreading misinformation.   
« Last Edit: August 30, 2021, 03:26:37 pm by joeqsmith »
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1260 on: August 30, 2021, 03:34:00 pm »
It is medically totally innocent. First, the only effect a cm wave has on the body is heating. The power used here is less than Wifi, BT etc., and heating is not measurable. Sitting in the sun is way worse in this respect. 2nd, as you can see, the waves are totally reflected at the conductive skin surface.

There were however some nasty accidents in the early times of radar (40s) when workers were doing stuff on the roof in front of active kW antennas at lower freqs where reflection is incomplete. They were effectively fried, and because humans have no temp sense inside the body they did not notice until some hours later when it was too late...
« Last Edit: August 30, 2021, 03:42:54 pm by ALW »
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1261 on: August 30, 2021, 03:56:31 pm »
****
Once you are certain of your findings, you may want to reply in the groups.io.   It may help prevent spreading misinformation.   
Good point. Done.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1262 on: August 30, 2021, 07:00:25 pm »
You should be putting together a little video showing your efforts. 

***
Quote
I did my "pendulum" experiment with a slowly swinging iron suspended from the ceiling with a 1m chord as radar reflector.
We can then see your soldering iron, clothes iron, golf iron..... hanging from the ceiling and swaying.     
« Last Edit: August 31, 2021, 12:05:49 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1263 on: August 30, 2021, 09:43:18 pm »
I have released 2.06 for the original NanoVNA which included the units case corrections and colored fonts for the range selected.   Again, minimal testing was done on this version.

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1264 on: August 31, 2021, 01:50:14 pm »
A bit more detail on the slow pendulum radar experiment with the Nano2+4 at CW 2.4GHz:
Centered IQ by nulling the DC, then unwrapping the atan2 phase with 2pi. The nano seems quite stable in frequency and phase, pretty low noise (Wifi was on!), and is drawing nice circles. Unfiltered complex S21 polar over 15 s below.
Then horizontal displacement taken from video in blue (not taken simultaneously) and the 10Hz filtered phase in red. Video rate was 30fps, sampling rate of the Nano is 400 Hz.
Last unfiltered S21 phase (now unwrapped and quadrature corrected).
« Last Edit: August 31, 2021, 01:57:42 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1265 on: August 31, 2021, 02:23:57 pm »
What is the target you are using and can you explain the video?   

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1266 on: August 31, 2021, 02:57:23 pm »
Target is an old iron appr. 1kg, swinging/suspended from the ceiling with appr. 1 m chord. Amplitude appr. 4 cm. The 1st image is a still from the video, the lower corner was marked and tracked in kinovea to record it's horizontal movement.

The iron is reflecting the radar beam from a Vivaldi antenna connected to port 1 visible in the 2nd image upper right corner. Reception of reflected signal with a stub dipole connected to port 2.
« Last Edit: August 31, 2021, 02:58:58 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1267 on: August 31, 2021, 03:48:40 pm »
Quote
....video frame rate of 30 fps...

And how does the camera with it's 30fps fit in?   How do you get the signal off of it?

***
Hey, you have that new software loaded and running! 
« Last Edit: August 31, 2021, 04:04:34 pm by joeqsmith »
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1268 on: August 31, 2021, 04:30:46 pm »
Its done with a software called Kinovea, normally used by sports physiologists to track the movement of joints and arms/ legs in video: https://www.kinovea.org/

You can place a marker on a feature in the video and it will track that corner / contour and create a displacement/time diagram. Cool software, I (ab)used it for tuning the suspension of my motorbike  :-DD
This type of image analysis is btw based on IFFT of the image to get into the space domain.

Thats how I created the blue curve. The horizontal displacement is in pixels per second, but I do not care about the amplitude of the movement, only about the time base which is now the frame rate of the phone camera. Amplitude I have already in the phase shift of S21, which is appr. 6.2 cm (half wavelength) for 360° shift because the beam goes forth and back.

Of course I have your SW running, couldn't do all this without it!
« Last Edit: August 31, 2021, 05:03:14 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1269 on: August 31, 2021, 08:29:24 pm »
I just assumed that was your math library.  That is some very slick software and now I can see I have one more thing to look into. 

You still ride a motorbike?  I have a bit of a 2-wheel addiction myself.   They can be a lot of fun. 



Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1270 on: August 31, 2021, 08:35:41 pm »
Yup
 

Offline ALW

  • Contributor
  • Posts: 33
  • Country: fr
Re: NanoVNA Custom Software
« Reply #1271 on: August 31, 2021, 09:05:17 pm »
It has a lot of character. When you open the throttle she is tilting to the side for the inertia of the longitudinal crankshaft  ;D  Becomes second nature after a while to steer this out... I love them naked and air-cooled, and I love torque in the low revs.
Yours is a real hotrod!
As long as we are playing with bikes and waves, we are alive... Toys tend to get more complex with age
« Last Edit: August 31, 2021, 09:24:50 pm by ALW »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1272 on: September 01, 2021, 12:35:02 am »
A good transfer relay may set you back more than $500 so I can understand trying to find cheaper alternatives.  Attached are two circuits.   

Circuit 1 uses a DPDT coaxial switch and a couple of tees.   
Circuit 2, my personal favorite, uses two VNAs with a couple of tees.

Assuming that the goal is to work within the full frequency range of the NanoVNA and no loss of performance,  how many potential problems can you identify?

***
For a more details
https://nanorfe.com/forum/T-Check-with-LabView-NanoVNA.html
DPDT switch being proposed for circuit 1
https://www.rfparts.com/72-2-p.html

For circuit 1 we are talking about a manual switch.  Without major modifications, it would be difficult to automate.   I had seen a video with a guy hooking up an actual transfer relay to a NanoVNA but they also had no way to control or calibrate it.   My old 8754As test set has two buttons on the front to select the direction which I am sure many people used back then.  My software will control a transfer relay and allow you to calibrate with one in the signal path but there are no provisions for a manually controlled one.   Someone would need to add support to the open sourced projects.  While having to manually change the state may not be the most effective way to work,  it doesn't really degrade the performance.    So, no points given for that one. 

***
Additional points awarded for coming up with your own circuit.   Swapping the cables is a negative points.
« Last Edit: September 01, 2021, 11:52:35 am by joeqsmith »
 

Offline jimlux

  • Newbie
  • Posts: 1
  • Country: us
Re: NanoVNA Custom Software
« Reply #1273 on: September 01, 2021, 07:29:00 pm »
Two Ts will work, but really, what you probably want is either a 50 ohm resistor in series with each port, or a 2 way divider. That way, the impedances presented to the UUT will be 50 ohms (not 25 ohms).  The 25 ohms would calibrate out, but some UUTs (amplifiers) may not like the mismatch.
I'm experimenting with this right now.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11758
  • Country: us
Re: NanoVNA Custom Software
« Reply #1274 on: September 01, 2021, 11:57:10 pm »
Two Ts will work, but really, what you probably want is either a 50 ohm resistor in series with each port, or a 2 way divider. That way, the impedances presented to the UUT will be 50 ohms (not 25 ohms).  The 25 ohms would calibrate out, but some UUTs (amplifiers) may not like the mismatch.
I'm experimenting with this right now.

In this case we know "works" was defined by: 
Quote
No reason it won't work - at least to the performance of the NanoVNA.

With nothing more than Ts to couple the two VNAs, even with the added stubs, poor termination, 25 ohms, running the VNAs asynch,  the system will perform to the same level as using one VNA properly. 

There was an paper I came across that was talking about common problems beginners have with VNAs.  One of the most common problems was the beginner feels they can calibrate out every error.    :-DD   I remember thinking the person that wrote that paper had some pretty good stories to tell.   

As far as
Quote
what you probably want
, I went over that some time ago and wasn't able to come up with anything worth documenting.   This is why an actual transfer relay was used.   Sprinkling in a few 50 ohm resistors isn't something I would consider. 

The DPDT may be acceptable at low frequencies with the added unterminated stubs.   Even with the cables bent to their tightest radius, that stub makes zero sense to me and  I see no reason to take the hit in performance.   It may be perfectly fine for the person who posted it.   


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf