Friday, September 30, 2022

Transformer Hum

Power transformers are everywhere: in our equipment and in our homes. They transform the utility service voltage (120 or 240 VAC in Canada) to a higher or lower voltage needed by an electrical device. Those that transfer high power are large: dimensions, weight and cost. Copper isn't cheap. Although they can be remarkably efficient there is power loss.

Heat is the most noticable attribute of power loss. Another is sound. The intense magnetic field can vibrate loose components in the transformer that are subject to the field. Those are the core and the windings. All transformers vibrate but an improperly constructed transformer or one that is old and suffering from degradation of chemical binders and insulating layers can be objectionably loud. 

The greater the power the transformer is handling the stronger the vibration. If the equipment is in the shack you'll notice it! For example, the power transformer in a kilowatt amplifier when it is transmitting.

The sound has a fundamental of 120 Hz (counting both positive and negative swings at 60 Hz) and there can be substantial harmonic content. The latter is more noticable since our ears' sensitivity rolls off at low frequencies. The transformer's enclosure and how it is mounted can amplify the sound, and those harmonics, in the same fashion as a speaker and its enclosure. In severe cases it can be quite loud and annoying. 

Headphones are not very good at blocking low frequency sounds, and other noise such as rig and amplifier fans don't cover it up very well. It is better to solve the problem at the source. Unfortunately that isn't always possible, depending on the condition of the transformer and its placement inside the equipment. 

Let's look at a few cases I've dealt with, or tried to deal with, that may give you a few ideas should you have to deal with loud transformer hum. Don't confuse this with the other kind of audio hum that can be cured with a transformer.

The sheet metal enclosure for the Drake L7 amplifier's separate power supply is prone to vibration since it is large and thin with little structural bracing. It is close to the transformer on 3 sides of the large plate transformer core. When I first set it up it was loud. The sound was amplified when I placed it on a shelf under the operating desk since the desk and wall acted as an acoustic enclosure.

The enclosure is not easy to remove so I waited until I had to open it to replace the rectifier and filter boards. The first thing I tried was to tighten the bolts that press together the laminations comprising the core. They may loosen over the years from the 60 Hz vibrations. That helped a little but not nearly enough.

The next step was to add dampening to the enclosure. Fibreglass insulation was attached to the top and sides of transformer core. The layer was just thick enough to fill the gap between the core and enclosure. This material works well since it fire and heat resistance and provides excellent soundproofing. It is important to allow adequate airflow when you do this since the transformer heat has to escape or the transformer will prematurely fail -- fibreglass insulation slows heat transfer (obviously). Use it sparingly.

The sheet metal vibration is greatly dampened by the insulation it is in contact with. The noise was sufficiently suppressed that I considered the problem solved. The hum is still audible though quiet enough that it almost completely disappears when wearing headphones.

This spring I purchased a small Astron linear power supply to replace, perhaps permanently, another that was damaged in my most recent lightning strike. Transformer hum was objectionably loud. Simple measures such as its placement on and under the operating desk were ineffective. A friend loaned me a power supply so I forgot about for a few months. About a week ago I decided to try again.

I'll tell you up front that I was not successful. Failures are interesting so I thought it would be worthwhile to show what I did, what effect it had and my final assessment of the power supply. Apart from the transformer hum the power supply works perfectly well.

The transformer is attached to the chassis with rivets. Unlike bolts and nuts, which have adjustable torque, rivets are not adjustable once installed. Transformer vibrations can be amplified and chatter if they are even slightly loose. They appeared to be tight but I removed them anyway. A drill is used to split the outer plate from the shank with a bit about the same diameter as the rivet shank.

I experimented with a more absorptive mount with the objective of attenuating the coupling of transformer vibration to the chassis. Plate steel chassis are notorious for vibrating and amplifying sound from within it. 

Screws and nuts replace the rivets, with fibre washers under the bolt head and nut. There is a thin layer of fibreglass insulation between the chassis and transformer flanges. With the enclosure still open, the level of audible hum was reduced. More insulation was loosely wrapped around the transformer to see if that would help. It didn't.

