Author Topic: NanoVNA Custom Software  (Read 524736 times)

0 Members and 8 Guests are viewing this topic.

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1075 on: June 10, 2021, 04:12:58 am »
on 12k you see IF (On original fw used 6k IF), also my fw allow work from 800Hz (but yes you get some errors near IF harmonic), for less 15k better use less then 1000 Hz bandwidth

Also try use less bw settings (you can change it in device (DISPLAY->BANDWIDTH) or use console command 'bandwidth 100 Hz' there can be any up to 4000)

Calibration also better done in 100 Hz or less bandwidth settings (allow get more clean result), less bandwidth - need more time for measure
« Last Edit: June 10, 2021, 04:16:29 am by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1076 on: June 10, 2021, 11:46:21 am »
on 12k you see IF (On original fw used 6k IF), also my fw allow work from 800Hz (but yes you get some errors near IF harmonic), for less 15k better use less then 1000 Hz bandwidth

Also try use less bw settings (you can change it in device (DISPLAY->BANDWIDTH) or use console command 'bandwidth 100 Hz' there can be any up to 4000)

Calibration also better done in 100 Hz or less bandwidth settings (allow get more clean result), less bandwidth - need more time for measure

I would have expected the firmware to default to being backward compatible and at least provide similar performance.   Normally, I would never use the display or touch pad.  It's certainly possible to support commands that are added to the firmware.  So far,  I have not found any advantage to them and the lack of detailed documentation is always a good deterrent.  I would rather that the firmware just send up reliable raw data.   The PC has slight advantage in computational horse power.       

1.0.38 seems to default at 1000Hz.   Per your suggestion, I repeated the same test using lower values. 

1) shows both 30Hz and 100Hz datasets.   
2) same as 1 but with the 1KHz dataset added.

I have also included the old hardware with the year old firmware.  The purple trace is the one we are interested in which is just the LC circuit.   
« Last Edit: June 10, 2021, 11:50:48 am by joeqsmith »
 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1077 on: June 10, 2021, 04:27:58 pm »
How you receive data from device? (command usage)
sweep start stop points
data 0
data 1

or

scan start stop points mask
mask - data receive mask:
0x01 - need frequency
0x02 - need data 0 (S11)
0x04 - need data 1 (S21)
0x08 - disable calibration for data
example usage - need receive 101 uncalibrated points (freq + S11 + S21) from 1MHz to 10MHz:

scan 1000000 10000000 101 15
or
scan 1000000 10000000 101 0b1111

In this case get list of data
freq s11_real s11_imag s21_real s21_imag
Example of answer:
09.143 tx: scan 1000000 10000000 101 15
09.146 rx: scan 1000000 10000000 101 15
09.460 rx: 1000000 0.093020952 -0.000852031 -0.000012151 0.000000849
09.464 rx: 1090000 0.092999120 -0.000905091 -0.000010828 0.000009627
.........

PS soon i allow get unlimited points count for this command
PSS 12k IF better for higher frequency, i try usage dynamic IF select for low freq range (800Hz to 15kHz), for reduce IF error
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1078 on: June 10, 2021, 05:16:32 pm »
During setup I use the following:
sweep start i32 CRLF
sweep stop i32 CRLF

For data collection I use a combination of:
data 0 CRLF
data 1 CRLF
depending what I am measuring.  In the above example, only the data 1 CRLF is used. 

The number of points was always fixed at 101.  My software (for the original NanoVNA) has no provisions to change it.   

I also issue the info command on connection but I believe that's the only other command I currently use.  As long as the firmware supports these and functionally they are kept backwards compatible, my software should work. 

If the protocol is drastically different, I create a new top level and interface layer.  Normally the hardware is different enough that it makes sense to just start over with a clean slate. 

For my normal uses, the 101 data points is fine.  The only reason I came up with that segmented sweep was to demonstrate making a  blackbox model of a crystal for SPICE. 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1079 on: June 10, 2021, 05:43:50 pm »
sweep command not made real swep, it used for set start stop range on device
data command return current data (so you receive wrong results)

You not correct receive data from device.

In all cases need use scan command - old format for receive data (all firmwares support it), remove 'sweep start' and 'sweep stop'
scan start stop CRLF
data 0 CRLF
data 1 CRLF

All fw from v0.7 support 'scan start stop point mask' in all cases  better use it, more faster and more correct
« Last Edit: June 10, 2021, 06:01:09 pm by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1080 on: June 10, 2021, 06:28:31 pm »
sweep command not made real swep, it used for set start stop range on device
data command return current data (so you receive wrong results)

