YaK:: Using an ICOM-2730 for an EchoLink to an Existing Repeater [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

Using an ICOM-2730 for an EchoLink to an Existing Repeater

The N6NFI/R Repeater (formerly W6APZ/R) on 145.23(-)PT100 near Palo Alto, California, is a wide-area coverage repeater in the San Francisco Bay Area. It's been a rather active repeater for decades, and hosts the "9am net" each weekday morning.

That repeater is a decades-old FM-voice-only repeater with no connections to the internet and no links to other repeaters. For some years now individual repeater users (with the permission of the repeater owners) have provided their own connections via the EchoLink network, using RF from their own QTHs to bind to the repeater.

Such an EchoLink station would have a 2m transceiver that receives on the Repeater's output frequency and transmits into the Repeater's input frequency, just like any human repeater user would.

This author (W6REK) is one of those providing Echolink for N6NFI/R from his home in San Jose, California. During the summer of 2019 the station developed problems with the audio levels being too low, and despite some remediation, in late September 2019 it got so bad that it was unusable for remote net controls.

Something had to be done, and I decided to start from scratch with a different radio, an ICOM-2730 whose LCD screen had become badly damaged during travel, but was still working reliably on previously-programmed frequencies, which included using N6NFI/R.

Here's the summary of the electrical connections available on the 2730 from it's manual:

I need three connections on the radio: Audio in, Audio out, and Push To Talk (PTT) control. I can get all of this via the Microphone Connector (2) and either of the external speaker jacks (6 or 7). I was lucky to find an old cable with an RJ45 (8-pin ethernet-like) connector that had a simple 8 wire ribbon cable coming from it. Other documents ( e.g. https://k0bg.com/cabling.html ) tell me that you can't use just any ethernet cable for it.

If I use the Right band for EchoLink, I can use jack 7 for that, and still be able to monitor something on the Left Band with the internal speaker, so I'll do that.

On the Microphone Connector (2) I can use the following pins:

  • Pins 6 and 5: Microphone signal and ground, for Audio In to the radio.
  • Pins 4 and 7: PTT input and ground, for switching the radio from Rx to Tx mode.
  • Pin 1: +8V DC output, maximum 10mA. This is perfect for powering one CMOS 4049 chip, see below.

    The EchoLink server software I use is "svxlink" by Tobias Blomberg SM0SVX running on a Raspberry Pi 3 B. My QTH has a Comcast Business internet connection with five usable static IP addresses exposed to the internet. The EchoLink station uses one of those five, so it has a stable non-firewalled IP address. The "svxlink" software is capable of being a repeater controller and many other things, but all I am interested in using is the EchoLink module. EchoLink users may connect over the internet to EchoLink node W6REK-R, where they hear anything being said on the Repeater or on the EchoLink channel, and anything they say will be transmitted to the Repeater and heard on the EchoLink channel. Everything else has been disabled in svxlink, including any DTMF commands.

    Two of the mechanisms svxlink can use to control the PTT are GPIO (General Purpose Input/Output) pins on the Raspberry Pi or some control line like RTS (Request To Send) on an RS232 dongle plugged into a USB port on the Pi. I've been using the latter, with RTS controlling the PTT, because it seems a little bit less fragile than a thin wire connected to a GPIO pin. However I do have to make sure that the PTT is not activated while the Pi is booting or if it crashes. Checking for failure modes is really important!

    The problem with RS232 is that the voltage levels are probably inappropriate for the PTT input to the radio. RS232 signals can range from +15V to -15V, and the radio probably prefers ground (0V) to +5V or maybe +8V, since that is the power level it provides. The manual says to ground the line to transmit, so it's probably a TTL-like or open-collector input where the current needs to flow for the low voltage state, but doesn't flow in the high state anyway.

    So we power a CMOS 4049 Hex Inverting Buffer with the +8V source from the microphone and use it to condition the RS232 signal. A 4049 is designed to handle RS232 voltages on its inputs without causing damage. Like all CMOS chips, its input uses the halfway point between its power rails (in our case, +4V) as the boundary between logical 0 and 1 inputs. And this criterion correctly distinguishes the two states of the RTS line on my dongle. I actually run the signal through two of these inverting buffers in serial, so it forms a non-inverting buffer. Then I tried running it through a 100 ohm resistor before going into the radio on the PTT line, and that worked. That will do some protective current limiting in worst cases. If it didn't work like that, I might have tried a smaller resistor or wired it without a resistor, but since it did work, I keep the protection.

    A raspberry Pi 3B doesn't have anything like a sound card on it, so I use a cheap USB sound dongle. You can get these for $7 to $20. I got a small variety of different brands, because not all of them are recognized by the Linux kernel on the Raspberry Pi.

    The other signal on the microphone plug is the actual microphone input. It might be possible to wire the headphone or speaker output on the USB sound dongle directly to the microphone input, but usually headphone or speaker outputs are operated at higher voltages than the small voltages that microphones produce. So I have the speaker output go through a voltage divider, with a 500 ohm potentiometer to ground, and connect the tap to the microphone input. The speaker ground connects directly to the microphone ground. Eventually when all is tuned and working well, I will replace the potentiometer with fixed resistors. I don't want to have parts that can be bumped and altered, and there is enough flexibility in software to adjust gain levels.

    Finally we need audio in the other direction, from the radio to the Raspberry Pi. That will come out of a 3.5mm mini audio jack on the back of the radio, as I described in the beginning. At the moment I did wire that directly to the microphone input on the USB sound dongle, but turned the microphone gain way down in the Linux system on the pi. Soon I'm going to add a potentiometer or fixed resistors as a voltage divider for this connection as well, so I don't have to keep the microphone volume so low. Things probably work better when the volumes are in a range like 30% to 80% like they were intended to be used.

    To adjust the volume levels in the Raspberry Pi, I'm now using the "amixer" command line tool. The manual for amixer is not easy to understand. Here is the shell script I use to set it:

    C=1
    for i in 0 1 2
    do
      if amixer -c $i | grep 'Playback channels: Front Left - Front Right'
      then C="$i"
           break
      fi
    done
    
    amixer -c $C set Speaker 50%
    amixer -c $C set Mic     5%
    amixer -c $C
    
    The grep pattern is something that I know appears on the sound card I want and does not appear on other sound devices, like the one built into my HDMI monitor. I use the control in the widget bar at the top right of the desktop to set my "USB Audio" device as the default.

    TODO: complete this article.

    TODO: Mention that svxlink always fails the first time but succeeds 10 seconds later on a second attempt. "CalmLogic" is the name of my logic configuration in svxlink. Typical startup log:

    + sh ALSA.sh
    + C=1
    + grep Playback channels: Front Left - Front Right
    + amixer -c 0
    + grep Playback channels: Front Left - Front Right
    + amixer -c 1
      Playback channels: Front Left - Front Right
    + C=1
    + break
    + amixer -c 1 set Speaker 50%
    Simple mixer control 'Speaker',0
      Capabilities: pvolume pswitch pswitch-joined
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 37
      Mono:
      Front Left: Playback 19 [51%] [-18.00dB] [on]
      Front Right: Playback 19 [51%] [-18.00dB] [on]
    + amixer -c 1 set Mic 5%
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: Playback 0 - 31 Capture 0 - 35
      Mono: Playback 2 [6%] [-21.00dB] [on] Capture 2 [6%] [-10.00dB] [on]
    + amixer -c 1
    Simple mixer control 'Speaker',0
      Capabilities: pvolume pswitch pswitch-joined
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 37
      Mono:
      Front Left: Playback 19 [51%] [-18.00dB] [on]
      Front Right: Playback 19 [51%] [-18.00dB] [on]
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: Playback 0 - 31 Capture 0 - 35
      Mono: Playback 2 [6%] [-21.00dB] [on] Capture 2 [6%] [-10.00dB] [on]
    Simple mixer control 'Auto Gain Control',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    + date
    Tue Oct  1 12:30:19 UTC 2019
    + /usr/local/bin/svxlink --config=/usr/local/calmlink/calmlink.conf
    SvxLink v1.5.99.7 Copyright (C) 2003-2017 Tobias Blomberg / SM0SVX
    
    SvxLink comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
    welcome to redistribute it in accordance with the terms and conditions in the
    GNU GPL (General Public License) version 2 or later.
    
    Using configuration file: /usr/local/calmlink/calmlink.conf
    --- Using sample rate 48000Hz
    
    Starting logic: CalmLogic
    Loading RX: Rx1
    *** ERROR: Open capture audio device failed: Device or resource busy
    *** ERROR: Could not open audio device for receiver "Rx1"
    *** ERROR: Could not initialize RX "Rx1"
    *** ERROR: Could not initialize Logic object "CalmLogic". Skipping...
    *** ERROR: No logics available. Bailing out...
    + date
    Tue Oct  1 12:30:21 UTC 2019
    + sleep 10
    + true
    + sh ALSA.sh
    + C=1
    + grep Playback channels: Front Left - Front Right
    + amixer -c 0
    + grep Playback channels: Front Left - Front Right
    + amixer -c 1
      Playback channels: Front Left - Front Right
    + C=1
    + break
    + amixer -c 1 set Speaker 50%
    Simple mixer control 'Speaker',0
      Capabilities: pvolume pswitch pswitch-joined
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 37
      Mono:
      Front Left: Playback 19 [51%] [-18.00dB] [on]
      Front Right: Playback 19 [51%] [-18.00dB] [on]
    + amixer -c 1 set Mic 5%
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: Playback 0 - 31 Capture 0 - 35
      Mono: Playback 2 [6%] [-21.00dB] [on] Capture 2 [6%] [-10.00dB] [on]
    + amixer -c 1
    Simple mixer control 'Speaker',0
      Capabilities: pvolume pswitch pswitch-joined
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 37
      Mono:
      Front Left: Playback 19 [51%] [-18.00dB] [on]
      Front Right: Playback 19 [51%] [-18.00dB] [on]
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
      Playback channels: Mono
      Capture channels: Mono
      Limits: Playback 0 - 31 Capture 0 - 35
      Mono: Playback 2 [6%] [-21.00dB] [on] Capture 2 [6%] [-10.00dB] [on]
    Simple mixer control 'Auto Gain Control',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    + date
    Tue Oct  1 12:31:00 UTC 2019
    + /usr/local/bin/svxlink --config=/usr/local/calmlink/calmlink.conf
    SvxLink v1.5.99.7 Copyright (C) 2003-2017 Tobias Blomberg / SM0SVX
    
    SvxLink comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
    welcome to redistribute it in accordance with the terms and conditions in the
    GNU GPL (General Public License) version 2 or later.
    
    Using configuration file: /usr/local/calmlink/calmlink.conf
    --- Using sample rate 48000Hz
    
    Starting logic: CalmLogic
    Loading RX: Rx1
    CalmLogic: Activating QSO recorder
    Loading TX: Tx1
    Loading module "ModuleEchoLink" into logic "CalmLogic"
            Found /usr/local/lib/svxlink/ModuleEchoLink.so
    CalmLogic: Event handler script successfully loaded.
            Module EchoLink v1.3.99.0 starting...
    EchoLink directory status changed to ON
    --- EchoLink directory server message: ---
    EchoLink Server v2.5.9997
    
    ECHOEC2-1: Herndon, VA USA
    @@@@@@ 01@12:32:00 CalmLogic: Ident not needed.
    @@@@@@ 01@12:33:00 CalmLogic: Ident not needed.
    @@@@@@ 01@12:34:00 CalmLogic: Ident not needed.
    @@@@@@ 01@12:35:00 CalmLogic: Ident not needed.
    @@@@@@ 01@12:36:00 CalmLogic: Ident not needed.
    
    
  • (unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
    (last modified 2019-10-01)       [Login]
    (No back references.)