That means that scan is not bottleneck. Excellent. USB have enough bandwidth
MCU have bandwidth as well - because it does update it's screen fast during PC software scan.
It means PC SW update speed *can* be improved. Somebody just have to look at it because it is important while using average, especially knowing that it can be *twice* as fast.
Do you release hex and/or dfu releases as well? Please.
That means that scan is not bottleneck. Excellent. USB have enough bandwidththat's not the case, it uses old USB peripherals which can work in USB FS mode
MCU cannot communicate with PC during sweep, because it will affect measurement.
For example you can use scanraw command from NanoVNA-Q firmware.
I can confirm that averaging certainly does work.
Even a tiny variation in the magnitude of S11 causes a large jump in measured return loss.
If there were opposite peaks at the time of calibrating the NanoVNA itself, it would over-compensate on those particular frequencies, and consistently produce such dips.
Possibly - though to confirm, you should probably do multiple sweeps with high averaging. If the dips (or peaks) stay in place, it's a "true" error, if they move around, maybe the averaging isn't good enough to catch it, or you have indeed found a bug that I just haven't recognized ;-)
....
I didn't measured the maximum performance, but think it is about 50-100 kB/s.
....
Communication speed really can be improved, but I'm not sure that this is really needed.
There are several ways to improve performance:
1) optimize communication from PC side (don't send extra requests, don't do long delays, etc)
2) use binary format communications, but it will break compatibility with existing software (NanoVNASharp, Saver, etc)
If I really push the data rates, basically asking for the next data set right after is finished sending a data set, without giving it some delay, the performance suffers.
But hey, it's $50.
Problem even have a name: multitasking race condition. PC software have to request data but time window while it is available, is very small.
Problem even have a name: multitasking race condition. PC software have to request data but time window while it is available, is very small.No, there is no race condition. There is just delay while NanoVNA is busy. It cannot respond immediately, because it may be busy. If PC request performed when NanoVNA is busy, it will needs to wait.
Since data is modified by sweep task and modification is not complete yet, the data command needs to wait when the sweep will be completed. This is the reason for delay.
If I really push the data rates, basically asking for the next data set right after is finished sending a data set, without giving it some delay, the performance suffers.Problem even have a name: multitasking race condition. PC software have to request data but time window while it is available, is very small. As we see, PC manages to miss each other scan data set. Needed change is quite "simple" - leave existing "polling" approach alone and introduce new command for continuous scan and "push" for nano. In short nano while said mode is initiated: 1) performs scan 2) optionally displays it on the built-in LCD 3) sends scan data to PC unconditionally and only when USB transfer fully done, continue with next scan.QuoteBut hey, it's $50.Yes, you can say so when you are talking about tiny screen and fonts, awkward and fragile input "thingie", lack of proper case but such excuse is not OK in case of poor software *design* that clearly can be improved.
I don't think this is the problem with why it's so slow. Without the Nano connected to the PC and just watching it, it will scan about once a second. This is using the last image you uploaded. On the PC I am seeing 325467 Bytes in 14.04 seconds or 185kbs. This is plenty fast to keep up with how slow the Nano scans.
As we see, PC manages to miss each other scan data set.
Why PC does get only each 2nd scan then?
I am afraid that you need to update your knowledge about "race condition". Meaning is quite broad BTW.
Why don't you comment my suggestion of PC communications redesign?
That's behavior is specific for NanoVNA Saver.
Why PC does get only each 2nd scan then?
Because NanoVNA Saver sends two data requests. First for S11 and second for S21. Each request requires one sweep cycle. So, two request needs two sweep cycles.
That's behavior is specific for NanoVNA Saver. You can request just S11 and it will take single sweep time. But NanoVNA Saver sends two data requests and this is why it takes two sweeps.
If I were buying my first ever VNA and was just getting started with RF, I would hands down spend the $50 on the Nano to at least learn some of the basics. I wouldn't be at all surprised to find out that it wasn't the highest sold VNA ever!
As "you" see, not "we".
Because NanoVNA Saver sends two data requests. First for S11 and second for S21. Each request requires one sweep cycle. So, two request needs two sweep cycles.
It's selling like hotcakes in my town as far as the local hams. A few of us got them and started talking about the NanoVNA. Most people didn't have a clue what a "vector network analyzer" did. But after an explanation and some in-person demos it's caught on Big Time. Companies like MFJ who sell antenna analyzers for hams here -
MFJ Analyzers
are in trouble because they will not be able to compete with something like the Nano for < $50.
Companies like MFJ who sell antenna analyzers for hams here -
MFJ Analyzers
are in trouble because they will not be able to compete with something like the Nano for < $50.
Right, they should be worried Is it even legal to use square wave signal for antenna tuning? - Harmonics violate out-of band radiation regulations for sure. It's kinda "spread spectrum" unless CW mode used, but anyway. Many of you are HAMs, right? Perhaps you can comment? - Just curious.