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 wire elements 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.

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 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.

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 switching between the dipole elements, four little RF relays should work:

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!

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.

The measured impedance of this little Yagi is 68 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 good match to a coaxial cable.  You should then get about 47 Ohm impedance.

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.

Have fun!


Monday, January 27, 2020

Small 12V Buck PSU

How does one build reliable electronic circuits?  By starting with a reliable and clean power supply.

The three terminal linear voltage regulators have been almost obsoleted by three terminal switching regulators.  It is now quite trivial to make a very efficient small power supply by using one of these modules - available from Mouser and Digikey.

I tend to buy interesting parts when I see them and the little bag may lie around in my workshop for years until I find a use for them in some or other widget.  Here is a little 12 Volt switcher circuit which took me about 2 hours to find the parts in the depths of my Junque Bochs, and build on strip board:

The circuit starts with a self resetting fuse against over current, has a MOV for protection against high voltage spikes, an anti-dumkopf diode, a switching regulator and a couple of electrolitic smoothing capacitors. The big capacitor has a tiny one accross it, to quench high frequency EMI. The two little terminal blocks make for easy wire-up.

The capacitors are overrated in voltage by a factor of three and the regulator is overrated in current capacity by a factor of five, so the circuit should last a long time - no stress.

The regulator doesn’t need a heat sink, since it is very efficient and won’t get warm.

If you want to use a switcher with a VHF radio receiver, check the noise with an oscilloscope/spectrum analyzer and if necessary, add another little EMI capacitor, or mount it in a separate aluminium enclosure for shielding.



Through hole parts with a double sided circuit board, where the bottom is a ground plane, will ensure low noise operation. It is easy to build and easy to repair if it ever breaks. For vibration and shock, the big parts should get blobs of RTV to hold them.  A quick spray with V66 or similar conformal coating, will protect the parts against corrosion.

That is about it.

It Just Works!


Friday, January 10, 2020

Solar Lantern

One can buy solar powered garden lights everywhere now.  They are useful for lighting up a garden path, outside patio, or your Satnogs ground station, but why buy one if you can build it yourself - at much higher cost of course.  If it would be a rational economic decision, then I'll never build anything!

How much current can one get from a small, supposedly 1 Watt, 12 cell solar panel:

X-Ray Tube Current

According to my ancient 'X-Ray Tube' meter, about 7 mA under my desk lamp!

If you want to build one yourself, or repair an existing one that failed, here is a little circuit with only about a dozen parts, that should get you going:

There are a few tricks to this circuit.  Solar cells are diodes, therefore one could simply wire a small solar cell panel across the battery to charge it, but solar cells are also cheaply made and full of flaws, meaning that they are not good quality diodes and will slowly discharge the battery when it is dark.  Therefore it is necessary to add a series blocking diode, to avoid discharging the battery at night.

Solar Lamp Prototype Board

The battery is made of three Nickel Cadmium or Nickel Metal Hydride cells.  These cells can be trickle charged and they are not expensive.  The three cells will slowly charge up to 3.75 V during the day.  Using a tiny 6 V, 1 W solar panel, we don't need a charge control circuit.

NiCd batteries can overheat and catch fire when short circuited, so it is best to put a 150 mA PolyFuse in series with it.  The PNP transistor is turned on/off with a Cadmium Sulphide photocell.  The level of light/darkness where it triggers is set with a 10k trimmer.  Put the photocell out of view of the LEDs.

The light source is made of two high brightness LEDs in series (Sparkfun has extremely bright LEDs).  The maximum current flow is controlled only by the internal resistance of the batteries, the inefficient transistor and the internal resistance of the LEDs.  This is another reason for the PolyFuse - to limit the maximum current.

Two high brightness red or green LEDs in series, require about 3 V to glow.  This sets the minimum discharge voltage of the battery.  If you discharge a NiCd cell below about 0.9 V, then it will get damaged.

If you want to use a blue or white LED which require 3V or more to glow, then use only one LED.

You can put LEDs in series, but not in parallel.  If you parallel them, the LED with the lowest forward voltage will light up, the other one will stay dark.

The whole circuit can be constructed inside the lid of a glass flask, with the solar panel on top, so now you have a good use for an empty Nescafe coffee powder bottle.  I learned over the years that one should mount a project PCB on the lid of a box using a few nylon/brass stand-offs.  Doing this, makes it much easier to work on the project than when it is way down in the bottom of the box!

You can buy all the parts from an online high tech toy shop such as Jameco or Sparkfun

If you want to learn more about wind and solar power systems, there is real no nonsense information here:

Have fun!