Code Monkey home page Code Monkey logo

nanovna's People

Contributors

cho45 avatar czietz avatar damib avatar dislord avatar edy555 avatar fabianschwartau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanovna's Issues

Cmd_scan hangs

Enabling and using cmd_scan keeps hanging the firmware. Can cmd_scan work?

TDR plot support

1Gくらいの周波数があれば数10cmの解像度が得られるので実用的かも。
FFTはin-placeで実行できるはず。しかし、F072だと全くメモリの余裕がないのとCM0=FPUが無いので無理か。

Crashing in version 1

I updated last night from the original stock firmware that came with the device. It was successful however every now and again the traces crash, as well as the screen, becomes unresponsive for a few seconds. Also sometimes parts of the traces persist on the screen for a few seconds while other parts are redrawn etc.
Also before the update, I was able to use the multi-segment sweep with VNAsaver pc app, but now it seems to always crash the device too.
When I say crash, the system just locks up and freezes with the screen freezing.

Broken thru calibration

Release 0.1.1 (commit d68ab20)

Bug found after updating my unit to this release. It worked fine with the stock firmware (GEN111.TAOBAO.COM Build time: Aug 2 2019 - 16:40:01). Double checked by flashing a backup.

After performing a full calibration (OPEN,SHORT,LOAD,ISO,THRU), the reference S21 shows a 0.5 to 1dB ripple. Ripple period depends on cable electrical length, but amplitude does not (tested with different quality cables).

If only ISO+THRU or just THRU calibration is done, the trace is flat.

F303 support

To easily extend features, F072 is not enough to extend something valued.