Before doing that, I tightened the 4 long screws at the corners of the transformer core. Only a little additional torque could be applied before the soft metal of the screw heads began to distort. Vibration was unaffected.

A small C-vise was applied to the vertical plates on the sides of the core to see if additional pressure would have an effect. It didn't. This was safer than torquing the screws beyond their limit. 

Had it worked I would have considered replacing the screws. This is not a good idea most of the time since the lamination and their coatings can be damaged. 

Should you try it, avoid steel screws unless the allow is designed for this application. Otherwise they may be heated by the magnetic flux. Brass or a similar non-magnetic metal can be used. The metal determines the maximum torque that can be applied. Be careful.

At this point I was running out of ideas. The core does not appear to be the source of the vibration. I concluded that the windings are at fault. This can be due to age or poor manufacture. I hesitate to blame Astron since this hasn't been common with their power supply products in my experience. However, I've sampled only a small quantity of their products.

My final attempt was to fully stuff the enclosure with insulation. This is not a particularly wise move but I had nothing to lose. Heat isn't able to freely escape and bits of insulation can cause a mess. I don't recommend it as a permanent solution. In any case it didn't work.

Well, that's not quite true. It did work well with the top cover off. When the cover was slipped on, screwed on or not, the noise returned. It was barely attenuated at all by all that insulation. In the photo you can see what it looks like. (Note: the cover was accidentally reversed when I took the picture but that's not how I tested it!)

The enclosure is amplifying the noise and there is no easy cure. It's partly due to its design. Notice that there are only two screw holes on top where the cover attaches to tabs on the rear panel by the heat sink. The front panel is free to vibrate, as is the top of the cover. Perhaps fabricated tabs and screwing it together would help. I don't plan on doing that since it isn't worth the effort for such an inexpensive product. I've exhausted my patience.

I am left with several options.

  • Use it with the cover off. While not the safest thing to do it will not be in reach of inquisitive fingers. A soft plastic cover can avoid the bulk of the electrocution risk.
  • Place it where the noise doesn't disturb the operator. I can do that, except turning it on and off becomes a chore.
  • Replace the transformer. That's an overkill repair and not worth the expense. Rewinding the transformer is a job for a ham braver than me, or one with far too much time on their hands.
  • Repair the lightning damaged power supply and relegate this one to the workshop. I have tried repairing the malfunctioning Pyramid power supply but it involves replacing almost every semiconductor on the PCB. There could be one or many faulty devices. It, too, isn't worth the effort.
  • Buy or build a new power supply.

I will use it for a while with the cover off and replace it at some point. I have two power supplies damaged by lightning and perhaps I'll get lucky getting one of them working again. The application is my station automation system which does not require a highly regulated 13.8 VDC. Relays aren't fussy. I have 5 VDC regulators to tame the power supply for the Arduino and relays.

Working on this problem was more about personal interest rather than necessity. I enjoy playing with broken things to see if I can get them working. I spent little time on it because my interest level isn't high. I've exhausted the learning experience dealing with vibrating power transformers. 

Is this report useful to readers? Perhaps it is, and that's why I took a few minutes to write it up.

Monday, September 26, 2022

Control Systems: Relays vs. Transistors

I haven't said much about revamping my automated control system since mentioning it a few months ago. A lot has happened since then. That said, progress has not been rapid because it was summer, and summer is a time for other activities. Despite the many delays the software is not far from completion. 

Well, that's the software. Where I have been more reserved is with my decisions for the hardware. Software cannot on its own do anything: it must be connected to the real world. On an Arduino and similar systems the GPIO (general purpose input output) pins are the interface between the two. 

I have waffled between solid state and relay switches to put signals on the control lines, weighing their various pros and cons. Now that I've made firm decisions and begun implementation I thought that this would be a good time to discuss my investigation and experiments, and the reasons for my choices. This could prove of interest to others, hence this blog post. 

Despite being oriented towards contesting, the presented information should be of broader interest. Our increasingly software-centric shacks enable opportunities for station automation and remote operation that we could only dream about in the past. 