I suspect this is a language problem.  I use the sweep to set the start and stop, which I referred to as setup.   I use the data command to return current data, which I refer to as data collection. 

I wouldn't call it wrong results but certainly when I use your firmware the results are poor.  It's easy enough to look at the VNAs screen and see that the sweep commands have taken effect. 

You not correct receive data from device.

In all cases need use scan command - old format for receive data (all firmwares support it), remove 'sweep start' and 'sweep stop'
scan start stop CRLF
data 0 CRLF
data 1 CRLF

All fw from v0.7 support 'scan start stop point mask' in all cases  better use it, more faster and more correct

There is no advantage for me to change the command set.  There is already firmware that works fine with the old hardware using the old protocol.  I say that but then you claim more faster.  Currently the update rate seems limited by how fast the Nano can sweep.  It could send ASCII or binary and it would not matter.  The PC has no problems keeping up.   So I am curious what this more faster really means.   I assume you have ran collected metrics on this.  Could you please post these results here?   If indeed it really is more faster than what I achieve with the old commands, I will have a look.     

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1081 on: June 10, 2021, 06:43:23 pm »
I tried to explain what you are doing wrong. Even on the old firmware, this is incorrect.
Yes, it works if you pause between command and data retrieval.
Even on the old firmware, it is necessary to use the sequence of commands that I gave.
Again, the sweep command will only set the start and end frequencies on the device. Then the device must make at least one pass (if there is no pause). The date command returns the current data value. If you set the interval, and immediately request the data, then you will get the old dataset.

On this I will no longer recommend anything, do as you want
« Last Edit: June 10, 2021, 06:46:50 pm by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1082 on: June 10, 2021, 07:25:47 pm »
No need to be sensitive about it.  I'm looking for what more faster means and trying to understand what advantage if any there would be to changing software that has been working fine for over a year.   From your comments is seems that you really feel this is the cause of the poor performance I am seeing with the H4 running your firmware.   I would have assumed you're testing your software before releasing it and would have caught something this obvious.   
 
Normally I am only sending the Data 0 or Data 0, Data 1, Data 0.... That is the sequence.   Changing the frequency is infrequent compared with collecting the actual data.  The software does change the frequency asynchronous with the data collection and I expect to throw out a sweep.  If I didn't have to, there would be some gains but hardly worth mentioning.   Now if we could go 4X or 8X faster, that would indeed be more faster. 

I will reinstall the original firmware that was shipped with the H4 and run my software as is.  If the performance is on par with the original NanoVNA, it rules out the hardware as the cause.    I will then change from the sweep to the scan and repeat the test.  I will then reinstall your firmware and run it with the software change.  And finally, I will try the old hardware/firmware with the software change and see if it has any effect. 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1083 on: June 10, 2021, 07:44:34 pm »
Send scan command
scan start freq_start
scan stop freq_stop
After device only change strart and stop points, not made sweep (just start it if no paused)
if after you send
data 0
Device return current data set (and if at this moment not complete scan - data not fully correct)
You must wait sweep complete (need add delay)

So if used segment scan and call
scan start 1000000
scan stop 2000000
data 0  - at this moment device in most cases not complete current sweep measure (last part of data contain prev scan measure, yes all good if you not change sweep range and so on)
scan start 2000000
scan stop 3000000
data 0 - in this case first part data contain new measured result, last part - contain any data from prev scans)
You get not correct result if not add delays (yes you can calculate it, but .. not good)

If use sweep command
sweep start stop points
points - optional, if not set - used max possible for device points
Device set start stop frequency (and points count if set), after made sweep and pause
So next received command
data 0
or
data 1
Always return correct result
This old format for receive data from device, work on any firmware (not related to my)

After v0.7 i extend this command by add mask, if set possible get result after scan, not need call 'frequencies' or 'data 0' and so on, this allow save some time
In my last fw to mask also added uncalibrated data ask (this allow in all cases get uncalibrated data, not depend from options selected on device)
Also added binary command scan_bin (it return data in binary format as v2, not need additional data convert), but this command supported only by my firmware.
« Last Edit: June 10, 2021, 07:46:07 pm by DiSlord »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1084 on: June 10, 2021, 08:06:18 pm »
I use a handshake with the data collection thread.  The old firmware may have cleared the buffer and resampled but I always toss out the first data set.   While I display the data, I don't use it for any measurements.   This caused the person trying to use your firmware to ask about the odd waveshapes.  Again, cosmetic.    It sounds like making these changes still requires the first data to be tossed out, so I still don't understand what more faster means.

