NanoVNA – interpolation – part 1

A simple two port VNA allows measurement of  S parameters s11 and s21 of a DUT. Port 1 contains a directional coupler to transmit a signal into the DUT, and to capture and measure the amplitude and phase of the reflected wave relative to the forward wave at Port 1 (s11). Port 2 simply measures the amplitude and phase of the signal at its input, the forward wave after it has passed through the DUT relative to the forward wave at Port 1 (s21).

This is typically done by stepping (sweeping) the source on Port 1 through a range of frequencies, specified for example by start and end frequency and the number of discrete steps.

There are several source of error in such a measurement, but by making a series of measurements of some known configurations (Short, Open and Load on Port 1, Isolation and Through to Port 2), those errors can be determined and corrected out of subsequent measurements. So, there is a calibration process to measure and save measurements on these known loads, and then a correction process to apply the calculated corrections to raw measurements.

Early VNAs invalidated the calibration data if sweep parameters were changed, and so corrections were applied to raw measurements at corrections measured and calculated at exactly the same frequency.

This was really inconvenient, especially where no facility was provided to permanently save and restore a set of calibrations.

Later VNAs included the facility to interpolate (but not extrapolate) the calibration / correction data to a new set of sweep parameters. This was really convenient, but introduced a new source of error, the interpolation error.

When all this is done under the covers, users with little understanding of what is going on under the covers can easily obtain invalid / worthless results.

Let’s focus on s11 measurement, though the same issues exist for s21 measurement.

Above is a plot of uncorrected or raw s11 sweeping a NanoVNA-H4 101 points from 1 to 900MHz with nothing on Port 1 (approximately an open circuit OC). Ideally s11 should be 1+j0, but the directional coupler circuitry and small distance to the connector means the amplitude and phase vary as shown in the plot. Continue reading NanoVNA – interpolation – part 1

nanoVNA-H – can firmware be updated if it has a broken USB socket?

The usual method used for firmware upgrade is DFU (Direct Flash Update) using the USB interface and one of many PC clients to load the firmware.

Before attempting a firmware upgrade, be certain of the hardware you have, and the appropriate / compatible firmware file and format. Look for a label on the back, or on the silkscreen of the PCB (though sometimes hidden under the battery… doh!)… know what hardware you have to ensure you load compatible firmware.

Before discussing how to upgrade firmware if the USB interface is not functional, be sure that this problem is not driver related, that there is a real hardware problem. Continue reading nanoVNA-H – can firmware be updated if it has a broken USB socket?

tinyPFA – new Nanovna-H4 arrived

TinyPFA is firmware from Erik Kaashoek for NanoVNA-H4 hardware for accurate measurement of oscillator and clock source stability.

I was so impressed with the possibilities of the project, I purchased a new Nanovna-H4 v4.3 a couple of weeks ago to dedicate to this application.

Anticipation got the better of me, and I put tinyPFA onto my existing Nanovna-H4 v4.3 to evaluate it, and was not disappointed.

Anyway, the recently ordered device arrived.

Above, the new tinyPFA at work. Continue reading tinyPFA – new Nanovna-H4 arrived

An improved simple Simsmith model for exploration of a common EFHW transformer designs (v1.03)

The article A simple Simsmith model for exploration of a common EFHW transformer design – 2t:14t proposed a simple model.

The previous proposal

Above is the equivalent circuit used to model the transformer. The transformer is replaced with an ideal 1:n transformer, and all secondary side values are referred to the primary side.

The model works quite well for low leakage inductance / low ratio transformers but falls down for the higher leakage inductance / higher ratio transformers.

An improved model

The improved model is similar, but Cse in the model above is distributed to the outer sides of the lumped constant model.

Above is the equivalent circuit used to model the transformer. The transformer is replaced with an ideal 1:n transformer, and all secondary side values are referred to the primary side. Continue reading An improved simple Simsmith model for exploration of a common EFHW transformer designs (v1.03)

Diagnosis of a 9:1 transformer from NanoVNA plot – part 2

Diagnosis of a 9:1 transformer from NanoVNA plot discussed an example measurement of a 9:1 transformer on a binocular ferrite core. These are often recommended for use with Beverage antennas on 160 and 80m bands, and this was the maker’s application. In that article, I hinted that the core might not be #73 as the maker thought, or wished.

