Tuesday, 17 December 2019

Dual Transverter IF switch and Sequencers for Elecraft K3 / K3s


I have a medical condition called Muscular Dystrophy which results in the muscles of body slowly atrophying over time which has resulted in my hand muscles weakening to the point I struggle connecting and disconnecting any type of RF connector; this poses a problem in that I use transverters for my 2m and 70cm systems and constantly need to swap the 28MHz IF lines.

A sequencer is also employed to ensure any pre-amps are switched out of the TX signal path as well as to ensure hot switching doesn’t occur to any relays when RF is generated by the exciter.

My original setup used a single sequencer shared between transverters and other devices and though this was perfectly adequate I wanted the new system to have separate sequences where each event could be configured or modified at a later date without too much hassle.



Original Setup



Both of the transverters were built with a single RF port with an internal relay however this isn’t ideal and so I decided to modify both my transverters to provide a separate RX and TX RF ports.

My station also utilises a Wavenode RF power meter to monitor in real-time the VSWR of each antenna.  In the event of a high VSWR the Wavenode closes an internal relay this can be used to connect to an external monitor to cease operation of the station.

I recently purchased an Elecraft K3S (K3) which provides both RX and TX IF ports with the TX port output at 0dBm giving the correct level of drive for the transverters.

While reading the K3 manual I discovered the ACC port provides four TTL level logic gates where a combination of the four indicates which band is currently selected.

So with the above in mind, I decided to completely re-engineer the station to give the best receive and transmit performance I could get on the 2m and 70cm bands, reduce the amount of cable swapping and have separate sequencers for each of the transverters

The ACC port can provide PTT and TX inhibit functions which again would also reduce the amount of cabling required.

The ACC port consists of a DE-15 socket where pins 3, 9, 13 and 14 provide access to the TTL logic gates and pins 7 and 10 provide the TX inhibit (TXINHIB), which can be configured to inhibit the exciter on either a high or low state and KEYOUT-LP (PTT) which provides a 10mA sink to ground.

This was exactly what I needed to create a single control unit to switch IF lines, provide an independent sequencer to each transverter chain and to ensure that no RF was generated until all events in each sequence was completed all at the press of the band selector button on the K3 after some thought I came up with the following station configuration.


New Setup



The K3s band logic gates can be configured in one of three ways NOR for HF bands only, TRN for transverters only and HF-TRN for both the HF bands and transverters. I selected the TRN setting which made reading the TTL logic simpler as it only requires knowing the current state of two of the logic gates instead of the four gates required for the NOR or HF-TRN configurations.

From here on forward when I reference bands it is taken to also include the transverters.

The band switch logic matrix for the K3 is shown below.

K3 band switch matrix


As you can see from the table when TRN1 or TRN2 is selected the logic can either be on or off for either band but they can neither be off or on together for band 0 and 1 so any other state would be equal to another band.

So with the above in mind, I needed firstly someway to read the K3 TTL logic.

Secondly, to key the 2m and 70cm transverters as well as associated amplifiers a 10mA sink to ground is needed.

Thirdly the change over relays, Tohtsu CZX-3500, which require 12V and draw around 250mA, which would be held closed for RX operation and released for TX. The CZX-3500’s also have an advantage or providing an extra 20dB of isolation between ports compared to the ones in the transverters which only provided 40dB of isolation.

Fourthly the ability to control two mini relays to switch the IF lines between transverters.

It would also be useful to have some indication of which band has been selected as a separate confirmation to the K3, and that events for that band are being sequenced correctly.

And finally, it would be nice to have some kind of audible alert in the event of a high VSWR.

I came to the conclusion using an Arduino microcontroller would be the easiest route to getting something working fairly quickly with little expense as well as keeping the electronics side of things simple.

The Arduino UNO uses an ATMega328P which has 23 general-purpose digital I/O pins available however two are used for serial coms and one for a reset button, two pins are used for an external 16MHz crystal reference, so minus those five I/O pins eighteen pins are available to for other purposes.

I decided I need the following pins:

2 pins to read the band switch TTL logic from the K3.
3 pins to light LED’s to indicate which band has been selected on the unit.
2 pins for the IF relays.
1 pin to monitor PTT enabled from the K3.
1 pin for a PTT LED indicator.
1 pin to enable and disable TX Inhibit function on the K3.
1 pin to monitor the VSWR trip alert from the Wavenode RF power meter.
1 pin for the VSWR trip enabled warning buzzer.
1 pin for a VSWR trip reset button, for which I’ll use the default Arduino reset pin.
6 pins for the two sets of three for the sequencer, one set for each band selected.

Programming the Arduino is fairly straight forwarding using the Arduino IDE from the Arduino website. The language used is a subset of the C/C++ language which is fairly simple to use and there are plenty of resources on the internet to get you started.

The first iteration of the software was a simple loop that read the state of the I/O pins that monitor the band logic gates on the K3 and lit an LED to indicate which transverter / band was selected.

What became apparent with this first simple loop was despite the fact there aren’t any mechanical switches the software was experiencing contact bounce.

Contact bounce is caused when a switch is pressed or released and for a few milliseconds or more the switch state is unstable to get around this problem it is normal to get the state of the I/O pin and store it in variable and then wait for a defined period and check again when the stored state and current state are equal we can be sure the switch is either high or low.

There were two issues caused by the contact bounce, one if the Arduino was switched on before the K3 then the band selected on the Arduino may not agree with the band selected on the K3 and secondly, when the band was changed on the K3 occasionally the wrong band was detected.

To resolve for these issues I started writing a routine to take into account the unstable state of the switch while bouncing but in a sudden moment of genius decided not to reinvent the wheel and instead download and installed a library called Bounce2.h which reduced the amount of code I had to write for myself.

With the contact bounce cured it took an evening to write the software and that included having to remind myself how hardware is referenced on the Arduino, the web is great for these kinds of projects there’s always plenty of example code around if you’re unsure how to do something.

With the software written the next thing to do was get on with the hardware, now electronics isn’t my forte so this wasn’t something I was looking forward too.

I knew for sequence events two and three some simple NPN transistors in low side configuration would suffice however for event one I needed the ability to switch between 5V to 48V drawing up to 1A so that in the event I need to replace the change over relays I wouldn’t be restricted in what hardware could be used, so I chose to use a P-Channel MOSFET in a high side configuration.

Switch Configurations


I had a discussion with a friend who convinced me that isolating the high voltage side of the circuit would be prudent, it’s not something I would have bothered with however optoisolators are cheap as chips so I decided to isolate all of the sequencer events this would allow me to change the hardware configuration at a later date if I wanted to.

 As I had moved to the optoisolators I decided instead of turning the sequencer event indicator LED’s on direct from the ATMega I/O pins I would instead add an NPN switch in parallel to the optoisolators to sink the LED cathodes to ground instead.

This seems to be overkill but as MMBT3904 NPN transistors are only five pence each including them wasn’t going to cost any significant amount and ensure if I altered the circuit, later on, I wouldn’t run foul of exceeding the 20mA limit on the ATMega I/O pins.


Opto-isolated Switch



The complete circuit diagram is as follows.

The complete schematic



With a general plan of action, I decided instead of building the unit on stripboard I would instead have a go at using KiCad, to develop both the main PCB and front panel LED PCB.


Main board

Front panel


 I decided to place all the LED indicators, high VSWR buzzer and reset button on a small PCB, shown left, which could then be mounted to the front of the case this removed a lot of wiring that would have been required if I had mount everything individually. I used IDC connectors to connect the two boards.

The KiCad project files, Gerber files and software can be downloaded from GitHub.

I do have a couple of sets of boards spare if anyone wants to build one of these units please drop me an email, see QRZ.com, if interested.

Once the PCB’s had arrived and populated I mounted them in a Hammond ‘1550’ 275 x 175 x 67mm die-cast enclosure which matched the transverters.

Font Panel

Rear Panel

Interior

No comments:

Post a comment