Repeater controller progress

From CECS wiki
Jump to: navigation, search


[edit] Current Repeater Project

[edit] Hardware

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

[edit] Current Architecture

(as reference for programming, this is pretty much set so we can code based on this)

[edit] Software/Firmware

This is a proposed design, no actual coding has been done yet.

[edit] supporting software

[edit] Threads

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

These can probably be grouped into three main threads:

Thread intercommunication consists of:

Thread functions:

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?
audio thread 
handles audio processing and mixing, described below
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*+) time out timer; 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
play / record audio clip
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] audio thread

This is a guess at what is necessary / possible.

[edit] Functionality not yet covered

Personal tools