CTCSS board.

V

VK3ZYZ

Guest
I have yet to try this out, but a simple CTCSS board can be made with an Arduino Nano driving an R2R network.
Pins 2 detects the TX on, and 3-7 select what tone is to be used.
Later today I'll put one together to see if it works.
This will be a cheap board as the R2R network can be soldered directly to the Nano so no extra board is really needed. Just maybe a few Rs and Cs.
Of course, this can use the Basic VFO board I have if folks are interested. And a display could be added too.

EDIT: Here is a sample circuit.
CTCSS_GeneratorSwitched.jpg
 

Attachments

Last edited by a moderator:
V

VK3ZYZ

Guest
I have a demo board running.
There is a push button for the "PTT" switch. The code expects a LOW for TX. But in real life, it may be a resistive divider from the TX power, and active HIGH. Or an opto isolator, or transistor......

Here is just to show how little is needed.
FinalDiscteteDemo.JPG
This uses discrete resistors for the R2R_DAC. It will be a lot neater to use the SIP resistor pack shown next to the board.


The series resistor network selects the channel
PrepareR2R_trimmed.JPG

A 12 position switch is the selector for the required tone.
R2R_Switch.JPG
The tones are...
1 = 0.0Hz (no tone)
2 = 67.0Hz
3 = 74.4Hz
4 = 88.5Hz
5 = 91.5Hz
6 = 94.8Hz
7 = 103.5Hz
8 = 118.8Hz
9 = 123.0Hz
10 = 141.3Hz
11 = 179.9Hz
12 = 440.0Hz as a setup test tone.

These tones can be changed in the code if needed.

The tones could use a bit more filtering maybe, as they are only 5 bits.
CTCSS_67.jpg
CTCSS_123.jpg
CTCSS_440.jpg
Of course, a trim pot will be added, along with an isolating resistor and coupling cap to feed the tones to the mic circuit, but that may depend on the set in question.

CTCSS_20120304.zip is the working code as is shown above.
Feel free to modify it as you want.
 

Attachments

Last edited by a moderator:

VK3ZYZ

Moderator
Staff member
CTCSS_Generator.jpg

Here is the circuit for CTCSS_20210304.zip file.

NOTE: D7 should not be connected and the 2 resisters connected to it need to be removed as per the notes. This was a PCB error. I'll fix this circuit board later if I do another run.
 
Last edited:

BillC

Active member
Hi Denys. Do the R2R resistors control the frequency of the tones or do they just switch in the pre programmed frequencies as generated by the Arduino? If the latter were the case maybe the unit could be configured to produce audio tones relative to the standard musical scale, with twelve semitones?
 

VK3ZYZ

Moderator
Staff member
The R2R resisters form a digital to analog converter to convert the 5 bit number written to the port under interrupt control. The interrupt timer period sets the frequency and each interrupt. This timer value is selected from the "SubTone" table.
part of it is here...

float SubTone [] // Edit this for CTCSS frequencies wanted. Selected by Input1-Input5 settings.
{ 0.0,
67.0,
69.3,
71.9,
..
.. and so on.


Then the next voltage value to be written out is fetched from the "sinetable" table that holds the numbers needed to produce a full cycle.

int sinetable[] // one cycle sine wave via R2R network.
{ 0,1,2,3,5,7,10,13,16,19,22,25,27,28,29,30,31,30,29,28,27,25,22,19,16,13,10,7,5,3,2,1, };

This table loops untill the timer is turned off.
That value is used to set the instantaneous voltage level sent to the radio, thus producing a sine wave.
Note the circuit I tossed together yesterday has an extra resistor pair connected to D7. It should just be D8 to D12. This is because there was a PCB error. So it is included to allow assembly on my PCB.

The file in post#1 uses inputs D3-D7 to form a binary number to select the tones while that in post#2 makes use on an analog input A7.


I don't know what the max frequency generated this way will be. As you go higher, the errors will increase too. But it would be an easy thing to try out. Just enter the frequencies into the SubTone table and see how it goes.
 
Last edited:

BillC

Active member
Hi Denys thanks for the comprehensive reply to my question. From what you say it looks as though the resistors would have to be high tolerance types in order to produce an accurate musical scale. It might be a bit too complicated to obtain an accurate twelve semitone scale based on A=440.0 Hz. I think that the original top octave generator chips are no longer being produced, they used a crystal oscillator around 2 megs I think.
 

VK3ZYZ

Moderator
Staff member
No, the resistors do not determine the frequency. Those on the selector switch just generate a voltage that is read by the Arduino and that reading is used to select the table entry. So, 1% resistors are fine for the selections.
The table entry is used to control the frequency of the timer so these entries can be set for the max accuracy the timer can produce.
 

VK3YNV

Administrator
Staff member
I think that approach is the best for generating CTCSS. The standard calls for 0.05% frequency accuracy. So at 123.0 Hz that would be +-0.06Hz
Not sure how precise you need to be in practice
 

VK2RK

Active member
I think that approach is the best for generating CTCSS. The standard calls for 0.05% frequency accuracy. So at 123.0 Hz that would be +-0.06Hz
Not sure how precise you need to be in practice
The precision is set by the standard, deviate from the standard at your own peril, something the big Asian country north of us do often ;)
Here is a copy of the standard document (Page 13)

However I am going to do a test on the IC-9700 and post the video on here, when I got to 124 Hz the tone squelch started to drop out.
 
Last edited:
Top