Wednesday, September 30, 2020

Hosts File Junk Filter for a Mac

Take out the trash, don't bring it home.

There are always a small number of people who go out of their way to annoy everyone else.  The result is that state parks, lakes and beaches have much in common with the internet: There is a ton of trash everywhere you go.

You could install an advertisement blocker on your web browser, but those things are usually also spyware in their own way, just less so, than an unprotected network.

A Macintosh is a UNIX machine and it is actually very easy to block most trash on the internet.  Download one of the big hosts files that enumerate most trash sites and save it as file /etc/hosts

Here is a good one, provided by a kind soul: https://someonewhocares.org/hosts/zero/hosts

Instructions and explanations are in there if you are still a bit helpless about this.

It contains lists like this:

0.0.0.0 track.msadcenter.afgz.com

0.0.0.0 track.msadcenter.ajfy.com

0.0.0.0 track.msadcenter.ama.com

0.0.0.0 track.msadcenter.bfy.com

0.0.0.0 track.msadcenter.bvp.com

0.0.0.0 track.msadcenter.cdn.com

0.0.0.0 track.msadcenter.ceio.com

0.0.0.0 track.msadcenter.chpn.com

0.0.0.0 track.msadcenter.cxtv.com

The 0.0.0.0 is an unroutable address and the domain name on the right is the offending party.

You could edit the file and remove a few # signs to activate some more blocks for Microsoft, Google and Double Click, which may affect the operation of some sites which you may never visit anyway and you can also add ones you discover by yourself.

This works, because when the network stack does a Domain Name Lookup, it first looks inside the local hosts file.  If the name is defined there and points to nothing, then the destination becomes unreachable.  

Your internet connection will now work a whole lot faster also, since the requested garbage is simply not downloaded at all.

Simple as that.

Have fun!

Herman

Friday, August 21, 2020

RTL-SDR Weather Satellite Preamplifier

I have been playing with the SATNOGS earth observation satellite system for a few years, but since I am still living in the desert, the climate is against outdoor activities, so its been a bit low key. To work on an antenna on the roof, requires a hat, black sunglasses, a wet T-shirt, a wet towel, a litre of water and a big black umbrella and after that I'm broiled for the day...

The few times I tried to download a weather picture, it actually worked, despite having seemingly more noise than signal.  An RTL-SDR or HackRF One receiver really needs to have a low noise RF preamplifier for best results.  There are several solid state, one transistor preamp kits available that one can buy and build in an evening and stick on the antenna cable, but why do something the easy way, if one can do it the hard way?

I recently made a 'simple' (!?) power supply for a Magic Eye cathode ray tube VU meter and the same power supply circuit can be used for a one valve RF receive amplifier.

Small Sovtek 6CW4 Nuvistor
(Whatever you see on your screen is about life size!)

A problem with garden variety glass thermionic valve amplifiers is that they do not work at VHF or UHF frequencies.  The big glass tubes are good for an electric guitar at baseband and shortwave radio, but not much beyond 50 MHz.  However, there are special, low noise metal and ceramic valves, that were designed for this purpose and one can get small triodes that work up to 3 GHz.

Although these parts were in common use for about 30 years in TV receivers, most people don't know about them, because they are small and don't look like a vacuum tube. They look just like a metal can transistor, but with too many leads and instead of a silicon crystal, there is a vacuum inside!

VHF Nuvistor RF Preamplifier

The above circuit should work for a 146 MHz weather satellite, using a 6CW4 Nuvistor triode.  I got a handful from my favourite Electronics Junque Store in Russia.  

Since these tubes are very small, the internal parasitic capacitances and leakages are small.  Therefore, they can be used with either Grid leak biassing, or with Cathode biassing.  They behave almost like a NPN transistor, or a N-channel FET.

Electron tubes are very forgiving - just feed it some lecce and see what happens.  I have never managed to blow up a tube. It would require very special skillz to smoke a vacuum tube.

Circuit design for Audio is different from design for RF.  Audio circuits need to be linear and wide band over multiple octaves at base band.  RF circuits need to be narrow band and reject signals both lower and higher, to reduce the noise and improve the SNR.  For this reason, audio circuits are biassed with resistors only.  Capacitors are used to stabilize the power and provide a slow roll-off to high frequencies to prevent oscillations.  In RF circuits such as for the weather satellites at 136 to 137 MHz, the biassing and feedback are done with tuned circuits, to increase the Q and make the circuit narrow band.

Therefore, there are little coils that you should wind from magnet wire, but don't be scared of that, the designs are not critical.  However, don't put them right next to each other.  Try to keep them a little apart and at 90 degrees to each other, to minimize coupling.

Any RF circuit should be built as small as possible, to avoid problems with parasitic capacitance, inductance and coupling, but there is a limit to what one can do.  This circuit is about the highest frequency that one can still build successfully on a tag strip, but use a single ground point and use as few tags as possible.  A Christmas tree circuit with most parts soldered directly to the nuvistor is the best way to do it.  You will need some thin heat shrink tubing to prevent shorts.

