Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NanoVNA should stop sweeping if nanovna-saver has not requested it #128

Closed
satfan52 opened this issue Jan 9, 2020 · 21 comments
Closed

NanoVNA should stop sweeping if nanovna-saver has not requested it #128

satfan52 opened this issue Jan 9, 2020 · 21 comments
Labels
enhancement New feature or request stale Long time no reaction, will be closed soon

Comments

@satfan52
Copy link

satfan52 commented Jan 9, 2020

It does not matter that nanovna continuously sweeps when measuring filters or passive devices. However when measuring amplifiers or active devices, especially with a high gain and/or high output power then stopping the sweep in nanonovna-saver should also physically stop the sweep and the transmission of rf on the Nanovna itself. At the moment, I have to physically disconnect the NanoVNA from the amplifier tested in order to prevent it from amplifying the signals that keep coming from the NanoVNA even if nanovna-saver has not instructed the NanoVna to sweep. Alternatively, I have to disable/disconnect the tested amplifier which is not nice either. All of this is not very convenient and it would be much better that the NanoVna simply stops sweeping when nanovna-saver does not request it.

@mihtjel mihtjel added the enhancement New feature or request label Jan 12, 2020
@mihtjel
Copy link
Member

mihtjel commented Jan 12, 2020

Hmm. I think for most uses, users expect the device to continue sweeping. But I get your point - having it as a setting could be useful.

@satfan52
Copy link
Author

satfan52 commented Jan 12, 2020 via email

@lordmorgul
Copy link

lordmorgul commented Jan 12, 2020 via email

@goldstar611
Copy link

goldstar611 commented Apr 21, 2020

I also would be interested in "single sweep" preference. I know the option is called "Pause Stimulus" on the device itself but wasn't able to find anything like that in the code base. If someone knows the serial port command to pause the sweep / stimulus I would try my hand at a PR (I'm familar with PyQt already)

[edit] The command is pause
https://github.com/hugen79/NanoVNA-H/blob/b9cdfd81abc9ae46b12c670c9ea74d820d9e0571/main.c#L2173

@goldstar611
Copy link

And the pull request is up! #173 Feedback would be appreciated. I just added a new checkbox in the "Sweep Settings" window that issues the pause command after a sweep/scan is complete.

@satfan52
Copy link
Author

Hello,
Thank you for the change. I am not really into Python, I am more of an RF guy. Can you please explain me briefly (key steps) how I can test your change ? I guess I have to apply some patch in V0.22 or is it included already in V0.23 that I should just re-donwload ? Sorry for the naive question.
Kind Regards
Peter

@goldstar611
Copy link

Thank you for the change. I am not really into Python, I am more of an RF guy. Can you please explain me briefly (key steps) how I can test your change ? I guess I have to apply some patch in V0.22 or is it included already in V0.23 that I should just re-donwload ? Sorry for the naive question.
Kind Regards
Peter

Hi Peter, No worries! I assume that you are on Windows so I generated an EXE with the pause stimulus feature for you and anyone who wishes to test. It is available at https://github.com/goldstar611/nanovna-saver/releases/tag/v0.2.2-1

Remember that this is just for testing and to be careful with high power devices that you mentioned like the PAs you are working with. I think I found all of the places where sweep is called but I may have missed some spots (I only spent 2 hours on it and there's a lot of code here) so proceed with caution!

Note: I don't know exactly how the exe files are created here since there was no Makefile so I had to come up with my own method (using pyinstaller)

@satfan52
Copy link
Author

Thanks! I am on Ubuntu 18.04 ;-) (yes I know I am full of contradictions). If you can please send me the link to a Linux version as well. Many thanks

@goldstar611
Copy link

Thanks! I am on Ubuntu 18.04 ;-) (yes I know I am full of contradictions). If you can please send me the link to a Linux version as well. Many thanks

Oh that should be even easier! Do what you normally do but with this source zip: https://github.com/goldstar611/nanovna-saver/archive/auto_pause_stimulus.zip

@satfan52
Copy link
Author

