Saturday, August 1, 2020

Covid19 in Alberta Reality Check

The Ultimate Question
How many people actually have a problem with Covid 19 and how scared do we really need to be of this disease?

Internet Statistics
A popular statistic bandied about, is that up to 80% of people are asymptomatic and 6% of patients need intensive care.

That sounds very scary, but the 6% only applies to the 20% that actually get sick, so that makes it 1% of the population, which means that 99% of the population need not be worried, but some folks are still worried that they will be the 1%.

So much for (probably bogus) statistics off the internet and social networks.

Reality Check
Let's look at the cold, hard, real numbers, of my home state Alberta Canada, straight from the official government web sites:
  • Population: 4,428,247
  • Cases: 10,843
  • Deaths: 196 
  • Percentage of deaths: 196 * 100 / 4428247 = 0.004%
Percentage of Albertans who don't need to worry about Covid19 = 99.996%

To make that number clearer, I made a graph of the Death Rate due to Covid19 in Alberta:

Death Rate Due To Covid19 in Alberta

You cannot see it?  Maybe you need reading glasses...  

I even used a pink sticky note for emphasis, but the result is still decidedly non-scary to me.

Reality Check Against Influenza
Lets compare Covid19 to everybody's favourite, last year's Influenza, again using the official government web site data:

Population: 4,428,247
Cases: 6082
Deaths: 30
Percentage of deaths: 30 * 100 / 4428247 = 0.0007%

Percentage of Albertans who don't need to worry about Influenza: 99.9993%
(Provided that you got your flu vaccine!)

Covid19 in Alberta, is about 6.5 times more deadly than Influenza, but Influenza has widely administered vaccines, which make the number better.

The flu vaccine reduces hospitalizations by about 80%

Therefore, Covid19 (without vaccine) and Influenza (without vaccine) really are about equally bad.

However, Covid19 is worse for old people (80%), while Influenza is worse for young people (children and pregnant women).  For young people, the risk of Covid19 (without a vaccine) is about the same, or less than flu (with a vaccine).  

It is only old people who need to worry about Covid19 and for them, a vaccine probably won't work, because old people's immune systems likely will not react to the vaccine, and for young people it won't make much difference.

So, the question about Covid19 vaccines is: Why bother, if it won't help either way?

Now, after six months, now that it is all over, some people want to make masks mandatory in public:

I'm not actually against masks, since I suffer from pollen/dust allergies and it may reduce the prevalence of Influenza, TB and common colds slightly, but don't expect masks to be much use against Covid19, because it is over already.

It Is Over

Even in the USA, it is also over, the graphs just keep going down and deaths are below average for the last 3 consecutive weeks:

BS Detectors Needed
A problem that I see is that the good Doctors in charge of the epidemic response are not Farmers, Mathematicians or Engineers and are udderly unable to detect BS projections.  

Budding Epidemiologists should please read this book:
Calling Bullshit
The Art of Scepticism in a Data-Driven World
Jevin D. West (author), Carl T. Bergstrom (author)

Stop worrying.

Enjoy life.  


Friday, July 24, 2020

Thermionic Valve Power Supply

Tinker, Tailor, Soldier, Sailor

I like to tinker with old fashioned thermionic valve circuitry - tubes, for the 'Merrykins.  It is strangely crude and simple and they make a friendly orange glow in the evening.  However, powering the things is hard, due to the high voltages that are required to overcome the vacuum.

The below picture shows how I build these toys.  It happens on the fly.  This is a hobby, so I don't kill myself with design calculations.  The tag strips enable experimentation to adjust things till it works properly.  The VU Meter even has a little transistor in there - sheer desperation!

Transformerless Valve Power Supply

One can use transformers, but they are big, heavy and expensive and shipping hunks of metal around the world make it even more so.  It makes sense to use transformers if you build a high power circuit with multiple valves, such as a guitar amplifier, but a small circuit with only one or two valves presents a problem.  

For a small fun display project using Nixie, Magic Eye or VFD tubes, you certainly don't want a huge box with a heavy transformer.  However the project should be self contained, with nothing else connected to it.  Rather don't put a headset on a valve amplifier!

VU Meter Top Panel

This article describes how to build a reactive heater supply and a rectified mains high tension supply, that will not break the bank, or your back, or risk burning your house down.

The problem is that the mains supply is 'dirty'.  The Earth wire sometimes isn't earthed.  The Neutral and Live wires can be swapped.  There can be high voltage spikes caused by air conditioners, industrial machinery and lightning.  So if you want your circuitry to last longer than a few months, then you need to protect it carefully.  You can either use a big hunk of transformer iron and copper to provide the protection, or you can use a few carefully selected specialized components, to do that with a little more finesse.

Circuit Protection

You should combine the two circuits below after the choke.  I drew them separately to make it more clear.

Safety Capacitors
A Safety Capacitor is self healing and self extinguishing.  If it gets zapped by a high voltage spike, then it will carry on working despite the puncture.  Eventually, the capacitor may fail, but while it may smoke, it will not burst into flames and burn your house down.  They are expensive, but rather cheaper than a new house.  It is the big blue block in the picture.