If the sweep command is causing the problem, are you suggesting that making two separate sweep calls rather than one is causing the poor performance?   If so, I can try that combination as well but it seems if you are testing your firmware with:

scan start stop CRLF
data 0 CRLF
data 1 CRLF

This is how I should test it.  Again, tossing out the first sweep after the scan is sent. 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1085 on: June 10, 2021, 08:16:06 pm »
scan start stop CRLF
data 0 CRLF
data 1 CRLF
In this case not need drop first scan, you should always get correct result after this commands.

Faster - not need wait additional thread sync in device for receive and exec shell commands (save some ms)

scan_bin more faster - not need made lot of float calculations for convert data in text format, less data send.

In most cases need get only s11 or s21 data, if use 'scan start stop' device always made 2 channel measure, if ask get only one channel data - sweep made 1.5x faster
example how receive only s11 data
scan start stop points 0b011
result list of
freq s11_re s11_im
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1086 on: June 10, 2021, 09:16:52 pm »
Again maybe a language problem but if I am only looking at S11, I send data 0, data 0, data 0 ....   I've always done this to speed it up.  When I first sniffed their software, I believe they sent data 0, data 1, frequency (repeat) which seemed stupid.  I know the frequencies, so that was dropped.  I then stopped asking for both data sets.  Again, it's been like that over a year.  With the new software, it's even further simplified.  Not having to drop that first data would help somewhat.  I suspect what you are suggesting is that the time to calculate the floating point values in firmware is taking a lot of time and ditching it would somehow speed up the over all data rates to the PC. 

It sounds like you are now suggesting that scan start stop will somehow cause it to collect both S11 and S21 but not send them.   This would be a detriment unless it actually improves on the poor performance from using the sweep command. 

I think now that I understand what is meant by more faster and the gains are small over what I have today, the real question is back to the poor performance.  Above all else, the data needs to be good.  If we can't get past that, the rest is useless.   It will be very interesting to see if how the ranges are set has anything to do with the actual data being sent back.  I wouldn't think it would have any effect on it but it's an easy test so we will see. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1087 on: June 10, 2021, 09:17:54 pm »
It's going to be a real pisser if I find out the hardware has a problem...   Still the box is pretty fancy and nice to look at. :-DD

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1088 on: June 10, 2021, 09:38:18 pm »
>Again maybe a language problem but if I am only looking at S11, I send data 0, data 0, data 0 ....   I've always done this to speed it up.
when a scan command is received, the device does not know what data will be requested later (you send in future 'data 0' or 'data 1'), therefore it always measures two channels.

If you explicitly indicate in the mask that only one channel will be needed, then only it will be measured (which is faster).

But since you are not using a mask, it doesn't matter
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1089 on: June 11, 2021, 01:49:10 am »
H4 with the stock firmware (0.5.0) looking at the 100uF//1uF.   Very similar to what we see with the old hardware and year old firmware. 

Running the regression test with this combination will not pass but outside of what appears to be the same old problem from a year ago, it seems alright.  It does not appear that the poor performance is related to the H4's hardware.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1090 on: June 11, 2021, 02:06:33 am »
Just using a dumb terminal, if I send "scan 100000 1000000" it returns without an error but the screen does not reflect the changes.  Sending "sweep start 100000" does change the start frequency on the screen. 

I then tried "scan 100000 1000000 101", no change. 

So the command that is wrong to use works but the one that fixes everything doesn't work, at least with 0.5.0.  Nice.   There's not much else I can do with that. 

****
Next I reloaded your firmware 1.0.38 and again using the terminal program I send the same commands.  Again, the H4s LCD does not reflect the changes.  So, I sent the frequencies command and it seems to report correct range.  I sent the data 0 command but the screen still shows the wrong range.

I then made the change to my software to use the scan rather than the sweep.   I left your 1.0.38 firmware installed in the H4.  It appears to have no effect (which I would expect) and the performance is again very poor. 
« Last Edit: June 11, 2021, 02:22:38 am by joeqsmith »
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1091 on: June 11, 2021, 02:32:43 am »
Next I reinstalled the original 0.5.0.   The firmware behaves a bit different but it does appear to update the range.  Once again, we can see it had no effect on the data and the performance is decent. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1092 on: June 11, 2021, 02:45:02 am »
Next I attached the original NanoVNA with my year old firmware to see what effects the scan command has with it.

