Skip to content

K3 Custom Scenario

K7MDL edited this page May 7, 2024 · 1 revision

I have 2 decoder/wattmeter units built, each controlled by a K3. One is the same in use for 2 years now controlling a 5-band transverter and downstream high power amps for 144, 222, 432, 903 and 1296 bands. This explains my default band naming and total number of bands as I was VHF+ focused for this. It is also why I selected a log power detector capable of 10GHz.

Here is the data I used to configure each band using the desktop app config screen.

Config after installation outside on 4/15/2022 is (after code changes removing inversion corrections):

PTT Input Active HIGH ON

PTT Output Active HIGH  OFF

CW Key Polarity High OFF

All ports are set to Port A Follows PTT OFF

 

*** Special case workaround.  When the K3 is powered off, the K3 end opto coupler box sends 1 on all 4 decoder lines so the decoder get b111111  (0x3F) and 0x30 at the input.  For HF and 6M it sends all 0s (0x30).  This caused a no match and the outputs were set to 0 causing all relays to turn on. 

Defined all ones and all zeros as a special case in code and set the relays to a particular state (All off).  PTT now checks the band input lines for invalid band since it seems to be the 1st event before the all 0 and all 1 event.

On the PCB we are now reading 6 input lines.  Only 4 are sent from the K3 interface today so only the lower 4 bits will change, the upper 2 are pulled high.

An invalid band (any pattern not defined, and 0x3F, 0x30, 0x00, and 0x30) forces PTT to RX state (really it blocks change to TX state)

Custom Input PortA PortB PortC
HF 63 (0x3F) 0 255 0
50 62 (0x3E) 0 254 0
144 61 (0x3D) 18 253 0
222 60 (0x3C) 19 123 0
432 59 (0x3B) 20 183 0
903 58 (0x3A) 21 47 0
1296 57 (0x39) 22 223 0

Sending 0 to the Xvtr on Port A disables the Xvtr.  Need to verify if it also disables TX.  Using HF and 6M to cover Radio ON and Off scenarios.

Port A Transverter with PCB V1 DB15 (Top)

The Xvtr pullup is 5V. 

DB15 connector Port Name signal Teensy io pin Xvtr pin# K3 pin
10-14 GND GND GND 11,12,13,14 12,5
1 PA0 Band 0 33 1 13
2 PA1 Band 1 34 2 3
3 PA2 Band 2 35 3 9
4 PA3 Band 3 36 4 14
5 PA4 Band 4 37 5 6 DigOut0
6 PA5 Not used 38 na  
7 PA6 Not Used 39 na  
8 PA7 Not Used 40 na  
9 PTT_Out_1 PTT_Out_1 13 15 10
15 Not used yet, routed on PCB v2 +12V +12V Na Na na

Note: I did not use DigOutX pins in this setup even though they might be wired at one end.


I recently built a second unit for a 2nd K3 (May 2024) has an internal 2M transverter and is used for HF, 6M and 2M. The 2M transverter drives a 1KW amp that has remote power on feature using a 12V relay. Port A Pin 10 is modified to put out a fused 13V for the relay and PA0 pin closes to ground to energize the relay applying AC power to the power supply. PTT1 out on Pin 9 keys the amp in TX. The input from the K3 has pullup to 5VDC on B0-B3. I also wired DigOut0 and DigOut1 to the decoder input since I plan to support all HF bands. I leave DigoOut1 set to OFF (Set in K3 config menu). DigOut0 is automatically turned on (0V, OFF is floating) when a transverter band is selected AND the power output is low (milliwatt range). This is useful to differentiate HF bands from transverter bands. Setting the KIO3 to HF-TRN vs just TRN enable a decoder output for all bands including 6M. TRN is transverter bands only, all others including 6M are 0. You can use DigOut1 which is per-band, but DigOut0 does the job already. In the example below, I wired all 6 input pins to B0-3 and DigOut0 and DigOut1 and configure the input pattern to match the correct pattern for each desired band, no matter if HF or VHF+.

You will need to wire a cable between the K3 HD15 acc connector and the band decoder input DB9. I create a table for this which includes any in-between connectors when there is a long run. For each wire I record the wire color and pin assignments.

This is the K3 IO drawing. It has pullup resistors for B0-B3 pins to 5V (no blocking diodes!). The K3S has diodes in series with the B0-B3 pullup resistors to prevent higher external voltages damaging the 5V power rail. Some old K3s do not have these pullup resistors so you have to add some. You also need pullup for DigOut0/1 pins and LPKeyOut (PTT, limited to 10ma). The PTT RCA jack is an open collector that closes to GND and handles higher voltage and current. The Keyout has several resistors in the path so it will not close to ground closely like the RCA jack does. This can be an issue depending on your low (0 state) switch logic threshold voltage. Since we are using an optocoupler we care more about the current.

image

For direct connection to the K3 The pullups for B0-B3 appear sufficient.  IF not then can lower the opto coupler input resistor value.

For internal 2M Xvtr TRN addrs can be set to any address 0-9/  Set it to Int Addr=2 to be the same pattern as the normal Xvtr 2M band.

For HF band decoding Set KIO3 to HF-TRN mode.  Normally it is set to just TRN but want to get decoder working on HF bands.  Digout 0 is low when a low power mode is set for current transverter band.  A pullup (used 2.2K) is needed to 5K (From Pin 7 K3 On which is 5V).  The 2.2K leaded axial resistor is connected between the DB-9 pins 6 and 7.  K3 on is pin 7.  DigOut0 is Pin 6.  DigOut1 is not used so will be 0V.  Since there is no pullup it look like an unchanging open.  The optos are inverted so will decode as a 1.  The result is Bit 6 (DigOut0) will be 1 on 2M and 0 for all HF bands plus 6M.  HF-TRN lets 6M have a unique pattern. 

 

Band Decoder results (inverted from actual signal)

 

Band DigOut0 DigOut1 B4 B3 B2 B0 Hex Value Decimal Port A pattern Xvtr Addr
160 0 1 1 1 1 0 1E 30 255 None
80 0 1 1 1 0 1 1D 29 255 None
60 0 1 1 1 1 1 1F 31 255 None
40 0 1 1 1 0 0 1C 28 255 None
30 0 1 1 0 1 1 1B 27 255 None
20 0 1 1 0 1 0 1A 26 255 None
17 0 1 1 0 0 1 19 25 255 None
15 0 1 1 0 0 0 18 24 255 None
12 0 1 0 1 1 1 17 23 255 None
10 0 1 0 1 1 0 16 22 255 None
6M 0 1 0 1 0 1 15 21 255 None
2M Internal 1 1 1 1 0 1 3D 21 254 (PA0) Int Trn2
1296 (Note 1)                    

 

Note 1: 1296 in the table is set up in configuration to force 144 to turn off when band up is hot landing on 160M.  It is not enabled in the K3.  Just a workaround until all HF bands are enabled.  Right now there is HF, 50Mhz, 144Mhz and loop back to HF when using K3 band up/down.

 

Use the above Decimal values to program custom pattern for each band.  Set 2M Xvtr to In TRN2 address.  Set DigOut1 to OFF for all bands.  IT is not used but if changed it will change the band decode pattern so adjust if needed.

 

PTT Input.  This is for the K3 Key Out or LP keying, pin 10 on the D15 connector, pin 8 on the DB9.

R3 is shorted, R1, R2 and Z1 are not installed.  A axial 2.2K resistor is soldered from the connector side of R1 (source of 5V from K3 ON, same as for DigOut0) to the junction of R3,Z1.  This creates a pullup for the K3 to pull down.  Set PTT Active High in config.

 

Now set to support all HF bands, or make it easy to program name for all bands, expand support for at least 11 bands.    Ideally 16 bands 160=23cm and General Band for an undefined input (serial, parallel or other).

 

PTT output:  Change all Opto drive resistors from 2.2K to 1K.  14V through 230ohm resistor load results in 4.0V.  Opto not driven into saturation.  Changed to 1Kohm and now drops to 1.0V.  Changes R28 (PTT1 Out) and R11 (remote 2M amp power control.

 

Cut the ground trace off pin 10 and jumpered 12V through a 0.17A resettable fuse  (Mouser # 652-MFR017 0.17A 60V Bourns Radial Lead Resettable Fuse). Operating PA0 to ground will connect the 2M amp control relay to ground.  Rewire the 2M amp remote power on relay to get 12V from decoder and have the decoder switch the coil to ground to activate amp.  PTT is common still.   This is only for decoder unit #2.  Original decoder for 144-1296 operates the same as before.

 

ToDo:

  1. Update Decoder to change 2.2K to 1K or even 470 or 330ohm.  Change out rest of resistors.
  2. Update software to make each band name easily configurable.  Expand table to 16 or 17 bands