MEDIDAS COM UM MINI VNA


 ESTA E UMA COPIA DA PAGINA

https://www.nonstopsystems.com/radio/frank_radio_coax-sw.htm#L


logo
buttonbutton
Latest page update: January 2020 (added 10m USB extension cable).
Previous updates: 8 September 2019 (added ref. 1N)

NOTE: the measurement techniques discussed below are not exclusively specific to the miniVNA. They are equally applicable to, e.g, the increasingly popular nanoVNA. The CH0 port of the nanoVNA corresponds to the Device Under Test (DUT) port of the miniVNA, and CH1 to the Detector (DET) port of the miniVNA.

©2006-2020 F. Dörenberg, unless stated otherwise. All rights reserved worldwide. No part of this publication may be used without permission from the author.
INTRODUCTION
A FOOL WITH A TOOL IS STILL A FOOL!

WER VIEL MISST, MISST VIEL MIST!
"He who measures a lot, measures a lot of crap"
Ca. 2007, I bought a "miniVNA". It is very small, and (relatively) inexpensive Vector Network Analyzer (ref. 1). I got it primarily for measuring antennas and antenna systems. For obvious reasons, I refer to it as "the little blue box":
Mag Loop

It covers 0.1 to 180 MHz. The miniVNA is controlled by software that runs on a PC. It communicates with the unit via USB (which also powers the unit), and presents the measurement data graphically to the user. VNAs in this price range clearly have significant limitations (ref. 1D, 1J). One of these, is that the miniVNA uses the AD8302 detector with its inherent 0-180° phase detection range - it cannot determine the sign ( = inductive vs. capacitive reactance) of the phase shift between its two input signals (ref. 1N), and phase error becomes excessive above ≈150°. But for many amateur radio purposes (ref. 1K, 4), it is quite adequate. This miniVNA is basically "first generation". Subsequent models have expanded range and can be operated via wireless. A top-level block diagram of the miniVNA is shown below.

coils

Simplified block diagram of the miniVNA



The Device Under Test (DUT) port is the signal generator output port. The gain and phase detectors in the VNA compare the excitation signal from the signal generator against one of two signals:
  • the signal that is reflected by a single-port device (or system) that is attached to the DUT port. This is done via the directional coupler at the DUT port. Not all VNAs on the market have this, and require an external directional coupler for certain types of measurement.
  • the signal at the DET port that output by a two-port device that is excited by the DUT port, or that is captured via coupling to a single-port device.

Measurements that involve only the DUT port, are done in "antenna" mode. Measurements that involve both the DUT port and the DET port are done in "transmission" mode.
coils

(miniVNA analysis mode selections in the original IW3HEV-IW3IJZ software)


coils

(miniVNA analysis parameter display selections in the original IW3HEV-IW3IJZ software)


All VNAs must be calibrated to the extent possible, before using them! Check the manual! Also note that relatively (!) inexpensive VNAs such as the miniVNA cannot determine the sign of the reactance part Xs of the measured complex impedance Z = Rs + jXs. I.e., it cannot tell an inductance from a capacitance.
The sections below provide a brief description of some basic measurements that can be done with a VNA such as the miniVNA.
I use the following freeware:
  • On my Windows PCs and laptops: the original software by IW3HEV/IW3IWZ/G3RXQ/IK3ZGB (the latest version: miniVNA234.exe)
  • Early 2018, I installed miniVNA234 on a 64-bit Windows 10 PC. Upon starting the application, I got an error message about an OCX file that was missing. In fact, six OCX files need to be DLL-registered. See ref. 1M for how I fixed this problem.
  • Another option is the more recent Java-based vna/J by Dietmar Krause (DL2BSA).
  • On my Android tablet: the nice and flexible Blue VNA application (both via USB & Bluetooth) by Dan Toma (YO3GGX).
There are other applications (e.g., qVNAmax for Linux, and 2012 VB software by PA7N), but I have no experience with them.

DETERMINING UNKNOWN INDUCTANCE
An electromagnetic coil is simply an inductor that is wound so as to have the shape of a coil, helix, or spiral. The current through the coil generates a magnetic field that interacts with the coils itself. For most applications, an ideal coil only has inductive reactance and no losses. A coil is a coil is a coil - it doesn't know (or care) how it is used and for what purpose. Its characteristics and behavior do not depend on the application.
coils

A coil

And here are some BIG coils.
coils

One of the antenna tuning coils of the 1 megawatt VLF "Goliath" transmitter (1940s)

(these enormous variometers comprised a fixed coil (3.5 m diameter, 11.5 ft), into which a slightly smaller coil (3.2 m diameter, 10.5 ft) could be inserted hydraulically with a precision of 0.1 mm! The coils were 5 m tall (16 ft) and weighed about 5000 kg (11k lbs)

coils

Tuning coil of the VLF transmitter at Rugby/UK  (mid-1920s)


In antenna systems, coils - if any - are primarily used in two ways:
  • As part of a "trap". This is a parallel circuit of an inductor coil and a capacitor. At the resonance frequency of this circuit, its impedance becomes quite high. A trap is inserted in the radiating element(s) of an antenna, somewhere between the feedpoint and the tip of that radiator. Around the resonance frequency of the trap, the part of the radiator beyond the trap is basically disconnected. In this case, only the part of the radiator between the feedpoint and the trap is "active". This is used in some multi-band antennas: the full length of the antenna is used on one band, the shortened length is used at a higher band.
  • Note that far enough below the resonant frequency, a trap basically acts like just a loading coil.
  • As a loading coil. This is a coil used by itself. Short antennas have a capacitive reactance at the feedpoint. This can be compensated by introducing inductance somewhere in the radiating element(s). One way to do that is with a "lumped" inductance: an inductor coil. Contrary to popular belief, a loading coil does not add "missing electrical length"!
  • Note that no coil is perfect: there is always loss resistance and stray (parasitic) capacitance. That is, any coil by itself also has a resonance frequency, and the coil will act as a "trap". This is why loading coils should be operated far away enough from that self-resonance frequency.
I am not a expert (real or self-anointed) of coils. So, rather than writing a lot of rubbish here, I refer to the list of references
The impedance of an (ideal) inductor is:
formula
This formula can be re-written as:
formula

where f in MHz and L in μH.  At the frequency where |Z| = 50 ohm, this simplifies to:
formula

Hence, with a simple  |Z| measurement, we can determine an unknown inductance value. Actually, it is "estimate" rather than "determine": VNAs such as the miniVNA are only reasonably accurate around 50 Ω.
Note: in all test set-ups, wiring should be kept as short as practicable.
coils

Test set-up for impedance-based measurement of Lx

(miniVNA software in "antenna" mode, |Z| parameter displayed)

Outside the range of 20-200 Ω, miniVNA accuracy is very poor. Resonance-based methods are more accurate. The standard formula for the resonance frequency of an (ideal) LC-circuit is:
formula

This equation can be re-arranged as:
formula

which can be re-written as:
formula

where L is in μH, C is in pF, and fres is in MHz. So, if we use a known capacitance C and measure the resonance frequency fres, we can determine the unknown inductance L.
For the special case where C = 253 pF (e.g., 220 pF and 33 pF in parallel), the equation simplifies to:
formula

coils

Test set-up for parallel-resonance measurement of Lx

(miniVNA software in "antenna" mode, "loss / dB" and "phase" parameters displayed)

coils

Alternative test set-up for parallel-resonance measurement of Lx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)


Note that in parallel-resonance configuration, the LC-impedance at the resonance frequency is high. In the series-resonance configuration, it is low.
coils

Test set-up for series-resonance measurement of Lx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)

The resonance frequency is easily identified in the loss/phase plot:
coils

Phase and loss plot for the LC-circuit, miniVNA in "transmission" mode


Note the -30 dB “loss offset” setting on the left hand side of the plot. This was done so as to lower the "loss" curve to where it was fully visible.
Note: accuracy of determination not only depends on the miniVNA accuracy, but also on that of the reference capacitor. Over thirty years of professional engineering experience has taught me that anything within ±20% is within engineering accuracy, hihi! Capacitors typically have poor tolerances with respect to their nominal value. When new, ceramic disk caps typically have +80/-20% tolerance, milar polyester ±5 or ±20%, tantalum ±10 or ±20%, metalized polypropylene typ. ±5, ±10, or ±20%, electrolytic typ. ±20%, silver mica ±0.1 to %±1%. Polystyrene capacitors are available with ±1 and ±2% tolerance. I normally use styroflex capacitors (a special form of styrene). Special capacitors are available down to ±0.01% tolerance.
A full-sweep plot shows some phase "dips" and "reversals" at (much) higher frequencies. They may be related to resonances due to stray capacitance of the coil, wiring of the test setup, etc.:

coils

Phase plot of parallel LC-circuit

(miniVNA in "antenna" mode, 1-180 MHz sweep)


Obviously, you can use a conventional/classical "dipmeter" to determine the resonance "dip". But the miniVNA can also be configured as a "dipper / sniffer":
coils

Dipper/Sniffer set-up for parallel-resonance measurement of Lx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)

coils

Note that you cannot use "dipper/sniffer" method to determine the Q of the coil: the phase-vs-frequency plot depends on the coupling (i.e., distance, orientation) between the test coil and the “sniffer coil”. As with the classical dipmeter, the resonance frequency also tends to shift with the level of coupling.
I have also used my fancy dipmeter with digital frequency read-out (ref. 3) to determine resonance frequencies. The dipmeter’s excitation coil was coaxially aligned with my test coil. Inserting a fiberglass fishing pole (my dipole is made up of two such poles) into the coil core did not cause the resonance frequency fres to shift. A good thing!

coils

Test setup with my dipmeter


The "sniffer/dipper" method can also be used to measure coils in-situ:

coils

The techniques discussed above can be also be used to characterize unknown parallel LC-circuits, such as antenna "trap" filters that are used in many antenna designs.
If Lx and Cx are the unknown parallel elements of the L/C trap, Cp is the additional known parallel capacitor, fres1 is the resonance frequency of the trap without Cp, and fres2 is the resonance frequency of the "trap plus Cp", then:
coils

coils

After determining fres1 and fres2 with one of the methods discussed above, we can solve for Cx:

coils

Once Cx is found, the standard resonance formula can be used to determine Lx.
DETERMINING UNKNOWN CAPACITANCE
Based on duality of inductive and capacitive reactance, basically the same methods described above can also be used to determine an unknown inductance. First the (coarse) impedance method. The impedance of an (ideal) inductor is:
formula

This equation can be re-written as:
formula

where f in MHz and C in pF. At the frequency where |Z| = 50 ohm, this simplifies to:
formula

Hence, with a simple |Z| measurement, we can determine an unknown capacitance value. As stated above for the inductance determination with this method: it is "estimate" rather than "determine", as VNAs such as the miniVNA are only reasonably accurate around 50 Ω (definitely not outside the 20-200 Ω range).

coils

Test set-up for impedance-based measurement of Cx


Then the resonance-based methods. Again, starting from the LC-resonance equation:
formula

This equation can be re-arranged as:
formula

which can be re-written as:
formula

where L is in μH, C is in pF, and fres is in MHz. So, if we use a known inductance L and measure the resonance frequency fres, we can determine the unknown capacitance C.
For the special case where L = 235 μH (I wish you good luck finding such a coil off-the-shelf, but you can make one...), the equation simplifies to:
formula

coils

Test set-up for parallel-resonance measurement of Cx

(miniVNA software in "antenna" mode, "loss / dB" and "phase" parameters displayed)

coils

Alternative test set-up for parallel-resonance measurement of Cx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)

coils

Test set-up for series-resonance measurement of Cx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)

As for the inductance measurement, the resonance frequency is easily identified in the loss/phase plot. Also, the "sniffer/dipper" method or a dipmeter can be used to determine the resonance frequency.

FILTERS
The miniVNA can be used to determine the characteristics of passive filters (LC-circuits and crystal filters). Typical parameters are the corner-frequencies and skirt-steepness of low-pass, high-pass, band-pass, and band-stop filters. Other parameters are insertion loss and ripple. This is very straightforward for filters with a 50 Ω input and output:

coils

Test set-up for impedance-based measurement of Cx

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)

For filters with I/O port impedance other than 50 Ω, (passive) adapter networks should be used. They can be transformer based (you will need "Un-Un" transformers), or a simple resistor network:

coils

Test set-up for filter measurements with resistor adapter-networks


With resistor networks, the "loss offset" in the analyzer GUI must be set to 2x the attenuation of resistor network. See examples above. Low-inductance resistors should be used, such as "metal film". For 10:1 adapters, oscilloscope probes may be used (they are 500-to-50).When using transformer adapters, the miniVNA must be calibrated with the input and output adapter connected back-to-back (i.e., without the filter).
For narrow crystal filters, the sampling speed ( = number of samples/sec) of the analyzer sweeps may have to be reduced. Also: some crystal filters require a small capacitor (e.g., 10 or 20 pF) to be installed across the input and across the output. Check the data sheet!
Matching to 50 Ω can be measured with the following set-up:

coils

Test set-up for impedance-based measurement of Cx

(miniVNA software in "antenna" mode, "loss / dB" and "phase" parameters displayed)


AL OF FERRITE AND IRON-POWDER CORES
The miniVNA can also be used to determine the AL value of an unknown ferrite or iron-powder core. This value expresses how many wire turns have to be wound onto the core, to obtain a certain inductance. So, if we know the number of turns, and measure the resulting inductance, we can determine the AL value. And with the  AL value, we can identify the type of core (if the core manufacturer is known). Here are some AL values for commonly used ferrite and iron-powder cores (note the large tolerances!):
coils

AL values of some common ferrite and iron-powder toroidal cores (rings)


For whatever reason, the AL is defined differently for ferrite and for iron-powder cores. The difference is a factor of 10. For ferrite cores:
formula

For iron-powder cores:
formula

As stated above, all we need to do is wind a couple of turns on the core, and measure the resulting inductance with one of the methods described above for unknown inductances. Then apply the appropriate AL formula.

coils

Test set-up for series-resonance measurement of L

(miniVNA software in "transmission" mode, "loss / dB" and "phase" parameters displayed)


coils

Alternative test set-up for resonance-based measurement of L

(miniVNA software in "transmission" mode, "loss / dB" and phase parameter displayed)


CRYSTALS
A mechanically vibrating quartz crystal can be represented by an equivalent electrical circuit (ref. 4C):
coils

Hence, measuring the resonance characteristics of a crystal is straightforward:

coils

Test set-up for the impedance-based measurement of Cx

(miniVNA software in "transmission" mode, "loss / dB" parameter displayed)


The plot below shows the typical resonance curve of a crystal. Note that there are multiple resonances! The lowest resonance frequency is always a series-resonance. It has the lowest damping. The next higher resonance frequency, with higher damping, is a parallel-resonance.
xtal

"Loss / dB" plot of a 10.250 MHz crystal

(miniVNA in "transmission" mode)

The "Q" of the crystal can be determined by zooming in the frequency sweep-range on the lowest frequency, and determining the -3 dB bandwidth. "Q" is the resonance frequency divided by that bandwidth. Typical crystal Q-values range from 104 to 106. This is orders of magnitude higher than typical LC-oscillators.

DIRECTIONAL COUPLERS & POWER-DIVIDERS - INSERTION LOSS & DIRECTIONAL ATTENUATION
A directional coupler is a 3-port or 4-port device. It has an input port, and output port, and one or two coupled ports. Insertion loss between the input and output port is the "through" loss between these ports, plus the "coupling loss" due to the load that is transformed from the coupled port(s) to the through-path between input and output port. The latter amount depends on the coupling ratio: the ratio between the power applied at the input port and the resulting power that appears at the coupled port. All ports must be properly terminated! The miniVNA can be used to measure the coupling (damping / isolation) between any two ports.
Shown below is a simple power divider. The coupled port is transformer-coupled to the 1:1 through-path between the input and output port. My -30 dB divider is described on this page.

coils

Test set-up for the insertion-loss measurement the 1:1 through-path

(miniVNA software in "transmission" mode, "loss / dB" parameter displayed)

coils

Test set-up for the coupling ratio between the 1:1 through-path and the coupled port

(miniVNA software in "transmission" mode, "loss / dB" parameter displayed)


COAX SWITCH - INSERTION LOSS & ISOLATION
I wanted to share my antenna between two solid-state transceivers, so I needed a coax switch. One transceiver has an output power of 5 Watt, the other 100 Watt. Clearly, I don't want to blow up the receiver input of the QRP transceiver when the coax-switch connects the antenna to the 100 Watt rig. For the HF-bands, a good coax switch has at least 60-70 dB cross-talk damping (isolation), and less than 0.1 dB insertion-loss.
We can measure this with an antenna/network analyzer, such as the miniVNA that I have. Note that for the insertion-loss measurement, we must account for the loss caused by the connectors between the switch and the miniVNA. Note that coax connectors really depends on production quality ( = price). This is particularly important on VHF and above. N-type connectors typically have negligible insertion loss, whereas cheap "oriental" PL-259/SO-239 connectors may have 0.2 dB insertion loss and frequency-dependent impedance transition.
Coax switch

Cross-talk (isolation) measurement


Coax switch

Insertion-loss measurement


Coax switch

Specification of the above coax switch (Jetstream JTSC-2M)


COMMON-MODE CHOKES
The common-mode attenuation of 1:1 current "chokes" is determined by measuring the loss (damping) on the coax shield (braid), between the two sides of the "choke". On HF, 25-30 dB common-mode damping is "good". The test set-up for some standard common-mode chokes is shown below.
Coax switch

Coax switch

Coax switch

Coax switch

Common-mode attenuation of a W2DU-style choke with 24 beads of #77 ferrite material

(attenuation is about 20-22 dB above 7 MHz)


ANTENNA SYSTEMS
Measurement of antennas (i.e., at the feedpoint) and of antenna systems (antenna + feedline(s) + balun(s) + choke(s) + antenna tuner) is easy. However, quite often, interpreting the data is not! I am not going into detail here, but ref. 4J may provide some practical examples.
Note: antenna resonance-frequencies and SWR-minimum almost never coincide exactly! Per definition, at resonance, the impedance is purely resistive: reactance is zero. The SWR minimum occurs where the impedance is nearest to 50 Ω. Most antennas do not have an impedance of 50 Ω at resonance!
Note: there is no requirement to operate an antenna at a resonance frequency. Doing so only makes matching to a feedline easier.
Note: obviously, you can measure an antenna system by connecting the VNA at the end of the feedline. However, unless the feedline is exactly half a wavelength long (including accounting for the velocity factor) such that it replicates the complex impedance at the opposite end, this does not tell you very much about what the impedance (Rs and Xs) is at the antenna. This also means that an antenna coupler ("tuner") that can match the feedpoint-impedance of the antenna, may not be able to do so at the end of the feedline (and vice versa).
The first plot shows a nice SWR-dip at/near resonance just above 7 MHz. At a slightly lower frequency, around 6.8 MHz, there is a small dip. Where does it come from? In this particular case, the antenna has a radial that is too long with respect to the antenna's resonance frequency. Sometimes such dips occur due to coupling with objects near the antenna.
coils

SWR dip of an antenna at/near the resonance frequency - secondary dip below it

(source: personal communications with Gerd Koetter (DO1MGK, SK))


The next plot shows the SWR-sweep of a multi-band antenna. Two of the dips (around 8 and 25 MHz) could be deepened by adding radials of the appropriate length.
coils

SWR
Some words about SWR....
Antennas are connected to a transmitter via an RF transmission line. This is typically a coax cable, "open wire" ladder-line, window line, or a twin-lead cable. Such transmission lines can be modeled as a series of infinitesimally small sections of four components:
  • series inductance per unit of length, denoted L0.
  • loss resistance per unit of length, R0, in series with inductance L0.
  • parallel capacitance per unit of length, denoted C0.
  • leakage conductance per unit of length, G0, parallel to the capacitance C0. This is the reciprocal of the loss resistance in the dielectric between the two conductors of the transmission line.

formula

Unbalanced transmission line (coax) - modeled as an infinite series of distributed components



formula

Balanced transmission line (twin-lead, window line, ladder line) - modeled as an infinite series of distributed components


A transmission line has a so-called characteristic impedance, denoted Z0. If the leakage conductance G is small enough and the loss resistance R is also small enough, then Z0 is only related to the ratio of two parameters that are distributed along the transmision line: L0 and C0:
formula
Note that this is independent of frequency and independent of the length of the transmission line!
Coax cable is typically dimensioned and constructed such that Z0 is 50 ohms (or 75 ohms for TV and satellite receiver coax). For twin-lead cable and window-line, standard Z0 is 300 or 450 ohms. The Z0 of ladder-line also depends on the wire spacing, wire diameter, and wire insulation material. Such line is often dimensioned for 450, 600 ohm, or more.
What happens, if a transmitter inserts a signal into the input end of the transmission line, but the transmission line is not terminated with a load impedance ZL that is equal to the line's characteristic impedance Z0? That is, ZL ≠ Z0. This impedance mismatch causes an impedance discontinuity at the output end of the transmission line. Part (or even all) of the input signal ("wave") is reflected at that discontinuity - just like a mirror. The forward "wave" (also referred to as "incident wave") and the reflected wave travel in opposite directions. They combine into an interference pattern.
For simplicity and illustration purposes, let's assume that the input signal is a constant sinewave. The forward and reflected waves have the same frequency (wavelength). The resulting pattern is then called a standing wave. Unlike the forward and reflected waves, the standing wave does not travel along the transmission line: it is stationary ( = standing still).
formula

Example: standing wave that is formed by 100% reflection of a constant sinewave

(blue = forward travelling wave, red = reflected travelling wave, black = resulting standing wave)

The wavelength of the standing wave is the same as that of the forward wave and of the reflected wave. Hence, the amplitude pattern of the standing wave repeats itself every full wavelength. As explained below, we are actually only interested in the absolute amplitude of the standing wave. Its pattern repeats itself every half wavelength.
The animation above is for 100% reflection of the forward wave. In this case (and only in this case), the reflected wave has exactly the same amplitude as the forward wave. The forward and reflected wave combine in a constructive and destructive manner ( = superposition). As a result, the amplitude of the standing wave is twice that of the forward wave, and the absolute minimum amplitude of this standing wave is zero:
formula

Obviously, the reflection cannot be more than 100% if the load is passive. If it is less than 100%, then the reflected wave has an amplitude that is less than the amplitude of the forward wave. The resulting standing wave now has a maximum voltage amplitude |Vmax| that is less than twice the amplitude of the forward wave. Likewise, this standing wave has a minimum voltage amplitude |Vmin| that is non-zero, but never larger than the amplitude of the forward wave. The opposite extreme case is 0% reflection. In this case, there is no standing wave, and the forward power wave is completely transferred to the load. This is what we want!
If the load is an antenna, then the transferred power is partially dissipated (loss resistance in the antenna and to ground/environment) and partially radiated. The radiated power is often modeled as being dissipated in a fictitious "radiation resistance".
The standing wave ratio (SWR) is the ratio of these maximum and minimum voltage amplitudes of the standing wave. More precisely, this is the Voltage SWR (VSWR, often pronounced as "vizwar"). Likewise, there is a standing wave pattern of the forward and reflected currents. This is the Current SWR, or ISWR. It has the same value as the VSWR:
formula

SWR is always in the range [1,∞] because |Vmin| cannot exceed |Vmax| and cannot be less than zero (since it is an abolute value).
Keep in mind that true |Vmax| and |Vmin| are only present physically, if the transmission line is at least half a wavelength long. A line that is shorter than that, will only have a local minimum and/or maximum. This local minimum may not be as small as the global minimum of a sufficiently long transmission line. Likewise, the local maximum may not be as large as the global maximum of a sufficiently long line. But based on the definition of SWR, this does not affect the SWR.
For a complex load impedance Zload = Rload + j·Xload, the above equation can be expanded as:
formula

The reader may verify that for a purely resistive load equal to the characteristic impedance of the feed line. I.e., for Zload = Rload = Z0, we obtain SWR = 1.
We have seen that SWR is related to "reflection" at the load end of the transmission line. In fact, it is directly related to the reflection coefficient, usually denoted Γ (capital letter Gamma).
formula
In general, Zload is a complex impedance, so the the parameter Γ is a complex number that has a magnitude |Γ| which is often denoted ρ (rho), and a phase angle. |Γ| is always in the range of [0,+1].
When a forward wave with amplitude Vforward is reflected at the load-end of the transmission line, then the reflected wave has an amplitude Vreflected = Γ·Vforward. In general, Γ is a complex number. If the transmission line is terminated with Zload = Z0, then there is no impedance mis-match and no reflection, hence Γ = 0. Termination with a short circuit (i.e., Zload = 0) results in Γ = -1. That is, 100% reflection, with opposite polarity. Termination with an open circuit (Zload = ∞) results in Γ = +1. That is, 100% reflection, with the same polarity.
Note that the source impedance Zsource does not appear in the above SWR equation. However, if the transmitter output impedance is not equal to Z0, then there is an impedance mismatch at the input side of the transmission line. This discontinuity also causes reflections, with its own reflection coefficient value Γinput. Likewise, reflections may be caused by local deformation of the transmission line (e.g., sharp folding over of a coax cable, change in wire spacing of a ladder line, etc.). Note that transmitters with a "50 Ω" output typically do NOT have a 50 Ω output impedance!
The relationship between (V)SWR and Γ is as follows:
formula
Conversely:
formula
In other words:
formula
Since Γ is a voltage ratio, it is also the square root of a power ratio:
formula
So, (V)SWR can be determined by measuring the ratio of reflected power and foward power. This requires a measurement instrument that can distinguish between these two directional power flows, and can measure both simultaneously.
Another parameter that is often used is return loss (RL), which is expressed in dB:
formula
Note that the better the impedance match at the load-end of the transmission line, the smaller the reflection and |Γ|, so the higher RL ! Yes, this is rather counter-intuitive. But keep in mind: RL represents reduction ( = loss) of the reflection, not loss (of the forward wave) caused by reflection! RL is always in the range of [0, +∞], based on the definition and |Γ| always being in the range of [0,+1].
If we change the sign of RL, we obtain the so-called scattering-parameter S11 :
formula
S11 is one of the four S-parameters (S11, S12, S21, S22) that are used in network analysis to characterize two-port networks such as transmission lines. Ref. 5C, 5D.
For a transmission line with characteristic impedance Z0, the SWR referenced to Z0 is only determined by two parameters: this Z0 and the load impedance ZL:
formula

The ratio is inverted as necessary, such that the SWR is never less than 1, which represents perfect matching.
So, contrary to popular belief:
for a given combination of characeristic impedance of the transmission line and the load impedance,
SWR(Z0) is a constant.
It can not be changed by changing the length of the feedline!
So, why can measured SWR change when the feedline length is changed? An SWR meter only measures something at the point were it is inserted in the transmision line. So, obviously, it cannot measure the voltages or currents all along the transmission line. There are two basic types of SWR meters:
  • an impedance bridge circuit that is only balanced when the measured impedance matches the reference impedance in the bridge.
  • current transformers.
  • directional couplers.

There are several possible reasons for this, e.g.:
  • The SWR instrument mis-reads due to RF interference.
  • Feedline loss
  • The SWR meter is an impedance bridge, so it can only measure the ratio of the local impedance and Z0.
  • The SWR meter senses forward and reflected current with a directional coupler, but the directivity discrimination of the coupler is not perfect. Directivity should typically be at least 15 dB, to reduce the power measurement error to less than about 1 dB.
  • The instrument does not measure at least not for the actual Z0 of the transmission line.
  • The actual Z0 of the transmission line is not exactly the Z0 for which the SWR meter is designed (and should be calibrated).
  • Note that, e.g., "50 ohms" coax is not "50.0 + j·0", but often around 52 ohms with some non-zero reactance.
  • Note that the "50 ohms" output of a solid-state transmitter or transceiver is rarely 50 ohms. This may explain some discrepancies between SWR-readings by the internal SWR-meter of transmitters/transceivers and external meters.

Depends on whether we are only interested in keeping the transmitter happy by loading its output with the proper impedance (e.g, 50 ohms), independent of the transmission line SWR, or we also want to match the antenna to the tranmission line, in order to minimize transmission line losses.
The only point along the transmission line where conventional SWR meters .
SWR is highest closest to the load, and only "improves" as the distance from the load increases, creating the false impression of a matched system.
Note: it is very important to always make clear which SWR we are talking about: SWR(Z0) or "measured SWR", which is also referred to as "true SWR", and SWR(True).
Conventional SWR-meters measure the ratio of the local impedance (at the antenna/output connector of the meter) , and the reference impedance that the meter is designed for (and hopefully calibrated to), typ. 50 ohm. Obviously, it cannot do a remote measurement of the load-impedance Zload. Likewise, it cannot measure the maximum and minimum voltage (or current) along the transmission line. So, such an instrument can only measure the Zload / Z0 ratio, if it is placed at the antenna feedpoint! Note that a VNA does not measure a local impedance: it measures the reflection coefficient. The magnitude of that coefficient is directly related to the SWR.
Note: whereas (by definition) SWR is a constant that is independent of the length of the transmission line, the impedance along that line is not constant, unless the impedance Zload of the load ( = antenna feedpoint) is equal to Z0.
So, how does the impedance observed at the transmitter end of coax cable depend on the electrical length of that cable and termination impedance? Let Zinput be the impedance that appears at the input end ( = transmitter end) of a transmission line that has a characteristic impedance  Z0, and that is terminated with a load impedance Zload at the oposite end ( = antenna end). The general expression for Zinput  as a function of Z0 and  Zload  is (ref. 5A):
formula

where  Zload is a complex impedance ( = resistance + reactance):
formula

and the phase angle expresses the electrical distance (in radians) from the load-end of the transmission line:
formula

So, except in a very small number of special cases:
the impedance that appears at the transmitter-end of the transmission line
varies as a function of
the Z0 of that line, the length of that line, and the load-impedance Zload
If you set Zload = Z0 in the above equation for Zinput, it is easy to see that the resulting Zinput = Z0:
formula

Or, to put it differently:
for a any length of transmission line,
the impedance that appears at the transmitter-end of that line,
is only equal to the impedance at the load-end of the line,
if the load-impedance Zload is equal to the Z0 of the line
What does that mean? Example: if a coax with Z0 = 50 ohm is terminated with a 50 ohm load resistor ( = "matched line"), then the 50 ohm of the load appears at the opposite end of the cable independent of the length of the cable. The local impedance at any point along the entire feedline is 50 ohm:
swr

Local impedance along a correctly terminated transmission line

(source: adapted from ref. 5B)

With antennas, this hardly ever the case! If ZL ≠ Z0, then the transmission line acts as an impedance transformer: the local impedance depends on the distance (in wavelengths) from the load-end. This means that the impedance at the input-end changes when the cable length is changed. These changes may be very large. "Impedance" SWR-meters may interpret this change as an SWR change.
So: what happens if a coax is terminated with an impedance that is not a pure 50 ohm resistor? The answer is....... that depends! It depends on that termination impedance, and on the length of the coax. To be more precise: not the physical length of the line, but the electrical length. The latter is a function of the Velocity Factor (VF) of the line, and the frequency of the transmitted signal. VF depends on the dimensions of the line and the type of dielectric. In a coax cable, the dielectric is the material between the center conductor and the shield. VF is typ. around 0.66 for coax with solid polyethylene, and 0.8 - 0.88 with foam polyethylene. The wavelength in the cable is equal to the "free space" wavelength of the signal, multiplied by the VF. Example: a frequency of 10 MHz is equivalent to a free-space wavelength of 30 meters. In a coax cable with a VF of 0.8 ( = 80%), a 10 MHz signal has a wavelength of 30 x 0.8 = 24 meters. Conversely, a cable with VF=0.8 and a physical length Lphys of 1 wavelength λ, has an electrical length Lelec = λ / 0.8 = 1.25 Lphys. Note that it is tacitly assumed that the VF is frequency-independent constant, which is a simplification.
Let's look at a very specific electrical length - whole multiples of ½λ (i.e., ½λ, λ, 1½λ,...). That is, in the general formula for  Zinput k = ½, 1, 1½, ... so  φ = π, 2π, 3π, ... Hence, cos(φ) = 1 or -1, and sin(φ) = 0. As sin(φ) = 0, the resulting Zinput is the same for cos(φ) = 1 and for cos(φ) =  -1:
formula

So, clearly:
for a transmission-line with an electrical length that is a whole multiple of 1/2 λ,
the impedance Zinput that appears at the transmitter-end of the cable
is the same as the impedance Zload that is connected at the load-end of the cable,
independent of Z0 !
So, an "open" (Zload = ∞) at the load-end is transformed to an "open" at the input-end (Zinput = ∞). Likewise, a "short" (Zload = 0) appears as a "short" (Zinput = 0), and any other impedance also as that same impedance (Zinput = Zload). Remember that the electrical length of a given cable is a function of the frequency. This 1:1 impedance transformation of a fixed length segment of cable only occurs for the harmonic and sub-harmonic frequencies for which the electrical length of that cable segment is ½λ, λ, 1½λ,...
Let's look at another special case:  the electrical length of the transmission line is an odd multiple of ¼λ. That is, in the general formula for  Zinput k = ¼, ¾, 1¼, ... so  φ = ½π,  1½π, 2½π, ... Hence, cos(φ) = 0 and sin(φ) = 1 or -1. As cos(φ) = 0, the resulting Zinput is the same for sin(φ) = 1 and for sin(φ) =  -1:
formula

To put this into words:
for a transmission-line with an electrical length that is an odd multiple of 1/4 λ,
the impedance Zinput that appears at the transmitter-end of the cable
is the ratio of the square of Z0, and the impedance Zload
So, an "open"at the load-end (Zload = ∞) is transformed to a "short" at the input-end (Zinput = 0). Likewise, a "short" (Zload = 0) appears as an "open" (Zinput = ∞). Any other load-impedance is transformed per the ratio shown in the formula above.
For purely resistive loads, the calculations are easy. Example: for a "50 ohm" transmission-line, a 100 ohm resistive load is transformed to 502 / 100 = 25 ohm (resistive) at the input-end of the line. Conversely, a 25 ohm resistive load is transformed to 2500 / 25 = 100 ohm (resistive) at the input-end. In both cases, SWR = 2. However, unlike the case where the line is correctly terminated, the local impedance along the feedline is now not resistive - except at the 1/4 and 1/2 electrical wavelength points, and multiples thereof. Between the latter points, the local impedance comprises both resistance and reactance (inductive or capacitive, depending on the distance from the end of the transmission line):
swr

Local impedance along a 50 Ω transmission line terminated with 100 Ω (SWR = 2)

(source: adapted from ref. 5B)

swr

Local impedance along a 50 Ω transmission line terminated with 25 Ω (SWR = 2)

(source: adapted from ref. 5B)

The two figures above show that the pattern repeats itself every 1/2 electrical wavelength. Of course, for loads with a reactive component, the calculation is a bit more complicated, as obvious from the general formula for Zinput.

THE EFFECT OF LOSSES
The above discussion only covers the simplistic and (typically unrealistic) case WITHOUT LOSSES !!!
In due time, I will expand this section to cover that as well... In the mean time, have a look at references 5G-5N.

Total power loss in the transmission line system consists of:
  • Transmission line loss:
  • Matched Line Loss (MLL): this is the power loss in a length of transmission line when it is perfectly matched by the load. It is typically characterized as dB for a given physical length, typically dB/100 ft or dB/100 m. It depends on the general line type (coax, twin-lead, wondow, ladder line), the specific model and manufacturer. MML is also frequency dependent: the higher the frequency, the higher the loss. See the attenuation graph below.
  • Additional loss due to SWR. This loss can be much higher than the MML!
  • Device insertion loss. Each device that is inserted in the transmission line between transmitter and antenna load causes frequency-dependent power loss:
  • Impedance matching unit (antenna coupler or "tuner"). In general, the larger the mismatch to be matched, the larger the loss. This loss can be very significant (i.e., more than 50%)!
  • Impedance transformers (baluns, ununs, common-mode chokes,...).
  • Instruments (SWR/power meters, current/voltage couplers,...)
  • Connectors. This loss is typically in the range of 0.1 to 0.3 dB per connector. Primary causes are:
  • Reflected losses, due to impedance mismatch between connector and Z0.
  • Dielectric losses, due to dissipation in the dielectric materials of the connector.
  • Ohmic losses, due to dissipation in the conducting surfaces of the connector (base metal such as copper, brass, steel; plating such as gold, silver, nickel).
  • Lightning arrestors.

TL MLL

Matched Line Loss (MLL) for various types of feedline (coax, window line, ladder line)

(source: adapted from ref.XX)

TL addl loss

Additional transmission line loss due to SWR

(source: adapted from ref.XX)


ADDING WIFI OR BLUETOOTH TO THE MINIVNA
The standard miniVNA communicates with the PC via a wired USB link. This works fine. My miniVNA came with a 1 meter long USB cable. This is not very practical for general use: if you connect the miniVNA at the feedpoint of an antenna, you and your PC have to be very near. You can increase this distance with a passive USB extension cable. This works OK, up to 4-5 meters max. Beyond that, you need an USB extension cable with a built-in repeater amplifier! I use a 10 meter long  active cable (UGREEN brand, model MPN US175, USB 2.0., US$15 in 2020).
BT

My miniVNA with a 10 mtr long active USB extension cable, with built-in repeater/amplifier


Newer models of the miniVNA have built-in wireless capability (Bluetooth). So: can we add wireless to the original miniVNA? Yes, we can! Is it very difficult: not really! Personally, I prefer such modifcations to be either easily reversible, or easy to passivate. So that is the approach taken below.
BT WiFi

BT

The 0.1 - 180 MHz miniVNA



THE MINIVNA SCHEMATIC
Before we do anything, let's have a look at the miniVNA schematic (ref. 6A). The diagram below shows the part of the circuitry that is involved with serial I/O. I have added lines in green, blue, and magenta. They show the serial TX/RX interconnections from the ATMEGA8L processor to switch SW1, and from there to either the FT232BM USB UART, or to the MAX3221 RS232 line interface.
The ATmega processor uses its PD0 and PD1 ports (pins 30 and 31) for the serial RXD and TXD. These two signals are wired to the "port select" switch SW1. This is a miniature slider switch. On the circuit board, the switch positions are labeled "RS232" and "USB". Depending on the switch position, the RXD and TXD either go to the FT232BM USB-UART chip (ref. 6B) or to the MAX3221 chip (ref. 6C). The latter is a TTL-RS232 line-driver/receiver chip. Normally, the switch is always in the "USB"  position. Note that the RS232 line interface is never used during normal operation of the miniVNA. It has no connector to the outside world. It simply terminates at pin-header J4.
BT

The original USB and RS232 interface part of the miniVNA schematic

(source: adapted from ref. 6A; click here for a full size image)


BT

Component placement on both sides of the miniVNA circuit board

(source: adapted from ref. 6A)

So, we have two basic options for connecting a wireless module or adapter to the miniVNA:
  • External RS232-WiFi or RS232-Bluetooth adapter
  • Internal TTL-WiFi or TTL-Bluetooth module
  • Below, I have not described using TTL-WiFi module, but the approach is basically the same as using a TTL-Bluetooth module.

Obviously, we do not want to permanently remove the standard USB serial interface functionality. We only want to add wireless capability: we always want to be able to quickly and easily revert to using the original USB interface, by simply flipping the SW1 switch position. This means that we must somehow create a serial-to-wireless interface on the "RS232" side of switch SW1. This gives us two basic options:
  • OPTION 1. The RS232 serial line driver output of the MAX3221 chip (i.e., signal TOUT = pin 13) and the associated line input (i.e., RIN, = pin 8) are easily accessible at the 3-pin header J4: pin 2 and 3 respectively (pin 1 of J4 is Ground). We can connect TOUT and RIN to the RX and TX pins of an external RS232-WiFi or RS232-Bluetooth adapter.
  • This is the least invasive option: there is no need to remove the circuit board to access the bottom side of the board. However, a hole must be made in the side of the miniVNA housing, to install a DB9 connector.
  • OPTION 2. The two TTL-level signal lines (ROUT and TIN) from the mini switch SW1 normally go to the MAX3221 line driver/receiver chip. We can interrupt these two lines (colored blue in the diagram above), and wire them to a small TTL-to-Bluetooth module inside the miniVNA housing.
  • A TTL-Bluetooth module must be connected to TTL-level TX/RX signals, not to RS232-level TX/RX signals! The RS232 TX output levels of the MAX3221 are +5 and -5 Vdc, which (of course) is not compatible with TTL.
  • This option requires removing the circuit board from the miniVNA housing, in order to access the pins of switch SW1 and to interrupt the two data lines from that switch to the MAX3221 chip. These components are located at the bottom side of the circuit board.

For both options, the internal switch SW1 has to be moved from the "USB" position to the "RS232" position, and the normal USB data interface can not be used at the same time.
Also in both cases, the wireless module or adapter must be powered. Obviously, the miniVNA itself must also still be powered. This is normally done via the USB interface, and the USB source (laptop, PC, tablet) provides the +5 Vdc USB power. However, when operating via a wireless adapter or module, the miniVNA will no longer be connected to a PC/laptop/tablet via a USB cable. When operating wirelessly, the USB connector of the miniVNA is no longer used for USB serial data communication. However, that connector can still be used to supply +5 Vdc USB power! All we need is a charged USB power bank ("USB battery pack"), and plug the USB cable of the miniVNA into it. This means that we must select a wireless module or adapter that can operate on +5 Vdc. For both of the above options, this +5 Vdc USB power is directly accessible inside the miniVNA, at pin-header J6.

BT WiFi

The miniVNA box, external WiFi and Bluetooth adapters, a Bluetooth module, and a USB battery pack



ADDING WIFI TO THE MINIVNA
WiFi

There are serial-to-WiFi (WLAN) modules and adapters. Must create virtual serial I/O COM port on the PC/laptop. Adapters normally come with software to do this (typically for Windows only, not iOS and Android).
External RS232-WiFi adapters can operate as a DTE ("Data Terminal Equipment") device or as a DCE ("Data Communication Equipment") device. DTE equipment acts as the initiator or controller of communication. This is not what we want or need. We need a DCE adapter, or a DTE/DCE adapter that can be configured (e.g., with a small switch on the adapter) to always work as a DCE device.
IMPORTANT: using a WiFi adapter means that you will have to select that adapter as the WiFi network that you connect to with your PC or tablet. So, your WiFi internet access will be disconnected as long as you are connected to the adapter!
IMPORTANT: WiFi adapters come with "virtual COM port" software. Such software can typically also be downloaded from the website of the adapter's manufacturer. There is also generic VCOM freeware available. I have only used VCOM software for my Windows laptop. There also exists VCOM software for Android (e.g., from Intel), but I am not familiar with it.

BT

Connecting an external RS232-WiFi adapter

(source: adapted from ref. 6A; click here for a full size image)

STEP 1: buy an external RS232-WiFi adapter. Some examples:
  • UCW232C (usconverters.com). It comes with USR-VCOM virtual COM-port software.
  • WA232E (usconverters.com); this is a replacement for the discontinued/obsolete UCW232C.
  • Important notes:
  • This list is obviously not exhaustive. It is also not kept up to date, and is provided "for information only". I cannot guarantee correctness of specs; prices vary (eBay, parts distributor, Amazon, Aliexpres, etc.)
  • I have only worked with a UCW232C adapter, and cannot endorse any other model.
  • The available documentation for the UCW232C adapter is unclear (or even incorrect) regarding the needed setting of the two mini DIP-switches! To power the adapter via pin 9 of the DB9 connector, they must be set as shown in the photo below

WiFi

My UCW232C RS232-WiFi  adapter - with the correct switch settings


STEP 2. The adapter has a male or female DB9 connector. Install a DB9 connector in the side of the miniVNA housing. This connector must be compatible with the one on the adapter: install a male DB9 connector if the adapter has a female DB9 connector, and vice versa.
BT

The four sides of the miniVNA box


BT

The two options for installing the DB9 connector


I decided to go with Option 2. This way, the external adapter is on the opposite side of where the BNC connectors are, and on the same side as the USB connector. The adapter is not heavy at all, but Option 1 would unbalance the pull on the BNC connectors.
STEP 3. Wire the DB9 to +5 Vdc, ground, TOUT and RIN inside the miniVNA box:
  • Connect +5 Vdc ( = pin 2 of miniVNA pin header J6) to VCC ( = pin 9) of the DB9.
  • Connect Ground ( = pin 1 of miniVNA pin header J6) to GND ( = pin 5) of the DB9.
  • Connect TOUT ( = pin 2 of miniVNA pin header J4) to RXD of the DB9.
  • If your adapter has a male DB9, RXD should be pin 2. If your adapter has a female DB9, RXD should be pin 3. Always check the pin number in the datasheet of your adapter!
  • Connect RIN ( = pin 3 of miniVNA pin header J4) to TXD of the DB9.
  • If your adapter has a male DB9, TXD should be pin 3. If your adapter has a female DB9, TXD should be pin 2. Always check the pin number in the datasheet of your adapter!

BT

Connections for the external Bluetooth adapter via a DB9 connector


BT

miniVNA with the modification for external wireless adapter installed - top view

(note: position of switch SW1 is already changed from "USB" to "RS232")

Once the DB9 connector is installed, you can no longer fully close the cover of the miniVNA box. There is interference between the top of the connector and the lip of the cover. Part of that lip must be must be removed. This must be done very carefully, so as not to crack or break the box!
BT

With the DB9 connector installed, part of the lip of the cover must be removed


BT

miniVNA with the modification for an external wireless adapter installed - side view with the DB9 connector


I drilled a small hole (2 mm diameter) to access the toggle switch SW1 with an unfolded paperclip. Drill very carefully, so as not to damage the switch!
BT

miniVNA with the modification for an external wireless adapter installed - side view with hole to access switch SW1


Note: there is enough room inside the miniVNA housing for adding a small flat rechargeable battery pack, and circuitry for charging it via the USB port. This way, you do not need an external power source (other than for charging, of course), but additional circuitry needed. This would make this modification more complicated. I decided to keep it simple, and use a small external USB power pack.
BT

My modified miniVNA - with a UCW232C external WiFi adapter attached


STEP 4. Apply power, check adapter settings, create a Virtual serial COM Port:
  • Power the miniVNA box via the USB cable, just like you always do.
  • Verify that the red LED of the miniVNA is "on" continuously.
  • With a voltmeter, verify that 5 Vdc appears across pins 9 and 5 of the DB9 connector, and that the polarity is correct.
  • Plug the wireless adapter into the DB9 connector, and verify that its LEDs light up correctly (check the datasheet or manual).
  • Check if the adapter is visible on your PC/laptop/tablet as a wireless network
  • Connect to it, as you would to a regular WiFi/WLAN network. Note: this will disconnect any other WiFi network connection.
  • If the default setting of the adapter is not 115200 / 8 / N / 1 (or you want to change the SSID name, which is Serial2WiFi_xx_xx by default for the UCW232C), connect to the adapter via a web browser and change the adapter configuration as necessary (check the adapter manual for how to do this).
  • If you have not already done so, install and start the Virtual COM-Port software on your PC/laptop/tablet.
  • Configure a Virtual COM-Port for the connected adapter (see the adapter manual or software manual for how to do this). The created virtual port will appear to the miniVNA software as a selectable serial port.
  • Start the miniVNA software and select the created virual port.
  • Enjoy!