help
Commands: help exit info threads version reset freq offset dac saveconfig clearconfig data frequencies port stat gain power sample sweep touchcal touchtest pause resume cal save recall trace marker edelay capture
ch>

Notice, there is no scan command.  So while the sweep command may be wrong, it certainly works and it much more compatible.  I think we have our answer to what the cause of the poor performance is.  Sadly, the standard firmware for the H4 isn't good enough to use.  I have packed away the H4 and won't bother with it.  On the plus side, it does appear that talking with it the wrong way works and it does put out good enough data to measure crystals.   I think that was all they were after.   

Back to writing manuals.... 

Offline DiSlord

  • Regular Contributor
  • *
  • Posts: 108
  • Country: ru
Re: NanoVNA Custom Software
« Reply #1093 on: June 11, 2021, 04:02:02 am »
Hmm i check again Hugen v0.5.0 (from 21/02/2020)
https://github.com/hugen79/NanoVNA-H/releases/tag/0.5.0

scan command present in code (it added in 24/09/2019)

scan command does not change the device settings, and is intended only for receiving data from the computer

PS About perfomance - used 12k IF (possible see it on measure in 12k and 24k?) better in work on higher frequency > 50k. Old fw use 5k IF
Need made research better IF for < 50k work

Thanks
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1094 on: June 11, 2021, 12:07:41 pm »
Hmm i check again Hugen v0.5.0 (from 21/02/2020)
...
scan command present in code (it added in 24/09/2019)

You would need to search this thread to find when the members here had started to fix the bugs in the firmware.   Looks like I made that first demo video in August 2019.   This gives you some idea of the timeline.   Once the major problems had been corrected, there was no need for me to try other firmware.   

scan command does not change the device settings, and is intended only for receiving data from the computer
Thanks

The language makes it difficult for me to understand what you are trying to convey.   Of course the scan command changes the device settings.     
It's odd how they decided to change how the H4's screen functions once you control it remotely.  I had not really paid attention to it until I ran these tests for you.     

PS About perfomance - used 12k IF (possible see it on measure in 12k and 24k?) better in work on higher frequency > 50k. Old fw use 5k IF
Need made research better IF for < 50k work

Thanks

You claim one of the features of your firmware is supporting 800Hz but the old firmware will far outperform what you have at lower frequencies.   At higher frequencies, your firmware can really mess up the data.   I suspect your filters have done more harm than good.   BTW,  while I did not show it, using the scan versus the sweep had no effect when changing the bandwidth filters.  The data still exhibits the same poor behavior. 

As you said:
Quote
I tried to explain what you are doing wrong.  Even on the old firmware, this is incorrect.  ... On this I will no longer recommend anything, do as you want

I now tend to agree with you.  We have done about all we can.  You're happy with what you wrote and I am happy to continue to incorrectly use the old firmware and get good results.  We both come out winners. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1095 on: June 12, 2021, 09:04:48 pm »
A draft manual for 2.0 is now available.  Of course the TOC was updated along with the what's new.  The main changes are at the end where it describes the difference in the new version and the new PDN measurement feature.   

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1096 on: June 13, 2021, 12:34:49 pm »
If the "native protocol" of all these VNA variants is getting to be a tower of babylon, what may be desirable is a rosetta stone.

Program client software based on an abstraction of WHAT the VNA hardware is supposed to be able to do (e.g. measure parameters discretely vs. frequency points), not HOW the VNA hardware may be asked to get that data and how it does the data acquisition.

Then all that is needed for clients is a fairly generic stable interface for "data requests" that pretty much any VNA can somehow or other satisfy (given range limits, et. al.).

For the wrapper that supports that generic interface for a particular model of VNA then that would be reduced to something simple / stable and easily tested / regression tested since the API of the VNA exercised by its interface wrapper implementation would be simple, consistent, and possible to optimize (or work-around) completely arbitrarily without modifying either the SW client code or the VNA protocol implementation / VNA firmware.

One could transparently talk to GPIB, Ethernet, USB, serial port, whatever VNAs with the same client side API.

Obviously if there are certain "access patterns" which are important to be able to represent to optimize the VNA's throughput / latency in responding to them then defining the API interfaces so they can express asking for a batch / vector of data or whatever could be interesting to consider.  The client could ask for anything as fancy as it wants as a "batch transaction" / request vector within the limits of the defined API but the API implementation could freely simplify or optimize that as much as it can for a particular back-end device protocol.

