                      ABC - A Better Controller

           G. D. (Joe) Young VE7BFK and Ben Young VE7AJT


                             D R A F T

Introduction

This article describes a single-chip microntroller circuit for operating
common VHF or HF transmitters as amateur radio direction finding (ARDF)
hidden transmitters or 'foxes'. The controller features convenient
configuration setup requiring only an ordinary terminal, field selection of
configurations without a computer or terminal, and solves a number of
problems found in other controllers.

For ARDF events, an automated method of operating a transmitter or several
transmitters is needed--to avoid requiring an operator to repeat a trivial
message for hours and to keep accurate on/off schedules so that several
transmitters can be synchronized. For example, in international rules
competitions, five transmitters take turns transmitting a unique message
for one minute each, repeating the cycle for up to 6 hours duration of the
hunt. For practice sessions, or other events, continuous operation,
different transmit durations, or different numbers of transmitters might be
useful. The ability to operate a variety of transmitters allows using
whatever can be located cheaply, or a handheld can be pressed into service.

Circuit modules which are readily available for repeater controllers may
have nearly the right combination of features--adjustable timing,
adjustable code speed, programmable messages, flexible transmitter
connections. Indeed, we have used the Comm Spec ID-8 as a fox controller.
However, these devices will usually have one or more of the following
shortcomings when they are used for fox controllers: timing the interval
between the end of one transmission and the beginning of the next (rather
than between the start of successive transmissions); awkward small keypad
programming--numeric-code commands, two digits per letter message text
entry with no editing of mistakes; 'burn an eprom' style re-programming
requiring specialized equipment; limited timing accuracy.

With these considerations in mind and thinking of various 'nice to have'
operating features, a detailed 'wish-list' of necessary capabilities was
drawn up. As well, software complexity would be permitted, but the hardware
was to be kept as simple as possible. It was strongly desired to have
simple field-selection of operation--meaning no need for a computer or any
auxilliary gizmo, no 'take-the-lid-off-and-set-switches' for field
configuration. No configuration operation at all should be necessary when
the controller is to operate the same way it did the last time it was used.
By the time this list was well underway, a microcontroller implementation
seemed natural.




Choice of microcontroller

I have to confess immediately that a significant factor in choosing the
68HC11 family of processors was familiarity, and the already owned C
compiler for code development. Nevertheless, this processor has several
features valuable for this project. The processor has a large on-chip
EPROM, 12 Kbyte, allowing the needed program complexity, and it does not
require any special hardware to load the program into the EPROM. The
program is downloaded from a PC connected via the same serial port that
will be used to set up the controller operation, using a bootstrap loader
built into each of the 68HC11 parts and a free 'debugger' program running
in the PC. On-chip peripherals used are the serial communications port,
timers, several bits of digital i/o, and an EEPROM for non-volatile storage
of configuration information. One substantial disadvantage of the processor
is its cost. Some ways to mimimize the cost are discussed later.




Resulting controller

Physically the unit is housed in a small, shielded, plastic case 2.5 cm by
6 cm by 9.5 cm, including a 9V battery. The front panel has a 3.5 mm,
two-circuit phone jack to connect control and audio signals to the
transmitter, and a single pushbutton for the limited operator input needed
in the field.

Inside, the microcontroller produces several transmitter control signals
simultaneously: push-to-talk asserted for the duration of the transmission,
on/off Morse code keying, 1000 Hz continuous tone, and 1000 Hz tone keyed
with Morse code. The tone outputs are logic voltage level, and a passive
filter is provided to produce acceptable audio for modulation. 

There are a few jumpers to select different kinds of transmitter control.
For example, to operate a standard FM handheld, the audio is combined with
the push-to-talk and supplied to the tip of the two-circuit jack.
Alternatively, a rig with separate audio and PTT may have the PTT on the
tip and the audio on the ring. For a third possibility, an on/off keyed rig
can be supplied with the audio on the tip and the morse code keying signal
on the ring.  Any one of these arrangements is realized by jumper
connections between the two-circuit phone jack and various controller
outputs. These jumper settings would normally only be changed in the
comfort of your workshop when setting up to use a particular transmitter.




Description of circuit

The schematic diagram is shown in figure 1. A block diagram showing a
possible overall fox hookup is shown in figure 2. The microcontroller I/O
pins are mostly brought to a header, H1, where jumpers connect the signals
to the rest of the circuit. Typical jumper connections are given in the
diagram. A pair of resistor networks pull up all the input pins so they are
not floating when unused. Header H2 provides the means to connect the EPROM
programing voltage when the program is being downloaded into the
microcontroller. R8..R11, C11, C12 form the low-pass filter for converting
one of the square wave tone outputs to reasonable sine waves. R11 may need
to be increased to 500 ohms or 1K depending on transmitter audio input
sensitivity. Q2 can provide an active-low PTT signal and is needed, with
R12, to generate the combined audio/ptt signal. Q1 is a power FET,
high-side switch which also requires Q2 to drive it. The Q1 circuit, if
needed at all, would normally be located with the transmitter, and is shown
in the second diagram. C13..C19 are RF bypass capacitors. C3, R2 drive the
reference input for the on-chip A/D with a filtered version of the 5V
supply. The A/D is not used in this version of the controller. The MODA
MODB jumpers on H1 configure the 68HC11 for operation in bootstrap mode,
normal single-chip mode, or expanded mode--external EPROM memory. Also on
H1 are the serial transmitter and receiver signals, at TTL levels. To keep
the controller simple, a special cable may be used which has the RS232
conversion circuits included in the connector and powered from the RS232
port it is plugged into. If RS232 levels are desired to/from the controller
board, a power-stealing interface is shown using Q3 and Q4 and associated
parts.






Description of overall system

Since there are several distinct operating conditions, each condition is
made to correspond to a selectable MODE. The current implementation has
modes called FOX, IARU, CONTINUOUS, and SETUP. The first three modes each
have a startup menu selection sequence, followed by a startup action, then
followed by a timed sequence repeated indefinitely. The SETUP mode is meant
for communicating with the operator via the serial port.

The FOX mode startup menu allows choosing an ID and a message to repeat.
Then the controller waits for a start signal from the pushbutton; the
transmitter is immediately turned ON, interval and duration timers are
started; an ID is transmitted; a message is repeated until the ON duration
expires; the transmitter is turned OFF until the duration timer expires;
the transmitter is turned ON again, timers restart and the sequence repeats
indefinitely.

The IARU mode startup menu allows choosing an ID, the number of foxes there
will be in the whole setup, and the number of the fox this controller is
operating. Then the controller waits for a start signal from the
pushbutton; an initial waiting time is counted out; the transmitter is
turned ON, one-minute ON-duration and a number-of-foxes minus one interval
timer are started; an ID is transmitted; a message is repeated until the
minute expires; the transmitter is turned OFF until the duration timer
expires; the transmitter is turned ON again and the sequence repeats
indefinitely.

The CONTINUOUS mode startup menu allows choosing an ID and a message to
repeat. The controller immediately turns ON the transmitter, starts an
interval timer, sends the ID followed by repeating the selected message.
The ID transmission repeats each time the interval timer expires.

The SETUP mode allows presetting or examining all the time intervals, CW
speeds, ID and message texts. The communication uses mnemonic, plain text
commands sent using a terminal or terminal emulator program connected to
the controller via the serial ports on the controller and terminal.

Selection of the mode may be made at power-up, or on interruption of a
mode. The controller sends an 'audible menu' of the selection choices by
turning on the transmitter and sending in Morse code a single-letter choice
with a pause. If the choice presented is the one desired, it is selected by
pushing the front panel pushbutton. As soon as a choice is made, the
controller stops that menu and sends the choices of the next submenu
appropriate to the mode. If no choices are made in any of the menus
presented, the controller setup stays the same as it was the last time it
was used.




Construction

The controller may be constructed on a good quality prototyping board which
has a 1/10" grid of plated-through holes, as shown in the photographs. It
will take 4 to 8 hours to construct each controller this way, but the
result will be as small as it can be. If size is not a concern, larger
layouts are easier to build.

Even easier is to use an the shelf module - Technological Arts' Adapt-11 is
a 4 cm by 7 cm board with the microcontroller, reset circuit, voltage
regulator and RS232 driver. All the processor signals are brought out to a
50-pin header. They also make a same-size, quality prototyping board with
mating 50-pin socket which could be used to add the filter, PTT switch,
power switch, and front panel connections to complete the controller.

Selecting the 68HC711E9 processor was deliberate. We wished to employ a
popular microcontroller so that it would be available for some time, and we
anticipated declining price as volume of use grew. Unfortunately, this
processor has actually increased in selling price, sometimes spectacularly
when demand exceeded the manufacturer's capacity to make them. However, if
the fox controller does not need to be small, a version of the processor
without the internal EPROM can be used and they are (usually) much cheaper.
The 68HC11A1 or 68HC11E1 plus an external EPROM and 8-bit latch yields a
circuit which is at least twice the size, but perhaps 1/3 the cost.