DISCLAIMER: I do not assume any responsibility or liability for the correctness of this modifcation, your ability to implement it correctly, or any damage to your miniVNA!

ADDING BLUETOOTH TO THE MINIVNA
BT

Obviously, the wireless communication range is very important. There are three Bluetooth device classes:
  • Class 1: max transmit power of the device is 100 mW, and nominal range is about 100 meters (328 ft), but often only 20-30 meters (66-100 ft)
  • Class 2: max transmit power of the device is 2.5 mW, and nominal  range is about 10 meters (33 ft), but often only 5-10 meters (16-33 ft)
  • Class 3: max transmit power of the device is 1 mW, and nominal range is about 1 meter (3 ft).

Two things are important here. First of all, the nominal ranges are for "unobstructed line-of-sight". All obstructions (walls, etc.) between the two terminal devices will reduce the range! Note that range is also affected by antenna configuraton of the devices, supply power level, and signal fading due to reflections. Secondly, for two paired Bluetooth terminals, the unobstructed range is determined by the terminal with the highest class! E.g., if you pair a Class 1 device and a Class 3 device, the range will be that of Class 3. Before you select which option to add to your miniVNA, you will have to decide which range you want/need, and if the built-in Bluetooth of your PC/laptop/tablet supports it. If not, you will have to upgrade the Bluetooth capability of your PC/laptop, e.g., with an external Class 1 or Class 2 Bluetooth dongle, or (in case of a desktop PC) a Bluetooth PCI card of the desired class.
Note that Bluetooth Class and Bluetooth Version are not the same! The "version" (e.g., "2.0 + EDR", "3.0 + HS", or "5") specifies data rates, modulation types, security, and other features.
The miniVNA draws less than 150 mA, a small TTL/Bluetooth module (such as the HC-06) draws about 10 mA, and an external "class 1" Bluetooth adapter as much as 100 mA or more (check the datasheet!). Small USB power packs typically have a capacity of (much) more than 1 Ah = 1000 mAh. When fully charged, they have enough capacity for at least several hours of miniVNA + Bluetooth operation. WARNING: if you use the USB port of a PC/laptop/hub as the power source, make sure that that it has a sufficient current rating. Some very old USB ports may not be rated for the standard 500 mA, and may be damaged.
Whether we use an internal module or an external adapter: it must either be a "slave only" device, or a "master/slave" device that can be programmed to always power up as "slave". In the miniVNA, the serial I/O speed of the ATMEGA processor is 115200 Bd. So the module or adapter must be configurable to this speed.
Small Bluetooth slave modules, such as the very popular HC-06, are inexpensive low-power Bluetooth "class 2" devices. External adapters are also available as high-power "class 1" devices. Before you buy a module or adapter, check which "class" it is.
External Bluetooth-RS232 adapters can operate as a DTE ("Data Terminal Equipment") device or as a DCE ("Data Communication Equipment") device. DTE equipment acts as the initiator or controller of communication. This is not what we want or need. We need a DCE adapter, or a DTE/DCE adapter that can be configured (e.g., with a small switch on the adapter) to always work as a DCE device.
Adapters are considerably more expensive than a small Bluetooth module such as the HC-06. The HC-06 is readily available via eBay, Amazon, Aliexpress, etc. HC-06 price levels vary a lot (starting at about US$1.80 ≈ €1.50, early 2018), and the number of real manufacturers appears to be very limited!
As I have explained below, to add a small internal module to the miniVNA , the circuitboard of the miniVNA must be removed: to access the pins of switch SW1 and to remove two SMD resistors. To add an external adapter, an additional connector must be added to the miniVNA housing (i.e., a hole must be made in the side of the housing). The required four wires inside the miniVNA housing can be added without removing the circuit board of the miniVNA, or performing other "operations".
As stated above, "class 2" modules are low-power. E.g., the HC-06 board (the version with a 4-pin header, not the bare board without the pin-header and without voltage regulator!) can be powered with 3.6 to 6 Vdc (e.g., +5 VDC from USB). Always check the back of the HC-06 for the allowable supply voltage! It draws less than 10 mA during communication (around 40 mA during pairing). External high-power adapters can typically also be powered from a +5 Vdc supply, but can draw as much as 100 mA to 1 amp! Always check the datasheet! Some adapters input +5 Vdc power via their 9-pin DB9 serial connector. Some have a separate power connector. Some have both. Clearly, an adapter that accepts +5 Vdc via the DB9 connector will be easier: +5 Vdc is available inside the miniVNA.
As stated before, there are two basic options for adding Bluetooth capability:
  • Option A: add an external Bluetooth-serial adapter.
  • This requires exactly the same simple modification to the miniVNA boax as described above for a WiFi-RS232 adapter. The schematic below shows that only the name/type of the external adapter is different.
  • Option B: add a small internal Bluetooth-serial module.


OPTION A: ADD AN EXTERNAL BLUETOOTH ADAPTER

BT

Connecting an external serial-Bluetooth adapter

(source: adapted from ref. 6A; click here for a full size image)


STEP 1: buy an external RS232-Bluetooth adapter. Examples:
  • Microchip model RN-240M or RN-240F (Class 1, Master/Slave (default = slave), DCE/DTE, 4-12 volt (50 mA) power via DB9 connector, auto 9600/115200 Bd, small: 7.6x3.3x2.3 cm = 3x1.3x0.9 in); 240M has male DB9, 240F has female DB9.
  • Raybo Industry model BT-232B (internal antenna) or BT-232B-E (short external antenna) (Class 1, DCE/DTE (toogle switch), Master/Slave (toggle switch), power 4.8-24 V via min-USB or power connector or via DB9)
  • Chongqing Jinou model BTS4504C1H with male DB9 connector, or model BTS3804C1H with female DB9 connector  (Class 1, 5-9 Vdc to power plug or via DB9)
  • LM technologies model LM-058 (Class 1, DCE/DTE, Master/Slave, 4-12 Vdc power via USB, mini-USB, DB9, or power plug)
  • LM technologies model LM-048
  • USB Gear model USBG-BT-0240-DCE (obsolete?)
  • Important notes:
  • This list is not exhaustive, is not kept up to date, and is provided "for information only". I cannot guarantee correctness of specs; prices vary (eBay, parts distributor, Amazon, Aliexpres, etc.)
  • Adapters such as IOGEAR GBC232A and BeMatik model BL32 are not suitable: power cannot be supplied via the DB9 connector!
  • I have only worked with an RN-240 adapter, and cannot endorse any of the other ones listed above.

BT

RN-240M adapter


Modification steps 2 and 3 ( = modification of the miniVNA box) are completely identical to what I described for the external WiFi adapter further above.
Configure the adapter for the 11500 bps, DCE, and power input via the DB9 connector (check the spec sheet!). Note: the default configuration of a factory new RN-240 adapter (or one that has been reset to factory settings with the procedure described in the manual) is exactly what we want - no need to change the anything! The four mini DIP-switches must be in the "off" position:
BT

Setting of the micro DIP-switches of the RN-240 adapter


BT

My modified miniVNA - with an RN-240F external Bluetooth adapter attached


This approach is "plug-and-play": no need to install drivers or anything - just connect to the Bluetooth adapter (the RN-240 is named FireFly-xxxx by default), just like you would do with any Bluetooth device, and enter the PIN code (standard is 1234) when prompted by the operating system. I have verified this on my Windows 10 laptop and my Android tablet, both with miniVNA software.
DISCLAIMER: I do not assume any responsibility or liability for the correctness of this modifcation, your ability to implement it correctly, or any damage to your miniVNA!

OPTION B: ADD AN INTERNAL BLUETOOTH MODULE
Adding an internal Bluetooth (or WiFi) module to the miniVNA is more complicated than adding an external adapter!
 ROUT and TIN pins of switch SW1 to the HC-06 module instead of to the MAX3221 chip.
The modified schematic is shown below. It reflects removal of resistors R12 and R27, and wiring the HC-06 module to switch SW1 and to pin-header J6:
BT