At first I thought you were referring to these low cost VNAs that this thread is about, until I saw your mentioning of Ethernet and GPIB.   It seems like you are interested in writing a generic VNA program.  This sounds like an interesting project but I am not sure how you would pull it off.   Normally, when it comes to test equipment, if I see generic software, it will have very limited capabilities. 

I have a few VNAs and each is very unique.  It's not just the physical layer, or the protocols used.  The systems are totally different.   One has a mechanical interface that can't be controlled remotely.  In this case, I prompt the user what they need to do.   The features they support can also be very different.   For example, I have one that can do spectrum analysis.   If you want to measure S11, you have to manually insert a directional coupler.   My less crappy VNAs support log or linear sweeps.  They also have basic features,  like attenuators.  The attenuators may require manual setting or they can be remotely set.   Then there are countless options you are not going to find in every VNA.  To top it off, you would somehow need to rent or procure all these VNAs, learn how to use them, maintain them.

Some flavor of my software runs on all of my VNAs.   There is a common library which for the most part contains all the number crunching stuff.  For each VNA, there is a top level program that supports their unique feature sets.  Finally, there is an interface layer.     

For the low cost VNAs, the problems I have ran into are poor documentation and unstable firmware. 

It will be interesting to see what you come up with and what instruments you support.   Maybe start up a new thread for your generic VNA software. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1097 on: June 13, 2021, 03:10:41 pm »
Thanks for the post.  It was a good read.

I own a modest amount of test equipment and most of it is controlled remotely.  Most is from major brands.  The documentation is well written and the systems are fairly bug free.  For me, putting together software for them has never been easier.   Its rare I need software that would say, record data from a meter.  It's more common that I want to read the meter as part of a much larger setup involving other equipment all tied together.   

The VNA is no different.  If you look at my software, you will find it has the ability to control a linear stage.  This isn't something you will normally find in any VNA software.  Having the ability quickly and effortlessly change the software to run more complex experiments is really powerful.       

It is certainly possible to make external calls from LabView.  I would frequently use MSVC to write code that needed to execute faster or more efficiently.  However, I have not had to resort to that in several years.  The modern PCs are so fast I now just use LabView for anything PC related.   

From my experience with that first Nano, it became apparent that with it being opened source, a lot of people were interested in making their own changes to try and improve the firmware.  It seemed like it would be a never ending battle to find something that worked well enough to use.   It was bad enough that I put together a simple regression test to automatically check the firmware of the week.  Much of the changes were focused on features I really had no use for rather than addressing the problems. 

Not surprising, none of my vintage VNAs are open source.  I'm not against it but when you have people making changes who really don't understand the problems they can cause, it's doing more harm than good.  In the case of the original NanoVNA, having the source allowed a few people to address the basic problems and get it working.  So there can be an advantage depending on the skills of the people working on it. 

At least for these low cost VNAs, my demands for the firmware and hardware are simple.   Document your code, allow the software to control what ever peripherals are attached and send down good data.   Getting good data off the Nano was always a problem.  Not because the protocol was complex or the PC lacks performance.  It was just bad firmware.   Oddly, more commands were added rather than correcting the root problems which had nothing to do with the protocol.  Once the locals sorted out the basic problems, there was no need to do any more with it.  I am surprised that much of what I saw with the early firmware is still a problem with the latest releases. 

If people want to try and run my software with the original NanoVNA, the manual is pretty clear about different firmware/hardware combos being a problem.  All the software in the world isn't going to make bad firmware/hardware good.  We need a solid foundation to build on. 