I do not claim expertise. What I can do is explain the how and why of my design choices. There are many online resources that delve into greater detail, and there are commercial control solutions for the ham shack. My citing of these will be sparse since that is not the topic of this article.

Using GPIO on Arduino

pinMode(gpio#, OUTPUT);

It may seem obvious but don't forget to include the above code in your Arduino sketch. I've forgotten a few times and the result was confusing behaviour. You can perform a digitalWrite on GPIO pins that have not been so declare (the default is INPUT) except that the GPIO may only supply a few milliamps before a logic HIGH sags to become a logic LOW. I now make sure to declare all the GPIO pins as OUTPUT during initialization (reset).

GPIO output pins default to LOW. That seems sensible since we tend to think of LOW as off and HIGH as on. That is often not the case. There are good reasons to use reverse logic (LOW is on) to simplify connection to external modules.

I posted a picture of a midsize Arduino. Mine is a Mega. I need the Mega's large number of GPIO pins due to the sheer size of my antenna farm and shack equipment. Most hams can get by with less.

What I need to switch

The mosaic of switches that can be found in my station are collected below. It is partial since there is far more.

Going clockwise from the upper left, and then the centre:

As you can see there are many relays in the RF path. To reach those remote switches there are multiple DC control lines that wend their way out to and up the towers, below ground and on the ground. There is a lot for the station automation system to connect and manage. Further, the threat of lightning is ever present and therefore the risk to control system electronics in addition to its more spectacular effects.

I am not able to switch the amplifiers at present because they are manually tuned tube amps. My plan for the future is for modern amps that can be automatically switched. An alternative is RF-detection that is available in an increasing number of amplifiers. A few milliseconds of transmitted RF will switch the band and ATU setting automatically. 

Switching devices

GPIO pins can't deliver enough current to directly switch the switch the relays shown above, and if you try there is risk of damage to the Arduino. Many control lines power multiple relays so the current requirement is even higher. It is also unwise due to the risk of damage to the processor from pulses and surges from relay coils, precipitation static and induction from nearby lightning strikes. On the bright side, all of these components, including Arduino boards, are inexpensive.

At right are several choices for switching devices. Clockwise from left, and then the centre, are:

  • 2N2222A NPN transistors
  • The same devices mounted on a proto-board with base resistors and current-limiting load resistors (e.g. for LED or a second switch stage); an SPST reed relay is shown, though not connected
  • ULN2003 NPN Darlington transistor arrays
  • Module with high current relays and drivers suitable for direct GPIO connection
  • 2N6034G PNP Darlington transistors

The solid state devices are cheap and easy to buy in bulk from online suppliers. They are small and quiet, which is nice for use within the shack.

Darlington transistors are important for switch voltages higher than that of the microprocessor logic. With a single transistor (Darlington transistors have two in series), there is a substantial risk of the higher switched voltage destroying the microprocessor.

During prototyping I tried all of the possibilities. In the above photo the NPN drivers are lighting LEDs that represent one side of the 2×8 antenna switch; the port for the 20 meter stack is selected. PNP Darlington transistors on the lower right and their NPN drivers light LEDs for the 10 meter stack switch. The upper yagi is shown as selected. The relay module is connected but with normal logic (see next section) none of its relays will switch on. 

The power supply PCB (upper right) with two 5 volt regulators is not being used. USB 5 volt power is the sole power source. The relay module has 5 volt coils, however the only reed relays on hand have 12 volt coils that could not be tested without a 12 volt supply connected.

Reed relays are quiet and small, and well suited to the modest demands of control line switching. The relay modules are larger and louder but they're cheap and easy to connect to the Arduino. If size and noise are a problem it is possible to locate them outside the shack with a wireless Arduino shield. That is my ultimate intent.

A benefit of using SPDT relays is that when the control line is idle it can be grounded by connecting the NC terminal to ground. That is only possible with high-side switching; with low-side switching, grounding the NC terminal energizes the circuit, which is not what we want. This brings us to the next section.

High-side and low-side switching, and switching logic

The switch (mechanical or electronic) can be placed on the low side or high side of the circuit. The diagram at right shows both. The supply voltage is applied at the high side of the load (e.g. relay coil) and a low side switch grounds the load to complete the circuit. The opposite applies for a high side switch.

You don't always get to choose. All of my home brew antenna switches are high side. The Hamplus 2×8 antenna switch requires low side switching. The same is true of almost all amplifiers, where you ground the control line to bring the amp inline when transmitting. I prefer high side switches for outdoor equipment so that the power supply is not continuously in circuit, leaving the power supply exposed to all potential occurrences of static and surge. In practice it's no big deal and I may be overreacting.

Whichever you want or require there are implications for how the GPIO are used. With a solid state switch you can use either NPN or PNP transistors. The choice is not arbitrary since they are not equivalent.

  • NPN: normal logic (HIGH is on) and low power dissipation.
  • PNP: reverse logic (LOW is on) and high power dissipation.

Vce is very low with an NPN switch so that the I²R loss is also very low. Vce is typically 0.6 to 0.8 volts with a PNP switch and the loss is higher. That is why it is common to see NPN Darlington array chips and individual PNP Darlington transistors with a heat sink option (see the picture above). With the small relays we typically use the power dissipation is modest and a heat sink is not required.

With normal logic and high voltage (12 volts is high when dealing with a microprocessor!) a high side switch requires a complementary Darlington transistor: NPN followed by a PNP. Since there are pretty well none of these devices commercially available it must be constructed from individual transistors, and the parts count is high. That adds up when you have dozens of control lines to switch. With a PNP Darlington you escape that if you use reverse logic (LOW is on).

For the typical multi-relay modules marketed to Arduino users you can directly connect them to the GPIO pins if, again,  you use reverse logic. With normal logic an NPN driver is required to invert the logic.

My choices

After looking at the effort and cost required for the various options I have settled on my final choices for switching devices.

  • Indoor equipment: Darlington transistors
  • Outdoor equipment: Relay modules

Relay modules are surprisingly inexpensive from multiple online sources. This stack of 48 relays cost me only a little more than $1 (CDN) per relay. That many relays might seem excessive at first glance until you consider that just the 2×8 switch requires 16 relays. The small PCB at the lower left is for one of the 6-band BPF. It is partially populated with PNP Darlington transistors.

By restricting myself to these two options I will use reverse logic in the Arduino. I recommend that you use similar code as that below when doing this. You can easily switch between normal and reverse logic by changing just two global variables. Mixing logic in an Arduino sketch can cause confusion during coding so I recommend sticking to one or the other.

int R_OFF = HIGH;
int R_ON = LOW;

digitalWrite(gpio#, R_OFF);
digitalWrite(gpio#, R_ON);

There are no NPN drivers required at all! The PNP Darlington transistors are driven directly by the GPIO pins with only a base resistor: 3.3 kΩ appears to work well for the 2N6034G. I have designed control boards for the BPF to support both manual and automatic band selection. Other than the transistors all it contains are bypass capacitors, base resistors and several Dupont connectors.

The relay modules connect directly to the GPIO pins. Except for the 2×8 switch (low side switched) the NC relay terminals will be grounded for lightning mitigation. The system will be large with all the relay modules stacked. It will be placed out of sight under the operating desk.

When I transition to Wi-Fi to untether the control system from the PC, it will be placed where the relay chatter can't be heard at the operating desk. Lightning protection for the station can be better when the control lines are kept out of the shack and closer to an external ground. A small 13.8 VDC power suppy can be colocated with the remote control system.

Next

Cabling is no small job. There are over 100 Dupont connectors to be assembled, most in groups, for connection to the Arduino, relay modules and BPF PCBs. A crimp tool is essential for the work to proceed smoothly and to produce reliable connections. 

There are multiple DB9 and DB25 connectors and cables to/from peripheral equipment and the control cable patch panel in the basement. It's a tedious but necessary job.

For the initial installation I might not use an enclosure for the control system. The quantity of connectors and an almost guaranteed need for future changes makes for difficult and perhaps unnecessary work. Provided there is sufficient RFI protection it can be left "open" until the design of the control system matures.

With a little luck and some hard work the full system should be ready for CQ WW SSB at the end of October. Well, that's the ideal, but with all the tower and antenna work I am doing for myself and others I might not be done in time. I'll have more to say about the full system once it is complete and it has been used in at least one contest.

Monday, September 12, 2022

Is Patience a Virtue?

Patience is the ability to endure difficult circumstances.

You've probably heard stories like the following. A ham operating with a small station in a small yard in a suburban neighbourhood has, after 50 years of effort, reached 300 DXCC countries on 160 meters. It doesn't have to be exactly this milestone but something similarly difficult like 9BDXCC, top of the DXCC honour roll, or a major award with QRP and a low dipole.

The common factor is the time required to get there. An achievement of this magnitude with one or more operating handicaps requires long years of patient effort. Each QSO is difficult, the propagation is seldom favourable, work and family obligations limit operating time and there may be only the occasional DXpedition for many of the target areas.

Are you impressed? Are these laudable pursuits? Consider that a ham with a big station can often do the same in 5 years or less. Is there virtue in spending a large fraction of your life with a minimal station to accomplish what another ham could do in a a fraction of the time and with less effort? 

There are some in the latter category who are dismissive of the long haulers and will gladly spout derogatory slogans such as "life is too short for QRP" or "work 'em fast and move on the next one". Big is the way to go for them. Is there an objective way to decide which category of ham is more correct or virtuous? Is the question ever asked in good faith, or is it only voiced with smug certainty? 

I know those in the former category, and they do not get upset when these views are expressed to their faces. Instead they just smile, smug in their belief that they understand something that others do not. Both would be wise to note what I said in an earlier article:

Never mistake a personal preference for a universal truth.

A pleasant homily, it would seem. Perhaps all I'm doing is drawing attention to my own biases! That said, let's pursue the matter further.

I enjoy operating QRP with small antennas. It can be tremendous fun to see what how much can be done with very little. I also enjoy heating the atmosphere with a kilowatt driving huge antennas and working the hordes during contests. What I don't enjoy is exclusively doing one or the other. I like variety.

So, no, I am not really impressed by stories like the ones I mentioned at the start of this article. Sitting there year after year, scouring the bands and waiting for the rare circumstances when I can put another check mark on my awards progress. That would make me feel like the fictional Casey immortalized in a famous poem standing at the plate and waiting for the perfect pitch. 

Expect to strike out more often than not. Self confidence can easily become or seen by others as smugness.

Of course no major award should be easy -- there's no challenge in that! But neither should the pursuit of operating objectives become drudgery or (if that term is offensive) a pursuit of some kind of Zen enlightenment. Which of the following strategies do you feel is more virtuous:

  1. Wait for the perfect pitch: dependence on external circumstances, such as propagation, to be favourable.
  2. Hasten success: reliance on one's own ingenuity and effort, such as by building a better station, and thereby decrease dependence on outside forces.

Challenge, yes, but one I can meet with a combination of circumstance and my own ingenuity. I feel good when I get through a DX pile-up with the aid of operating skills I've spent years learning and using towers and antennas I've designed and built myself.

I do not feel as happy when I'm simply lucky working the rare DX. I would also feel no accomplishment by paying to rent a super-station via internet remote. Others feel differently and that's okay. We all have our preferences.

Patience may be a virtue but, to lean on another homily, practice it in moderation. There is no shame in the ambition to improve your station to more speedily reach your objectives and, indeed, to reach previously unachievable objectives. That said, I commend those limited to small stations, whether by taste or means, who hone their skills and exploit technology (e.g. digital modes) and other aids to accelerate progress towards their goals. 

Patience may be a virtue but it can become complacency: an excuse to justify the avoidance of learning and building. If you're patient it may be time to push yourself out of your comfort zone and try something different. There is much to be gained. Good things rarely come to those who are merely content to wait.

Sunday, September 4, 2022

Ode to a Fried Egg Insulator

Lightning is a perpetual risk. As our towers get higher, the antennas larger and the footprint of the antenna farm expands, the risk increases. When you have a big station you will be hit by lightning. Don't build a large station unless you are prepared to face the risk.

Lightning does not negotiate. Attempts to appease it with exemplary grounding practices, protection devices and emergency disconnects don't keep it away. All you can do is minimize the damage. Injury and property damage can be largely avoided when you follow best practices.

There is more that I can and should do in my station, steps that I've deferred to the priority of putting up towers and antennas. Now that I've been struck by lightning twice, each time to the Beverage system, it has percolated up my priority list. With summer largely in the rear view mirror I have time to plan and execute before next year's storm season.

You are probably familiar with the myth that lightning is attracted to high points. It isn't. There isn't anywhere near enough charge in a tower to equal that in the atmosphere. The real reservoir is in the ground. It is only when the cloud and the ground have sufficient electrical potential to bridge the large air gap that our towers may come into play. 

The height of an amateur radio tower is almost negligible in comparison to the distance between cloud and ground. Its role is secondary. If a conducting structure is within the "zone" of a nascent strike a primary or secondary channel will take advantage its presence to sate its appetite, travelling through it and other attached conductors to better reach the charge reservoir in the ground.

When lightning strikes a tower there are many paths to ground. It can, of course, travel down the tower to the ground. In a direct strike the ground rod is almost an afterthought since lightning will bridge the gap through the air as well for a channel large enough to carry up to 100,000 amps. Many of our protections are really only sufficient for secondary strikes and nearby strikes that induce high currents in the tower and other conductors.

In addition to the tower itself, lightning will recruit the coax and cables on the tower and, for a guyed tower, the guys and their anchors. The anchors are natural ground rods, and pretty low impedance ones at that. But what of the insulators we use to break our guys into non-resonant lengths? That brings me to the crux of this article.

The adjacent photo is a ceramic insulator on a guy cable for my 150' tower. Pre-form guy grips thread through the insulator. There is no DC electrical connection between the sections of 5/16" EHS. The capacitance between the pre-forms is no more than a few picofarads, which is an effective barrier at HF frequencies.

I use a mix of 502 and 504 insulators on my guys. Although they are designed for utility service, they do well in this application. But there is only so much they can do in the event of direct lightning strike. While I haven't checked the specs, I expect that they can withstand at least 20 kV, assuming they are in good condition and not coated in dust and pollutants. They are no match for a direct strike.

The 502 insulator at right used to be on the guy of a tall tower at a friend's station. The tower suffered a direct strike years ago and the guy cables conducted a substantial amount of the current. Some of the insulators shattered and the tower only kept upright when the now slack pre-forms made direct contact.

Notice how the lightning flashed around the insulator to travel between guy segments. The flash heating cracked and charred the surface. Even that wasn't enough so it punched through the insulator to reach the next guy segment.

Let's look a little closer.

Impressive, isn't it? Apart from the extensive lightning damage you can also see an ordinary abrasion mark of the pre-form on the insulator (top centre). That can happen even when the pre-forms are installed correctly since there will always be some guy motion that will scrape material over the years. This is a good reason to exceed the minimum requirements for guy components.

He had to replace all the guys on that tower. It couldn't have been a fun job but it can be done while keeping the tower standing. Knowing his background I am certain he did it properly. That, however, is beyond the scope of this article. I know how it's done but I've never done it, and I hope I never have to!

Lightning is intensely powerful. For most hams and their smaller antenna systems the greater risk is by induction from nearby strikes and secondary channels: lightning is an RF phenomenon. There are usually more enticing paths to ground in the area. That's why you should never stand under a tree during an electrical storm.

Use lightning protection measures but never deceive yourself of lightning's power and reach. Good protection against direct strikes is possible but absolute protection may be out of reach of ham budgets. Do it well, follow the regulations and make sure that you're insured.