A polymer fuse typically contains little spheres of metal inside a rubber compound.  Normally the spheres make contact and the fuse conducts.  When it heats up, the rubber relaxes and the spheres lose contact, interrupting the current.  When the device cooled down, it will again conduct.  In case of a fault, it will cycle on/off.  In an extreme failure, it will melt permanently and open the circuit.  You absolutely must use a fuse.  You will get shorts, arcs, or blown parts from time to time, when working with high voltages.

Common Mode Choke
A common mode choke will block current spikes that are the same phase on both the live and neutral wires - for example lightning induced spikes.  There are two ways to wind a common mode choke: 
1. Double up some thin hookup wire and feed it through a toroid ten to twenty times, but then it is prone to arc between the two windings - it is easy to damage the wire coating while winding on a toroid with sharp edges (some toroids are really dreadful).
2. Make two separate windings on the 'left' and 'right' sides of the toroid for beter isolation. Start on the outside and dive into the middle - keep going.  It seems to be opposite, but it is not, the two windings rotate the same way. 

To hold the windings, drop the toroid onto a sharpened pencil held upright in a vice, then glue it with epoxy or a drop of varnish.

Gas Arrestors
Place a gas arrestor between both Live and Neutral to Ground.  A gas arrestor is a non-linear device (it is a special neon bulb).  A high voltage spike will cause the gas to form a plasma and conduct. It will continue to conduct, until the voltage subsided.  In the extreme, it will arc over between two sharp points.  This will absorb both common and differential mode spikes on the mains wires.  You can get centre tapped ones and single ones - your choice.  

You can also use a couple of zinc oxide MOVs, but since we are talking about vacuum tubes, gas arrestors are more cool.

Turret Boards and Terminal Strips
I build olde fashioned circuits on olde fashioned Turret Boards and Terminal Strips.  These are authentic early 20th century strips of Bakelite with solder pins or eyelets

Building on these strips is error prone.  This time I managed to solder a resistor directly accross live and neutral - it made a nice flash.  So it is good to have a self resetting Polyfuse.  If you prefer glass tube fuses, be sure to have a dozen available, since they only give you one shot at a mistake!

Heater Current Supply

The heater supply uses a ballast capacitor to drop the excess voltage, without generating heat as you would with a series resistor. This is a nifty trick which is rather smaller than the smallest available 6V3 transformer, but your need to get a capacitor that is designed for the purpose and it is therefore much bigger and more expensive than a garden variety capacitor.  They are known as Safety Capacitors, or Motor Run capacitors and can continuously source AC current.

Heater voltage for two valves in series = 12.6 V
Heater Current = 300 mA

(I used an ancient manual CAD program, known as a pencil)

Mains: 220 VAC at 50 Hz
Vdrop = 220 V - 12.6 V = 207.4 V RMS 
(Yankees need to recalculate using 115 V and 60 Hz)

Capacitor impedance = 1 / 2 x Pi x f x C 

4.7 uF:
Z = 1 / 2 x 22 / 7 x 50 x 4.7 x 10^-6 = 677 Ohm imaginary

Assuming that the mains voltage is much larger than the heater voltage, we can ignore the 90 degree phase shift for the following calculations and simplify, just because I'm lazy to punch more buttons on the calculator:
Vin^2 = Vc^2 + Vh^2
Vin ~= Vc + Vh

230 V Supply:
217.4 V / 677 Ohm = 321 mA

220 V Supply:
207.4 V / 677 Ohm = 306 mA

Capacitor: 871-B32926A4475K
Safety Capacitors, 4.7uF, 10%, 350Vac, LS, 37.5mm

I did not have a 4.7 uF safety capacitor available, so at first I used five caps in parallel for the prototype, which is of course 5 times more expensive and bulky, but it took a while for the next Mouser delivery to get here.

Also put a 1 Megohm bleed resistor in parallel with the capacitor and a 10 Ohm, 2 W resistor in series with the capacitor, to limit the start-up current until the heaters warmed up, because the heaters are non-linear and have a much lower resistance when cold (~6.5 Ohm vs ~22 Ohm).

Test the heater supply with a 22 Ohm (one valve heater) to 47 Ohm (two valve heaters), 10 Watt resistor.  Once wired to the valves, measure the current and voltage and adjust the series resistor if necessary. The green thing next to the blue block in the picture is a 22 Ohm 5 Watt resistor (The schematic above still says 10 Ohm, but 22 Ohm, 5 Watt works better for me!).

