MAGAZÍN D'INVESTGACIÓ PERIODÍSTICA (iniciat el 1960 com AUCA satírica.. per M.Capdevila a classe de F.E.N.)
-VINCIT OMNIA VERITAS -
VOLTAIRE: "El temps fa justícia i posa a cadascú al seu lloc.."- "No aniràs mai a dormir..sense ampliar el teu magí"
"La història l'escriu qui guanya".. així.. "El poble que no coneix la seva història... es veurà obligat a repetir-la.."
28-02-2018 (3648 lectures) | Categoria: Antenna |
This document is an unofficial user guide for NanoVNA. The URL is https://cho45.github.io/NanoVNA-manual/.
It's maintained in a github repository .
If there are any discrepancies with the latest firmware, please send a pull-request if you have any corrections.
It's also available in PDF format on the Releases page on GitHub.
There are several types of NanoVNA hardware, and this document covers the following hardware:
These hardware have almost identical circuit components and common firmware is available.
You will need at least the following:
A VNA (Vector Network Analyzer) measures the frequency characteristics of the reflected power and transmitted power of a high frequency network (RF Network).
NanoVNA measures:
From here we calculate:
The following items that can be calculated from these can be displayed.
Such.
NanoVNA measures reflection and transmission coefficients at 101 points in the target frequency band.
NanoVNA's local oscillator frequency ranges from 50kHz to 300MHz. Higher frequencies use harmonic mode. The fundamental wave is not attenuated even in harmonic mode. The usage modes for each frequency are as follows.
Especially when checking the gain of the amplifier, etc., it is necessary to pay attention to the fact that there is always the input of the fundamental wave.
The input is converted to an intermediate frequency of 5kHz in both cases. The signal is analog-to-digital converted at 48kHz sampling. Digital data is processed by the MCU.
It must be calibrated before use. First, calibrate as follows.
NanoVNA has the following inputs:
Each frequency when start/stop is specified is displayed.
The position of the marker for each trace is displayed. Selected markers can be moved in the following ways:
Displays the data number of the calibration being read and the error correction applied.
C0
C1
C2
C3
C4
: Each indicates that the calibration data with the corresponding number is loaded.c0
c1
c2
c3
c4
: Each indicates that the corresponding number of calibration data has been loaded, but that the frequency range has been changed after loading and that interpolation is used for error correction.D
: indicates that directivity error correction is appliedR
: Indicates that reflection tracking error correction is appliedS
: indicates that source match error correction is appliedT
: indicates that transmission tracking error correction is appliedX
: indicates that isolation (crosstalk) error correction is appliedIndicates the reference position of the corresponding trace. DISPLAY
SCALE
REFERENCE POSITION
You can change the position with .
Shows the currently selected active marker and one previously active marker.
Displays the state of each trace format and the value corresponding to the active marker.
For example CH0 LOGMAG 10dB/ 0.02dB
, read as follows.
LOGMAG
Also, the channel display for the active trace is inverted.
When the battery is installed and on the PCB D2
is populated, an icon will be displayed according to the battery voltage.
Displays each frequency when the center frequency and span are specified.
You can display the menu by the following operation.
Tap a number to enter one character.
Delete one character. If you have not entered even one character, cancel the input and return to the previous state.
Multiply the current input by the appropriate unit and exit the input immediately. In the case of ×1, the entered numerical value is set as is.
The item name to be entered and the entered number are displayed.
Calibration should basically be performed every time the frequency range to be measured is changed. If the error has been corrected correctly, the calibration status display on the screen Cn D R S T X
will be . n is the data number being loaded.
However, NanoVNA can supplement existing calibration information to give a somewhat correct display. This happens if you change the frequency range after loading the calibration data. At this time, the display of the calibration status on the screen cn D R S T X
becomes . n is the data number being loaded.
CAL
RESET
CAL
CALIBRATE
OPEN
execute.CAL
CALIBRATE
SHORT
run.CAL
CALIBRATE
LOAD
run.CAL
CALIBRATE
ISOLN
execute. CH0 port can be left unconnected if there is only one load.CAL
CALIBRATE
THRU
execute .CAL
CALIBRATE
DONE
CAL
CALIBRATE
SAVE
SAVE 0
* Each calibration data must be loaded after the display has stabilized sufficiently.
Up to four traces can be displayed, one of which is the active trace.
Traces can be displayed only as needed. DISPLAY
TRACE
TRACE n
Select to toggle the display .
There are the following methods to switch the active trace.
DISPLAY
TRACE
TRACE n
to display. (If already visible, it should be temporarily hidden)Each trace can specify its own format. To change the format of the active trace, DISPLAY
FORMAT
select the format you want to change.
The display of each format is as follows.
LOGMAG
: logarithm of the absolute value of the measured valuePHASE
: Phase in the range -180° to +180°DELAY
: delaySMITH
: Smith ChartSWR
: Standing Wave RatioPOLAR
: polar coordinate formatLINEAR
: absolute value of measured valueREAL
: real number of measurementsIMAG
: the imaginary number of the measured valueRESISTANCE
: Resistance component of measured impedanceREACTANCE
: Reactance component of measured impedanceNanoVNA CH0
CH1
has two ports. The following S-parameters can be measured at each port.
CH0
S11 (reflection loss)CH1
S21 (insertion loss)Select DISPLAY
CHANNEL
or to change the channel of the trace CH0 REFLECT
.CH1 THROUGH
Up to four markers can be displayed. The display of the marker MARKER
SELECT MARKER
MARKER n
is done from. Displaying a marker sets the active marker to the displayed marker.
NanoVNA can simulate time domain measurements by signal processing frequency domain data.
DISPLAY
TRANSOFRM
TRANSFORM ON
Select to convert the measurement data to the time domain . TRANSFORM ON
If is enabled, the measurement data is immediately converted to the time domain and displayed.
The time domain and frequency domain have the following relationship:
Therefore, there is a trade-off relationship between maximum time length and time resolution.
If we compare the length of time with the distance, we can say the following.
Bandpass mode allows you to simulate a DUT's response to an impulse signal.
The trace format LINEAR
LOGMAG
SWR
can be set to
Below is an example of the impulse response of a bandpass filter.
Lowpass mode allows you to simulate a TDR. In low pass mode, the start frequency should be set to 50kHz and the stop frequency should be set according to the distance you want to measure.
REAL
You can set the trace format to
An example of step response in open state and impulse response in short state is shown below.
Lowpass mode allows you to simulate a TDR. In low pass mode, the start frequency should be set to 50kHz and the stop frequency should be set according to the distance you want to measure.
REAL
You can set the trace format to
open:
short:
Capacitive short:
Inductive short:
Capacitive discontinuity (C in parallel):
Inductive discontinuity (L in series):
The measurable range is a finite number, and there are minimum and maximum frequencies. A window can be used to smooth this discontinuous measurement data and reduce ringing.
The window has three stages.
MINIMUM gives maximum resolution, MAXIMUM gives maximum dynamic range. NORMAL is in between.
The transmission speed of electromagnetic waves in a cable varies depending on its material. The ratio to the transmission speed of electromagnetic waves in vacuum is called the wavelength shortening rate (Velocity Factor, Velocity of propagation). This is always stated in the cable specification.
In the time domain, the displayed time can be converted to distance. The wavelength shortening rate used for distance display DISPLAY
TRANSFORM
VELOCITY FACTOR
can be set with . For example, if you measure the TDR of a cable with a wavelength shortening rate of 67%, VELOCITY FACTOR
specify 67
.
You can set the frequency range from the markers as follows.
MARKER
→START
Sets the frequency of the active marker to the start frequencyMARKER
→STOP
Sets the frequency of the active marker to the stop frequencyMARKER
→CENTER
Sets the frequency of the active marker to the center frequency. The span will be adjusted to maintain the current range as much as possible.MARKER
→SPAN
Sets the two visible markers to the span, including the active marker. Nothing happens if only one marker is visible.There are three types of measurement range settings.
Select and set STIMULUS
START
, respectively .STIMULUS
STOP
Select and set STIMULUS
CENTER
, respectively .STIMULUS
SPAN
Zero span is a mode in which one frequency is sent continuously without sweeping the frequency.
STIMULUS
CW FREQ
to set.
STIMULUS
PAUSE SWEEP
Select to temporarily stop measurement.
Up to 5 calibration data can be saved. NanoVNA will load data with number 0 immediately after startup.
Calibration data is data that contains the following information:
CAL
SAVE
SAVE n
You can save the current settings by selecting .
CAL
RESET
You can reset the current calibration data by selecting . If you want to calibrate again, RESET
you have to do it.
CAL
CORRECTION
indicates whether error correction is currently in progress. You can select this to temporarily stop error correction.
RECALL
RECALL n
You can recall the saved settings by selecting .
CONFIG
Below you can make general settings for the device.
CONFIG
TOUCH CAL
Select to calibrate the touch panel. If there is a large difference between the actual tap position and the perceived tap position, doing this can help. TOUCH CAL
After doing , TOUCH TEST
check that the settings are correct by doing , and SAVE
save the settings with .
CONFIG
TOUCH TEST
Select to test the touch panel. A line is drawn while you tap the touch panel. When released from the touch panel, it returns to its original state.
CONFIG
SAVE
Select to save general instrument settings. General device settings are data containing the following information:
There is currently no way to configure, other than touch panel calibration information.
CONFIG
VERSION
Select to display the device version information.
CONFIG
→DFU
RESET AND ENTER DFU
Select to reset the device and enter DFU (Device Firmware Update) mode. Firmware update is possible via USB in this mode.
Original firmware. It is versioned and frequently developed.
GitHub releases have reasonably stable release versions of the firmware.
CircleCI has all the firmware per commit. Use this if you want to try the latest functions or check for bugs.
The latest firmware is located on Google Drive.
You can easily clone the github repository and build it yourself.
There are various ways to write, but here we will explain using dfu-util . dfu-util is a cross-platform tool, and binaries are also provided on Windows, so you can just download it and use it.
There is dfu-util in the standard package repository.
sudo apt-get install dfu-util
dfu-util --version
Boot the device into DFU mode. Enter DFU mode in one of the following ways:
CONFIG
→DFU
RESET AND ENTER DFU
to chooseRun the following command. build/ch.bin describes the path to the downloaded firmware file .bin.
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin
It is recommended to install using homebrew .
Install the brew command.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install the dfu-util command.
brew install dfu-util
Confirm that the dfu-util command can be successfully launched.
dfu-util --version
Boot the device into DFU mode. Enter DFU mode in one of the following ways:
CONFIG
→DFU
RESET AND ENTER DFU
to chooseRun the following command. build/ch.bin describes the path to the downloaded firmware file .bin.
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin
On Windows, connecting a NanoVNA in DFU mode automatically installs the device driver, but dfu-util is not available for this device driver. Here you can use Zadig to replace the driver.
Boot the device into DFU mode. Enter DFU mode in one of the following ways:
CONFIG
→DFU
RESET AND ENTER DFU
to chooseStart Zadig with NanoVNA in DFU mode connected, and use WinUSB as a driver for STM32 BOOTLOADER as follows.
* If you want to restore the driver, search for the corresponding device from "Universal Serial Bus Controllers" in "Device Manager" and execute "Uninstall Device". Unplug the USB connector and plug it in again, and the driver will be installed automatically.
Then place dfu-util. Download dfu-util-0.9-win64.zip from releases and extract it. Here, as an example, it is assumed that it is expanded to C:dfu-util (anywhere is fine).
Right-click the Start Menu and select Windows PowerShell. A shell window will open.
If you drag and drop dfu-util.exe from Explorer to PowerShell, the path will be automatically inserted. --version
You can display the version of dfu-util by starting it with the following .
C:dfu-utildfu-util.exe --version
Similarly, you can enter the path of the firmware file by dragging and dropping it from Explorer to PowerShell.
Run the following command. build/ch.bin describes the path to the downloaded firmware file .bin.
C:dfu-utildfu-util.exe -d 0483:df11 -a 0 -s 0x08000000:leave -D buildch.bin
For those who are unfamiliar with CUI, we will also introduce the writing method using the DfuSE Demo tool provided by ST, although it requires a slightly complicated procedure.
Download STSW-STM32080 from ST site .
contained.
First launch DFU File Manager.
I want to GENERATE a DFU file from S19, HEX or BIN files
Choose.
S19 or Hex...
Click the button. ch.hex
Select the firmware .hex file, etc.
Generate...
Click the button to create a .dfu file with a suitable name.
First boot the device in DFU mode. Enter DFU mode in one of the following ways:
CONFIG
→DFU
RESET AND ENTER DFU
to chooseStart the DfuSe Demo. STM Device in DFU Mode
Make sure it's in Available DFU Devices and Choose...
click it.
Select the .dfu file you saved earlier.
Upgrade
Click the button.
When the writing is finished, this screen will appear, so Leave DFU mode
click the button to exit DFU mode. The device will reset and boot with the new firmware.
Here are the things you need to develop firmware for NanoVNA:
If you already have these, make
you can build the firmware with.
git clone git@github.com:ttrftech/NanoVNA.git
cd NanoVNA
git submodule update --init --recursive
make
With docker you can build without hassle. docker is a freely available cross-platform container utility. It can be used to quickly reproduce a particular environment (in this case the build environment).
After installing docker , just run the following command.
docker run -it --rm -v $(PWD):/work edy555/arm-embedded:8.2 make
Visual Studio Code (VSCode) is a multi-platform code editor provided free of charge by Microsoft. By installing Cortex-Debug Extension, you can do on-chip debugging with GUI.
I'll leave out the platform-dependent parts, but in addition to the above, you'll need:
Cortex-Debug is searched from Extensions of VSCode and Installed.
First, define a "task" that makes the entire NanoVNA on VSCode.
{
"tasks": [
{
"type": "shell",
"label": "build",
"command": "make",
"args": [
],
"options": {
"cwd": "${workspaceRoot}"
}
}
],
"version": "2.0.0"
}
Now you can make it as a task on VSCode.
Next, define how to start when Debug. Set as described in Cortex-Debug.
Below are the settings when using ST-Link. If you use J-Link, replace with interface/stlink.cfg
.interface/jlink.cfg
{
"version": "0.2.0",
"configurations": [
{
"type": "cortex-debug",
"servertype": "openocd",
"request": "launch",
"name": "OpenOCD-Debug",
"executable": "build/ch.elf",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f0x.cfg"
],
"svdFile": "./STM32F0x8.svd",
"cwd": "${workspaceRoot}",
"preLaunchTask": "build",
}
]
}
svdFile
The file specified in can be downloaded from the ST site . svdFile
There is no problem in operation even if is not specified.
Start Debugging ( F5
) will automatically launch OpenOCD and transfer the firmware after building with make. When the transfer ends, the reset handler breaks.
svdFile
, the defined MCU registers will be displayed on the debug screen.
TO DO
Here is an example of using NanoVNA as an antenna analyzer.
The following two points are important in adjusting the antenna.
Since only CH0 is used for antenna adjustment, perform calibration for all items other than THRU
and .ISOLN
Set the trace settings as follows.
CENTER
Set the frequency you want to tune the antenna to and SPAN
set appropriately.
Find the frequency where trace 1 displaying the reactance is close to 0. Since that frequency is the tuning point, if it is off, adjust the antenna so that the tuning point comes to the target frequency.
Once the tuning point is at the frequency of interest, check to see if trace 0, which displays the SWR, displays a sufficiently low (close to 1) SWR. If it doesn't show enough SWR (below 2), we use the Smith Chart to do the matching. At this time, matching may be performed using an antenna tuner directly below the antenna.
If the SWR drops, the antenna is tuned at the desired frequency and the tuning for the antenna with the low SWR is over.
A TDR can be simulated using the time domain lowpass mode. By using TDR, it is possible to discover faults in the transmission path.
TO DO
TO DO
The lost catalonian original of Celestina |
Cronologia del Regne de Jerusalem |
LA LÃ’GICA FORMAL APLICADA A LA RECERCA HISTÃ’RICA |
El Plus Ultra de Carles V |
The Catalan road - Camino de los españoles |
Joan d'Homedes i Coscó |
Descoberta catalana d'Austrà lia |
De Malta a València, un viatge sense retorn |
Rafel de Cotoner i d'Olesa |
Llibre de Menescalia - Manuel Dieç |