Looking at the LibreVNA, it seems like they are having problems with their software and firmware.  While the moderators of some of the groups (for example https://groups.io/g/NanoVNAV2) have chosen to make them private (which I see it as a dick move),  the LibreVNA group seems to want to sensor the posts.  That was enough to turn me off of it.   Hopefully OWOs team will roll something out that can measure lower frequencies,  with a higher resolution (at least at lower frequencies) and an increased upper frequency range beyond the capabilities of the V2Plus4.   Even if they kept it closed source, as long at the interface is documented,  I would get one based on my experience with the V2Plus4.   Even if they just improved the V2Plus4 to allow it to fully replace the original NanoVNA, I would get one.   

I was mostly referring to the low cost ones here, I was just extending the example how the same basic "I want to measure X at frequency Y" approach is vendor / model / VNA / interface neutral and could apply to high end units or low cost ones.

I gather that the tower of babylon of both interface hardware as well as interface apis & protocols is a fairly major annoyance with respect to cross platform applications that control and access test equipment in general.  It seems like it doesn't need to be so bad these days one could have a simple HTTP/REST or JSON or XML or database or something based neutral exchange layer and then the instrument driver can go off and get the data however it wants, and the client applications can fetch/use the data however they want.

So far I've just got one nanovna model and no "boat anchor" devices.  But even just with that it's getting hard to keep track of what nanovna variants there
are and what the differences in their hardware capabilities are not to mention what differences exist in their protocols and firmwares with respect to how to talk to them from a client application and what works / doesn't.

Eventually I'd like to upgrade to measure to 6GHz, low frequency / narrow bandwidth crystal parameter measurement, and PDNs but given what I see in this thread and the mailing lists being full of "but X doesn't work on model Y, and Z doesn't work on firmware Q" it's seeming out of hand.

I get that they're trying to build it down to a cost level but it seems so penny wise pound foolish to have all the variants of these tiny little MCUs running mutually incompatible firmware as the interface.  They could just have made it so the processor board was pluggable e.g. arduino interface or something and then one could at least upgrade the CPU and the host interface (e.g. ethernet) so one wouldn't be quite so limited in terms of MCU and interface quirks / limitations by spending a few more optional dollars on a better controller.

Anyway I'd be willing to write a wrapper and API layer for these things in spare time but I don't have nearly enough hardware variants to make it very useful in the sense I couldn't port / test things to different devices without those protocols / devices available.

And in the client end since in your code's case you run labview I take it that'd mean it'd be more oriented to a C-API + DLL or better yet something over IP/UDP/TCP/HTTP or something that'd be much more portable cross client sw / platform.

I suppose if there was a simple suite of unit / system tests and a half decent client API / protocol in a few variants that might be enough to get some of these VNA firmware developers / manufacturers to be interested enough to support it instead of making everything firmware / device unique.

One thing I don't understand is the whole firmware / protocol business.  I gather that the nanovna v2 being open hardware (and open source, maybe, I think?) is something that's not representative of what other devices are / will be.  So I don't even know if there's open firmware / protocol documentation for any / many of the other low cost VNAs at this point or what.  I saw mention to sniffing the protocol of something or other so I guess that's one way to reverse engineer at least what the serial command / response sequences are for a given firmware/unit, though if that's really all there is to rely on for most of these devices then it's a bit sad state of affairs.

I am wondering if there is NOTHING relevant / compelling about the "boat anchor" APIs, SCPI, whatever for "lowest common denominator" basic VNAs that nobody thought practically of just reusing those protocols exactly or if needed extending them slightly vs. reinventing the wheel incompatibly....
« Last Edit: June 14, 2021, 11:31:54 am by joeqsmith »
 
The following users thanked this post: croma641

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 11715
  • Country: us
Re: NanoVNA Custom Software
« Reply #1098 on: June 14, 2021, 11:16:29 am »
Robert Feranec, PCB Layout & Decoupling - Explained why it's so complicated

I've watched a few of his interactive interviews.  He does a good job with them. 
**
If it's not obvious, the reason including this series here is it explains the basics of PDN design, simulation and measurement.  In part 3, they use the Bode 100.  Could we use the $50 NanoVNA and a couple hundred bucks of hardware to make this same measurement?   








« Last Edit: June 14, 2021, 11:23:35 am by joeqsmith »
 
The following users thanked this post: croma641

Offline Knuddel

  • Contributor
  • Posts: 19
  • Country: de
Re: NanoVNA Custom Software
« Reply #1099 on: June 16, 2021, 04:12:10 pm »
A draft manual for 2.0 is now available.  Of course the TOC was updated along with the what's new.  The main changes are at the end where it describes the difference in the new version and the new PDN measurement feature.

Hi Mr. Smith,

I would like to try out your new PDN measurement feature and may have the chance to borrow some DC-blockers and maybe a professional common mode transformer for short time.
Did you upload the two announced versions 2.0 for both VNAs already?
The last version that is visible for me is p1.08 and for the V2Plus4 it's p1.04 in your GitHUB repository.

However, as for my privat use I would like to build up the blockers and the CMT like yours, would it be possible to post the partlist and the 'how to' for this in more detail some time?

Thank you very much for all this investigations and education up to now!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf