Help writing code?

Is there anyone that would write code for a ham repeater controller project? Our club cannot afford the amount for those controllers that cost $300-$400 for each repeater.

Thank you

Mike

Is there anyone that would write code for a ham repeater controller project?

To do what with what external hardware?

Control 2 radios as a repeater with a link radio.

OUT LYING REPEATERS Radio 1 COR = active low RX audio = mic in PL Detect = ctcss decode Ground = ground

Radio 2 PTT =active low Mic in = rx audio Ground

Link Radio Upon Rx would act like radio 1 When radio 1 receives, radio 2 and link transmits.

MAIN REPEATER at spoke-hub link

Radio 1 and 2 same as normal repeater with: Link rx 1 = RX ONLY Link rx 2 = RX ONLY Link rx 3 = RX ONLY Link rx 4 = RX ONLY Link rx 5 = RX ONLY Link rx 6 = RX ONLY

Link TX = TX ONLY

Each link rx will have COR, Audio, PL detect, and Ground

When Link rx "?" is avtive it locks out the other link rx radios.

Basically, you talk on any repeater it gets linked with the main and distributes it out to the other outlying repeaters.

So, at each link point you have two radios running on two different frequencies. When you sense incoming on either radio, your would like to have the other radio repeat the message, same as holding down the transmit button on a microphone.

I don't know what most of those acronyms mean.

Each point would have 3. If one of the receive radios got a signal it would repeat to the transmit radio. Yes it would be like holding down the transmit button. Most radio the button take the ptt lead to ground.

Mike44: Each point would have 3. If one of the receive radios got a signal it would repeat to the transmit radio. Yes it would be like holding down the transmit button. Most radio the button take the ptt lead to ground.

What should happen if a signal comes in from one of the incoming radios while the other incoming radio is being repeated?

When the receive radio gets the signal the COR goes to ground. Then a normal controller would determine if the ctcss(sub-audible tone) is correct (67.0hz to 255.0hz) (which ever you choose for your repeater). The controller then takes the PTT to ground, that keys up the radio. When the receive radio stop getting the signal, the controller holds the ptt for a determined amount of time that you specify. ie: 1second. This way there is a "tail carrier".

Another thing it need to do is ID in morse code the callsign every ten mintes(9:30) on activity.

How would the arduino connect the audio out of one radio to the mic in of another? I assume there's some electonics for this, or a relay.

Now, there are a couple of reasons why you are not getting a lot of responses to this m,essage.

1 - throwing around a bunch of ham radio acronyms - COR, RX, TX, ctcss, ptt. I don't know what 'ctcss' means, but I do know what "when the ctcss input from a radio goes to ground" means.

2 - Not sure what your equipment does and what you want the arduino to do.

When the receive radio gets the signal the COR goes to ground. Then a normal controller would determine if the ctcss(sub-audible tone) is correct (67.0hz to 255.0hz)

Are you saying that the arduino is expected to behave as a "normal controller" and do some sort of fourier analysis on an input? Or are you sayng that you have a normal controller that does this, and the arduino receives it as an input? And what's a normal controller, anyway? It's another undefined acronym.

I had all sorts of problems like this with another client. He'd asy thing like

Basically, you talk on any repeater it gets linked with the main and distributes it out to the other outlying repeaters.

And I wasn't sure if he was talking about what already happens thanks to other equipment, or if he was describing what he wanted me to make the arduino do.

3 -

Another thing it need to do is ID in morse code the callsign every ten mintes(9:30) on activity.

Thinking up new requirements on the fly like this - well - how many other things doe your want this sucker to do that you just haven't thought of yet?

So, you want some more code sent. Now, if you are talking about generating the tone on the board, that's a hard problem. If you are talking about sending some morse code to a digital out, which will go to some sort of tome generator, then that's a bit easier.


I'll try to untangle this conversation into something I could maybe code to.

1 - INPUTS We have a set of N COR inputs (N is 2) which go LOW when a signal from a radio is being received

2 - OUTPUTS We have a set of N outputs (N is 2) which patch the audio from a radio into our transmitter We have an output that turns the transmitter on We have an output which sounds a tone generator that can be used to send morse code

3 - EVENTS

Normally, the patch outputs should be LOW, the tone generator should be LOW, and the transmitter on output should be LOW, and the COR inputs will be HIGH.

When any COR input goes LOW, then: Put the corresponding patch output HIGH and put the transmit buttton HIGH. Keep them high until that COR goes HIGH for one second.

Every half an hour, transmit the morse station ID. If the arduino is currently patching through a transmission, wait for 10 seconds after the trasmission has completed. If one of the COR inputs goes LOW while the morse is being transmitted, cease transmission of the morse and patch through the transmission. In this case, transmit themorse after the trasmission relay is complete. The morse should use the standard timings for morse, with a 'dit' duration of .25 seconds

