Author Topic: NanoVNA Custom Software  (Read 480311 times)

0 Members and 2 Guests are viewing this topic.

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27211
  • Country: nl
    • NCT Developments
Re: NanoVNA Custom Software
« Reply #1750 on: February 21, 2022, 01:29:04 pm »
The last time I played with it, we were working on using the VNA to measure a PDN.    Then again, if you are the typical radio hobbyist and just want to look at SWR, then you may be just fine.   It's free anyway so you're not out anything.   
My use for a VNA is more likely doing PDN measurements and looking at component behaviour at high frequencies. I already have a network analyser but that only goes to 300MHz which is just not high enough. As a test I measured an elliptic microstripline 1GHz low pass filter I designed / build a about a decade ago with my NanoVNA h4. The measurement shows the filter does something but it is nowhere near accurate (compared to the simulation and measurements -using a swept RF generator + spectrum analyser- I did back then). The noise floor on the NanoVNA h4 is not stellar.  So yes, the NanoVNA h4 is good to see if the impedance / SWR isn't much off and get some very coarse measurements on filters.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1751 on: February 21, 2022, 02:06:30 pm »
I don't recommend using the original NanoVNA or any derivatives above 300MHz.  The software/firmware can't overcome the limitations of the hardware.

To show the difference between the harmonic mode and the direct mode the V2Plus4 uses,  I had demonstrated a GHz interdigital filter and compared the data with my vintage Agilent PNA.   The same video also shows various hacked up circuits made from copper foil tape on FR4 to demonstrate the V2Plus4 working above 1GHz. 

Of course, these low cost VNAs are missing some key features.  I recently watched an YT video where a person was giving a training class on these low cost VNAs.   They talked about some of them having a sinewave drive which of course they don't.    They mentioned the possibility of problems when using a squarewave drive but provided no further details.  So I made a quick video showing one such potential problem.   

Of course there are many other missing features but for educational use, who cares.  They are very inexpensive.   With Dislord's efforts in developing the firmware for the LiteVNA, I would say that one in particular is the most flexible.  Once Dislord releases his latest firmware, I will most likely make a review for it. 
 
https://youtu.be/XaYBpPCo1qk?list=PLZSS2ajxhiQD2gftdurGQoyGpUM_HobNI&t=2732
 
The following users thanked this post: nctnico

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1752 on: February 22, 2022, 01:05:42 am »
Quote
You can calculate it from IF / Periods count for one AVG / AVG like this:
IF = 60k (for > 400kHz measures, at current firmware)
Periods count for one AVG = 15 (at current firmware)
RBW = 60k / (15 * AVG)
For AVG = 1, RBW = 4k
For AVG = 10, RBW = 60k / (15 * 10) = 400Hz

Quote
0xE0 - for Si5351 (< 140MHz range)
0xE1 - for MAX (>140MHz)

Are both E0 and E1 defaults 15?

For RBW is the switch point 400kHz or 140MHz? 
Is E1 then used above 400kHz and E0 <= 400kHz?

Is the 60kHz fixed or can divider be set as well? 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1753 on: February 22, 2022, 03:50:52 am »
E0 used for < 100MHz now (i move thie threshold to 100MHz, MAX2871 allow do this. This reduce generator mode change count in sweep)
E1 for >=100MHz

For < 400kHz used different IF (not 60k), used 12k
For < 20kHz used 6k IF

Default E0/E1 = 15

