Monday, February 10, 2020

Phased Array Antenna for 5 GHz Band

I've been toying with a switched phased array antenna design for use on a small aircraft.  This type of antenna could be made to radiate forward, backward, or to the sides.  With the addition of a Raspberry Pi Zero (or Arduino Teensie, a UBlox GPS receiver and 4 little RF switches, your toy aircraft could then always point its antenna towards your ground control system, without using any step motors or moving parts - well, except for the armatures of the little RF switches.

Phased Array NEC2 Simulation

The design is essentially four Yagi antennas positioned back to back in a cross.  Only one dipole is driven at any time and the result is that the rearward parasitic elements act as a reflector for the antenna that is active.  This improves the front to back ratio quite noticeably.  The NEC2 graphs show extremely small back and side lobes, which I found so encouraging, that I went ahead and built the antenna to see whether it is indeed true.

The whole assembly could be housed inside a streamlined toadstool radome, the head about 190 mm in diameter and the stem about 150 mm high, with the RF switches in the bottom of the stem.

I aimed for about 10 dBi gain, which should result in about 8 dBi in reality.  I don't want to make the gain too high, since then the 45 degree positions will be nulls. I did however leave room for yet another set of directors on the prototype antenna base, to gain another dB if needed.

With a directional antenna, it is not just the forward gain that is important, but the back and the side lobes need to be small, since the lobes introduce unwanted noise.  The aim is to get an improved Signal to Noise Ratio, so that the aircraft radio will work better in both transmit and receive modes.  The NEC2 prediction shows very small unwanted lobes and I hope I can achieve that in practice.

Phased Array 5GHz Design 

I modelled it in NEC2 and because of the large number of wire elements, I added tiny parasitic capacitors with LD cards to the ends of each wire, to make the simulation more accurate.

Phased Array 5GHz Wires and Loads

The prototype antenna elements are made from jumbo paper clips and the substrate is a piece of Lucite acrylic, so my antenna is transparent and the wires seem to float in the air.  The pieces are held down with 'antenna putty' (UHU Patafix) - once tuned up, apply tiny drops of epoxy glue with a tooth pick.

The ultimate phased array was probably the enormous Soviet Duga Radar Antennas, which were built to detect incoming cruise missiles and which operated during the 1970s and 80s.  It was abandoned when the Ukrainian site was contaminated by the Chernobyl accident, leaving a huge hole in the middle of the system, making it all useless.  I remember as a teenager listening to their constant check-check-check screech on my shortwave receiver and wondering what on earth that horrid noise was.  A Duga array used so much electricity, that it had to be next to a nuclear power station and is a bit too big for my backyard:

Duga Radar Antennas

The wire elements of the array must be cut very carefully.  You need to be within a fraction of a millimetre with each wire, otherwise the operating frequency will be off.  The Lucite has a permittivity of 2, which is quite low.  Alternatively use blank FR-1 phenolic paper (Bakelite) printed circuit board, which also has a permittivity of 2.

The magic of this design is in the bent wire element tips.  Each wire end (3 mm) is bent slightly inwards.  This makes the design more wide band and reduces the sensitivity of the antenna so that it doesn't get detuned by close objects so easily.  Bending them is painful on the fingers - use small round nose pliers.

Phased Array 5 GHz Prototype

If you only need one or two of these toadstool antennas, then building it with little wires is quite practical, but if you want to make a million, then you should etch the elements on thin printed circuit board.  Due to the thin dielectric on one side, the elements will then need to be slightly shorter, but the spacing will remain the same.

Initial measurements with a VNA looked encouraging, but some more work was needed to calm the antenna down - widen the band and improve the VSWR.

Phased Array 5GHz VSWR and Smith Chart

Now, I need to mount it on a wooden dowel post and measure the gain, to see how reality compares with the NEC2 predictions.  The impedance and VSWR bumps were a concern and a couple of small ferrite beads over the cable quietened it down.  Large beads will detune the antenna since everything is so close together - keep them small.

Ferrite Beads

The beads improved the matching significantly - still bumpy, but now the antenna is usable, with the VSWR below 2.

Improved VSWR with Ferrites

To measure the antenna, I needed to make yet another little Yagi to use as a receiver, which took a while to do and measuring an antenna in the open, without an anechoic chamber is very difficult.  A 5 mm wooden dowel, a few more paper clips and O'l Bob's yer Uncle.

5 GHz Yagi

The little Yagi is the same as the phased array with a half folded dipole and a couple of ferrite beads to prevent current flowing down the co-ax screen, causing weird pattern effects and a bad VSWR.  I left room in front on the boom for another director to up the gain by another dB if I would want to, but it worked well enough as is.  I later cut the unused wooden snout off for aesthetic reasons.

You almost should not breathe while taking measurements indoors and the numbers are always rolling up and down for no apparent reason, due to reflections off the surroundings.  The sun is also a strong C-band noise source and I live next to a couple of cell towers with C-band back-haul - all extremely non-ideal and going outside is therefore just as dreadful as inside.  If you can't make any sense of your measurements, then you should probably add a few more ferrite beads on your cables.  Otherwise you can try absorbent paint in your workshop - it should help a bit - or go and stand in the middle of a sports field or in a farmer's meadow:

Some more rough measurements in my living room indicates that the antenna more or less works as it is supposed to and I get in the order of 10 dB difference between the front to side and front to back, which is what I was hoping to achieve.  This proves the concept, so the next step is to make the widget from FR-1 PCB to get the design more stable and repeatable.  For this, I bought me a PCB milling machine for the princely sum of 285 Dirhams ($80!) - my next toy.  Milling a board costs as much as Ferric Chloride and UV chemicals, but is less dangerous I think (I've etched boards and printed B&W photos when I was young and reckless).

For switching between the dipole elements, four little RF relays should work.  At 5 GHz, one should use a miniature coaxial relay.  A low cost reed relay will leak so much that it will upset the antenna pattern and VSWR.  You really should invest in something with isolation of around 40 dB or better (about $80 to $120 each!), but be careful when you select one, since there appears to be little correlation between price and quality:

It is strange that FR-1 is hard to get these days, but it is making a comeback due to PCB milling machines (the router bits are blunted by glass fibre board, so old fashioned Bakelite is better).

For this kind of antenna, I want a substrate with low permittivity and FR-1 is about 2, whereas FR-4 is about 3.5.  FR-1 also has the advantage that it doesn't cover your workshop with white itch powder when you cut and drill it like FR-4 glass dust!

PCB Milling
I bought a small PCB Milling Machine and made a couple of test cuts.  This one was done with a 0.8 mm high speed steel end mill, 0.15 mm deep, at 20 mm/minute, which took about 3 hours.  The picture is fresh off the machine, I did not sand the board - just washed the oil off - there are no burrs.  (On the Log Periodic Antenna experiments I tried 30 mm/min with 3 in 1 oil and got some burrs. Therefore 20 to 25 mm/min seems to be best with this little router, but I'm also wondering whether Diesel will make a bettter cutting fluid - 3 in 1 oil is SAE20 and may be lubricating too well).

5GHz Yagi Freshly Milled From FR4

This shows that it is possible to make prototypes this way and while it feels very slow, it is much faster than ordering boards from China.  There are tiny flecks of copper foil left over here and there to scratch off with a blade.  I have to increase the milling overlap a little for the next try.

I connected the centre of the coax to the end of the J and the screen to the centre of the reflector.

5GHz Yagi on FR4

The result is an almost perfect 49 Ohm match and the centre frequency is 5.056 GHz with a bandwidth of 4%.  Usually a Yagi bandwidth is < 2%, so the 4% bandwidth is very nice.  The rule of thumb is that d/L must be between 0.01 and 0.04.  For the next one, I'll increase the rod diameter form 1 mm to 3 mm and see whether that makes a useful difference.

I designed for 4.75 GHz and then made a drawing with Inkscape - what you build is always different and will require tweaking to get it spot on.  Usually the frequency goes down, not up, but who am I to argue...

5GHz Yagi Smith Chart

This shows that PCB milling of common FR4 is a perfectly valid way to make a microwave antenna, but to repeatably get the frequency exactly where you want it, would either require precision high frequency substrates, or a way to trim the dipole length (make it a little too long, so you can trim it), or a small tuning circuit, or adjust the drawing and mill a new one.  It depends on your time vs budget!

5GHz Yagi VSWR

5GHz Yagi Return Loss

As you can see in the above plots, a Yagi antenna is a narrow band device.  If you need a wide band array, then consider using a small log-periodic antenna

Note that an antenna like this, can be scaled to any frequency, so you could make one for use at 2.4 GHz for example, but at 900 MHz it will be large and probably impractical for a small aircraft.  It could be good for a ground station tracking antenna with no moving parts.  You could also install 4 antennas on four ends of the aircraft, but beware of the coaxial cable losses.

Post Mortem
This Yagi idea works, but it is very narrow band.  I consequently started work on a wide band log periodic antenna instead and it is rather more difficult to do.

Have fun!


Friday, February 7, 2020

Yagi Antenna for 900 MHz ISM Band

I like tinkering with wire antenna designs, since they are simple and cheap to make.  Mr Yagi invented his antenna about 100 years ago, but there are still some things left to learn about it.

900 MHz ISM Band Yagi

The 900 MHz ISM band ranges from 902 to 928 MHz.  Covering the whole band with a single Yagi antenna is difficult, since they are inherently narrow band devices.  Consequently some tweaking is required and the result below is a desensitized design that can be built and replicated quite easily, but you need a network analyzer - "To Measure, is to Know!"

A Yagi generally consists of a Reflector, Radiator and one or more Director elements, arranged on a boom.  For a small Yagi, a wooden ruler works a treat, since one can easily mark the position of the wires.  The wire elements are fastened to the bottom of the ruler with hot glue.  The wire elements are  made from straightened out jumbo size paper clips.  The balun, is two clip-on Ferrites, to prevent current flowing on the sleeve of the co-ax, disrupting the pattern.  Winding a ferrite bobbin balun, is not quite worth the hassle to me.

You can plot the pattern of a Yagi with NEC2, but NEC2 does not provide accurate impedance, or VSWR plots and the simulation operating frequency will be lower by about 4% as well, because NEC2 does not automatically compensate for the end effects of the wire rods - you need to add a load card with a tiny capacitor (0.01 to 0.1 pF) for each element end.  For serious Yagi design, you probably need to consider NEC4 or FECO, but if you are aware of the 3 to 4% systematic errors of NEC2, then it doesn't matter, so I never could be bothered to actually buy NEC4!

Stray capacitance calculator:

There are many Yagi antenna tables and calculators on the wild wild web.  I used an Optimized Wide Bandwidth Array (OWA) design, with the first reflector very close (~0.05 Lambda) to the dipole:

Javascript Version 12.01.2014, based on Rothammel / DL6WU
Frequency     :  930  MHz
Wavelength    :  323  mm
Rod Diameter  :  1  mm
Boom Diameter :  1  mm
Boom Length   :  231  mm
d/lambda      :  0.003    ( min.: 0.002 , max.: 0.01 )
D/lambda      :  0.010    ( min.: 0.01 , max.: 0.05 )
Elements      :  5
Gain          :  7.99 dBd (approx.)
Reflector Length   : 155 mm
Reflector Position :  0 mm
Folded Dipole Position : 77 mm, Length: 144 mm
Director #1 Position : 102 mm ,  Length : 147 mm
Distance Dipole - Dir. #1 : 24 mm 
Director #2 Position : 160 mm ,  Length : 145 mm
Distance Dir. #1 - Dir. #2 : 58 mm 
Director #3 Position : 229 mm ,  Length : 144 mm
Distance Dir. #2 - Dir. #3 : 69 mm 
Directors / Parasitics are isolated.
Please choose an isolater thicker than : 2 mm

Make the folded dipole of a length between the reflector and the director and then tweak it till it is reasonably well tuned to the frequency you want.

Several rules of thumb have been developed over the decades and if whatever online design calculator or tables you use differs much from the below rules, then you should be suspicious:
  • The reflector is a little longer than the dipole radiator
  • The directors are a little shorter than the radiator
  • The elements are 3% to 5% shorter than half a wavelength.
  • The spacing between the elements is between 0.1 and 0.2 wavelength.
  • The gain in dB is about equal to the number of elements.

900 MHz Yagi - Voltage Standing Wave Ratio

A Yagi tends to be a sensitive and narrow band antenna with low impedance.  This can be improved with the following suggestions:
  • A folded dipole will increase the impedance to between 50 and 75 Ohm.
  • A folded dipole needs to be a little shorter than a regular dipole and may end up the same size or a little shorter than the first director.
  • The bandwidth can be increased by placing the first director very close, about 0.05 wavelength to the radiator.
  • The antenna can be tuned the old fashioned way: With pliers! - by bending the ends (10%) of the rods.

900 MHz Yagi - Smith Chart

Tuning a Yagi is an art, not a science!

In general, one designs an antenna for the top of the band (930 MHz) and then it will end up lower down towards the middle of the band, due to parasitic effects from the boom, the coaxial cable and things around it.

Tweaking the antenna is quite tricky and requires some patience, but it can be a lot of fun:
  • Do not change the spacing.  You can mount the rods securely.
  • Increasing the length of the dipole, decreases the frequency and vice versa.
  • Make the dipole in sections, so that you can solder and resolder it, till it is tuned exactly to the desired frequency.
  • Bending the ends of the reflector forward, increases the forward gain and reduces the impedance.
  • Bending the ends of the directors backwards, increases the bandwidth and lowers the centre frequency.
  • Bending the rod ends slightly inwards is very important in my experience, since it makes the design much less sensitive to its surroundings, so it will not be detuned so easily by things next to it, but it may reduce the gain a little bit if you go extreme.
Note that since Lambda = 1/(2.pi.f), if your frequency is low by 1%, then you need to trim the length of the elements by 2%, or trim 1% off at each end of the element.  Since the design should not be very far off (unless you used a really dreadful design tool) and the directors will be bent later, only trim the dipole.

I made two.  The one ended up at 913 MHz and the other at 916 MHz and both covered the whole band.  Pretty good.

The measured impedance of this little Yagi is 53 Ohm to 92 Ohm, meaning that one can use a garden variety RG59 or RG58 co-axial cable to drive it directly and avoid using a power sapping trans-match.

If you feel that the impedance is too high for RG58, then you can make a somewhat unconventional dipole with only one folded leg, which is inherently unbalanced and therefore a better match for a coaxial cable.

How to measure the gain of an antenna by pulling yourself up by your boot straps, starting from first principles:
Make two simple dipole antennas - two pieces of wire and a toroid balun each.  Measure the power received over 1 meter distance between them.  Replace one antenna with your antenna under test and measure again.  The difference is the gain of the antenna in dBd (dB relative to a dipole).  For dBi, add 2.2 dB, the gain of a dipole.  Once you have characterized one directional antenna, you can then use that one for measurements of other antennas.

La voila!


Saturday, February 1, 2020

KiCAD Schematic and PCB Design

The venerable Eagle PCB design program has gone Cloudy.  I have used Eagle for about 20 years - sometimes I bought the professional version and sometimes I just used the free hobby version - depending on what I needed to do.  Eagle now requires a permanent subscription, which is not compatible with intermittent use.

I therefore looked around for a Free PCB design program, tried gEDA PCB and KiCAD and quickly found that I am not alone.  My favourite high tech toy stores Sparkfun and Digikey also looked around and we all settled on KiCAD.  It turned out that KiCAD is also used by Great Scott Gadgets (HackRF One) and that two of the main developers of KiCAD are employed by CERN.

KiCAD on a MacBook

If KiCAD is good enough to make the HackRF One PCB, then it must be good enough for me...

As with all CAD tools, it takes a little getting used to.  Note that Move and Drag are not the same.  For example, Dragging will rubber band the wires, while Moving will not.

I tried to install it on my MacBook and soon ran into a little spot of bother, but after futzing around a bit, I found the solution and it works great, as you can see from the above screen grab. (My latest hack is an Olde Skool VHF preamplifier using a miniature thermionic valve - for use with my RTL-SDR SatNOGS receiver)


On Windows and Linux, installing it should not be a problem and the stable version comes with all versions of Linux, so it is as easy as:
# dnf install kicad

$ sudo apt install kicad

For Windows, get KiCAD here:


Install KiCad on a Mac

If you want to install KiCAD on a Mac, you may run into a permissions problem:

No Authenticate Button

The usual way to install program on a Mac, is to drag the left hand icon over to the right hand one.

See the problem?  'Click Authenticate', but there is no 'Authenticate' button to click!

The solution requires two settings changes and some manual dragging and dropping.

1. Enable viewing the Library folders in Finder
Go to your User home folder. Pull down the “View” menu and choose “View Options” Choose “Show Library Folder” in the settings options for the User home folder.

2. Enable Install from Identified Developers
Go to System Preferences, Security and Privacy and tick Allow Apps Downloaded From App Store and Identified Developers.

Now, if you right click/two finger tap on the right hand icon of the KiCAD installer and select Get Info, then you will see the full designation path which is something like "/Library/Application Support".  With Finder, go there and drag the left hand icon of the installer over to the correct place in Finder and now you will get a security authentication prompt.

After that, once everything is installed, KiCAD will work just fine.


KiCAD includes a manual router, which is fine for very simple boards, but if you want to do something more serious, then the manual router will become tedious in no time.

Install Freerouting on Linux:
$ su -
# dnf install freerouting

KiCAD with Freerouting Auto-Routed Board

More information here:

In essence, you export a DSN file from KiCAD, import it into Freerouting, turn it loose and go watch a ball game - when you get back, it may be done...

Have fun!