Now - would that do what you want?

I have a Sketch for the Arduino UNO board. It includes CWID, and DTMF remote controls. Sorry but I just read your post for help.
Dean, KI7CC

rpt_w_dtmf_controller_ver_03_05.ino (17.1 KB)

I need to add additional information about my Repeater Controller Sketch. The Controller uses a MT8870D DTMF Receiver IC from Zarlink Semiconductors. I reference their MT8870D Data Sheet Page 9, Figure 9 for circuit wiring. The MT8870D and a 3.58MHZ crystal can be purchased on E-Bay for under $10.00. The sketch assumes active "high" inputs for the COS and the PLL decode signals. If your equipment uses "active low", modify the sketch to accommodate "active low" inputs. Wire the MT8870, the PTT output, and the audio circuits on an Arduino Protoshield board.

Dean, KI7CC

Mike,
Here is a sketch for ACTIVE LOW inputs for the COS and PLL inputs. I recommend that you proof test
the sketch’s operation on a breadboard utilizing LEDs for output indicators. I have not tested the sketch following the coding changes to implement the “ACTIVE LOW” inputs.
I am attaching a schematic diagram for the Repeater’s wiring connections.
I have not included coding in the sketch for a “REMOTE Link Radio”.

NOTE: CTCSS and PLL have the same meanings for this APPLICATION. CTCSS means Continuous Tone Coded Squelch System, " A System" where the transmitter is sending a “sub-audable” tone to open the receiving station’s squelch. The repeater’s Receiver would detect the CTCSS (or PLL) tone and signal
the controller that a valid station was received. Do a WEB search for"CTCSS" to obtain more information.

Dean, KI7CC

rpt_w_dtmf_cont_Act_Low_ver_03_061.ino (17.2 KB)

I have an updated and easier to use Arduino Uno sketch for a Ham Radio Repeater Controller with
DTMF commands for the Repeater on/off, and CTCSS (TPL) on/off functions. The DTMF commands are stored in the EEPROM,for call-up, whenever the Controller is Reset or powered-up.
The Repeater users (necessary) settings are all made in a well marked area of the variables declaration section of the program sketch. If initial power up shows strange “RPTR and TPLR” settings, enter a “1” for each these two variables using DTMF inputs to the repeater receiver.
The previous schematic diagram has a serious mistake – the DTMF LED circuit should have been connected to the MT8870 pin 15 (not 16).
I have thoroughly tested this sketch and hardware design on a breadboard. If your receiver generates
COS and C.T.C.S.S. (TPL) signals that are more than 5.0 VDC, see the notes about using diodes (1N914 ETC) TO PROTECT THE ARDUINO’S INPUTS.
Please thoroughly test your Repeater Controller on the bench before you put it on the air. The responsibility for the operation of the repeater belongs to you.

Dean, KI7CC

Repeater_Controller_ver_04.40.ino (19.8 KB)

I have updated my sketch to improve my notes and comments. Version 4.41 has only minor
changes to the codes.

Dean KI7CC 9/13/2016

Repeater_Controller_ver_04.41.ino (20.6 KB)

Hello Dean KI7CC been looking at the code and it will not verify the error code Arduino: 1.6.8 (Linux), Board: "Arduino/Genuino Uno"

/tmp/Repeater_Controller_ver_04.41/Repeater_Controller_ver_04.41.ino:59:19: fatal error: Timer.h: No such file or directory

include "Timer.h"

^ compilation terminated. exit status 1 Error compiling for board Arduino/Genuino Uno.

is there a version of the timer library you are using ?? any help appreciated

SORRY found it I MUST GET MY GLASSES CHECKED AND BRAIN CLEANED thanks

Steve73, I tried a reload of the library the from the Web address listed in the sketch (https://github.com/JChristensen/Timer). I was able to successfully compile the sketch after a new library download.

I suspect that you did not rename the file before you copied it to your Arduino/Library folder.

Download the Master-Timer.zip fie, in the downloads folder, then highlight the "Master-timer" file, and then click on the "Extract all" icon (assuming you are using Windows, Linux is similar), Then rename the "Master-timer" folder "Mastertimer" . Now, you can copy the "Mastertimer" folder into the Arduino/libraries folder. I have all my Arduino folders (including the sketch folders) in my Documents folder.

Or you could use the official method of importing a library: While running the Arduino I.D.E. , left click on HELP, and do a search on "Importing Libraries". You will find other methods of importing library files.

You should verify that the "Timermaster" folder is in your Arduino/libraries folder.

Good luck, Dean KI7CC

I think the OP will soon realize the $300-400 price is relatively cheap!

Paul, KD7HB