IF frequency depend from ADC samplerate, and used in DSP sin/cos table size and periods count in it.
IF can`t be any. MAX2871 generate F second MAX2871 generate F + IF, this must be very accurate. Generators not allow set any frequecncy, exist minimum step. This step additional depend from reference TCXO (24M at this moment).
Current step = 24M / 4000 = 6k
« Last Edit: February 22, 2022, 03:57:03 am by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1754 on: February 22, 2022, 04:10:41 am »
When you calculate RBW (IFBW?)  is everything below 100MHz using E0? 

So, < 20kHz
RBW=6k/(E0 * AVG)

20k - 400k
RBW=12k/(E0 * AVG)

400k - 100M
RBW=60k/(E0 * AVG)

> 100M
RBW=60k/(E1 * AVG)

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1755 on: February 22, 2022, 04:20:00 am »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1756 on: February 22, 2022, 01:38:18 pm »
I ask because you may find RBW is acronym mostly associated with spectrum analyzers.   For example:

https://coppermountaintech.com/optimizing-vna-measurement-speed/

I am trying to think about how you would tackle the filter from a user perspective.  I would expect for most VNAs, the user just sets the IFBW they want.  It's independent from frequency.  The software can set the sweep range which could cover all four bands you currently have defined.  It's not in control of E0,E1 & 40 real time during the sweep so it can't dynamically change them.   I also doubt the user will want to poke values into these registers after they calculate what filter they want.   The other problem I see is that you have not yet locked them down and I wonder when you release the firmware, if they would still be prone to changing.   This is why I asked about setting the divisor for the 6k-60kHz.  At least the software would have some control to keep it consistent.   

Maybe I'm not understanding it. 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1757 on: February 22, 2022, 03:23:40 pm »
Yes better name it as IFBW

register 0x40 (avg setting) present in all LiteVNA firmwares
registers E0/E1 also present in all, but better not use it, only if need very fast sweep (use only 0x40), i leave it for debug use in all fw
Power setting 0x41 and 0x42 registers also present in all firmwares (just fix apply in CW mode in last official fw)

0x44 - (S11 or S21 data select) added only in last beta, and i plan leave it for future use

PS It is quite difficult for me to operate with technological terms, English is not my native language
« Last Edit: February 22, 2022, 03:30:15 pm by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1758 on: February 22, 2022, 03:50:31 pm »
Google translate has made it a smaller world.  Without it, you and I would not be working together and that would be a shame.   

VNAs I have used IFBW is constant across the entire sweep range.   With Lite,  presented with a selection of four bands (maybe more depending on what you settle on) .  The data for the IFBW pull-down is populated when changing E0 and/or E1. 

I can hear the screams of the poor users now.  :-DD   Give it some thought. 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1759 on: February 22, 2022, 04:06:06 pm »
The low price of NanoVNA/V2/LiteVNA allowed many users to get it, and lowered the entry threshold. Many users with little skill have started to use the instrument and have many questions.

This little device has a lot of options available on professional devices, but there is no good description.
 
The following users thanked this post: realfran

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1760 on: February 22, 2022, 04:39:05 pm »
I suspect most users are CB and amateur radio hobbyist who were sold on it being an antenna analyzer.  It seems to be the one area that they generally still enjoy constructing their own.    Most features would never be utilized by that group and I suspect just further confuses them.   Most are going from a simple SWR meter and now placing the VNA in-line with their PA and antenna.   :-DD 

Using a PC can make it easier and more flexible.  It also provides a system with basically unlimited resources compared with the embedded system.  Still, there is only so much the software can do.  It's at the mercy of how the firmware is designed.

My experience based on feedback from users,  there is little benefit from investing in documentation.
 
The following users thanked this post: realfran

Offline jspencerg

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: NanoVNA Custom Software
« Reply #1761 on: February 22, 2022, 06:38:49 pm »
Hello,  I have realized the source of my confusion about the graphs showing crystal filters in different vna's. My ignorance and not paying attention.  Need I say more?

I appreciate getting to watch your conversation as you work on firmware and software to eke or as much performance as possible from the hardware.  I've always admired the concept of continual improvement.
I went ahead and bought the nanovna-h and the v2plus. I did my best to get instrument that were not clones and which ran in Dislord's firmware.  I appreciate things will change, but my hope is that your collaboration will see continued functionality with Joe's software (Does the program have a proper name?)
Joe,  perhaps the day will come when you have to specify the specific hardware and firmware which will be compatable with your program?  Maintaining and testing compatability with the variations is a job which you have not signed up for!
I know I'm ignorant, but I am learning.  I've decided to use program SimSmith and videos from WOQE along with a text to learn about Smith charts. I hope to understand and implement features of Joe's program in the future.  Joe's presentation and explanations of his experiments are helpful and inspire me to better understand.
Thank you Joe and Dislord for your work and for sharing the process.
 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1762 on: February 22, 2022, 08:18:17 pm »
Stand-alone device portability is useful making the habit of (mobile phone gadget)
"
Quote
Using a PC can make it easier and more flexible.  It also provides a system with basically unlimited resources compared with the embedded system.  Still, there is only so much the software can do.  It's at the mercy of how the firmware is designed.

Using the PC resource can make one powerful software to use with this low-cost VNA.
Personally, I learned much and want to learn more to use the VNA, not only one gadget but like a real instrument (with is on limitation).
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1763 on: February 23, 2022, 03:24:02 am »
Quote
...proper name
I've never given it any thought.  They are typically named after the instruments they support.   HP3589A.EXE for example.  Let me know if you have something in mind.   

Quote
I went ahead and bought the nanovna-h and the v2plus.
I have no plans to further support the older units and many of the new features we are discussing here are only supported by the Lite.   

Quote
..want to learn more..
I've been reading "The VNA Applications Handbook".  The first couple of chapters are available free on-line.  It covers many of the basics.  You may want to have a look. 

Lite with firmware avg set to 10 and 20, with common mode transformer and 100uohm resistor attached.   Compared with the original NanoVNA.  Don't ask how long the Lite took to run those sweeps.


Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1764 on: February 24, 2022, 05:45:38 pm »
I'm computer illiterate hope  someone gives one simple way to get the possibility and freedom to install the Dislord firmware or other on the NanoVNA 2V plus4  :box: :-+
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1765 on: February 24, 2022, 05:55:00 pm »
Really odd problem with Flipper's Lite.   We are not sure if it came this way or if this is a problem that has happened over time. 

We were testing with nothing attached to the Lite, except the end caps.   We had programmed in your latest test firmware and looking at the noise of S21 in the 9KHz to 1MHz range.    There is a 20dB step in the noise at 400kHz where it jumps from 80dB to 60dB.   There is no calibrations applied.  We rolled it back to the last released firmware and it had no effect.   If we change the sweep range to 1M to 100M, its roughly 60dB.

If we run it standalone disconnected from the PC, S21 drops to 80dB.  Plugging in the USB cable (but not running any software), it jumps back up to 60dB with the step at 400kHz.   

***
We tried different ports on the PC as well as used a powered hub and different cables, no effect. 

Taking the unit apart, it appears the same as my Lite.   We removed the battery and ran it from the PC, noise still present.   Totally different from how mine behaves.
***
We tried a few different PCs, again no effect.  Shown also is sweeping Flipper's from 1M to 100MHz.

For comparison, my Lite is shown in J1&2.  The USB port on mine seems to have no effect.     



   
« Last Edit: February 24, 2022, 11:46:41 pm by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1766 on: February 24, 2022, 11:52:01 pm »
If I run 50 averages on mine, we can see the switch point at 400kHz but mine actually decreases rather than increases like Flippers.


Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #1767 on: February 25, 2022, 02:20:24 am »
By default Ive gotten in the habit of leaving ferrite beads on both pigtails and the USB on my nanovna2. Having an RTLSDR made me strange that way.. lol

Really odd problem with Flipper's Lite.   We are not sure if it came this way or if this is a problem that has happened over time. 

We were testing with nothing attached to the Lite, except the end caps.   We had programmed in your latest test firmware and looking at the noise of S21 in the 9KHz to 1MHz range.    There is a 20dB step in the noise at 400kHz where it jumps from 80dB to 60dB.   There is no calibrations applied.  We rolled it back to the last released firmware and it had no effect.   If we change the sweep range to 1M to 100M, its roughly 60dB.

If we run it standalone disconnected from the PC, S21 drops to 80dB.  Plugging in the USB cable (but not running any software), it jumps back up to 60dB with the step at 400kHz.   

***
We tried different ports on the PC as well as used a powered hub and different cables, no effect. 

Taking the unit apart, it appears the same as my Lite.   We removed the battery and ran it from the PC, noise still present.   Totally different from how mine behaves.
***
We tried a few different PCs, again no effect.  Shown also is sweeping Flipper's from 1M to 100MHz.

For comparison, my Lite is shown in J1&2.  The USB port on mine seems to have no effect.     



 
"What the large print giveth, the small print taketh away."
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1768 on: February 25, 2022, 02:59:46 am »
I suspect this problem is similar to what I see with my V2Plus4.   I suspect it uses a SMPS when running off the USB and this is the source of the noise.  Sadly the schematics do not appear available.    I can use the USB interface with the V2Plus4 without any problems as long as I don't power off it.    Even using a linear supply or batteries will not help.  The noise source is internal to the V2Plus4.   Still, I had Flipper purchase some very lossy cores but doubt it will have any effect.  He has another Lite on order in hopes of getting a good one.    I'll post an update once we have more information.

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: NanoVNA Custom Software
« Reply #1769 on: February 25, 2022, 03:15:51 am »
I have a habit from way back of using a .22 or .33 yellow tantalum capacitor across the USB rails. (used to be common in cheap phone handsets) Not so large that the current draw will cause USB enumeration to glitch but significantly smooths out the DC power. Have never seen any problems from doing this with those low value tants. The original maker of the first nanovna also recommends doing this with USB devices.. (this wasnt referring to nanovna though.. He just, like I always does this.
"What the large print giveth, the small print taketh away."
 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1770 on: February 25, 2022, 03:36:50 am »
On 400k threshold for switch IF from 12k to 60k

You see power source noise as on V2Plus4.

Hugen post this reccomendation
https://groups.io/g/liteVNA/topic/reduced_interference_from_usb/89382728
« Last Edit: February 25, 2022, 05:09:22 am by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1771 on: February 25, 2022, 01:08:00 pm »
Quote
Since LiteVNA is designed to work without a battery installed, it switches to using USB power directly when connected to USB power. When working with the USB power supply, the voltage of the input DC-DC boost power supply is very close to the voltage of the output, resulting in a very narrow PWM pulse bandwidth of the switching power supply, and these pulses may enter the IF, resulting in a large measurement noise.

Without the schematics, I wonder what the proposed changes do.   It seems to claim the voltage is too high when running from USB.  Once the changes are in place, will the battery still charge?  Will the charger circuit provide enough power to keep the battery charged when running extended times?   Why are two VNAs bought at the same time from the same company behaving so different?   Bad design?   I'm surprised designers wouldn't consider the the worse case as seen in the second link as this problem basically renders the VNA useless.   At $130, it's a coin toss so far pr 50:50 chance if it will work or not.   Not great odds.  I'll let you know how Flippers second Lite behaves.         

https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg3891083/#msg3891083
https://www.eevblog.com/forum/rf-microwave/nanovna-custom-software/msg3891791/#msg3891791
 

Offline Alextsu

  • Contributor
  • Posts: 42
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1772 on: February 25, 2022, 01:22:18 pm »
If variable PWM noise spectrum is the cause, it's quite possible to have this problem arise occasionally, depending on the current state of battery charge )
 

Offline realfran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: gb
Re: NanoVNA Custom Software
« Reply #1773 on: February 25, 2022, 02:42:53 pm »
This I get with my LiteVNA
« Last Edit: February 25, 2022, 02:47:22 pm by realfran »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11899
  • Country: us
Re: NanoVNA Custom Software
« Reply #1774 on: February 25, 2022, 05:08:19 pm »
I had Flipper take a powered hub and replace it's external fixed 5V supply with his bench supply.   We then ran it down at 4.5V.   Sure enough, the Lite's noise drops to normal.  We then tried averaging 50 samples and see the same drop in noise at 400kHz that I see with mine.   Finally, we increased the supply voltage and the noise level goes up. 

So, this is certainly the issue with the Lite's design.   For now, Flipper will just use a diode to drop the hubs voltage.   Hub + Lite was drawing less 380mA.   We will wait for the second one to arrive.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf