In this demonstration we measure the standing wave ratio (SWR) of a load, in this case an UHF antenna. A constraint is that we want to do this in a cost-effective way up to 1.7 GHz. My earlier discussed VNA is not capable of doing this, you can get VNAs that can but they rapidly become rather expensive.
In the demonstration video we generate noise with a tool that essentially amplifies the noise of a zener diode, you could make it yourself, but if you google for BG7TBL noise generator then you will soon find out it is easier to order it than to build it yourself. Noise from the BG7TBL tool has the property that it is random phase by frequency and that the amplitude is somewhat constant over the entire spectrum. Put it on the scope and you get what you expect: something that resembles white noise. The tool needs up to 12 Volt to operate, it will get hot, but it also works on a 9 Volt battery.
If you insert noise in the SDR (I used my airspy) then it will fill the entire HF VHF and UHF spectrum, and you may wonder why you would like to do that at all. Please insert attenuators because the output of the BG7TBL tool is rather high, so I added 30 dB attenuation before I did the measurement with the SDR. When I measure the reflection properties of a load then 10dB goes before the bridge, and 20 dB goed after the bridge to prevent that the bridge is influenced too much.
There is a very good reason why you would like to insert artificial noise into your SDR. The reason is that it allows you to measure the performance of filters or loads connected in between the source and the receiver. In the video we inserted a RF bridge between the source and the receiver.
The RF bridge comes from the transverter store on ebay, see the movie, also there the conclusion is, it is easier to buy one than to make one. The bridge has an input, an output, there is a reference port and there is a device under test port. There are only SMA connectors on the PCB, the schematic is as follows:
On the input (left in the schematic) you insert a signal into the RF bridge, and on the reference port (top port in the schematic) you insert a nominal dummy load of 50 Ohm. On the output of the RF bridge (right port in the schematic) you measure the throughput with your SDR (an airspy). There are now several possibilities depending on what you connected to the DUT port (bottom port in the schematic):
Nothing is connected to the DUT port, in this case the signal reflects back into the RF bridge and this is picked up by the receiver. The throughput is called the directivity of the RF bridge. (for details see the discussion on the transverter-store web page).
The DUT port has a dummy load of 50 Ohm (or the same amount of Ohm as the reference port). In this case you will notice that no signal will pass the bridge and that everything is dissipated in the dummy load at the DUT port.
Connect an unknown load to the DUT port, and now you will see that some of the signal is reflected back to the receiver, but that the rest of the signal is dissipated into the load on the DUT port.
With the first and the second measurement you calibrate the set-up, with the third measurement you can see who much dB is dissipated in the unknown load. You can measure this in the waterfall plot, and hence you can measure the so-called reflection loss RL in decibel caused by the unknown load. Next you need to convert the RL into a SWR value, the equation is as folows:
RL = 20 log10( (SWR-1)/(SWR+1) )
I measured on the waterfall a reflection loss of 20 dB near 440 MHz, this is compatible with a SWR of 1.2, the connected antenna is a miniature version of a 70 cm amateur band antenna.
The DelfiC3 project is described here and the purpose of this experiment was to see whether a 3 element Yagi for 2 meter is sufficient to catch the signal. With the airspy, and the yagi shown below and sdrshap we found an SNR of approximately 10dB. You need to stay a few meter away from the notebook that records the data to avoid radio frequency interference.
This was the passage on 27-feb-2018 at 9:40 at the campus of the TU Delft. The elevation was approximately 30 degrees, and the ground track was eastwards. Mind that the satellite transmit power is no more than approximately 2 Watt and that the distance to the transmitter is some 2000 km.
PE4WJ added: the TX power is 10dB under the total power consumption, which is 2.4W. So 2.4 Watt minus 10dB = 0.24 Watt, or 23.8 dBm.
The topology is shown in the image, there are 12 faces, 20 nodes and 30 edges. I started with node 1 as the pole, and compute the resistance at all other nodes with 1000 Ω resistors along the edges. The same MATLAB program found 5 possible solutions:
Category 1: drain at nodes 2,3 and 4: 633 1/3 Ω
Category 2: drain at nodes 5,6,7,8,9 and 10: 900 Ω
Category 3: drain at nodes 11,13,14,17,19: 1066 2/3 Ω
Category 4: drain at nodes 12,15,18: 1133 1/3 Ω
Category 5: drain at node 20: 1166 2/3 Ω
I guess the code is sufficiently debugged now, the answer agree with what I found on the internet.
If you can do the cube, then you can also do the icosaeder, the topology is as follows:
Enter the topology in the program that I used for the cube, and of course, the Kirchhoff conditions are automatically generated. With 1000 Ω resistors I found:
Configuration 1: From node 1 to node 12 : 500 Ω
Configuration 2: From node 1 to node 6 : 366 2/3 Ω
Configuration 3: From node 1 to node 7 : 466 2/3 Ω
For configuration 1 the current solution shows zero ampere between nodes 2-3, 3-4, 4-5, 5-6 and 6-2 and also between nodes 7-8, 8-9, 9-10, 10-11 and 11-7. For the other configurations this is not the case.
Are there volunteers to solder the “resistor icosaeder” and verify the answers?
What is the replacement resistance of this resistor network? There are three possible answers, the original problem I found on stackexchange (and other websites) was like this:
All resistors are the same value, the answer is 5/6 times the value of each resistor. The are also other answers, namely, the resistance along one side or the resistance across a face between two corner nodes.
How to solve this problem
Your friends for this problem are Ohm’s and Kirchhoff’s laws. Both laws are linear and you can build a system of linear equations to be solved. So how does this work? In a network of resistors there are voltage nodes, they are numbered in black, at which there are voltages, and there are currents along links between the nodes, the resistors numbers are in red. The voltage difference between two nodes A and B over a resistor R results in the linear condition Vb – Va = I * R. Also at a node you have the condition that the sum of all incoming currents equals to the sum of all outgoing currents. This is all you need together with two boundary conditions, namely a prescribed voltage at the entrance of the network (node 1) and 0 volt at the exit (node 7). The entrance point is called the source, and the exit point is called the drain.
In the resistor cube problem there are 8 nodes, and 12 links. The MATLAB code creates the matrix A and the vector y and it solves A x = y so that x in the end returns all the voltages and currents in the network. Due to the boundary conditions you need to remove two Kirchhoff law equations. The rationale is that we set voltage of 1 at node 1 and at node 7 we ground the system. The sum of the currents that connect to node 1 results in the replacement resistance for the cube. For the problem posted on stackexchange it becomes 5/6 times the resistors in the cube.
MATLAB code for the problem
In the follow code the Ohm law equations are hand coded, also the Kirchhoff conditions and the boundary conditions are manually inserted.
The outcome of this problem not only depends on the value of the resistors, but also on how we define the boundary conditions of the system. But we can change that, lets keep for simplicity the source at node 1, but select difference nodes where we ground the system. I found this for 1000 Ω resistors along the cube:
Ground at node 2, 4, or 5 and the replacement resistance becomes 583 1/3 Ω
Ground at node 3, 6, or 8 and the replacement resistance becomes 750 Ω
Ground at node 7 and the replacement resistance becomes 833 1/3 Ω
In other words, the problem is very symmetrical and there are only three possible answers.
Automate a part of the equations
Want to play around with code that automatically generates the Kirchhoff and boundary conditions so that you only need to specify the current paths? Try this code, in principle it should be expandable to something like SPICE which is a general tool:
% Cube with resistors, all R=1000 Ohm,
% Calculate the replacement resistance depending on the boundary conditions
R = 1000;
% Here are the voltage nodes and the current links
vnode = [1 2 3 4 5 6 7 8]; nv = 8;
inode = [1 2 3 4 5 6 7 8 9 10 11 12];
inode = inode + 8; ni = 12;
nlink = 0; njoint = 0; ne = 0;
% topology: you only need to specify the voltage current relations
nlink = nlink + 1; link(nlink,:) = [vnode(1) vnode(2) inode(1)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(2) vnode(3) inode(2)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(3) vnode(4) inode(3)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(4) vnode(1) inode(4)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(5) vnode(6) inode(5)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(6) vnode(7) inode(6)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(7) vnode(8) inode(7)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(8) vnode(5) inode(8)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(5) vnode(1) inode(9)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(2) vnode(6) inode(10)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(3) vnode(7) inode(11)]; resistor(nlink) = R;
nlink = nlink + 1; link(nlink,:) = [vnode(8) vnode(4) inode(12)]; resistor(nlink) = R;
% define here the boundary conditions (where is the source/drain)
bc = zeros(nv,1);
bc(vnode(1)) = 2; Vset(2) = 1; % this is the source condition
bc(vnode(7)) = 1; Vset(1) = 0; % this is the drain condition <<<<< change the drain condition here
to = zeros(1,10); sense = zeros(1,10);
% automatically generate the joints (the Kirchhoff relations)
njoint = 0;
if ( bc(vnode(i)) == 0 ),
from = vnode(i);
idx = find( (link(:,1) == from) | (link(:,2) == from) );
nidx = size(idx,1);
if (nidx > 1),
nto = 0;
for jdx = 1:nidx,
p = idx(jdx);
if (from == link(p,1)),
nto = nto + 1;
to(nto) = link(p,2);
sense(nto) = 1;
ipath(nto) = link(p,3);
if (from == link(p,2)),
nto = nto + 1;
to(nto) = link(p,1);
sense(nto) = -1;
ipath(nto) = link(p,3);
% [from to(1:nto) sense(1:nto) ipath(1:nto)];
njoint = njoint + 1;
joint(njoint,:) = ipath(1:nto); flow(njoint,:) = -sense(1:nto);
% Insert the Ohm and Kirchhoff relations in the A matrix, add the boundary
ne = ne + 1;
idx = [link(i,1) link(i,2) link(i,3)];
A(ne,idx) = [-1 1 resistor(i)];
ne = ne + 1;
idx = [joint(i,1) joint(i,2) joint(i,3)];
A(ne,idx) = [flow(i,1) flow(i,2) flow(i,3)];
j = vnode(i);
if (bc(j) ~= 0),
ne = ne + 1; A(ne,j) = 1;
if (bc(j) == 1),
y(ne) = Vset(1);
if (bc(j) == 2),
y(ne) = Vset(2);
% The A matrix and the y vector should be complete here
fprintf('Number of links/joints/equations = %d %d %d\n',nlink,njoint,ne);
x = A\y;
voltages = x(vnode)'
currents = x(inode)'
Ical = -x(inode(4))+x(inode(1))-x(inode(9));
Replacement = (Vset(2)-Vset(1))/Ical;
fprintf('R= %f, Replacement resistance = %f\n',R,Replacement);
Are my answers correct?
In order to check the model I made a resistor cube from twelve 270 Ω resistors. Next you take the multi-meter and start to measure a sufficient number of resistances so that the mean and the standard deviation can be determined. With 95% probability I found:
225.50 +/- 0.16 Ω for node 1 to 7 like combination
203.04 +/- 0.34 Ω for node 1 to 3 like combinations
157.88 +/- 0.48 Ω for node 1 to 2 like combinations
The resistors are according to me somewhat larger than 270 Ω, probably they are closer to 271 Ω, in any case, the model predicts:
For 270 Ω resistors you get: 225, 202.5 and 157.5 Ω
For 271 Ω resistors you get: 225.83, 203.25 and 158.08 Ω
For 270.5 Ω resistors you get: 225.42, 202.88 and 157.79 Ω
The last guess is closest to the measured values. The conclusion is that model and data seem to be in agreement.
Get a Raspberry pi 3 (rsp3) and you own a 1 Gb ram 8 Gb flash memory Debian linux box that talks to the internet via wifi and/or wired ethernet. I configured it to run as a headless rsp3, initially you need a HDMI monitor, a USB mouse and a keyboard, and access to a wired ethernet. Once you got ssh to run on the rsp3 you can access it from anywhere on your local area network (LAN) or beyond when you forward ports on your router.
Plug in the airspy and try to run spyserver, initially sdrsharp crashed on a device busy warning. I added airspyone_host-master installed their libraries from github, set the device-type to the airspy you it starts to work, great support via their forums, thanks! Next run sdrsharp on any PC, and configure the input to be the sdr://192.168.0.16:5555/ device on your lan. IP 184.108.40.206 is the wifi access to my rsp3, and IP 220.127.116.11 is the wired rsp3. The network bandwidth is restricted to 100 MBps by the rsp3 although my network could handle the 10 folds (which is handy if you’ve got children watching youtube).
Bandwidth is a somewhat a concern on your LAN, so tweak the Bandwidth and the IQ format checkboxes in sdrsharp and change it so that the connection is confortable, see also the images below. This setup works both in wifi and wired, the latter allows a bit more bandwidth and is more stable because my WiFi to the access point has an overall bandwidth limitation of 10 MB/s which is shared by everyone in the house.
The benefit for hamradio is that a remote receiver can be set-up in your neighbood, away from the QRM (radio frequency interference, demonstrated in this movie) in your shack. If you live in an apartment building with access to the roof, then try to get the receiver and the antenna to the roof and control everything remotely over the LAN. Often this is easier than installing coax cable over many meters, and oftentimes the LAN UTP cables are already there.
The SDR generates IQ data that is scrutinized by the PC, your PC is fast enough, the RSP3 is also fast enough, but the bandwidth of the local area network (LAN) is often the main limitation. If bandwidth is already an issue on your LAN, then it will certainly be a greater problem when it goes beyond your LAN. This is one of the main limitations of any WebSDR, it may need a lot of bandwidth. But all airspy’s were designed to efficiently handle the compression of IQ data.
The checkbox “Use full IQ” directly under the spyserver select box in image 1 will open up when the connection to the spyserver is closed, the C button right of the select box opens and closes the connection, click it a few times until the “Use full IQ” checkbox is can be selected. With this you tell the spyserver on the RSP3 to compress the IQ data so that a typical 5 to 10 MB/s is reduced to often less than 100 kB/s.
Reduced IQ data has a consequence for the resolution of the spectrum and the waterfall plot resolution displayed in sdrsharp, but the quality of the audio seems unaffected. Other options are the bandwidth and the IQ format which can be selected on the fly. Both also determine the bandwidth over your LAN.
Remember that all data packages on your LAN directly go to the router before they will arrive at their destination, unlike traffic over a USB cable between the SDR and your PC. A gigabit router and CAT6 cabling is advisable in my opinion. Although the RSP3 box and the SDR are physically seen no more than a meter away from your PC, the router is 30m down the cable, while the LAN is shared by some 20 devices because nearly all gadgets in the house carry WiFi these days.
How do you make a short dipole? The answer is, put two loading coils at a distance B from the dipole feed point at its center. You can probably get loading coils from MFJ but it is really more fun to make them yourself. You need to know the position B and the overall length A of the dipole, the wire thickness D and the resonance frequency f.
In the rest of this blog you find all essential ingredients to design a short tuned dipole. The first part is the function loadingcoil, it is written for MATLAB and it estimates the inductance that you need. The second part is a MATLAB program to demonstrate the functionality of function loadingcoil, the third part shows NEC validation with a Smith chart of a 4.3 m dipole tuned for 10.1 MHz, this is the 30m radio amateur band that I currently use for WSPR.
MATLAB function loadingcoil
function [H] = loadingcoil( f,A,B,D,metric )
% What loading coils are required for a short dipole? This problem is
% described by Jerry Hall K1PLP in QST Sep 1974, 28-34. The relevant
% equation and a script can be obtained from
% To compute the loading coil inductance for a dipole of length A where
% two loading coils are placed at distance B from the center of the dipole,
% you need the wire thickness D, and the frequency f. The variable are:
% A is the overall length of a dipole in meter
% B is the place where you put the coil in meter
% D is the thickness (diameter of the wire) in meter
% f is the frequency in MHz
% H is the returned loading coil that you need
% metric=1 when in Europe (all values are in meter), otherwise metric=0 for US/UK
% (feet for A and B and inches for D)
% To verify this function you can use the script on the website of m0ukd
% listed before, but bear in mind that he speaks about the height of a
% quarter wave antenna and not the length of a dipole, so there is a factor
% two difference.
if (metric == 1),
inch = 0.0254;
foot = inch*12;
A = A/foot;
B = B/foot;
D = D/inch;
T00 = (234/f)-B;
T01 = log(24*T00/D)-1;
T02 = (1-f*B/234)^2 – 1;
T03 = (A/2)-B;
T04 = ((f*A/2-f*B)/234)^2 – 1;
T05 = log(24*T03/D)-1;
T06 = 1e6/(68*pi*pi*f*f);
H = T06 * ((T01*T02)/T00-(T04*T05)/T03);
% Last update: 1-jan-2017;
MATLAB example for loadingcoil function
% Jerry Hall K1PLP equation
% Checking this design:
% loadingcoil(3.58,20,5,0.0015,1) should result in 42.555 microHenry
f = 3.58;
A = 20;
B = 5;
D = 0.0015;
metric = 1;
H = loadingcoil( f,A,B,D,metric );
fprintf(‘F=%8f MHz A=%7.3f B=%7.3f D=%7.5f metric=%1d H=%7.3f microHenry\n’,f,A,B,D,metric,H);
Verification of a short dipole at 10.14 MHz for WSPR
To validate the results of part 1 and 2 I use the NEC software which is in the public domain. The design criterium is that a short horizontal dipole has to fit between two chimneys under the roof of our house. The solution is: A=4.315m B=0.1m, D=0.8 mm wire and H=13.7 microHenry. It is always a wise idea to independently verify whether the computed values make sense, so this is where the NEC code assumes that there is a 13.7 uH coil at 10cm from the center of the dipole, the value of A was tuned numerically until a minimum SWR relative to 50 Ohm was obtained.
model ( “short tuned 30m dipole” )
real length, height, radius, N, X, R, L, d, e;
element driven, left, right, leftmost, rightmost;
frequencySweep( 10.1, 10.15, 10 );
d = 0.05;
e = 0.10;
radius = 0.0008;
height = 10;
N = 20;
d = 0.05;
e = 0.10;
driven = wire( 0, -d, height, 0, d, height, radius, N);
left = wire( 0, -d, height, 0, -(d+e), height, radius, N );
leftmost = wire( 0, -(d+e), height, 0, -length/2, height, radius, N);
right = wire( 0, d, height, 0, d+e, height, radius, N );
rightmost = wire( 0, (d+e), height, 0, length/2, height, radius, N);
L = 13.7;
X = 2*pi*10.1*L;
R = 0;
impedanceLoad( left, R, X );
impedanceLoad( right, R, X );
voltageFeed( driven, 1.0, 0.0 );
This result in the following Smith chart rom which you learn that the SWR relative to 50 Ohm is 8.48.
The conclusion is that the impedance is 5.9Ohm which means that you need an impedance transformer to connect it to a 50 Ohm coax cable, any 1:9 current balun would be fine, I used something I purchased at a radio market, but they are relatively easy to make them yourself. The other option is to use a twin line and an impedance transformer near the beacon. The center section of the dipole consists of 40cm of PVC tube with a diameter of 40mm, at 10 cm from the center there are 17 turns and this results in the required inductance.
Next I measured with my antenna analyzer the resonance frequency of the antenna. With the analyzer at the feed point I cut the length of both arms of the dipole to the desired length so that the resonance dip occurs at 10.1 MHz. The measurement should be done at the antenna feed point, and not at the end of the coax connector that goes to the WSPR transmitter because cable impedances shouldn’t interfere with the measurement. Another verification is, listen with the SDR to the antenna, there are always plenty of signals, and inspect where the signal envelope is largest. I found it to be at the 30m band.