Be sure to wire the two tube heaters in series.  When you turn the system on, the current will slowly go down and the voltage will slowly go up, as the heaters heat up and their resistance increase.  Eventually, the tubes should be glowing a nice and friendly orange and the voltage should be around 12V6 AC.  I measured up to 11.9 V AC, which is probably fine.  If the voltage and current is way out, then you need to adjust the series resistor (don't touch it - it gets hot!).

High Tension Supply

The high tension for a typical valve circuit needs to be in the order of 100 to 300 VDC.  Valves are very forgiving - when they work, they work - and contrary to popular belief, they last for many years.  Lots of the parts on the market were 'lightly used' in a military installation for 30 or 40 years, half a century ago and they still work!

You can get the HT voltage by rectifying the European mains supply and then drop the excess with a series resistor on the valve Anode.  Use high voltage diodes with a rating higher than the protection circuitry and another safety capacitor to stabilize the voltage.  (If you live in the US of A or Canada with 115 VAC, then you need to make a voltage doubler instead.)

Note that most European plugs can be inserted any which way.  If you live in Europe, then it is probably a good idea to install two fuses, in both the L and N leads and also use a DPST toggle switch.

Mains: 220 VAC @ 50 Hz
Bridge rectifier Vht = 1.414 x 220 V = 311 VDC

Mains: 230 VAC @ 50 Hz
Bridge rectifier Vht = 1.414 x 230 V = 325 VDC

Mains: 240 VAC @ 50 Hz
Bridge rectifier Vht = 1.414 x 240 V = 339 VDC

Diode, 1000V, 1A: 1N4007 (1 off or 4 off)

Capacitor: 871-B32926A4475K
Safety Capacitors, 4.7uF, 10%, 350Vac, LS, 37.5mm

I used a single diode, half wave rectifier and a 10 uF, 350 V DC capacitor for the prototype, till my Mouser order arrived.  That is the advantage of terminal boards - easy to change and fix later.

However, the 10 uF, 350 VDC electrolytic capacitor was a very bad idea.  It self oscillated, thus generating a very high voltage >1000V, with various weird and wonderful things happening as a result.  Eventually I removed it, tossed it in the bin and replaced it with a Ceramic 4.7 uF, 500 VDC capacitor, which calmed the HT supply down and since it now finally works, I'll just leave it like that.

Protection Circuitry

Resettable fuse: 576-600R150-RAR
Voltage: 350 V maximum
Current 300 mA

Gas arrestors: From each mains wire to ground
Gas arrestor: 652-2045-40-BT1LF
Spark over: 400 V

Common mode choke: 10 to 20 turns, double wound
Toroidal core: 80-ESD-R-10E
Size: 10 mm OD, 5 mm ID, 5mm height

Also put a 1 Megohm bleed resistor in parallel with the capacitor.  You won't be sorry if the capacitor is safely discharged when you touch the wires...

Test the HT supply with a 33 kilohm, 5 Watt resistor.

Indicator Lamp
What is a power supply without an indicator lamp?  A little NE2 neon bulb with a 1M to 3M3 resistor in series over the 325 VDC supply output will work, but it will be boring.  If you put a 470 nF or 1 uF capacitor in parallel with the bulb then it will flash - a relaxation oscillator.  

The capacitor will never see a voltage higher than about 90 V, but if the neon would ever pop, then the cap will pop too, so it is best to use a 1000 V ceramic capacitor.  

Please don't use a blue LED with valves.  A blue LED in a valve circuit should be illegal - A crime against humanity.

Personal Safety

When you work with thermionic valves, be sure to put a rubber carpet on the floor and house your project in a well insulated ABS, bakelite or wood enclosure, away from curious little prying fingers!

Power on: Put a piece of transparent plastic over the project and stand some distance away when turning it on.  A capacitor may explode, or something may arc and maybe you can see what happened through the plastic shield and smoke...

La Voila!


Monday, July 20, 2020

Its Over!

The Covid19 epidemic is over, but people are so scared, because of the exponentially exaggerated projections, that they now refuse to listen to reason, as explained in this video

A big problem is that the crazy-news media concentrate on the scary projections and ignore the real statistics.  Let's look at the USA CDC Covid19 death count report Table 1 - literally the cold hard facts

After the very vulnerable people sadly passed away, the illness continues to burn through the healthy population, the majority of whom will not get seriously sick, the death rate keeps going down and is now near zero.

Every week, you can go back and look at a new version of this graph and every week you will see that it doesn't go back up.  It is a very boring graph and in this case, boring is good.

On 11/7/2020, 132 people died in the USA of Covid19 - if it flat lines, then over the next 6 months, another 23,000 souls will pass away, but the curve is still declining and medical treatments for the small percentage of seriously sick people are improving, so that would be an upper limit.

The death rate is independent of the infection rates, so loved by the crazy-news papers.  There are no peaks in the table when the infection rates climb, NY stopped their lock down, political rallies broke the lockdowns, etc, meaning that all the preventative measures have had little to no effect on the death rate.

Sweden with no lockdown, had lower slopes than the UK with lockdown.

This disease is extremely contageous, it is in the air, it is carried by pets and other mammals and the expensive lockdowns were not effective.  It may have prevented some healthy people from being inconvenienced, but it did not prevent old and sick people from getting sick with Covid19 and dieing of it.  Deaths are only prevented by medical intervention and treatments in hospital.  

The lockdowns clearly did not 'flatten the curves' - the disease carried on spreading - Sweden's curve is 'flatter' than either Belgium or the UK.

Graphs for every country in Europe look the same.  The graphs go up steeply and come down slowly, just a few weeks earlier in time, compared to the US.  

In Europe, Covid19 is fish paper - yesterday's news.

North America is not far behind Europe and indeed,  for the past 3 weeks, deaths from all causes in the USA was also below the expected.  See Table 1, Percent of expected deaths:

These graphs are updated once a week by the CDC.  One cannot argue with this data since it is not predictions, it is real stone cold deaths.  Normally, deaths are dispiriting, but in this case, the contrast is so stark with the wild exponential predictions, that it is actually encouraging and unlike James Bond, people only die once.

Of course, once the death rate bounces back up to normal, the crazy papers will tell of the second coming of Covid, while the near zero bumps in the curves are really because all the vulnerable people died a few weeks/months earlier than they would have without Covid19.

Lately, there is news in Europe about a second wave of infections.  We shall see what happens in two weeks with the death counts, after the Grim Reaper walked by.  My hope is that there won't be many, since this wave is amongst younger people.

More information on real numbers vs scary exponential projections, done by people in the insurance industry, who wanted to know what would happen to their businesses if people really started dieing in droves as the projections indicated:

"The death rate is inversely proportional to the amount a country spends on health care."  

This conundrum is due to the disease disproportionately affecting older people (80%).  Poor countries don't have old people - they die young, since they don't invest in health care.  There is also some new research coming in on Covid19 vs age and immune system T-cells (old people have fewer), which may explain the problem and lead to new treatments.

Here is a graph that Americans are not allowed to see.  If you are American, please close your eyes and don't peep:

According to the BBC, more than 50% of Mumbai slum dwellers already had Covid19 and the death rate is about 1 in 2000, or 0.05%, which is so close to zero that one cannot graph it - you will only see the x and y axes with nothing in the graph:

Send the children back to school, they will be fine.  The older teachers may have a worry, but not the children.

Why is Boris Johnson wearing a mask?  He already had the illness.  Apparently he forgot.

It's over folks.  Light a candle for the lost souls and move on.  


Further reading: 
Calling Bullshit
The Art of Scepticism in a Data-Driven World
Jevin D. West (author), Carl T. Bergstrom (author)

Sunday, July 19, 2020

C-Band Yagi Antenna

A Formal Bow Tie Event

I have made a few PCB antennas and the Yagis worked well, but they were very narrow band.  So I tried to improve that by making the elements conical - or in this case, since it is 2D PCB antenna, triangular.

I think it is a fairly unique idea and I certainly haven't seen a picture of a PCB antenna like this before.  The Driven element and first director are flared to 3 mm (since there is no more space) and the Reflector and other Directors are flared to 10 mm.

Wide Band Yagi with Unbalanced Co-ax Feed

I'll see what happens once the conformal coating dried and I hooked up a cable.

It is the same design I used before - I just flared the elements and left out the last 2 directors:

This way I can compare the two antennas with each other.  I didn't bother to simulate it - I just went ahead and machined it to see what happens.

Antenna Gain

Initial tests showed that the gain is about 5 dBi which is typical for a 5 element Yagi and the bandwidth of the new antenna is much wider than the conventional old one, which is very promissing, but I need to work on my RF cables, connectors and calibration kit, to get proper graphs, since the VNA seems to be out of calibration.

I don't have an anechoic chamber - I hold two antennas in my hands and rotate them 90 and 180 degrees to see what is going on - good enuff!

Performance Graphs

I eventually charged the battery of my VNA (Having decent power sure helps!), reread the manual and reset the calibration (Func Shift 7).  I also verified that there is no significant difference between Sys Cal and User Cal with my cables, so it is good to go.

Bandwidth of 120 MHz at 3.1 GHz

For comparison, here is the previous simpler antenna with 1 mm wide straight elements:

Bandwidth of 30 MHz at 3.38 GHz

A low VSWR is important for a transmit antenna.  Modern day radios have Gallium Arsenide semiconductor drivers that can get damaged very easily by high voltages.  The better radios have self protection circuits that will reduce the output power if there is a mismatch, but El Cheapo radios may simply heat up and melt down.

Vacuum tube radios can handle enormous voltages, so the old clunkers can simply be tuned for maximum smoke, but the missus may not want to have a hot and sizzling 1 meter tall Klystron tube in the living room, although it could be quite a discussion piece.  Travelling Wave Tubes are still used in some K band satellite transmitters, so vacuum tubes are not just ancient relics of microwave ovens!


Flaring the antenna elements to 3 mm and 10 mm does help significantly to widen the bandwidth of the Yagi antenna by 400% and it still has the nice linear Phase, VSWR and Impedance characteristics of a conventional Yagi, but the antenna is still quite narrow band, compared to a Log-Periodic antenna for example.

The centre frequencies are somewhat different, because the new one is made on FR2 and the old one on FR4, but I also plotted the new one more accurately in KiCAD.  To get a PCB antenna exactly on the frequency you want, will take three to five iterations.  That is just the nature of the game.

I think that the bandwidth can be further widened, by inserting cross pieces to make the elements more like cones.  Maybe I'll try a Conehead antenna another day.

Have Fun!


Monday, July 13, 2020

Bar Clamp

Clamped Up
I needed a little clamp, but we were in Covid19 lock down.  So I made one.  No transistors, no batteries, no thermionic valves, no flashing neon bulbs!

There are many complicated ways to make a bar clamp, but I prefer the simple way.  A picture is worth a thousand words:

Mini Bar Clamp

It can't be simpler:
  • One 6 mm dowel rod
  • One 6 x 80 mm bolt
  • One 1" nail
  • Ten popsicle sticks
  • Glue

Yup - ten popcicle sticks glued together, made a small piece of plywood, that I could cut up for the clamp jaws.  You can use the exact same method to make a big bar clamp.  You don't need a super long lead screw, just a long bolt and a whole lot of little holes to adjust the other end of the clamp.  Scale it up as required for size and strength.

How do I keep the movable jaw in place?  Some funny putty (Press Stick) in a hole.  It churns around in there and keeps the block from falling off the end of the bolt - a little piece of rubber will also do.  The best way would be to file a ring in the end of the bolt, cut a washer in two and glue that into the block, but that is a lot of hassle - another day - do, do that on a big clamp.

It it really worth making a bar clamp?  Of course not!  One can buy a perfect clamp for a few Dollars, but what is the fun in that and what else can you do with a bag of craft store pop sticks?

Have fun!


Tuesday, May 26, 2020

Stacked Log-Periodic - 5GHz

While playing with my milling machine and little microwave PCB Yagi antennas, I wondered about increasing the bandwidth and still getting directional gain.  A Log-Periodic antenna looks almost exactly, but not quite unlike a Yagi...

Practice is the best of all instructors
-- Publius Syrus

On a Log-Periodic, all the elements are driven, but each dipole is reversed by 180 degrees.  To make it on a single sided PCB, will require some links to wire up the dipoles.  I added a BNC connector and thin equilength coax to the feed points of the antennas.

Stacked Log-Periodic 5GHz

To reduce the amount of copper that needs to be milled out, I cut the board close to the radiators.  The bar at the back is for mounting and also serves as a reflective ground plane.  A log-periodic antenna is surprisingly compact and a little 5 dipole antenna will have a gain of about 3 dBi.  

By carefully stacking two of them 0.75 Lambda1 centre to centre (54 mm), one should get another 2 to 3 dB of gain for a total forward gain of 5 to 6 dBi.

The important thing in radios is not the signal strength, but rather the Signal to Noise Ratio (SNR).  A directional antenna reduces multipath reflections and noise from the surroundings and improves the SNR, so that a radio will perform much better with a directional antenna, compared to a simple omni-directional dipole.

Antenna Calculator
Here is a decent log-periodic antenna designer:

Lowest frequency f1 = 4200 MHz
Highest frequency f = 5200 MHz
Diameter of the shortest element ⌀ = 3 mm 
Characteristic input impedance Zc_in = 50 Ω 
Taper τ = 0.901
Optimal relative spacing σo = 0.168 
Chosen relative spacing σ = 0.050

Number of elements ⌊N⌉ = 5 

Dipole element lengths:
dipole l1 = 0.036 m 
dipole l2 = 0.032 m 
dipole l3 = 0.029 m 
dipole l4 = 0.026 m 
dipole l5 = 0.024 m

Sum of all dipole lengths lo = 0.146 m Distances between the element centres and their position along the boom:
d1,2 = 0.004 m, i.e. l2 @ 0.004 m 
d2,3 = 0.003 m, i.e. l3 @ 0.007 m 
d3,4 = 0.003 m, i.e. l4 @ 0.010 m 
d4,5 = 0.003 m, i.e. l5 @ 0.012 m

Boom length L = 0.012 m
Length of the terminating stub l_Zterm = 0.009 m 
Required characteristic impedance of the feeder connecting the elements Zc_feed = 4.8 Ω

Dielectric vs Antenna Size/Frequency
Bear in mind that the permittivity of FR4 (Fire Rating 4, glass and epoxy PCB) is about 4.3 and because the copper is in air on one side, the effective permittivity is less, about 3.3 - this conspires to make your antenna operate at about 20% lower frequency than the above (air dielectric) calculator indicates.  

The effective Dielectric Constant gives the Velocity factor:
  • VF = 1/sqrt(3.257) = 0.555
For this experiment, I will ignore all that, since I want to know whether this kind of antenna is practical and can make a tuned one another day.

Version 1: Single Sided PCB
An antenna this complex, really should be built on double sided board, for best performance, but I managed to get the prototype together with 22 SWG hookup wire and RG316.

Log-Periodic Wired Up

If you look closely, you can see the hookup wire links under the coax.

Performance Graphs
Considering how it was built, this is not too bad.  It needs a balun to clean up the VSWR ripples.

Log-Periodic - Return Loss

Log-Periodic - VSWR

Log-Periodic - Smith Chart

Design Issues
The graphs show that this a viable antenna and the match is a good 53 Ohm at the centre frequency of 4518 MHz.

When I designed this antenna, I spent much time trying to get the elements done right in the KiCAD footprint editor and Flatcam, so it can be cut out successfully with a 0.8 mm end mill.  However, I did not think enough about how to wire it up and the feed point is not designed for hooking up with unbalanced coax.

The unbalanced feeds cause large VSWR variations, which are very visible in the VSWR and Return Loss graphs.  An infinite balun made with ferrite beads will not work well at 5 GHz (Ferrites falter at about 2 GHz), so I need to change the feed points to match with unbalanced feed lines.  I also need to get some thin coax, which will be easier to hook up than RG316.  I think there is some thin WiFi antenna U.FL pigtails somewhere in a dark corner of my Junque Bochs - it will take a day of archeological digging to find it.

Version 2: Single Sided PCB with J Balun for a Coaxial Cable
This test unit is a single sided board design, which requires wire links and there is no way to make microstriplines, since there is no ground plane, so eventually, there are multiple reasons to go double sided.

I would also like to shift the centre frequency up by 200 MHz to about 5700 MHz, therefore the elements need to be 9% smaller, which makes it even more important to find some thin coaxial cable.

For the second version, I added a folded balun on the front dipole, so that it can connect to a coaxial cable directly.  The other dimensions all stayed the same, so that I can compare the results between the two versions.

Log-Periodic with a Half Folded Dipole Balun for a Coaxial Cable

The whole thing was machined with a 0.8 mm end mill and a cut depth of 0.15 mm into the FR4 board.  I take it slow and mill in an oil puddle, to keep the cutter sharp.  I got some burrs at 30 mm/min with 3 in 1 oil.  The process takes about 3 1/2 hours.  The board cut-out is done in multiple passes, each 0.2 mm deep, so it seemingly takes forever, but I don't want to break the mill bit by forcing it and FR4 with glass fibre is very hard on the mill bit.  

I need to cut the four retaining tabs with a knife and do some soldering before I can test it and see whether the VSWR graph now looks any better.

Log-Periodic With RG316 Feed

Log-Periodic with Shoelace Hook-up Wiring

Log-Periodic VSWR is Smooth, but High

Log-Periodic Smith Chart Impedance Mismatch

Log-Periodic Impedance Chart

The graphs above show that the cable match is remarkably much better at the antennas.  Next, I have to improve the power combiner/splitter match at the connector with a tapered microstrip line to improve the VSWR.

Version 3: Double Sided PCB with J Balun and Tapered Power Combiner
To make a good design, I need to use double sided board, install Microcoax SMD connectors (Molex Microcoax 73412-0110 and 73116-0004) with thin coaxial pig tails and a TNC connector (Amphenol RF jumper cable 095-850-221-048).  BNC connectors are nice for quick connect in a lab at UHF, but they are not stable enough for microwave use - the connection comes and goes by several dB.  TNC connectors provide more consistant and stable performance, since one can torque them.  SMA connectors are nice and small, but expensive - double the cost of TNC.

The third version of this antenna costs a few dollars more, due to the connectors and little cables which I have to buy ready made, to get good quality.  The SMD sockets are tiny, but one can solder them down by hand.  The microcoax cables however are well nigh impossible to do by hand; you have to buy them ready made, but they are not expensive (If you want to play with a scalpel under a microscope to trim a 1 mm diameter coax by hand, get a longer ready made cable and cut it up, Molex 73116-0037).  

The J Balun is simply a half folded Dipole feed, which drives the unbalanced co-axial cable with a good impedance match of almost exactly 50 Ohm.

The simplest way to combine/split the power at the connector for the two antennas, is with two tapered microstriplines 50 Ohm on one end; and 100 Ohm on the other end; and about 1/4 Lambda in length.  Where the two 100 Ohm ends come together at the connector, it becomes 50 Ohm again (resistors in parallel). You can design the taper with the Pasternack calculator
  • Taper length: 18 mm
  • Epsilon: 3.7 - FR4 glass-epoxy PCB
  • Height: 1.5 mm - Standard double sided PCB
  • 50 Ohm Width: 3 mm
  • 100 Ohm Width: 0.8 mm
This results in a bowtie stripline, 3 mm at the outer ends and 0.8 mm in the middle at the connector, with an overall length of 36 mm.  More details here

Now, I need to get into KiCAD again, to convert the design into a double sided board with little microcoax sockets at the drive points. This of course, turned out much easier said than done.  See the PCB Mill guide for the gory details of double sided boards...

Double Sided Board with a Milling Error

The double sided design milled a bit messily despite having 25% overlap and one antenna element was cut through in error.  There was a lot of cleanup to do with a carving knife.  I could have milled the under side with a bigger mill, which would have saved some time, but I just didn't think of it. 

Front Side - Microcoax and Tapers

I patched the cut dipole with a piece of solder braid and soldered tinned copper wire into the through holes.

Back Side

VSWR - Wide Bandwidth

It has a hump in the middle that I don't like, so I need to work on the matching some more.

Smith Chart
The power combiner taper and microcoax pads milled out nicely.  The two sides align perfectly well, so it should be easy to complete with microcoax connectors and 1.2 mm cable.


The middle of the band is about 100 Ohm, which explains the VSWR hump.  I should try a high frequency ferrite bead on the little coaxes.

Phase - A Log-Periodic is Complex

The Microcoax and TNC connectors make a big difference.  All the cable connections are stable and the measurements don't change if I touch or move something.

As for that cutting error, I think I will solder a big capacitor onto the controller board, since it could have been caused by a power glitch.

I would like to change to FR2 board and finally got some single sided board ordered from Radio Spares, but I need double sided FR2.  Some suppliers only ship locally, but Radio Spares is international:  

Version 3: Eight Elements on Double Sided FR4
To get the frequency where I want it, always requires a few iterations and I don't like the VSWR hump in the middle of the five element above.  To get a 20% lower frequency, means that I should design for 3.3 GHz or less, on the low end.   

Note that I found a missing through hole link on the 2nd version above.  It actually works much better than the above graphs show.  However, the bandwidth is still not wide enough to my liking.

If I run the Hamwaves design wizard again with 3.0 to 5.2 GHz frequency, I get an 8 element antenna:

  Lowest frequency f₁ = 3000 MHz
  Highest frequency f = 5200 MHz
  Diameter of the shortest element ⌀ = 1 mm
  Characteristic input impedance Zc_in = 50 Ω
  Taper τ = 0.880
  Optimal relative spacing σₒ = 0.163
  Chosen relative spacing σ = 0.060

  Number of elements ⌊N⌉ = 8
  Dipole element lengths:
    dipole ℓ₁ = 0.050 m
    dipole ℓ₂ = 0.044 m
    dipole ℓ₃ = 0.039 m
    dipole ℓ₄ = 0.034 m
    dipole ℓ₅ = 0.030 m
    dipole ℓ₆ = 0.026 m
    dipole ℓ₇ = 0.023 m
    dipole ℓ₈ = 0.020 m
  Sum of all dipole lengths ℓₒ = 0.267 m

  Distances between the element centres
  and their position along the boom:
    d₁,₂ = 0.006 m, i.e. ℓ₂ @ 0.006 m
    d₂,₃ = 0.005 m, i.e. ℓ₃ @ 0.011 m
    d₃,₄ = 0.005 m, i.e. ℓ₄ @ 0.016 m
    d₄,₅ = 0.004 m, i.e. ℓ₅ @ 0.020 m
    d₅,₆ = 0.004 m, i.e. ℓ₆ @ 0.024 m
    d₆,₇ = 0.003 m, i.e. ℓ₇ @ 0.027 m
    d₇,₈ = 0.003 m, i.e. ℓ₈ @ 0.030 m
  Boom length L = 0.030 m

  Length of the terminating stub ℓ_Zterm = 0.012 m
  Required characteristic impedance of the feeder
  connecting the elements Zc_feed = 126.1 Ω

  Position two antennas 54 mm apart centre to centre for improved gain.

A drawback of working with FR4 is that the glass blunts the mill bits very quickly.  I can only mill one little board with a tungsten-carbide bit.  However, if I redo it on a FR2 paper substrate, then the centre frequency will change again and I also cannot find double sided FR2 anywhere (maybe I can glue two back to back).

The measured results of this antenna are simply awful - the VSWR is around 5.  The impedance is more in line with a 75 Ohm cable.

I think I have a better chance to improve the matching of the smaller 5 element antenna, than to fix this 8 element design.  This one is just too complicated to get right and the elements are too close together to make them wider.

Version 4: Two Pieces of FR2, Back to Back
I eventually received a stack of FR2 boards from Radio Spares.  The phenolic paper boards cut much easier than glass fibre FR4.

Dual 5 Element Logperiodic on FR2

These are single sided boards, so maybe I'll glue them back to back, to make a 3.2 mm thick sandwich.  Since the permittivity of phenolic paper FR2 is a little lower than epoxy glass FR4, the operating frequency will be a little higher, but I have no idea what it will be, until I completed it.  

Target Frequency Band: 4.5 to 5.0 GHz

Design target for single sided FR2 PCB: +20% = 5.4 to 6.0 GHz

Widened design BW for parasitics: 5.0 to 6.5 GHz

LPDA — — v20180914

  LPDA design 2020-07-16 14:11


  Lowest frequency f₁ = 5000 MHz

  Highest frequency f = 6500 MHz

  Diameter of the shortest element ⌀ = 1 mm

  Characteristic input impedance Zc_in = 50 Ω

  Taper τ = 0.880

  Optimal relative spacing σ = 0.163

  Chosen relative spacing σ = 0.060


  Number of elements N = 5

  Dipole element lengths:

    dipole ℓ₁ = 0.030 m

    dipole ℓ₂ = 0.026 m

    dipole ℓ₃ = 0.023 m

    dipole ℓ₄ = 0.020 m

    dipole ℓ₅ = 0.018 m

  Sum of all dipole lengths ℓ = 0.118 m

  Distances between the element centres

  and their position along the boom:

    d₁,₂ = 0.004 m, i.e. ℓ₂ @ 0.004 m

    d₂,₃ = 0.003 m, i.e. ℓ₃ @ 0.007 m

    d₃,₄ = 0.003 m, i.e. ℓ₄ @ 0.010 m

    d₄,₅ = 0.002 m, i.e. ℓ₅ @ 0.012 m

  Boom length L = 0.012 m

  Length of the terminating stub ℓ_Zterm = 0.007 m

  Required characteristic impedance of the feeder

  connecting the elements Zc_feed = 144.7 Ω

Now build it on FR2 and see whether it is anywhere near the desired band…

Double Shoelace Hookup

Logperiodic Dipole Array With Half Folded Match

This little array was designed for 5 to 6.5 GHz and ended up working from about 4 to 6 GHz.  The half folded dipole feed makes a kind of balun with a 75 Ohm match, so it should be used with a 75 Ohm cable.  The trouble is that at 5 GHz, one cannot use Ferrites to make a balun - they only work up to maybe 2 or 3 GHz.  I tried some beads and they had no effect.

The VSWR and Impedance are a Mess

It seems to be a little inductive

From what I have seen so far, the VSWR of a log periodic antenna is quite awful and it is hard to improve.  If a VSWR of 3 is OK for your transmitter, then fine.  If not, then it may be useful to solder a tiny capacitor (1 - 5 pF) onto the antenna feed point, to try and improve the matching with a 50 Ohm cable.  I have to go and dig for one and see what happens.

For a wide band receive antenna, it is good, since the VSWR doesn't matter much on receive.

This Log Periodic experiment turned into a mission.  I now have a whole pile of dud little antenna boards and blunt milling bits.  Pretty much the only thing that I can confidently say, is that one should not mill FR4 fibreglass boards - get FR2 Phenolic Paper boards for milling.  

At least it kept me busy during the Covid19 intermission...


This is not a cheap hobby, but this article shows how one can move stepwise from an idea, to a real product, without going bankrupt along the way.

La Voila!


Thursday, April 9, 2020

Radios and Attenuators

When you need to test two radios in a lab, they are awfully close together and may not work over the air, since the transmitter will overdrive and saturate the receiver.  You may even damage the receiver since the radio front end is very sensitive and the transistor features are extremely small.  If you would accidentally touch the antennas of two radios together, you could instantly melt the receiver front end.

DIY 90 dB(?) Attenuator

To avoid this melt-down problem, military manpack radios are usually built with power transistors on the front end - the same ones used in the power amplifier.  Since power transistors are expensive, commercial radios are usually not so rugged.

Path Loss
If your transmitter operates at +30 dBm (1 Watt) and the receiver has a sensitivity of -90 dBm (1 nano Watt), then to work properly, you need a path loss of 80 to 90 dB, to bring the transmit signal down to a safe level of about -60 dBm.

You can then hook the two radios back to back, with coaxial cables through the 90 dB attenuator, without risk of blowing anything up.

One trick, is to hook both radios to 50 Ohm dummy loads.  They will then usually still work over the air for a few meters in a lab, due to leakage signals.  A wireless connection like this can be handy for software tests, since you don't need to run a cable over the table/floor, but it is not repeatable for accurate RF tests.

Therefore, every radio shack needs one or two attenuators and dummy loads.  If you go and look at the prices of these things on Pasternack, or Everything RF, you will see that they can be horribly expensive.  You may be tempted to build one, but building a good one from little SMD coils and capacitors that will work at microwave frequencies, is difficult.  Well, maybe not...

DIY Attenuator
The above picture shows my 90 dB attenuator, made from three 30 dB attenuator pads, that one can buy on AliExpress Bokon Store for about $4 each, or from Everything RF for a few bucks more.  So you can 'crook' and not actually build a T or Pi circuit - buy it as a little module and save yourself a whole lot of hassle and money.

Just solder three in series, add two connectors and an aluminium box for shielding and heat dissipation and Bob's Your Uncle?  No, not exactly...

Minus 50 dB Attenuator

To get - 90 dB attenuation is very difficult in practice, due to leakage from the input to the output, inside the box.  My first attempt came in at about -46 dB attention. I eventually got it up to about -60 dB, with careful routing of the little coaxial cables and some copper tape inside the box.

To Measure, is to Know (sorta kinda):
When I plug two RG58U cables into my little network analyzer and leave the ends open, it measures -80 dB.  So with the cables I got, I cannot measure -90 dB.  I would have to get double/triple screened coaxial cables to really know what the attenuation of this little box is, since what I measure, is the attenuator and cable leakage in parallel.

To actually measure this attenuator, I would need to build two and hook them up in parallel, then measure, so that I measure a lower value more within the capabilities of my test setup.

Dummy Loads
I have in the past made quite a few crude dummy loads from 50 Ohm 10 Watt wire-wound resistors soldered to a BNC/TNC connector.  Some radios are OK with that, but some may not like it, since a wire-wound resistor is very inductive.

50 Ohm Dummy Loads on PCB

You can also get 50 Ohm thick film resistors that look much the same as the attenuator pads, to make accurate dummy loads that are not inductive.  Screw one inside a little box with one connector and there you are.  If it is an open construction like this, then they will radiate a little, which is sometimes useful.  The small piece of scrap PCB acts as a heat sink - good for a few Watts.

15 dB Attenuator

Grey anti-static bags work as a RF attenuator.  The bag data sheet shows that it is a multi-layer composite with a thin transparent aluminium layer inside:

My measurements showed a 15 dB attenuation at 5 GHz when I put a bag over an antenna.  This is useful when two radios under test are too close together and you need to suppress the signal a bit, without changing the wiring to install/remove an inline attenuator.

It is Time, Gentlemen

One thing you got to remember though, is that an attenuator doesn't provide a time delay.  The speed of light is very fast, but not infinite.  Some radio modem protocols (WiFi) assume a turn-around time of a few nano seconds that may work in a lab - but not in real life over long distance.  This is why long range WiFi radio modules have adjustable turn-around timers, so that you can configure it for 100 to 200 km range.

La Voila!