The VK5DJ Repeater Controller V8 VK5ROH
The VK5DJ Repeater Controller V8 VK5ROH
The VK5DJ Repeater Controller V8 VK5ROH
March 2012
16F1827 version 8 for VK5ROH (solar version)
A design for a repeater controller for amateur or professional use. On a board 80mm
by 82mm, the controller is a two port design intended to control a duplex repeater
with or without a simplex gateway or link.
Based on the 16F1827 PIC it includes a range of remote controllable functions, and
has the capacity to interface to either positive or negative active COS or PTT. Version
7.01 adds two new features, firstly a watchdog timer so that in the event of a rare
lockup the chip will reset itself after 256 seconds, secondly in the event of a failure in
the MC145436 or the crystal the micro will automatically changeover to an internal
clock and continue running. If the internal clock is accessed you will notice that tail
times will be shorter and tones higher in pitch. DTMF will of course not be available
if this happens but it will buy time until the site can be visited. The 16F1827 is a
superior chip to the replaced 16F628A and is also cheaper.
There is no audio amplifier on board so the TX audio input should not require high
levels unless the receiver can provide it and it does not cause breakthrough.
The secondary (link or gateway) port interfaces to a receiver and transmitter in the
same manner as the primary port. A single transceiver is used as either a link system
or a gateway to another frequency.
The secondary port may be set to behave as a link (no tail except for a timeout when
the morse ‘TO’ is switched through) or as a gateway where tails are provided,
signalling beeps added, identification etc. The behaviour is set by a control byte in the
PIC’s EEDATA memory (see P10) and may be altered by remote control.
The direction of the mute may be set by an appropriate value in EEDATA (and
correct placement of input resistors) at programming time.
The direction of the PTT lines may be set by an appropriate value in EEDATA
inserted at programming time.
GENERAL DESIGN
Hardware
The first version of this controller was based on a 16F84 while the second used a
16F628A. This version uses the 16F1827 PIC because of its improved and larger
memory (room for future improvements) and additional features. As for the 16F628A
version a jumper should be installed under the board to access an additional port for
DTMF purposes. See later comment and photo LINK.JPG.
The controller’s chip line up is: 16F1827 for control, a MC145436 IC for DTMF
detection, a combination of a CA3140 op amp operating as a second order low pass
filter and a NE567 to detect CTCSS tones while a 4066 CMOS switch controls audio.
A LM7805 provides regulated 5 volts to the ICs that require it.
The choice of a NE567 to decode CTCSS is a practical one as the author had a
number on hand, they are cheap and they work OK. There are a small number of
specially designed CTCSS chips on the market. They are quite expensive and couldn’t
be located in Australia. If a reader is interested in using a proprietary CTCSS chip
then a small outboard circuit could be developed. The controller board can interface to
an external decoder (see jumper JP3 and pin 12 of the external connector).
Software
Rather than use the MPASM assembler directly, I chose to purchase and use the
BASIC compiler, PROTON+ from Crownhill (see www.picbasic.org). The compiler
produces the asm file for MPASM, which in turn creates the Hex file for the hardware
programmer. To program your PIC you need the Hex file included in this package
• V703ctrl.hex
The programmer used in the VK5DJ shack is the PICkit3 available from Microchip
Direct at reasonable cost. The free MPLAB suite is also the programming software.
General operation
A minimum of components and cost to achieve the following features:
The design is copyright and may not be used commercially without prior approval
from VK5DJ. For amateur use there is no restriction on use. The author will accept no
responsibility for any problems arising from use of this freely provided project.
The code may be changed from time to time to correct problems or add new features.
Updates will be placed on: http://www.vk5dj.com
The Controller
PCB board layouts including Protel and Gerber files, parts list etc is provided in the
main zip file. Construction details are provided later in this document.
Connection to the real world is through a 12 pin plug mounted on the board.
Pin Description
1 +12V in (approx 10mA)
2 DC common ground
3 Mute input from repeater receiver
4 Mute input from gateway or link transceiver
5 Repeater audio in (receiver approx 100mV)
6 Gateway/link audio in (receiver approx 100mV)
7 Discriminator of repeater receiver (for CTCSS)
8 Gateway/link audio out of board (microphone)
9 Repeater audio out of board (microphone)
10 Repeater PTT
11 Simplex PTT
12 External CTCSS detect input to board
Pin 1 is the unregulated supply voltage to the board, nominally +12 volts but should
lie between the limits of 8-14 volts for reliable operation.
Pin 2 is the common ground for power supply, logical inputs and audio lines.
Pin 3 the repeater receiver mute input is generally programmed for 0V when a signal
is received (ie active) and +5 to 15V when the receiver quiet. The line is clamped on
the board with a 5.6V zener. Note that the line is held to either +supply line or 0V via
a 22k resistor mounted on the board to ensure that if a receiver is not connected the
input line has a clear logic level. When constructing the board the pull up resistor OR
the pull down resistor (R21) is installed depending on the mute state available from
the receiver in use and the appropriate programming of the PIC.
If active high from mute then install a pull down resistor (reprogram PIC for active
high). If active low from mute then install a pull up resistor.
Pin 4 the gateway (or link) transceiver mute input. See notes for pin 3 but R22.
Pin 5 is the repeater receiver audio in. A capacitor is included on the input in case this
line has superimposed DC. Audio levels should be at least 100mV. Pot RV2 controls
the level. The top of the volume control in the receiver is an ideal source although
some transceivers have an output on a connector for this purpose. It doesn’t matter if
the audio is not muted as the board provides this function.
Pin 6 is the gateway (or link) receiver audio in. See notes for Pin 5 but use pot RV1 to
control level.
Pin 7 is audio from the discriminator of the repeater receiver (or the receiver being
used for CTCSS input). The audio must be taken at this early point to obtain sufficient
CTCSS tone as these low frequencies are both low in deviation and strongly
attenuated in the remainder of the receiver chain. Commercial CTCSS decoders use
the discriminator or access a low pass filter (eg the Simoco PRF15-20 units). On this
board I require separate audio in from the receivers and this comes in on pins 5 and 6.
If CTCSS is required for BOTH ports then an external circuit will be needed to
combine the audio from the two discriminators before connection to this point.
Pin 8 is the audio out of the board to the gateway or link microphone. The level is
adjustable and depends on the settings of RV2 (received audio) and RV5 (tone
outputs for beeps and call sign)
In standard repeater/gateway/link use both pins 8 and 9 are jumpered together on
board (JP6). In the case of an on air cross-linking gateway (eg a uhf gateway into a
remote 2m repeater via a simplex connection) JP6 is unjumpered.
Pin 9 is the audio out of the board to the main repeater microphone. Level depends on
RV2 and RV5 when the repeater receiver is in use and RV1 and RV5 when the
gateway/link is in use. See Pin 8 notes re JP6 use.
Pin 12 is the output of an external CTCSS board. The pin expects an active low. The
inactive state of +5 to15V is zener protected on board. Jumper JP3 provides for either
external CTCSS or internal CTCSS. If the internal CTCSS is not required do not
install parts for IC3 (NE567 tone decoder) and IC6 (CA3140 op amp low pass filter).
INPUT
Mute (COS) inputs are available at pins 3 and 4 of the main connector. Repeater input
overrides the gateway input. On mute active (received signal) the timer begins. On
closure of the mutes the timer is reset. Note the speed at which the repeater COS
causes the logic to perform is set in memory. (See remote control function “0”). The
logic will ignore any COS opening shorter than the value set by function “0”. Quiet
locations will use a value of 0 while noisy locations may need a value as high as $FF
(255msecs).
On timeout the board sends ‘TO’ and shuts down the PTT and audio of both
transmitters. When both mutes are high the transmitter provides a tail and sends
another ‘TO’. The device is again ready for use.
The mutes from the primary and secondary receivers are applied to Ports B.4 and B.5
of the microcontroller. The voltage is clamped to no more than 5.1 volts by the zeners
to protect the input of the 16F1827 from excessive voltage.
Assuming negative going mutes, a zero on a mute indicates that a signal is being
received. The mutes are continually polled by the microcontroller at approximately
20msec intervals. Once a mute is open on Port B4 or B.5, the appropriate PTT pin is
raised on Port B.3 or B.2 and at the same time the appropriate audio is switched on
through Port B.7 or B.6. The timeout timer starts counting.
For what I have termed ‘Standard identification operation’ when a mute goes high
(receiver mute closes) the 16F1827 checks to see if a callsign is due, if so it sends a
callsign, if not it sends a tail and if appropriate a beep (or two or three – see later).
The timeout timer resets to zero. The callsign timer resets if a callsign was sent
If a mute stays on for a longer period than allowed by the timeout value the audio is
shut down, a ‘TO’ is sent in Morse code (Port A.4 goes high to turn on the audio
switch), then the PTT is taken high (Port B.3 and Port B.2) and everything shuts
down. When the mute finally goes high this frees the system and a further ‘TO’ is sent
in Morse and the repeater/gateway is again available.
FUNCTIONS: Note these are different from ALL versions prior to Version 6.00
In this description it is assumed the primary port is a duplexed repeater while people
will set either the link or the gateway to manage the secondary port. The main
difference between a ‘link’ and a ‘gateway’ is that the ‘gateway’ has a tail and
callsign added while a link does not.
In the following table the values for Functions 01-03 are cumulative. For example in
Function 2 to relay DTMF tones on main TX, inhibit ‘roger beep’ and have DTMF
tones come in from external RX you need a command byte of 01+04+08=0D so you
send *+password+02+0D. Where a total for a command exceeds 09 remember these
are Hex digits so Hex 10 (which is decimal 16) + 8 +1 is Decimal 25 or Hex 19. The
command must use the Hex number 19.
Example1: If the password is 987 then a control sequence of DTMF ‘*9870003’ will
inhibit the main timer. When the carrier is dropped an ‘OK’ is sent in Morse if the
command was successful. The tail will now have an extra two beeps.
Example2: If the password is 987 (used in all examples here), then a control sequence
of DTMF ‘*9870611’ will set a callsign timer at 17 minutes (11 Hex = 17 Dec).
When the carrier is dropped an ‘OK’ is sent in Morse if the command was successful.
Remote controls:
Function Hex Value Hex Description Default
Some key pads may not be labelled in the letters A,B,C,D but usually these occupy
the fourth column. My Yaesu FT50 has quite different labels than what is expected
but the fourth column works in the way described with ‘A’ in the top right hand
corner, then B,C,D below it in sequence.
Function 00 (on loss of power this is the only function that auto resets)
Restore both TXs and timeout *+password+00+00
Add the numbers to achieve the desired results (e.g. Hex 8 + Hex 4 = Hex 0C)
Examples:
• *+ password + 01 + 05 would cause the secondary port to be inhibited, using
the Swedish callsign mode, standard tail.
• *+ password + 01 + 38 would cause a secondary port to be an available
gateway, standard callsign mode, extended tail mode.
• *+ password + 01 + 26 would enable a link on the secondary port, Italian
callsign mode, standard tail.
• *+ password + 01 + 18 would disable the secondary port, standard callsign
mode, use 1750 beep, standard tail.
• *+ password + 01 + 48 would enable a link on the secondary port, no callsign,
use 1750 beep, standard tail.
Callsign modes
Standard callsign mode: default mode if others not set
The callsign is sent at the end of a transmission if the callsign timeout period
has completed. If a callsign was not sent at the end of a QSO the callsign will
be played once at the conclusion of the timeout and then the repeater will fall
silent until the next mute opening.
Operational mode
Beep operate:
Some repeater groups use a 1750 tone “beep” to open the repeater. Adding
08 Hex to the data requires a beep to open the repeater from sleep. The
repeater then remains open until the extended tail timer expires. The code
expects that the NE567 has been retuned to 1750Hz and the low pass filter
retuned or omitted (or an external tone decoder accessed through pin 12 of JP5
and jumper JP3 set appropriately).
For this mode to work it is essential that the following are set:
• Function 01 with minimum value of 18 Hex (at least Beep operate and
extended tail)
• Function 03 with 00 for no CTCSS conditions set.
• Function 05 with minimum value of 64 Hex (mute delay)
• Function 0A, extended tail timer, with minimum value of 05 to allow
tail ending.
• Note: there is a 30 sec delay before function operates after setting up.
For example a code of *9870134 (4+8+16=28 or 1C in Hex) would set
secondary port to a link, Swedish style identification, beep access, and use
extended tail. *9870300 sets no requirement for CTCSS. *9870564 sets mute
delay of 64msec. *9870A05 sets the extended tail to 5 secs.
Once opened by a 1750Hz beep the repeater is available until the repeater TX
shuts down (period set by Function 0A expires). Tail ending by a station with
no 1750 beep is acceptable until the extended tail timer expires. If there is a
gap in transmission by the repeater transmitter a beep must be resent.
Including a 20h (remember these are Hex numbers) in the total for function
‘01’ will cause the controller to boot up with the link/gateway available. The
absence of 20h makes the link unavailable. Once the secondary port is enabled
Function 00 may be used to regulate operation of the secondary port.
No Callsign:
In some countries no callsign is required. Setting a value of 40h will inhibit the
callsign (or more correctly adding 40h to the other choices in this group).
Function 02
Relay DTMF codes and beep function *+password+02+ two digit data
If your repeater needs to forward on DTMF tones you may need to activate this
function if you want to send a *. Normally, the controller does not pass on legitimate
command sequences so this function is needed if you wish to relay a sequence to
control a remote system through a link.
For example:
*9870200 will inhibit DTMF tones beginning with a * from being relayed.
*9870201 will pass all tones through Repeater TX but not the simplex port TX
*9870202 will pass all tones through simplex TX but not the repeater port TX
*9870204 will inhibit ‘roger’ beeps on the tail.
*9870208 will enable DTMF to be supplied by external receiver with no COS
*9870210 will enable DTMF to be supplied by second receiver with COS
*9870220 will enable the voltage telemetry see Appendix 5
If the audio outputs are jumpered together on the board then clearly 01, 02, 03 all pass
DTMF audio to both TXs.
Add 08h to above values to input DTMF audio from external receiver with no COS.
Add 20 hex to the above codes to activate the voltage readout on the modified
controller for solar cell operation
Function 03
Require CTCSS to transmit *+password+03+two digit data
To fully access these functions you will need a system of switching CTCSS tones in
from both receivers. The on-board jumper caters for CTCSS from one receiver. I
have provided the software functions, but you must provide your own external means
of mixing the CTCSS signals and switching them via the appropriate mutes.
Otherwise you must make a choice as to which receiver has the CTCSS function.
The CTCSS system also allows repeater operators to use a CTCSS tone to prevent
timeout. This is achieved by sending a parameter of 8.
The selected choices will depend on local issues such as licensing or interference
problems. In my network of repeaters I have CTCSS from the repeater receiver and
therefore commands 00,02,04,06 will be used. CTCSS from the gateway/link receiver
would access commands 00 and 01 if the CTCSS was available.
CTCSS only on the gateway receiver will allow you to use commands 00, 01, 08.
CTCSS only on the repeater receiver will allow use of commands 00, 02, 04, 06, 08
(although 04 and 06 achieve the same outcome).
I have assumed in data 02, that CTCSS required on the repeater would of necessity
require it on the gateway, otherwise people on the repeater system would hear only
one half of the conversation and think the system is not in use.
The next two commands should exist alone and not mixed with other parameters in this group.
a) Add 8 to any of the above to extend the timeout timer to 60 mins (convert total to Hex
digits eg 08+04=0C).
b) A value of hex 10 enables CTCSS extended operation. This value cannot be mixed with
the other parameters.
Examples
(1) For example *9870301 requires CTCSS on the gateway receiver to access the
repeater system, no CTCSS is required in the reverse direction, normal
timeout works.
(2) For example *987030C requires CTCSS on the repeater receiver to access the
gateway but not the repeater, and timeout is inhibited for special purposes.
(3) For example *9870310 enables one person with CTCSS to enable the system
for a user without CTCSS. The system is enabled according to command 04.
Note: do not use this command in association with others
This is an alternative method of preventing the repeater from timing out for long
broadcasts. If function 03 08 is set, a three second CTCSS tone will prevent timeout
for 60 minutes after the tone disappears. Normal timeouts return 60 minutes later.
Function 03 08 may be left operational until needed as it is only activated when the
three second CTCSS tone is received. The CTCSS must be received for at least 3
seconds to activate this mode. When the extended timer is successfully set, two beeps
are heard on the repeater audio. Continuous CTCSS transmissions are NOT allowed
as the controller will loop within the extended timer routine.
Used in conjunction with CTCSS access to ports, this function if activated, causes the
repeater to be available for the length of time set in Function 04. Timing is constantly
reset on receipt of CTCSS. Useful where non CTCSS enabled stations are talking to
those that are so equipped. See function 04 for time setting.
If set by adding 32 (Hex20) to the data sent, this function will cause EITHER CTCSS
received or COS operation to activate the transmitter functions. The CTCSS acts as a
pseudo COS. At this time only the primary receiver works with this option.
Do NOT use with values of 02, 03, 06, or 07.
The Hex information number sent is the length of time the COS must be open before
the logic accepts there is a legitimate signal. The values may be within $00 and $FF.
The default condition is $00 (i.e. no delay). The maximum of $FF provides a delay of
about 500msecs. Use this function in conjunction with Function 01 to achieve beep
access.
A typical command might be : *9870532 where the $32 equates to 100 decimal
msecs.
Function 06
If you want a short delay and your calculation suggests a single digit, you MUST
preface it with a 0. eg the control sequence might be *9870601
Function 07:
Function 08:
To achieve a zero tail set the data to $00, then turn off the beep function (See control
#). The acceptable values for data are between $00 and $4B (0-7.5 secs). These are in
increments of 0.1 secs. I recommend a value of $0A for 1 sec delay. A long tail of
$4B provides 7.5 seconds. The timeout resets when the COS drops so users may re-
key the repeater during the tail if your operating protocols permit.
Function 0A:
Function 0B:
Function 0C:
The PIC program works by reading the ASCII value of each letter of the callsign then
reading a corresponding look up table item for the morse code construction.
To put VK5DJ into memory you would send from the DTMF pad:
*987 (the password) 0C (the command) 56 4B 35 44 4A FF (the call followed by FF)
I’ve shown spaces to make it easier to read but the numbers would be sent:
*9870C564B35444AFF
The callsign must finish with an FF. This is used by the software to determine EOM.
A space (00) can be inserted in a callsign or used to send a blank callsign. If using
Command 02 08 (DTMF from external rcvr) the code MUST receive a FF to abandon
the remote control loop as it has no other way of knowing the sequence is finished.
Function 0D:
A 00 puts in a word space, so to place “NO MEETING” in the message memory you
would send: *987 0D 4E 4F 00 4D 45 45 54 49 4E 47 FF
The spaces between the Hex characters are to help you read the pattern, in practice the
above would be sent: *9870D4E4F004D454554494E47FF
If you run out of memory the program will detect this and prevent you from
overwriting other memory. An emergency stop $FF exists in memory to avoid
overrun problems on playback. If you have to change the callsign and it is shorter or
longer than the original one, you will need to re-enter or change the message too. If
using Command 02 08 (DTMF from external rcvr) the code MUST receive a FF to
abandon the remote control loop as it has no other way of knowing the sequence is
finished.
Function 10:
Set frequency of the sound made by morse ident: *+password+10+two digit data
The default is 76h and most of the usable frequencies are around this mark. I have not
allowed a value less than 5. This is a very low frequency. A maximum of 7F Hex is
allowed, beyond this white noise is created.
Function 11:
Set the minimum voltage at which the main transmitter will be allowed to operate:
*+password+11+two digit data
The default is 73h (115decimal = 11.5v) so that any voltage below 11.5V will lock
out the main TX. The TX will not become available again until the voltage rises to 1
volt above the minimum voltage to protect the battery. Use the hex/decimal table in
Appendix 4 to obtain volts to hex
The remote command will not accept a value less than 11.4V, if a lower figure is
attempted the software will insert 11.4V.
Function 12:
Set the minimum voltage at which the link transmitter will be allowed to operate:
*+password+12+two digit data
The default is 77h (119decimal = 11.9v) so that any voltage below 11.9V will lock
out the link TX. The TX will not become available again until the voltage rises to 1
volt above the minimum voltage to protect the battery. Use the hex/decimal table in
Appendix 4 to obtain volts to hex. The minimum voltage is 11.4V, see command 11.
Further information
Tail operation
A tail is provided once both mutes are inactive. This is user settable and may be
changed by remote control (see above). Audio is fed through during callsigns and tail.
Transmissions arising from the link have a ‘boop’ tone while those from the repeater
receiver have a ‘beep’ on the tail.
A ‘Roger beep’ is normally provided at the end of a tail.
• No beep on tail indicates Function 00 has gateway/link off
• 1 beep on tail means gateway/link on
• 2 beeps on tail indicate timer is inhibited and link/gateway off.
• 3 beeps on tail indicate gateway/link on and timer inhibited.
All beeps may be turned off using function 02 with a value of 04.
A tail of length set by function “08” is always generated on the repeater TX.
Programmed as a gateway, tails and callsigns are provided on both TXs (providing
link is not programmed off or CTCSS is not missing if required). Whether the
controller supports a link or a gateway is set by the data in EEDATA memory
location decimal 64 where 00=link and 01=gateway behaviours.
The purpose of this facility is to provide a simple message facilty eg. “Club meeting
cancelled tonight”. The message can be sent at any interval from 1 minute to 75
minutes of repeater silence. A callsign will be sent at the end of the message
providing that the callsign delay time is less than the message delay.
The length of the callsign and that of the message may be up to 62 characters. They
share the same memory space. The message may be 62 minus (length of callsign)
long. So if the callsign was VK5DJ followed by the FF there are 6 characters used.
This leaves 56 characters for the message including the $FF.
CTCSS operation
The values on the circuit suit reception of a 118.8 Hz CTCSS signal. These low
frequency signals are attenuated by tailoring of the receiver audio, so the board must
take its audio from the discriminator circuit or early in the audio chain before
tailoring.
Changing C7 or R8 changes the CTCSS frequency beyond the range achievable with
control RV6. Lower values increase the frequency. LED L4 lights when a correct tone
is received. L4 is a useful tune indicator when adjusting RV6.
Normal operation i.e. repeater and link TXs active, does not require a CTCSS signal.
Through remote control functions 4 and 5 the link and repeater functions respectively
will require CTCSS for access. These functions may be necessary to avoid
A requirement for CTCSS on the main repeater may be any combination (see
command 03) or on the link may be mute only or mute+CTCSS. The CTCSS will
need to come from only one receiver (unless there is an external mixer and some form
of CAS control.) Generally CTCSS will not be a feature of a link. See function 03 in
remote controls, but CTCSS may be required for gateway operation.
LEDs
See Jumper section for orientation of the board for this description.
The CTCSS detect LED is in the North East of the board and lights when there is a
valid CTCSS signal received.
The repeater and simplex PTT LEDs are together in the South East corner. The
repeater LED is the northernmost of the pair. The simplex PTT LED is the
southernmost of the two. They light when PTT is low (i.e. active).
The DTMF valid LED is at the bottom (South West) corner of the board by itself and
lights when a valid tone pair is received.
The power on LED is in the North West corner of the board.
Constructors may choose to mount the LEDs on the front panel of the box.
Jumpers
With the board held with components up and the main connector on the left (west)
and the voltage regulator at the bottom (south), the trim pot for the CTCSS is to the
east. From an imaginary point in the centre of the board the angles locate jumpers.
H means the jumper lies east/west, V means the jumper lies north/south.
Position number 1 is always either the northernmost or the easternmost position.
Position number 2 is the next to the south or west and so on.
JP1 are test points see above (190 degrees) with pin 1 nearest the 7805
JP2 controls the source of the audio for the DTMF tones. (300 degrees)
• H, 1 = repeater receiver audio
• H, 2 = simplex audio
JP3 internal or external CTCSS input to 16F1827 (75 degrees)
• V, 1 = external CTCSS decoder
• V, 2 = internal CTCSS decoder
Construction
Drill the mounting holes for your box, and trial mount the board.
Mount the socket for the 16F1827 (strongly recommended, you might want an
updated program one day). Note notch is to the regulator end.
Install JP1-6
Install a wire jumper from pin 5 of JP1 (effectively pin 12 of the MC145436) and pin
15 of the 16F1827 on the boack of the board. Use a 1cm length of insulated wire. See
LINK.JPG.
Either solder LEDs to board or attach wires for LEDs to be mounted on front panel at
a later date. I suggest at least dangling the ‘power on’ LED temporarily on its wires
for the next check.
Apply +12V to board and ensure that +5V is available in appropriate spots eg pin 4,14
of PIC.
Remove voltage and solder remaining solid-state devices – leave PIC out of socket for
the moment.
Install in box and wire the board to the DB25 on the rear of the box. I used pins 1-12
to maintain the integrity of the numbering system.
Wire the LEDs located on the front panel and a power switch if you wish. I didn’t use
a switch, preferring the control logic to boot up as soon as the rigs have power to
avoid unpredictable states in the rigs.
Load the programmer memory with the file ‘V703ctrl.hex’ into your programmer of
choice. Once loaded, your programmer should allow you to modify the callsign and
the password within the data area although the callsign can be entered later. If you
want to add a short tail on the link this is also the time to enter a number at EEDATA
address 5A.
EEDATA memory map, all address numbers in decimal. Values must be in Hex.
If the defaults provided in my sample file are not what you want, now is a good time
to edit them. Remember that the “*” key sends Hex “E” and the “#” sends Hex “F”
Now put the required password numerals in locations 75,76,77. (Use 00 to 09,0A-0F).
Remember a *=Hex 0E and #=Hex 0F. If you plan to relay DTMF tones for IRLP it
may be wise to choose at least one digit of the three that is not base 10 eg A, B, C, D,
* or # to avoid a false remote control.
Now put the appropriate number in the mute direction location at 78. The default is 03
that is for active low mutes. This must match the locations of resistors R21, R22.
(0=both active high, 1=rpt low & simp high, 2=rpt high & simpl low, 3=both active low)
Now put the appropriate number in the PTT direction location at 79. The default is 03
that is for active low PTT.
(0=both active high, 1=rpt low & simp high, 2=rpt high & simpl low, 3=both active low)
Now set the gateway/link selection byte at 64 decimal to 00 if you want the controller
to support a link, to a 1 if you want the secondary port to be a gateway. If you are not
using the secondary port use a zero. A zero will also set the callsign rules in ‘standard
mode’. See remote function ‘01’ for other combinations. These values can be
remotely changed once the controller is built. Other EEDATA memory values are
probably OK as is.
Frequency of ‘beep’ for repeater receiver tail and ‘boop’ for link receiver tail are
located at decimal 86 and 87 (see table above). If you don’t like the frequencies I
chose adjust these accordingly. The higher the number the higher the tone. I suggest
adjustment by only one or two for starters. Maximum value is 127. Default 75 and 6C.
The CTCSS system has a 1 second hang delay built in (except when in mode 03 20).
This delay is to stop jitter with noisy signals dropping the CTCSS. In some
applications this may not be required. It is possible to change the antijitter value at
memory locations Hex 58, 59. The default value is Hex 09C4 (2500 decimal), but
because these are stored in reverse order they will appear in your programmer
window as C409. Changing these two values to 00 00 will stop the CTCSS from
hanging. Alternatively you may wish to put a smaller value such as Hex 0100 which
will be placed in memory as 00 at location $59 and 01 at $5A and will provide a delay
of about 100msec.
If you require a short tail on the link you can add one by inserting a value at address
$5A (00 default). Each unit delays 10 msec. e.g. a value of 20 Hex = 32 Decimal
provides a 320 msec delay. This may be helpful in stopping chop on the link TX.
Before programming ensure that the programmer fuses are set as follows:
Config1 FOSC_ECH,WDTE_ON,PWRTE_ON,MCLRE_OFF,CP_OFF,CPD_OFF,
BOREN_ON,CLKOUTEN_OFF,IESO_ON,FCMEN_ON
Config2 WRT_ALL,PLLEN_OFF,STVREN_ON,BORV_19,LVP_OFF
All this information is in the hex file and is usually automatically set by your
programming software. There is a small chance that some software does not do this
Make sure the programmer is set for the 16F1827. Always recheck this before
burning. Now program the chip.
TESTING
The following assumes active low situations. If not, you will no doubt work out your
own testing procedure by inverting the logic. Pin numbers refer to either the DB25 or
JP5 if you followed my advice on connections.
Temporarily connect the following:
• Switch R – SPST between pin 3 and earth pin 2
• Switch S – SPST between pin 4 and earth pin 2
• A SPDT switch and a headphone socket to listen to either pin 8 or pin 9 (earth
is common)
• A SPDT switch and a socket to enable audio either from a receiver or an audio
generator to direct audio to either pin 5 or pin 6.
• The capacity to measure the voltages at pins 10 and 11 (the PTT outputs)
• Connect jumpers – JP2, 1&2 JP4, 1&2 JP3, 1&2
On power up with default settings, the controller is set with link/gateway off.
With no input check the voltage on pins 1,2,3,4 of JP1. These should be at 0V. Send a
DTMF C and check that all pins 1,2,3,4 are high.
If DTMF decode LED doesn’t work with incoming tones, check level RV4 (nearest
main socket or check with a CRO that there is a 3.58 MHz clock on pin 6 of JP1.
Now close switch S and note that LED1 (primary repeater PTT) lights and on opening
switch S hear a ‘boop’ on the tail.
The 567 tend to drop out when there is a whistle or loud speech. The program allows
for this and has a hang facility built in. As long as the LED flashes once every couple
of seconds the system will work.
Audio switching:
With different audio provided to the two receiver output pins, switch R and switch S
alternately note the different combinations of audio. Potentiometers RV1 (simplex TX
audio) and RV2 (repeater TX audio) adjust levels.
FINAL TEST
Connect to your transmitters and receivers. All levels will need to be reset. Connect
jumpers as appropriate. Generally JP6 is bridged EXCEPT when you use the board as
a simplex range extender. Check general operation. It is at this time that some nice
instruments help. Otherwise do what I do, get a group together to monitor your
experiments as you adjust levels, flicking to and fro from the direct path to get an idea
of similar levels – crude but it works.
Mounting
The production board will fit quite nicely in a small instrument case 110*140*35mm
(Dick Smith H2512 - $9.75). A DB25 socket mounted on the rear is a simple way of
achieving connectivity to the transceivers.
General notes
Note that in the parts overlay and circuit diagram LED L5 is the wrong polarity. It
will need to be inverted. Also note that the pdf overlays have labels to JP2 and JP4
reversed for repeater and simplex audios. Experience suggests that a 22K pot at RV6
may be a better choice than 4K7 and provide better coverage of lower CTCSS
frequencies.
The onboard CTCSS system is satisfactory for most tone access situations. Its failing
is that the response of the NE567 is not especially sharp. Depending on audio level
the NE567 may respond to nearby CTCSS frequencies.
I would like to thank Russell VK3ZQB for converting my hand drawn circuits into
Protel so well, creating the parts lists and layout of the board. Without him the board
would be hand drawn, twice the size and have many links. Dave Catlin VK2JDC
chased up commercial manufacturers for boards. The support of Michael Carra in
building a controller and discovering errors in the documentation is also appreciated.
Arrio IW6BFE and others have provided valuable feedback, especially with regard to
using a 8870 in place of the MC145436. Thanks Russell, Dave, Michael and Arrio.
An Italian version of this manual has been written by Arrio and is on my website. It
describes an older version but provides an introduction.
Boards
Other than LED L5 shown reversed on the overlay, there are no errors on the board
Rev 4. To use this later version of the software intended for the 16F1827 it is
necessary to put a jumper under the board – see elsewhere in this document.
I have a small number of commercial boards available for AUS $15 plus post and
pack. The boards are double sided, plated through holes and a component mask. In
Australia P/P is $2 while overseas orders need $7 for P/P. I have a similar number of
MC145436 DTMF decoder chips for $7-50 plus P/P if not sold with board and I can
provide programmed 16F1827 for $10 for those who cannot program or obtain a PIC.
AC Fail indication
A hardware modification is required because I have had to press the MCLR pin
(normally goes to +5V for normal operation) into operation as a port.
On the bottom of the board cut the trace between pin 4 (the MCLR pin) and pin 14
(Vdd - the +5V supply to the chip).
In the clear space near pins 1,2,3 drill a hole to take a pcb pin and glue it in place from
the top of the board. Join pin 4 of the PIC to this pcb pin with a short piece of hookup
wire.
It is ESSENTIAL that no more than +5V is ever applied to this pin, nor should the pin
be left just floating. I suggest the following circuit:
Raising pin 4 much above +5V may put the PIC in programming mode.
Although I have programmed pin 4 as an input pin, a high voltage on this pin will put
it into programming mode. Therefore use a zener OR arrange for a relay which
switches between +5V (AC power supply working) and ground (AC power failed).
When the AC fails, the beeps on the tail are extended to approximately 0.7 sec each
providing a clear indication that the power is off. Note that beeps must be turned on
for this to work (see function 02).
If you do not carry out the hardware modification, the controller will work as usual
with no AC Fail capability because pin 4 is normally tied to +5V rail.
Interface issues
The connection to the Carrier Operated Switch (COS or mute) of receivers can vary
considerably from radio to radio. Here is some advice that may save some frustrating
moments.
• To ease changing COS polarities:
When wiring R21 and R22 stand the resistors on end with the resistor body in
the R21, R22 resistor holes closest to the centre of the board. Bend the long
top lead so that it may be soldered into the correct hole near C9. The hole
closest to C9 connects the resistor to +5V whereas the inner hole connects it to
0V. If at a later date you need to change polarity it is easy to snip the long
resistor tail and bend it out of the way. A new wire can then be soldered into
the alternate hole and soldered to the remaining tail of the resistor. Board
photos on this site do not YET show this suggestion. Alternatively leave R21
and R22 off the board entirely and wire them externally to either +5V or 0V.
• To cater for different COS situations use this table in association with the
relevant section of the manual:
• Note that the circuit diagram shows capacitors C14,15,18,21 with negative to
the outside world. Some radios have +ve voltage on their microphone inputs
resulting in distorted audio and possible failure of the capacitors. I strongly
suggest these capacitors are wired with +ve to the outside world. The circuit is
wrong as is the board overlay.
• To cater for different PTT situations:
• Note that when using open collector COS equipment in the positive active
mode it will be necessary to tie an unused simplex port COS to 0V. This is
most easily done on the back of any input plug to the controller. If this is not
done the software will think the COS is active. In this mode if the main
receiver is turned off the controller will interpret this as a received signal and
key the transmitter. In all other modes the controller will ignore loss of
receiver power and not key the transmitter(s).
• To use the beep access mode (setting functions 0 and 9) you will need to either
retune the NE567 for 1750Hz and bypass or retune the lowpass filter or use an
external decoder accessed through pin 12 of J5 and change jumper JP3.
Have fun, I’m prepared to help fellow amateurs within reasonable limits
John Drew VK5DJ (Updated 17 Feb 2012 for version 8.00 VK5ROH software)
1. If you are using remote control from a different receiver (using command 02
08) and if you are changing the callsign or message, then the controller may
seem to lock up if for some reason the ‘FF’ code was not received. Just send
an FF or even several FF. This will finish the callsign or message loop and
return normal control. In this circumstance you should check that the callsign
or message was correctly updated and if not, repeat the whole process.
There was a problem in versions prior to Version 6.43 where opening of the
mute during control would lock the system until power was removed. It was
caused by the filling of the 16F628 PIC’s stack (too many Gosubs and
arithmetic that used the stack!!). Exceeding the stack size causes unpredictable
results, in this case a crash. I programmed around this issue, but is even less
likely to occur with the PIC16F1827 as it has twice the stack size.
Frequencies for values of the “beep” and “boop” tones with 3.579MHz clock
EEDATA Decimal 86 (hex 56) and 87 (hex 57) respectively
All numbers in this case are decimal and you will need to convert to HEX for entry
into the EEDATA.
This table applies if a 3.579 xtal is running the PIC via the MC145436
Frequencies for values of the “beep” and “boop” tones with 4MHz clock
EEDATA Decimal 86 (hex 56) and 87 (hex 57) respectively
All numbers in this case are decimal and you will need to convert to HEX for entry
into the EEDATA.
WARNING
The A/D converter has a maximum rating of 5V, anything beyond this may damage
the PIC, hence the need for a voltage drop across a zener.
If activated <pwd>02 20
L= low tone (200Hz), M = medium tone (500Hz), H = high tone (1430 Hz)
Remote adjustments:
<pwd> 02 20 activates the telemetry
<pwd> 11 + ‘hex value’ to set minimum voltage for main TX
<pwd> 12 + ‘hex value’ to set minimum voltage for link TX
The values sent in hex for setting these minimums consist of the voltage without the
decimal point. For example a command of <pwd> 11 80 would set the minimum
voltage for the main TX at 80 hex = 128 decimal = 12.8 volts.
No matter what the cutoff voltage the TX will not transmit again until the voltage
rises by 1.0 volts above the cutoff voltage, thus allowing for some charge into the
battery.
The actual values for the cutoffs will depend on voltage drop though leads etc so my
defaults are just guesses to get things setup.
Voltage cutout Dec Hex to send Voltage cutout Dec Hex to send
14.0 140 8C 12.7 127 7F
13.9 139 8B 12.6 126 7E
13.8 138 8A 12.5 125 7D
13.7 137 89 12.4 124 7C
13.6 136 88 12.3 123 7B
13.5 135 87 12.2 122 7A
13.4 134 86 12.1 121 79
13.3 133 85 12.0 120 78
13.2 132 84 11.9 119 77
13.1 131 83 11.8 118 76
13.0 130 82 11.7 117 75
12.9 129 81 11.6 116 74
12.8 128 80 11.5 115 73
Note position of wire from old JP3 position to pin 16 of the PIC. This is a direct connection for the
external CTCSS, JP3 is no longer used to choose the CTCSS input. It is now NOT possible to use the
internal CTCSS on VK5ROH. The old jumper head could have been left in place and the wire could
have been soldered to the pins. The red wire from the voltage sense on the tag strip connects to the top
of two prongs on a header cover sticking up from the old JP3 to pin 7 of the PIC which is now the
voltage measure in (VoltsIn). The board may still be removed by unplugging the header and JP5.
The error is due to the zener’s curve at different currents. The A/D conversion is
accurate to about 0.1%
If you duplicate this circuit a different zener may give slightly different results.
Testing may be done with a quality multimeter measuring the voltage at VoltsIn while
changing the supply voltage. A plot can be made of voltage in versus VoltsIn. You
may need to try a number of zeners to get the best result. I used the one and only 10V
zener I had. I did start off with 2 of 5.1V zeners in series but the result was skewed by
the extra 0.2 of a volt.
I could have adjusted the software to suit my zener but if anyone ever copies this it
would possibly make things worse.
In the end I think that +/- 0.1V isn’t bad and will give a good idea of battery charge.
The telemetry only shows values in the range 11.5 to 13.9 at other times it indicates
that it is either >=14.0 or <=11.4
Three high pitched beeps indicate that all is well and truly charged, three low beeps
are a sign for immediate action but by then you would have the transmitters inhibited
by the minimum value.