Another way to do it, is to cut some squares in the copper of a single sided PCB with a Dremel cutting wheel and build a blob circuit. Use a square in the middle as the ground, with some smaller lands around it.  Drill some holes for the nuvistor leads and put it on the other side.  It would be best to sketch the physical circuitry on paper before you start.

Wind the RF Coils from magnet wire around a 1/4 inch drill bit and slide it off.  The input transformer matches a low impedance antenna to the high impedance Grid.  Wind the negative feedback RF Coil on top of the 1M resistor - the 500p capacitor  only blocks the high voltge DC.  The output transformer 40T:10T can drive a low impedance antenna cable. If the tube oscillates - remove one turn at a time from the 28T coil on the resistor, till it stabilizes (Less turns = more negative feedback = lower gain).

Be sure to use large 2 W resistors and high voltage capacitors, else you may get smoke signals.

These little triodes were widely used in television sets in the 1960s and 70s, so there are millions of them still available.  The thimble size triodes are good up to about 1 GHz and they are not really any more difficult to use than a transistor - they just need a higher supply voltage and building the PSU keeps things interesting. 

So, instead of the ubiquitous 2N2222 NPN transistor, you can use Nuvistors and amaze and confuse your fellow geeks when you hook a vacuum tube running at hundreds of volts to a Raspberry Pi or Arduino.

Well, now I don't have an excuse anymore and should grab the soldering iron and find a traditional old tobacco tin to house it in...

La voila!

Herman

Saturday, August 15, 2020

GI-7b Microwave Triode

