Wednesday, March 22, 2023

Automating VA6AM 6-band BPF

The VA6AM switchable 6-band low power BPF (band pass filter) product does not exist. Or at least, not yet. I believe that mine are still the only two in existence. Pavel has little time for this product to have a higher priority. I was fortunate that he undertook completion and testing of the relay boards and the 6 BPF modules at my request. I've used these filters in many SO2R contest operations and I'm very satisfied with their performance. 

Eventually (as I've promised a few times) I intend to say more about these filters on the blog. This will have to do for now. Pavel had not completed the control board for the filters and I needed one to integrate with my station automation

I purchased 8-position rotary switches to enable manual band selection as a temporary measure when the units were built. Rather than wait any longer I decided to proceed to integrate the filters into my station automation project with a home brew solution. 

The BPF are now automatically selected when changing bands. Manual operation remains an option when automatic switching is disabled or not functioning. There is a bypass feature for when a non-contest band is selected or it is manually turned off. I leave the BPF wired into the station at all times since their presence, in bypass mode, has no measurable effect.

The 8-positions of the rotary switch are (clockwise): Automatic (no written label); Out (off or bypass); 160; 80; 40; 20; 15; 10. Until the recent upgrade the Automatic position was equivalent to Out. The front panel control is ugly, with temporary labels and no LED indicators. Perhaps I'll add them when I get the urge. It isn't difficult but it also isn't urgent or necessary.

Manual operation is quite simple. The wiper of the switch is connected to the +12 VDC power socket on the rear panel. The relays for each band on the two relay boards for are connected to their respective positions on the rotary switch. The bypass relay is powered by diodes that leech the power from all the band relays. There are 4 relays energized when a BPF is selected. The total current draw is 120 ma. Two indicator LEDs would add another 40 ma.

The Automatic position on the rotary switch has more complex wiring. It is connected to the band selector DE9 connector on the rear panel. Of the other 8 conductors, one is power (+12 VDC), one is ground (as is the cable shield) and the other 6 are band selectors that carry +12 VDC when the band is selected. These are wired to the rotary switch in tandem with the wires to the relay boards, as described above. The straight-through DE9 shielded cable connects to the BPF driver board in the automation system.

Yes, the wiring of the rotary switch is a mess! Had I planned everything in advance it would have a connector board. The LEDs, when I get around to it, will go in a row on the front panel or positioned around the rotary switch. I'm not sure which would look better. The automatic mode LED will be a different colour than the band LEDs.

The Cat5 cable runs under the BPF boards and doesn't affect their behaviour. On the enclosure above the cable runs under one of the relay boards. I should have done them both this way but, as I said, there is no problem having it under the filters. Toroids isolate themselves very well and the more sensitive solenoid coils in the 10 meter BPF (above left) are sufficiently shielded by the PCB ground plane.

For automatic operation the power socket is redundant; power comes via the 9-conductor cable to the automation system. The BPF operates as before for manual operation. In automatic operation, the +12 VDC from the Automatic position on the rotary switch powers the switching electronics in the automation system. This is shown below (connections from the band lines to the rotary switch are not drawn).

In manual operation when the switching electronics are not powered, the GPIO pins driving the 6 band lines cannot power the BPF relays. There should never be conflicting control of the BPF relays from both manual selection and the automation system. Switching two BPF inline would be bad. However, there is an unfortunate though non-destructive interaction that I'll discuss towards the end of the article.

The software does not have to be aware of whether the BPF are operated manually or automatically. The operator decides whether to operate manually or automatically by turning the rotary switch. Software does not trigger any GPIO for bands other than the 6 HF contest bands. When only one radio is in use (SO1R) the other radio's GPIO are idle. There is no check for whether the two sets of BPF are on the same band. Conflicts must be resolved by the operator(s), software or by antenna port lockout.

There are other ways to accomplish both manual and automatic switching of the BPF than what I've built. You may be able to think of one or two. I did it this way for simplicity of hardware and software, and intuitive behaviour for the operator. At least it's intuitive to me, and I'm the one who matters most at this station! 

One alternative is to have a band decoder for Yaesu/Elecraft or Icom coding within the BPF. The decoder must manually or automatically detect the coding scheme for different manufacturers. If the band data from the transceiver is needed for other automation task such as for an amplifier, they must be wired in parallel. I have done away with hardware signalling by extracting it from N1MM's RadioInfo UDP messages. The Arduino thereby knows the band and can send +12 VDC to the BPF on each band's dedicated line. 

The BPF requires no control board when used with my home brew system automation. There is just a straight-through DE9-DE9 male shielded cable. There are commercial BPF that support a similar per-band DE9 pin, so my interface is not unusual. However, the connector pin out is likely to be different from any existing product.

Driver circuit

Two types of driver circuit were considered: electronic and electro-mechanical. The first is compact and silent, and the second is noisier and larger. I have opted to use relays for all control lines exiting the house since they are better at handling lightning surges and precipitation static. I ground the control lines via the SPDT relays for high side switching. That cannot be done for low side switching. All my home brew antenna switching systems use high side switching. The 2×8 Hamplus antenna switch is the only device in my station using low side switching.

Since the BPF and the control lines are inside the shack and not directly susceptible to weather events, I decided to use electronic switching. I have a spare Arduino-compatible 16-relay module that was my fallback in case the electronic solution became too difficult. The BPF require high side switching.

I learned something new about PNP transistors while bread boarding alternative driver circuits. A pull up resistor is needed to quench the switch and turn it off. The same appears to be true of the PNP Darlington transistors I am using. It isn't enough to set the GPIO pin High since the GPIO's 5 volts is lower than the 12 volts being switched. Since I am using reverse logic (GPIO Low is On), I naively thought I could drive the Darlington transistors directly from the GPIO with just a base resistor. A pull up resistor would be disastrous in this circuit since it would place +12 VDC on the GPIO pin and fry the microprocessor. 

I resorted to the more common 2-device solution. An NPN transistor drives the PNP Darlington. No pull up resistor is needed for proper operation and the Arduino GPIO pin is protected from the higher voltage. This may be an odd implementation of a complementary Darlington transistor but I had the parts on hand and it works. The doubled parts count, from 2 to 4, requires more PCB area. There is no cost penalty since the parts are absurdly cheap.

I bread boarded two drivers to test them before proceeding to construction. Testing a circuit is highly recommended before soldering 12 of them on a PCB. LEDs are a convenient substitute for relays since no extra test equipment is required and they glow. Keep in mind that an LED is inadequate for testing applications where the actual load is high current (an LED only consumes about 20 ma). The driver circuit schematic is shown further below.

There are 4 Omron SPDT relays energized when a BPF is selected, along with two optional LEDs. The total current is roughly 200 ma. For a PNP high side switch the voltage drop across the Darlington transistor is approximately 0.7 volts. Since P = EI, the power dissipation is 0.15 watt. Heat sink are not required on the Darlington transistors. The voltage drop itself does not affect the BPF relays since the nominal 12 VDC coils operate over a wide range.

The PCB is small and crowded with 12 drivers, connectors and wiring. A larger proto board would have been easier to work on. I chose a board with two holes per pad rather than one with long connected vertical and horizontal rows. Layout has to be sparse for the latter and there would be much wasted space in this application. Those proto boards worked well for my Beverage antenna reversing electronics since there were fewer components to mount. A custom PCB would have been easier to work on by eliminating all the wiring, but at a significant cost for just one board. 

The main cost of this board was the endless frustration of fitting and soldering small components and wires with magnifying glasses. I took care to avoid cold solder joints, bridging pads and overheating wire insulation and transistors. I was lucky to have only one cold solder joint and another where there was a high resistance leakage between stages. Aggressive cleaning of flux and spreading wires apart fixed the latter.

The cable harnesses for connection to the Arduino and BPF were another source of frustration due to their small size. A couple of bad crimps were easily repaired. The Dupont connectors with 0.1" spacing fit the board nicely. I went with all male connectors for their low profile and ease of cutting from the long chains they're sold as. The low profile eases component and wire mounting. The 9-pin connectors to the BPF are ideally female so that power pins are not exposed.

In retrospect, the layout could have been improved. I also didn't need the above board power rails. To avoid crossing wires, the 3.3 kΩ resistors are mounted below the board. In the end, what matters is that it works, and it's okay if it's ugly since it'll be out of sight.

You may have noticed the lack of bypass capacitors to prevent RFI. The cables are short and shielded, and the control lines are bypassed on the BPF relays boards. There has been no trouble with RFI. Capacitors will be added should RFI arise in the future.

The driver board was connected to one of the BPF units after testing each circuit with LEDs. That's when I discovered and corrected the problems mentioned above. I accidentally scrunched a couple of the bottom resistors when I was too aggressive pressing on the 9-pin connector. I was lucky not to do more damage when I levered up the scrunched resistors with a small screwdriver. 

Testing proceeded well after dealing with the aforementioned difficulties. But there was one problem I discovered that is not easy to resolve. It's an odd case that is very unlikely to occur in actual operation so I am not going to deal with it, at least not now. It occurs when the BPF is operated manually by the operator while the driver board is connected and operational.

Let's say you turn the rotary switch to 15 meters to manually select the BPF. The relays function as intended and the 15 meter BPF is placed in line. However, if the rig is on another band (10 meters), the BPF relays for that band are also energized. That connects two different BPF in parallel, and that's bad. 

The reason for the misbehaviour is inherent in my design of the driver board. Although there is no +12 VDC directed back to the driver board from the BPF via the Automatic rotary switch when a band is manually selected, it is present at the driver board via the 15 meter control line. It is therefore present at all 6 Darlington transistors. The NPN transistor for 10 meters turns on its Darlington and the 10 meter relays are energized.

This was an oversight in my design. Wiring the control lines for automatic in tandem with the manual controls for each band selection is responsible. There are a few ways to correct the problem but, as I said, this is not likely to every happen in real life. There is no reason to manually select 15 meters when the automation system is working and tracking the transceiver to 10 meters. The glitch can stay.

I mounted the driver board to the rear of the open frame automation system, connected the several cable harnesses, glued rubber feet to the bottom and re-installed it in the station.

Was it worth it?

With this project done, the shack hardware for my station automation is substantially complete. That is one of the objectives I set for 2023. Of course I'll continue to expand and improve the software and extend the hardware for new antenna projects. But that only involves connecting or moving wires and not hardware changes.

Use of the automation BPF band switching in a contest will have to wait. Although I set myself a deadline of CQ WPX SSB this weekend, there will not be a multi-op or SO2R operation that requires BPF. There will be other contest opportunities in the not too distant future to give the BPF switching a full workout.

Although it's done and working and ready to go, there is the question of whether this project was worthwhile. It would have been far simpler and easier to use another Arduino compatible board of 16 relays, connect it to the GPIO and stack it on top of the other 3 relay boards. While I do not regret the effort and experience of building these electronic switches, and I like that they operate silently, it was a poor investment of my time. In retrospect I would have gone with the relay board. I have one in stock, as a spare, and I could have automated the BPF in a fraction of the time.

Home brewing is fun and educational, and I had the time since it was winter and (being retired) I had time for indoor projects. Now that spring has sprung and the weather is warming my thoughts are turning to the great outdoors. It won't be long before I dig into my growing list of tower and antenna jobs.

No comments:

Post a Comment

All comments are moderated, and should appear within one day of submission.