Feedback on TDR function

 - When the Transform function is disabled, the 4 buttons below are disabled, right?
       - If yes, can the 4 buttons below be greyed-out?
 - upper right corner - marker shows time but distance is always 0.0m
 - velocity input doesn't appear to do anything [yet] that I can see.
 - logmag, phase and delay screens are affected when transform is enabled
       - how to make user aware in case they forget and can't figure those displays?
       - can there be a transform-enabled flag shown at left of display similar to the calibration ((DRSX) list or just re-arrange menu and grey-out affected functions?

Make it possible to set NEGATIVE edelay

After calibration you may use the device without the female-female adaptor or without the cables and you may want to have a negative edelay.
This implements the change

@@ -1211,6 +1211,7 @@ const keypads_t keypads_time[] = {
{ KP_X(2), KP_Y(0), 9 },
{ KP_X(3), KP_Y(2), KP_N },
{ KP_X(3), KP_Y(3), KP_P },

  • { KP_X(3), KP_Y(1), KP_MINUS },
    { KP_X(2), KP_Y(3), KP_BS },
    { 0, 0, -1 }
    };

@@ -1712,6 +1713,9 @@ keypad_click(int key)
return KP_DONE;
} else if (c <= 9 && kp_index < NUMINPUT_LEN)
kp_buf[kp_index++] = '0' + c;

  • else if (c == KP_MINUS && kp_index < NUMINPUT_LEN) {
  • kp_buf[kp_index++] = '-';
  • }
    else if (c == KP_PERIOD && kp_index < NUMINPUT_LEN) {
    // check period in former input
    int j;

missing group delay and phase delay measurements

There is exists trace format DELAY in the menu, but it doesn't works, because it is not implemented in the code.

I implemented group delay (GD) in this changeset: e81f4fe

Also it will be nice to add phase delay (PD) trace. But it requires continuous phase unwrap for entire sweep, so I'm not sure how to implement it with no use additional memory.

Miscalculated zr?

Is there an error in line 574 of plot.c
float zr = ((1+coeff[0])*(1-coeff[0]) + coeff[1]*coeff[1]) * d;

I think the right is
float zr = ((1+coeff[0])*(1-coeff[0]) - coeff[1]*coeff[1]) * d;

interpolate on polar plane

CALでやってる線形補完を、角度と振幅の補完に変更すべき。ステップ間の位相回転が小さいと誤差は小さいが、位相差が大きくなるとかなり効いてくる。

calibration reset at attempt to change stimulus

STR:

  1. calibrate device: open,short,load,isoln,thru
  2. make sure calibration is ok
  3. open menu stimulus and change stop frequency
  4. make sure calibration is unexpectedly reset

This bug appears after latest commits (scan command, etc)

Increase font size

The font size is very small and hard to read. There should be an option to choose bigger fonts. Thanks.

unstable measurements and spikes at frequency boundaries

There are unstable measurement on frequency band boundaries (where reset pll is performed).

The root of cause is missing wait for si5351 PLL lock. Also there is minor affect from flashing LED during sweep, it leads to a small voltage deviations and as result higher measurement noise.

The bug can be noticed as a random spikes at frequency boundaries (at begin of sweep, at 300 MHz, etc).

Both issues are fixed in this changeset: 23dba7d

some measurement point sometimes has wrong value

This is related with this issue: #70

The bug didn't fixed. The spikes are reduced but don't disappears.

Try rollback your changes and apply my small fix, this fix completely eliminates instability bug: qrp73@2ba09fb

This is how it looks with my changes (cal reset, S21 ref point=9, center 450, span 100):
delay-good

Now let's check the latest code from your master branch with the same settings and exactly the same conditions:

delay-bug

As you can see there is a spike at 450 MHz with your change, it is still unstable.

My fix looks very easy, but it don't means that it uses random values. I tested hard different delays in different modes. I tested similar delays that is used in your changes in different configurations. But after all I found stable and fast configuration. After that I tested it very hard with different values. And after all I got these "magic values" 3 and 8 :)

It's long story to explain all details. Just in short, use minimum delay = 3 even for channel switch. For pll reset, band change and gain change use delay = 8. It works great and pretty fast

floating point data loss due to chprintf

chprintf doesn't supports lossless floating point formats such as "%.9g". It seems that it has very basic support for floating points. As result, the floating point value is truncated with data loss, especially for very small floating point numbers.

I propose to use snprintf instead of chprintf and then put the buffer to the output stream.

For example:

        char tmpbuf[32];
        int leng = snprintf(tmpbuf, sizeof(tmpbuf), "%.9g", s11[0]);
        for (int j=0; j < leng; j++) {
            streamPut(chp, (uint8_t)tmpbuf[j]); 
        }
        streamPut(chp, (uint8_t)'\t'); 
        leng = snprintf(tmpbuf, sizeof(tmpbuf), "%.9g", s11[1]);
        for (int j=0; j < leng; j++) {
            streamPut(chp, (uint8_t)tmpbuf[j]); 
        }
        streamPut(chp, (uint8_t)'\t'); 

Screen artifacts

I have seen some screen artifacts from traces since the first firmware version i have tested. Has anyone paid attention to this?

photo5796658605267727050
photo6044092117866884827

Usable at 868MHz

Hello,
Very impressed about the project.
I’ve seen it can be used to up to 900mhz but in practice can i measure the impedance at 868mhz?

Make max SI5351 output frequency user settable

There is some variation in the quality of the SI5351 being used. Going to 300MHz is formally always out of spec so you are never sure if the nanoVNA will be able to reach 300MHz
Would it be an idea to make the max SI5351 output frequency user settable (and stored in flash) so users experiencing stability issues can set the max SI5351 frequency to a lower value?

License?

Hi,
I don't find a license file here, or on your CentSDR page. Is this an oversight?
Thanks for your good work!
73,
Rob
KL7NA

incorrect behavior of scan command

current scan command works incorrectly. It just duplicates sweep command functionality and don't returns data immediately. This is just a copy of sweep command. This is incorrect behavior.

The expected behavior of scan command is to get unlimited measurement point count. For example it should measure 1'000 points or 100'000 points. It should not store all points in the memory, because it will leads to out of memory error. So, it should return data immediately with no need for data command.

Another issue with current scan command is that it doesn't allow to select expected frequency step, because current implementation expects stop frequency instead of step frequency.

The expected scan command parameters is the following:
scan {start(Hz)} {step(Hz)} {count}

Note, it should use {step(Hz)} instead of {stop(Hz)}. Step may be negative, in such case scan command should perform sweep from higher frequency to lower frequency. The firmware should not calculate step, it should be provided in the command parameter.

scan command should NOT store all points in the memory, instead of that it should print measured data into console for each frequency step immediately.

touch freze

STR:

  1. power on device
  2. during device initialization, touch at the center of screen with frequency 2-3 times per second
  3. make sure device freezes and don't respond on any input anymore.

This bug is a little floating and may require 2-3 times to repeat in order to reproduce it.

first measurement point sometimes has wrong value

There is strange bug. Sometimes the first measurement point has very high spike.

I found the following STR that allows to reproduce this spike with high probability:

  1. power on
  2. open CONFIG -> VERSION screen and wait 5-10 sec
  3. tap on the center of screen to close version screen
  4. note that first sweep has high spike at first measurement point

The same spike may happens when you use joystick to move cursor left or right.

Also it may happens during calibration, in such case calibration will be wrong for the low frequency.

imbalance of gain

There is a little imbalance of gain, which leads to some discontinuities. You can find it by reset calibration and setup DISPLAY TRACE S11 LOGMAG scale=1 with reference position about 27.

@hugen79 tried to fix it in NanoVNA-H, but not complete.

More precise fix is done in this commit: qrp73@675b5bb

No more than 3 Memories usable

I have installed your last Firmware,
hat trouble to save more than 3 Memories. At the 4th the cal procedure is fine but if i want to recall the Memory it contains Garbage.

Have Reset the Calibration Data before and try to erase the config.

Its not important on witch place i store the memory.

73s Holger, DF6DBF

C Standard compliance failed

Current code has some syntax tricks which have issue with C standard compliance. Please fix it. It's hard to merge all changes when this fix is not applied. Thanks.

The main issues are following:

  1. implicit cast from void(*)() to void*
    Proposed solutions:
  • explicit cast
  • use unnamed union to store void pointer or function pointer at the same memory, but with different field name
  1. struct field initializers are not compatible with C standard
    Proposed solution: use C standard struct field initializers:
config_t config = {
  .magic =              CONFIG_MAGIC,
  .dac_value =          1922,
  .grid_color =         0x1084,
 //...
};
  1. Binary constants are not supported in C standard.
    Proposed solutions:
  • use hex constants
  • use header file with predefined constants starting from letter b to translate binary constants to hex: #define b10001010 0x8A

fix is already done in the following two changesets:

USB Serial get corrupted data

USB serial 経由のデータ(など)が化けることがあります。

が原因かと思っています (実際 tmpbuf を stack 変数にすると再現しない)。が、tmpbuf は意図的に global にされているようなので、issue にします。

逆のケース (sweep スレッドの chvprintf が shellThread で上書きされる) もあると思いますが扱う文字数が違うので観測するのが難しそうです。

AA Version of NEW Software 2 Traces - Bigger Fonts

Hello
is it possible tot have Bigger Fonts, like in the AA version of 2/8
if not possibel, 2 traces can be enough
Since used for field work and older man, bigger fonts can be very usefull
Tnx for soft anyway

strange "peaks" in S11 after upgrading to 0.2.1 and higher

Have here "strange" Peaks after upgrading to v0.2.1. v0.2.2 shows same behaviour. Took Screenshots with nanoVNA-saver to show the Problem. The v0.2.0 from 27. Sept. seems ok.

Screenshot from 0.2.0 (27.Sept)
pre0 2 1-270919

Screenshot from 0.2.2 (29.Sept)
after0 2 1-290919

Use complex conjugate in FFT for TDR

For TDR , instead of doing a window function its better to extend the FFT to
twice the length with the complex conjugate and use a 256 point FFT

CAL Kit model support

現在CALキットは理想的である前提での実装。(<300MHz以下だったから)
周波数範囲が上がったので、理想ではないCAL Kitのモデルを適用できるようにしたい。
オープンのC0-C3
ほか全てのZr, delay
定義を画面でさせるのはツライので、コマンドラインからのみサポート

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.