The modified USB and RS232 interface part of the miniVNA schematic

(source: adapted from ref. 6A; click here for a full size image)


THE HC-06 BLUETOOTH MODULE
The HC-06 is a Bluetooth "slave" module. It is small (37x17 mm ≈ 1.5x0.7 inch) and is used in many projects with processor boards such as Arduino, Raspberry Pi, STM32 Nucleo, Beagle, and MSP430 Launchpad.The HC-06 is readily available via eBay, Amazon, Alibaba/Aliexpress, etc. Price levels vary a lot (I paid €1.80 and €2.75 in 2018, incl. shipping), but the number of real manufacturers appears to be very limited!
The HC-06 is basically an HC-05, but programmed with reduced instruction-set firmware: it can only be a "slave" device, with a limited subset of AT-commands. It is not easy at all, to tell them apart! Do not get an HC-05 module: it is not a "slave" module, but a "master/slave" module. The HC-06 breakout board typically has a 4-pin header (as the KEY and STATE pins are not used). The HC-06 does not have a small reset button near the EN (KEY) pin. The ones that I purchased are marked "ZS-040" on the back side. Some HC-06 modules are marked "JY-MCU".
See the back of the module for the pin-out and voltage levels.
BT

Front and back of two different HC-06 breakout boards - both with designator "ZS-040"

(size: 15.6 x 37.5mm (0.6 x 1.5 inch) excl. pins; note the RX voltage limit of 3.3 V!!!)

The pin-out of the HC-06 breakout board is as follows (see the photos above):
  • VCC is the supply voltage = 3.6-6 Vdc. This is fully compatible with the +5 Vdc USB voltage used in the miniVNA.
  • GND is simply ground level and signal common.
  • TXD is the serial output (to the host controller).
  • RXD is the serial input (from the host controller).

Note: the HC-06 (and HC-05) is also available as a bare board (28x15x2.35 mm). It does not have a pin-header, 3.3 Vdc voltage regulator, LED, etc. Do not get one of these:
BT

A bare HC-06 module - without breakout board and its pin-header

(do not get this version)


CONFIGURING THE HC-06 MODULE
The default communication speed of the HC-06 is 9600 Bd. However, the serial communications speed of the miniVNA processor is 115200 Bd. So the HC-06 must be  reconfigured. To do this, you must connect the HC-06 to a serial host. Basic options are:
  • Via a USB-to-TTL converter dongle to your PC/laptop.
  • Such converters often use  a CP2102 or CP2104 UART-UART chip with 3.3 Vdc TTL levels. If you use such a converter, check the TTL levels in the specification!
  • To the RS232 COM-port of your PC/laptop (if it is old enough to have one).
  • Standard RS2323 logic high "1" is a positive voltage (+3 to +25 Vdc, in PCs often +3 to +13 Vdc), and logic low "0" is a negative voltage (-3 to -25 Vdc, in PCs often -3 to -13 Vdc).
  • To an Arduino or similiar single-board processor.
  • The data pins of such boards typically operate at +5 Vdc TTL level.

Both TXD and RXD of the HC-06 operate at 3.3 Vdc logic level, not at Vcc level! This means that you should not apply more than 3.3 Vdc to the RXD input! If you do apply 5 Vdc to the RXD port, you may destroy it! Note that special precautions are not necessary in the miniVNA: the TXD and RXD ports of the HC-06 will interface directly with the PD0 and PD1 ports of the ATMEGA8L processor. This processor is operated from the 3.3 Vdc supply voltage, and does not up-convert to +5 Vdc. The 3.3 Vdc TXD output of the HC-06 is fully compatible with +5 Vdc TTL RX inputs.
As explained above, the HC-06 has a 3.3 Vdc TTL RX/TX interface. In all cases, you MUST use a logic-level converter to reduce the level voltage that will be connected to the RXD of the HC-06. The easiest way to do this, is with a simple 2-resistor voltage divider across the TX output of the programming device (PC dongle, Arduino,...) and Ground:
BT

5 V to 3.3 V logic-level adapter for the RX input of the HC-06

(other resistor combinations will also work, e.g., 18 kohm & 10 kohm, and 20 kohm ( = 2x 10 kohm) & 10 kohm)

BT

USB-TTL adapter model CP2104


Once the HC-06 is correcty connected to the programming host, teh HC-06 must be configured for 115200 Bd communication, and you may want to change the name of the module. This requires that several AT-commands be sent to the HC-06. This can be done manually via a terminal program (e.g., Putty, Termite), or with a script, or with an Arduino sketch (e.g., ref. 6J; there are many similar write-ups on the internet). If you use a terminal program, make sure to configure it for "append nothing", i.e., do not add ENTER or RETURN (i.e., \l and \n commands): the HC-06 intreprets the command string 1 sec after entering the first character. Also: use upper case characters! Unless you can type in the entire command string faster than that (I doubt it), you wil have to copy-and-paste the commands into the terminal window.
RECOMMENDATION: make sure to do this configuration first, before you make the required modifications to the miniVNA circuit board!!!
The HC-06 has two LEDs (red and/or blue): one is the Power LED (typ. located near the pin-header), the other the STATE LED (typ. located near the zigzag antenna) blinking = standby, Bluetooth not paired and connected; steady "on" = connected).

MAKING THE MODIFICATIONS
IMPORTANT:
  • You will have to remove the circuit card from the miniVNA blue box!
  • You will need a small soldering iron (15 watt, not a big, high-power soldering iron for plumbing!) and solder wick.
    • If you have access to a vacuum de-soldering machine, use it! It is faster and better than using a soldering iron and wick.
  • You have to remove the BNC connectors from the circuit board!
  •  There is no need to cut any copper traces of the board.

DISCLAIMER: I have not performed this modification, nor do I assume any responsibility or liability for the correctness of this modifcation, your ability to implement it correctly, or any damage to your miniVNA!

BT

Bottom of the miniVNA circuit board - before the modification


The following modifications must be made to the miniVNA circuit card:
  • "Neutralize" the MAX3221 chip by removing SMD resistors R12 and R27. This interrupts the TX/RX connection between the switch SW1 and the MAX3221 chip.
  • If you want, you can leave one side of these SMD resistors soldered to the circuit board. This way, you will not lose these small parts, and you can easily reverse the modification.
  • I prefer my approach to the non-reversible solution suggested by OK1CDJ in ref. XXX: remove the entire MAX3221 chip, by de-soldering all of its pins (be careful not to overheat the circuitboard!!!) or by cutting all the pins of this chip.
  • Connect the HC-06 module:
  • Connect the VCC (supply voltage) pin of the module to pin 2 of the the J6 pin-header ( = + 5 Vdc) .
  • Connect the GND (ground) pin of the module to pin 1of the the J6 pin-header ( = GND) .
  • Connect the TXD pin of the module to pin 2of the mini slider switch SW1 ( = ROUT) .
  • Connect the RXD pin of the module to pin 1of the mini slider switch SW1 ( = TIN) . Yes, TX and RX are crossed over: TXD to ROUT and RXD to TIN, not TXD to TIN and RXD to ROUT !!)

SIMPLEST: If you don't mind wiring to the opposite side of the board (there is enough room around the circuit card inside the blue box to do this).
Additionally, a hole must be drilled in the side of the blue plastic housing of the miniVNA. This way, the slider switch SW1 can be changed back and forth between "USB" and "Bluetooth" without having to open the blue box. See the modifications described for adding WiFi capability, as described further above.
Now, makes sure that the small slider switch SW1 is in the correct ("RS232") position. We are ready to go!
Obviously, the miniVNA must still be powered. And this will still be done via the USB port, even though the USB link to the PC will no longer used. Simply plug the USB cable into a USB power bank (power pack), instead of into the USB port of the PC or laptop on which the miniVNA software is running.
Use your PC, laptop, tablet to "discover" the miniVNA Bluetooth (whatever name you gave the HC-06, or default xxxxx).

REFERENCES
Note: these articles are copyrighted material; all related restrictions regarding access and usage apply.


External links last checked: October 2015

red-blue line

Back to top