I recently obtained an ancient Rusky GI-7b microwave C-band triode.  Packed in an innocent looking styrofoam container (I didn't know they had styrofoam in the bronze age - maybe that is how they floated the pyramid stones down the Nile!), it is quite a monster:

GI-7b Radar Amplifier Triode

This is a radar amplifier tube designed to operate while pulsing at up to 9 kV and 3 GHz.

To digress a bit, contrary to common perception, there are still lots of microwave electron tubes in use,  for example microwave ovens, radars, medical diagnostic equipment and satellites.  Travelling Wave Tubes are popular in satellite transmitters, because they are very efficient, very rugged and small. TWT amplifiers have been manufactured by the likes of Honeywell, Thales and others for over half a century - the frequency band just keeps going up and they now operate in the Ka bandhttps://aerospace.honeywell.com/en/learn/products/satellite-communications/traveling-wave-tube-amplifiers

What I would like to do one day, is build a Thermionic Valve satcom UHF preamplifier for use with a SATNOGS  Raspberry Pi earth observation ground station - just for fun.  I got some small Nuvistor tubes for that.

Really BIG electron tubes and oscillators are made in China by the Bejing Jenerator Co:  https://jenerator.en.ecplaza.net

There is also still a manufacturor of new electron tubes for audio amplifiers, the Xpo-Pul (Reflektor) factory in Saratov, Russia:   http://rutubes.com/category/reflector-tube-saratov-russia/

The big GI-7 tube is supposed to have a vacuum inside - I hope it is still in there and that it didn't crawl out through a crack in the casing - it was designed for use in a battle tank, so it should be OK!

Serious Data Sheet

The Heater and Cathode are at the bottom, the Gate in the middle and the Anode at the top.  It is wired like a simpe Triode - no confusing extra grids as in a Pentode.  I frequently wondered whether the extra grids of a Pentode really do anything useful, or are just there for marketing purposes.  Hey, five are better than three right?

Electron Tubes tend to be very forgiving things and like a little kitten, will usually try their best to please you, if you warm them up nice and cozy and feed them some lecce.  Therefore I'm wondering how it will do at a more pedestrian 335 VDC at 10 kHz baseband, in an audio amplifier output stage.  The biggest problem will likely be the 12 V, 2 A heater current - 24 Watt to do mostly nothing - maybe it will work at half that.

One should not run a tube at kilovolts in your living room anyway, since you can get X-rays and Ozone, which are both not very nice.

Some Audiophile amplifiers have a random tube or two on display and wired such that if you remove the tube, the amp stops working, while it actually doesn't do anything at all, but since I grew up with tube fired radars in the Army, I'll find a way to make it work for real!


Crazy Socket

The socket for this valve is total overkill, so I'll have to make something more aesthetically pleasing.

UHF and Microwave Ceramic Valves are usually quite easy to solder to, since the contacts are silver plated.  So I can run some copper steam tubes around the valve just for show: 

RG405/U - https://www.pasternack.com/semirigid-0.085-rg405-50-ohm-coax-cable-copper-rg405-u-p.aspx

Semi-rigid coax make nice looking steam tubes and shield the signals from 5G Audiophile interference, so you don't need a double layer tin-foil hat when you listen to my amps. https://www.aeronetworks.ca/2015/02/cool-amplifier.html

Here is the complete thermionic valve data sheet:




GI-7b Triode

Microamp per kilovolt - Hmmm...  Keep yer kotton picken fingers in yer pokkets!

What I want to do is far off the left-hand bottom end of all the curves, but it should work anyway.


For now, it will have to rest some more in my Junque Bochs.  

Maybe I'll get to it next year. 

No rush.

The tube patiently waited 50 years already, so it can wait some more!


La voila,

H


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.  Also, rather don't put a headset on a valve amplifier - a high voltage on your ears may be a little too hot!

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.

Polyfuse
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 two zinc oxide MOVs, but since we are talking about vacuum tubes, gas discharge 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 https://www.digikey.com/product-detail/en/tubedepot/534-831/2197-534-831-ND/10488281

Building on these strips is error prone.  This time I managed to solder a resistor directly across 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 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
https://eu.mouser.com/ProductDetail/EPCOS-TDK/B32926A4475K?qs=ZxCuU5VshqBvujh9kykPlw%3D%3D
$10.13 

Initially, 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 2 Watt bleed resistor in parallel with the capacitor and a 22 Ohm, 5 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 gud enuff.  If the voltage and current is way out, then you need to adjust the series resistor (don't touch it - it gets very 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)
863-1N4007G
https://eu.mouser.com/ProductDetail/ON-Semiconductor/1N4007G?qs=y2kkmE52mdOJ200gEKhp%2FQ%3D%3D
$0.21

Capacitor: Electrolytic, 100 uF 450 VDC
$3.44

Capacitor: Ceramic, 10 nF 1000 VDC
$0.59


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, but since the rest of the circuit wasn't built yet, it did not cause further damage.  

Eventually I replaced it with a Ceramic 10 nF 1000 V, paralelled with a Ceramic 1 uF 1000 V,  paralelled with an Electrolitic 100 uF 350 VDC capacitor, which calmed the HT supply down and since it now finally works, I'll just leave it like that.  How this works, is that the X rated ceramic capacitor has the lowest impedance and handles the brunt of the ripple, which is then further smoothed by the 100 uF Electrolytic and the little 10 nF in parallel with it, damps any self oscillations in the Electrolytic capacitor.

Note that you must use 2 Watt resistors to discharge the capacitor bank and drive the Neon indicator bulb, not because of the power dissipation, but because of the high voltage.  A 1/4 Watt resistor will arc and make cryptic smoke signals.

Protection Circuitry

Resettable fuse: 576-600R150-RAR
Voltage: 350 V maximum
Current 300 mA
https://eu.mouser.com/ProductDetail/Littelfuse/600R150-RAZR?qs=sGAEpiMZZMsgjL4JkW1EEUfdUrimm9NEBXyO2non48E%3D
$1.08

Gas arrestors: From each mains wire to ground
Gas arrestor: 652-2045-40-BT1LF
Spark over: 400 V
https://eu.mouser.com/ProductDetail/Bourns/2045-40-BT1LF?qs=qcv5MX6YzaKx5e3H%2FmTy%2Fg%3D%3D
$0.819

Common mode choke: 10 to 20 turns, double wound
Toroidal core: 80-ESD-R-10E
Size: 10 mm OD, 5 mm ID, 5mm height
https://eu.mouser.com/ProductDetail/KEMET/ESD-R-10E?qs=BenOyfdfAroZzp6LE7YowQ%3D%3D
$0.18

Also put a 1 Megohm 2 Watt bleed resistor in parallel with the capacitor banks.  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 may pop too, so it is best to use a 1000 V ceramic or self healing safety 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!

For this hobby, one not only needs a soldering iron, one also needs quite a serious woodworking shop - bench saw, drill press, router, planar, sander, maybe even a CNC machine!

Power on: Over the years, I have had multiple components explode at first power up, so do put a transparent plastic box 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!

Herman

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!

Summary

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!

Herman

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

Is 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!

Herman

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.


SNR
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:
https://hamwaves.com/lpda/en/index.html

Input
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

Design
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 https://www.pasternack.com/t-calculator-microstrip.aspx
  • 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 https://www.aeronetworks.ca/2019/03/driving-quad-patch-array-antenna.html

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.


Impedance

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: https://ae.rsdelivers.com/product/sunhayato/13/13-single-sided-plain-copper-ink-resist-board-fr2/4539041).  


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:

INPUT
  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

RESULTING DESIGN
  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 — https://hamwaves.com/lpda/ — v20180914

  LPDA design 2020-07-16 14:11


INPUT

  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


RESULTING DESIGN

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

--oOo--

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!

Herman

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

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

https://www.descoindustries.com/PDF/Static-Shielding-Bag-1300-Series.pdf

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!

Herman