This article reports measurements of a 9:1 transformer wound on a Fair-rite 2873000202 (#73) binocular core. The pic above shows the test fixture. Continue reading Diagnosis of a 9:1 transformer from NanoVNA plot – part 2

Diagnosis of a 9:1 transformer from NanoVNA plot

A chap recently posted online a question:

I have added two 1:9 transformer (2T/6T) back to back (high side together) and measured with the nanovna – 2 port measurement, as the binocular core I am not confident BN73 or not.

Also I swiped with one port S11, with one transformer where the high side is terminated with a 470ohm resistor load.

Please advise if it can be used for beverage antenna for 160/80m.

Let’s focus on the second test, and assume that the measurements are valid (and that is often an issue), that the 470Ω resistor is close enough to 450+j0Ω and the connections are short.

Above is his s11 sweep from 1 .5-7MHz.

I suspect this is actually #43 material. Continue reading Diagnosis of a 9:1 transformer from NanoVNA plot

NanoVNA source mismatch error

One of the popular ideas online is that the correction process in the NanoVNA does not correct errors in mismatch at Port 1 and Port 2. This article deals with the first case ONLY, Port 1 mismatch.

An experiment with source VSWR nominally 2:1

A NanoVNA was configured with a SMA tee connected to Port 1 and a good 50Ω termination connected to the branch port, see the pic below. The left hand side of the tee becomes the new Port 1 interface, and by virtue of the additional 50Ω shunt termination, if the native Port 1 was indeed well represented by a Thevenin equivalent circuit with Zs close to 50+j0, the Thevenin source impedance is now closer to half that, Zs close to 25+j0.

Some would calculate this mismatch as causing a mismatch loss of 0.512dB that is additional loss in the s21 path.

Above is the test setup. The NanoVNA was SOLT calibrated with cal parts attached to the left hand side of the tee and the 200mm coax jumper from that point to Port 2. Continue reading NanoVNA source mismatch error

NanoVNA-H – modification of v3.3 PCB to start the bootloader from the jog switch

Later NanoVNA-H* hardware allows the device to start in bootloader mode by holding the jog switch in whilst powering on. It is a very convenient facility for firmware update, much more convenient than taking the case apart to jumper BOOT0 to VDD. (Some later firmwares provide a menu option to start the bootloader… but of course that is only useful if the firmware is running properly and may not be useful in the event of a failed firmware update.)

This was a mod I devised prior to the v3.4 hardware change, it is not identical to that change as it preceded it, but it works fine on v3.3 hardware and may work on earlier versions.

Boot switch

The mod calls for replacing R5 with a 1k (1402) and running a short jumper from the T terminal of the jog switch to the un-grounded end of R6.

To use it, hold the jog switch in and turn the nanoVNA on.

Above a pic of the mod. It is a simple mod, but very fine soldering so it might not be within everyone’s capability.

NanoVNA-H* – a howto do firmware update using STM32CubeProgrammer

One of the many solutions for updating firmware on the NanoVNA-H* is using ST’s STM32CubeProgrammer.

It would seem that STM32CubeProgrammer deprecates the older DfuSe Demo utility… which remains available for download. Some online experts have inferred that the word Demo in the latter implies it is not the full quid… but they misunderstand the context.

Windows drivers

The two are kind of incompatible in that they use difference device drivers. If you set your machine up for one, it breaks the other until you switch the correct driver in.

STM32CubeProgrammer uses libusbk (or the like) whereas DfuSe Demo uses the STub30 driver.

Above is a dump of the driver properties in my working instance. Continue reading NanoVNA-H* – a howto do firmware update using STM32CubeProgrammer

NanoVNA-H4 – battery charge from discharged

This article documents the charge cycle of a NanoVNA-H4 from fully discharged to charged.

The DUT is probably a ‘standard’ H4, but with Chinese sourced produce, you never, never know.

The original battery fitted to the NanoVNA-H v4.3 is a 804050 (8.0x40x50mm) 2000mAh LiPo pouch cell (1S) with protection board.

The charger chip is a TP4056, and it would appear to be limited by Rprog to about 0.75A (which includes the current drawn by the working NanoVNA-H4) (though the circuit employed would appear to tweak that limit between VNA on and off conditions with R44). The TP4056 is simply a charger chip, it will not prevent over-discharge of the cell so it is wise to use a cell with protection board (as originally supplied on the DUT).

Above is a plot of the calibrated battery voltage reported by the NanoVNA-H4. Continue reading NanoVNA-H4 – battery charge from discharged