Hello,
Thank you so much for giving attention to this change request. I have only tested the linux link you sent and unfortunately there is no change compared to the 0.22 version that I am using normally. In the two picture below you can see that the nanovna is continuously sweeping between 50 and 60 Mhz (my start and stop parameter') at a power level of about -40 dBm, there is no difference with my normal 0.22 version. It is also the same power level when I am sweeping. Are you sure you sent me the right link ;-)

normal 0 22
your updated 0 22 version

Kind Regards
Peter

@goldstar611

This comment has been minimized.

@goldstar611
Copy link

Hello,
Thank you so much for giving attention to this change request. I have only tested the linux link you sent and unfortunately there is no change compared to the 0.22 version that I am using normally. In the two picture below you can see that the nanovna is continuously sweeping between 50 and 60 Mhz (my start and stop parameter') at a power level of about -40 dBm, there is no difference with my normal 0.22 version. It is also the same power level when I am sweeping. Are you sure you sent me the right link ;-)

I hooked up a scope with a SMA to BNC adapter and indeed there is still a stimulus on the output with my changes -- but it is not sweeping anymore (pause not stop stimulus). I will dig into the firmware to see if it's possible to completely stop the stimulus but I have a bad feeling about that feature.

@satfan52
Copy link
Author

satfan52 commented Apr 24, 2020

Thanks ;-) No I had not... I redid the test with the check box enabled and indeed the screen of my spectrum analyzer is much less crowded (see picture below). However there is a huge spike of -17 dBm corresponding to the "start frequency".....that keeps "booming" after after the sweep. If you could manage of getting rid of it, it would be fantastic !

3_20200129231958

This is corresponding to a sweep between 50 and 60 Mhz, no other signals are visible on my spectrum analyzer but this one.

Note that turning off this unsolicited -18 dBm signal which is corresponding to "start frequency" is useful not only to test HIGH power amplifiers but also to test LOW POWER amplifiers with HIGH GAIN, so this change is also useful for QRP operation not only QRO one. For instance, I am currently optimizing one of the cheap 35dBm PAs available on eBay and Aliexpress for less than 10 euros. After adequate optimization for HF operation, these PAs deliver 35 dBm with a gain in the order of 47dB. This unsolicited signal of -18dBm will output a signal of 29 dBm (47-18) if the PA is not disconnected between two sweeps.

@goldstar611
Copy link

So I took a look at the supported commands in the firmware and have bad news.

  1. I don't know how to eliminate or reduce the start frequency signal after the sweep is finished :(
  2. Firmware support to completely turn off stimulus is not supported. (at least I could not find a serial command to do it)

There is a "power" command which changes the output power of the stimulus but it doesn't disable the stimulus in my testing, only adjusting the gain.

@satfan52
Copy link
Author

Thank you so much for looking at this. Let's keep the ticket open until someone figures out the issue. Maybe that a walk-around could be to decrease the gain to the lowest possible value until the next sweep. If we can lower the residual output signal by -40dB so from -17 dbM to -57 dBm or so it is ok too.
Kind Regards
Peter

@satfan52
Copy link
Author

Actually the trick could be to let the nanovna sweep but disable the rf output. Some active components should be shut down via the firmware or a trick is needed to disable the rf output some ways so no rf energy exits through CH0

@goldstar611
Copy link

let the nanovna sweep but disable the rf output

I'm not sure if that's feasible. Someone please correct me if I am wrong and I will mark this comment as outdated.

I took a very very quick glance at what I think is the most popular schematic:
https://github.com/ttrftech/NanoVNA/blob/master/doc/nanovna-sch.pdf
I'm pretty sure X1 and X2 are the SMA connectors. These are directly connected to SA612AD chips in the schematic.
According to NXP it doesn't appear that this mixer has any RF OUT enable/disable mechanism.

@satfan52
Copy link
Author

satfan52 commented Jul 31, 2020

I have opened two ticket to modify the firmware of the nanovna V1 and V2

nanovna-v2/NanoVNA2-firmware#28

ttrftech/NanoVNA#143

The idea is no longer to stop the ongoing sweep as this could have some performance impact, but to have an option in the firmware to cut the rf output. This option could then be exploited by nanovna-saver

@BenjiWiebe
Copy link

I'm not sure if that's feasible. Someone please correct me if I am wrong and I will mark this comment as outdated.
...
These are directly connected to SA612AD chips in the schematic. According to NXP it doesn't appear that this mixer has any RF OUT enable/disable mechanism.

As far as I can tell from reading your linked schematic and relevant datasheets -
The ports are connected to the inputs of the SA612 mixers. The RF output is provided by the Si5351A, which is controlled by I2C and does have an output disable option.

@github-actions
Copy link

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍
Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale Long time no reaction, will be closed soon label Dec 28, 2022
@rjordans
Copy link
Contributor

The NanoVNA I have indeed does reproduce.

My LiteVNA doesn't seem to suffer from this issue, I see no RF when no sweep is running in NanoVNA-saver.

Sounds like a hardware/firmware issue in the NanoVNA to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Long time no reaction, will be closed soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants