Repeater controller progress

Jump to: navigation, search


[edit] Current Repeater Project

[edit] Hardware

  • Custom Board (Layout in progress)
    • PIC32MZ2048EFH144 MIPS microcontroller
    • I²S Audio Codec with dual I/O
    • microSD Card Slot (via SPI) for storage (audio files, etc...)
    • USB2.0 and 10/100baseT Ethernet (not populated)
    • All I/O, except on expansion headers, is fully isolated for prevention of ground loops and damage
    • 2x 60-pin high-density Hirose expansion headers (all unused MCU pins, with +5v and ground lines)

Upverter (Cloud EDA) page for controller (schematics, layout, bom, etc...)

[edit] Software/Firmware

[edit] supporting software

[edit] Threads

Threads communicate by setting config variables, triggering events, receiving events or sending/receiving a data stream

timer (length, end event, restart) 
triggers: start, reset, stop
Dtmf decoder 
input: audio stream output: DTMF events
PL decoder 
input: audio stream output: bool:CTCSS
PL encoder 
modifies audio stream?
Repeater thread
inputs: CTCSS PTT COR TOT CW audio outputs: PTT COR audio
GPIO thread
look for rising edge, falling edge, pulse, or analog ranged triggers
special GPIO threads
for GPIO dedicated to a specific device type
Serial control thread
input: all? events output: serial triggered events, config changes, etc.
CW thread 
input: message output: PTT, audio, end event triggers: abort?
Simplified repeater thread state diagram

[edit] Timers

grandfather clock timer(30m, ID, yes)
reset: HalfHour start/stop via serial only
ID timer(id period(def=9), ID, no)
start: PTT, must not self trigger, may be multiply started, only first start resets timer, may stop via serial
TOT timer(tot, TOT, no) 
start: COR stop: !PTT or !COR
courtesy timer(courtesy lead (2s?), courtesy, no) start
tail timer(tail (1s?), !PTT, no) 
start: !courtesy or !COR

[edit] Signals and Events

All events (E) can be artificially triggered via serial. Signals (S) must be triggered and untriggered (or asserted and de-asserted). Some events and signals cause an action including triggering other events. Some events and signals (*) trigger state transitions, actions, and timers which can't be altered (+), but timings can be adjusted.

(E) generated by real time clock
default action: trigger ID
(S*) generated by request to transmit, repeater thread
(S*) generated by receiver detect of carrier, may require CTCSS
(S) generated by PL decoder
(S*+) generated by timer, play TOT chime, untriggered by !COR which plays unTOT tone
GPIO digital input : generated by hardware input on select(none, rising edge, falling edge, positive pulse, negative pulse)
GPIO analog input threashold
(S/E) range select for signal, range edge triggers event; hysteresis needed
(S*+) trigger by timer; plays chime(courtesey+index) and then (if !COR) stops PL encode, deasserts and starts TAIL timer
(S*+) drops PTT when timer expires unless COR aborts
(E*+) plays ID cw message
user event(array)
(E) runs a stored serial string
DTMF event(array)
(E) triggered by a specific sequence of DTMF codes, can trigger a user event
watchdog event
(E) trigger by hardware watchdog after reset is complete, then enters REST state
power on event 
(E) actions at power on followed by REST state

[edit] Variables / config options

PL tone
(seconds) time out timer length default=2m
(seconds) gap between !COR and sending chime default=2s
courtesy tone index
(seconds) gap between courtesy and carrier drop default=1s
array of (pitch, duration) ; multiple chimes including: courtesy1 courtesy2 courtesy3 TOT unTOT
ID cw message
series of morse code symbols (e.g., K4UCF/KR ? )
id period
default 9m
repeater variables (i.e., ENABLE)

[edit] Serial commands

stop / start / reset timer
set variable
read variable
read digital GPIO
read analog GPIO
set GPIO digital trigger (pin, trigger mode, event)
set GPIO analog trigger (lower, upper, event)
clear GPIO analog trigger
set output GPIO pin
trigger event
set trigger action
test event status
request report of event triggers / all event triggers
clear all report requests
play chimes
play CW
start/stop thread??
update firmware (code protect checksum? hardware jumper enable?)
set mode bank (bank contains all vars)
play DTFM to a audio sink

[edit] Functionality not yet covered

  • audio mixer
  • voice recorder
  • built in real time clock (instead of relying on the computer)
  • weather station (can this be partially covered by GPIO events?)
  • secondary serial port (weather station?)
  • ethernet
Personal tools