PiTone CTCSS Tone Generator

Announcing PiTone Version 3

PiTone has been revised to Version 3. Versions 1 and 2 have been deprecated.

The major changes to PiTone are as follows:

  • PiTone options invoked when the program is started are now read from a pitone.ini file.
  • The tone output can be continuous or follow an input signal (i.e. On/Off) connected to an RPi GPIO pin. This signal is typically derived from a received CTCSS signal (the HamVOIP Allstar distribution calls this signal the TxCTCSS bit).
  • When following an input signal, the turn-off of the tone output can be delayed by a fixed number of cycles of the tone frequency.
  • The I2C address of the MCP4725 DAC is now specified in the pitone.ini file

Introduction

PiTone is a software application that runs on a Raspberry Pi (RPi) single-board computer and produces a stepped approximation sine wave, frequently used for a transmitted Continuous Tone Coded Squelch Signal (CTCSS). The program can run in parallel with other applications on a single Raspberry Pi (for instance, on an RPi running the Allstar repeater control application) or can be installed stand-alone on inexpensive hardware like the Pi Zero. In either case, the software generates a stepped sine wave by using a Digital-to-Analog converter controlled from the RPi’s I2C interface.  PiTone can generate a continuous tone or a tone output synchronized with an external input signal – typically a detected CTCSS tone at the input of a repeater. In the synchronized mode, the turn-off of the output can be delayed by a specified amount.

PiTone can be used with the Raspian operating system as well as other RPi operating systems. PiTone will run on any version of the Raspberry Pi. However, to avoid occasional distorted cycles of the tone output, the faster Raspberry Pi 3 or 4 is recommended. We use Pitone is used as part of our Allstar repeater controller system we call MABEL for the Yaesu DR-1X/2X repeater which commonly uses the Allstar HamVOIP distribution running under ArchLinux.  The MABEL hardware also includes a low pass filter and a connector for a DAC module.  More information about this system is available at www.customcomms.net.

PiTone Powerpoint Presentation (PDF)

Here is a Powerpoint presentation about PiTone.

Performance

The first four following figures show the output waveforms from PiTone at 110.9 Hz for 16, 32, 64 and 128 steps. The green trace is the raw output from the DAC and the black trace is the output from a 3 pole active filter as used in the MABEL DR-1X repeater controller. The last two figures show Histograms of the output frequency for 32 and 128 steps.

Low Pass Filter

The CTCSS tone is typically injected into a repeater transmitter to provide a CTCSS signal on the transmitter output. Depending on the point where the tone is injected and the circuitry of the transmitter, additional low pass filtering may not be required. In our MABEL DR-1X Interface Board design (www.customcomms.net), we opted to use a 3 pole low pass active filter as shown in the following schematic (IC1A and IC1B).

PiTone Executable and Source Code Files

The PiTone Version 3 executable source code files can be downloaded HERE . PiTone will run on a Pi Zero, 2, 3 or 4. However, when using the TxCTCSS input feature with a Pi 4, the GPIO input cannot be driven from an open collector or drain source unless a 56K pullup resistor to 3.3 VDC is provided. This is due to a WiringPi library bug in which the internal pull-up cannot be activated by WiringPi. PiTone v3 must be compiled using the latest WiringPi library to run on a Raspberry Pi 4.

PiTone by K8UT is free software; you can redistribute it and/or modify it under the terms of the license agreement found in the source code.

PiTone_V30 User’s Manual

Click on the Download button for a copy of the PiTone_V30 User’s Manual .

Using PiTone with MABEL and HamVOIP

PiTone was originally written to provide a transmit CTCSS tone when using our MABEL DR-1X Interface board Allstar to control a Yaesu DR-1X repeater. Complete information on this system is available from www.customcomms.net/products.

Comments are closed.