Picaxe Comms to Ham AT-50 Antenna Tuner

meridian

Member
G'day from Darwin,
I have a Kenwood TS-50 Ham transceiver with matching AT-50 automatic antenna tuner. The radio is a bit flakey and beyond economic repair. A friend has arranged another HF radio but it doesn't put out any signals regarding what band it is transmitting on.

The first solution is to buy an ATU that only needs RF input, and it can work out the frequency and best match for the antenna. An SGC-230 costs about $700.

The smarter, cheaper way is to get a Picaxe to do the talking to the ATU. I got this (somewhat cryptic) info from DK.mods.

BTW the ATU is in another cabin, near the aft end of the boat where the antenna wire exits to the back-stay.


Communication method: Serial interface
Tranfer rate: 4800 bps
Synchronization: Start-stop (Asynchronous)
Parity: None
Signal format: TTL level (!)

2: TT (TS50<--AT50)TTL!

3: TS (TS50-->AT50)TTL!

Firstly the TS50 and the At-50 talk to each other on power-up.

1. at Power-on:
===============


+------------------+ ++1 ++3++6
TT--+ +---------------------->
| | | | |
| 1.45 sec---+ | | |
+--+ ++2 +-+4,5
TS- + +--------------------------------------->
| |<- 600ms->|
0 + 90ms resume time t

Sorry, this timimg diagram is not showing the spaces correctly, so its a bit of a mess.


Signal:
1 3 6
TT: ;;;;;0C;___0D01;__________0F11;
2 4 5
TS: ________0C;_____0D01;0F11;____

1: Power on comm.
2: Power on answer
3: Auto on request
4: Auto resume finished
5: ok at50
6: ok answer ts50

When the TS-50 is tuned from one band to another, it tells the AT-50 which band. The AT-50 stores the frequency and antenna settings in memory.
The info looks like this:

2. DOWN-UP-Communication
========================

TT: 0E02;__________0F11;__ - UP from 1.8 to 3.5
TS: _____0E02;0F11;_______

same:
0E04;0E04;0F11;0F11; UP 3.5 --> 7
0E05;0E05;0F11;0F11; UP 7 --> 10
0E06;0E06;0F11;0F11; UP 10 --> 14
0E07;0E07;0F11;0F11; UP 14 --> 18
0E08;0E08;0F11;0F11; UP 18 --> 21
0E09;0E09;0F11;0F11; UP 21 --> 24.5
0E0B;0E0B;0F11;0F11; UP 24.5--> 28
0E0C;0E0C;0F11;0F11; UP 28 --> 29
0E01;0E01;0F11;0F11; UP 29 --> 1.8

DOWNs
0E0C;0E0C;0F11;0F11;
0E0B;0E0B;0F11;0F11;
.
.
0E01;0E01;0F11;0F11;


TUNE: 0D03;0D03;0F41;0F41;
AUTO OFF (THRU): 0D00;0D00;
AUTO ON: 0D01;0D01;
tune error: 0d03;0d03;0F83;0F83;

It seems to me that by having a rotary 12-position switch I should be able to tell the 'axe what band I want, and whether it is up or down. I then press the Tune button for the ATU to do its stuff.

Not having done any serial work with the 'axe I am at a bit of a loss on how the handshaking will work. In the first example,
TT: 0E02;__________0F11;__ - UP from 1.8 to 3.5
TS: _____0E02;0F11;_______

The 'axe has to hear the 0e02, respond with 0e02;0f11, then wait for the 0f11. How is this done?

Sorry about the long post. I just hope some of you gurus out there can point me in the right direction. I really don't want to spend anoher $700, this trip has cost me plenty already!

paulr
on the way to Indonesia in 2 weeks.
 
Last edited:

moxhamj

New Member
Hi, I'm a bit concerned this has sat with no reply for a while, but I guess the answer is that this is complicated but it can be done. I'm playing around with radio and picaxe data comms at the moment and it is great fun. 4800 baud, no parity and start/stop is no problem. Picaxes can output quite long data packets, but can only input 14 data bytes and then an arbitrary number (within reason) of fixed wakeup bytes. But your packets seem short.

Picaxes do hang while waiting for input bytes, but we can probably assume that once packets start being exchanged, they will be exchanged in a fixed order with known numbers of bytes etc.

You can write bytes in hex 0-FF or decimal 0-255. For starters would it be possible to explain a bit more about the data format, particularly what "0E04" means, is that one byte or two?

The protocol looks like it might use up much of the code space of a smaller 08M, but ought to fit ok in a bigger picaxe like an 18X.
 

meridian

Member
Hi Dr. Acula
I guess its 2 bytes, ie $0e $02 or whatever. I was thinking of using a 20 with lots of inputs so I could use the rotary switch to indicate which band.

Cheers
paulr
 
Top