Loading 3D model… large boards can take a moment.
Is it possible to build a full EchoLink® node using a $6 microcontroller? I'm not completely sure, but let's find out. The goal of this project is to create the smallest, cheapest way to put a radio onto the EchoLink network. If you are new to the world of EchoLink please see the official website for complete information. EchoLink is a peer-to-peer VoIP (voice over IP) network used to link amateur radio stations across the Internet.
There are much easier ways to get onto EchoLink. The MicroLink project will only be interesting to someone who wants to get deep into the nuts-and-bolts of EchoLink/VoIP technology. In fact, you should start to question the sanity of anyone who spends this much time building their own EchoLink station. I am a homebrew enthusiast and I try to avoid off-the-shelf software/components where possible. This has been a huge learning opportunity.
The system currently runs on a Pi Pico W (RP204, ARM Cortex M0) board. I'm pretty sure it could also run on an ESP-32, or possibly an Arduino of sufficient caliber. More experimentation is needed here.
The software is fully open source. Now that EchoLink is "open," others can experiment with this important amateur radio technology. I am currently working on adding support for AllStarLink. More to follow ...
Here's my production setup at the moment. This station provides EchoLink access to the Wellesley Amateur Radio Society repeater (W1TKZ-L) using a Yaesu FT-1900:
The green case contains the MicroLink system. The DB9 connector on the side of the case connects to microphone and audio plugs on the FT-1900. A 12V supply powers the radio and the MicroLink interface. Note that there are no other computers required. The only things not shown in this picture are the antenna (on the roof), and the home WIFI network that the Pico W is connected to. The red LED is the 12V power indicator and the blue LED is the internet connection status.
Here's a demo video I made of the first bench test:
The microphone/analog section still needs some work.
Here's what it sounds like over the air:
The official PC-based EchoLink client written by Jonathan Taylor (K1RFD) is excellent and is the quickest/easiest way to get on EchoLink. Download it here. There are also versions that run on mobile phones. MicroLink is not a supported part of the EchoLink family of products.
I've learned many things about EchoLink during this project. One thing is for sure: Jonathan (K1RFD) who created the EchoLink system is an outstanding engineer and we should all be greatly appreciative of the work that he and the rest of the EchoLink team do on behalf of the amateur radio community. Thanks to Jonathan for his suggestions/advice along the way.
Huge thanks go to Steve Kondo (K1STK) for providing the mechanical design work for this project.
Thanks also to Julius Jones (W2IHY), creator of the world-famous EQPlus and other sophisticated audio gear, for his advice on the audio circuit.
I have a few extra boards which I would be willing to sell for a reasonable price if someone wanted to try to build a station of their own.
I am good in QRZ at KC1FSZ if you have any questions or suggestions. Or e-mail at bruce at mackinnon dot com.
My goal was to build a complete station from scratch, with no strings attached to PCs/servers.
I have made a PCB for ease of use with radios (link mode) and/or direct integration with repeaters. Further refinements of the PCB are in process. The latest Gerbers are here and the latest BOM is here. You can build one yourself.
This project required an in-depth examination of how the EchoLink protocol works. The notes I created during this analysis are located here. The reverse-engineering of the EchoLink protocol was the most time-consuming part of the project.
Here's a picture of the the current version of the PCB.
This is a picture of the cellular module. This has passed some initial tests, but is not ready for production yet.
MicroLink identifies itself using a version string of 0.02MLZ.
Microphone Pre-Amp
Performance audio circuits are not my forte. The quality is improving with each iteration. This is what I built originally, but a new version using parts with better noise specs is in the works.
The microphone part will not be used when the radio is integrated. I will probably leave the speaker/amplifier in for monitoring purposes.
Audio Input
This is the circuit used when connecting directly to a radio's AF output (i.e. no microphone). This repeats some of the circuit shown above (but minus the high gain). This also shows the circuit used for carrier detect (COS). The idea is to boost up the rig's audio output (U6) and then compare it to an adjustable threshold (U8). There is no debounce in the analog part of the COS circuit - that is all done in software.
Audio Output
This is a work in process. The performance on the low end of the audio spectrum is not good yet.
I have a working version of the MicroLink system using 4G cellular internet
connectivity using an SIM7600A cellular module. The $70 USD breakout
board for this module comes from Waveshare and is linked here.
The Waveshare module was originally designed to plug into a full Raspberry Pi (NOT A PICO!), hence the
use of the term "hat," but it is possible to use the module directly via a serial
interface and there is no technical requirement to connect it to a Raspberry Pi.
I am communicating with the module using their AT command set across a 115,200 baud serial link. This requires a pretty elaborate state machine to allow bi-directional UDP traffic across a protocol that was originally designed so support auto-dialing modems. The Hayes people would be shocked if they saw what people were doing with AT commands. I've had good luck getting the SIM7600 to maintain the UDP data rate needed to support EchoLink.
I am using a pre-paid SIM card from Mint Mobile. It turns out that not all cellular providers support the "raw" SIM7600 module. In fact, it took a few conversations with their help desk to get them to activate my SIM card. The Mint Mobile activation website wants you to select what kind of phone you have (i.e. iPhone, Android, etc.) and apparently "homebrew EchoLink station" isn't a valid choice in their system yet. Someday ... But after some back-and-forth, they activated my SIM and within 30 seconds the "link" LED started flashing and I was on the Internet!
The only bad thing about Mint Mobile is that they don't appear to allow inbound UDP traffic into this module. Or at least I've not figured that out yet. ARRGG! This required the use of a TCP proxy to handle the traffic in/out of the cellular module. I've not documented this part yet because I am still hoping to eliminate this component.
Mint Mobile is an example of what is called a "Mobile Virtual Network Operator," or MVNO for short. The real mobile cellular infrastructure is built/run by Verizon, T-Mobile (including the remnants of Sprint), AT&T, and US Cellular. All of the other low-cost "providers" are essentially renting bandwidth from the big firms. In the case of Mint Mobile, they are using the T-Mobile network.
One interesting facet of the MVMO service is that the traffic is de-prioritized vs. the "real" carrier's traffic. So during congested times you might find that T-Mobile service is better than Mint Mobile's. You get what you pay for.
The mechanics of the prioritization is managed through the assignment of QCI levels. According to one article I saw, T-Mobile uses QCI 6, 7, 8, and 9 for their normal consumer plans. The lower numbers have higher priority. T-Mobile uses 6 (the best) for their "real" customers (i.e. pre-paid subscribers) and 7 for Mint Mobile. Interestingly, T-Mobile branded hot-spots run on level 9 (the worst).
MicroLink will update its internal time using an NTP server. The main value of this is to ensure that the timestamps on the internal log messages are correct.
The SNTP message protocol is quite simple. The request is 68 bytes, mostly zeros. The non-zero bytes are as follows:
The response that comes back has been observed to be around 52 bytes, although this may vary in some situations. The important information in the response is:
Steve K1STK designed and fabricated a great enclosure on his 3D printer. Here's what the PCB looks like with the case:
(More detail to follow)
reboot
status
log
tone
dropall
add [callsign]
drop [callsign]
Configuration commands - using during initial setup:
set addressingserver [EchoLink addressing server hostname: ex: naeast.echolink.org]
set callsign [your call]
set password [your password]
set fullname "[your full name]"
set location "[your location]"
set wifissid "[yourssid]"
set wifipassword [your password]
set hardcos [0 or 1. Enables or disables hardware carrier detect. Defaults to 0.]
set coson [COS debounce ms during off->on transition. Defaults to 10.]
set cosoff [COS debounce ms during on->off transition. Defaults to 400.]
set costhreshold [noise power floor used to decide when COS is detected]
set adcoffset [value that is added to the raw ADC value. Used to center the DC bais at 2048.]
The MicroLink device provides a DB9 (female) connector with the following pinout:
Top row, left to right (looking into device connector)
Bottom row, left to right (looking into device connector)
NOTES:
I implemented my own fixed-point audio compression/decompression CODEC for the GSM 0610 Full Rate protocol by following the specification here. The coding scheme is the so-called Regular Pulse Excitation - Long Term prediction - Linear Predictive Coder, generally referred to as "RPE-LTP." This standard was developed as part of the modernization of the European mobile phone system in the late 1990s and is a good balance between efficiency, quality, and compactness.
The European Telecommunications Standards Institute (ETSI) publishes a comprehensive set of test vectors containing known audio streams (PCM) and the corresponding GSM encoding. I have used that test data to validate that my CODEC is 100% complaint.
The smallest/cheapest microcontrollers lack hardware support for floating-point, so I built my CODEC using fixed point (Q15) math.
One of the most difficult challenges I had with this project was getting audio that was "smooth" in both directions. This stuff is probably obvious to people who are well versed in the state-of-the-art of VoIP. Here are a few points that will help anyone getting into this.
Two important things that make a difference for audio noise performance. Note that these comments are relevant when using the Pi Pico board as-is. The rules will be different if using the RP2040 chip directly.
Per Pico datasheet:
For much improved ADC performance, an external 3.0V shunt reference, such as LM4040, can be connected from the ADC_VREF pin to ground. Note that if doing this the ADC range is limited to 0-3.0V signals (rather than 0-3.3V), and the shunt reference will draw continuous current through the 200Ω filter resistor (3.3V-3.0V)/200 = ~1.5mA.
Per Pico datasheet:
AGND is the ground reference for GPIO26-29, there is a separate analog ground plane running under these signals and terminating at this pin. If the ADC is not used or ADC performance is not critical, this pin can be connected to digital ground.
When using MicroLink as a bridge to a repeater system via a radio link, be careful about the duty cycle limitations of the bridge radio you are using. The W1TKZ-L system uses an AZDEN mobile rig that certainly wasn't designed for 100% key down.
During "normal" repeater use this isn't a problem because the link radio is only keyed when a remote EchoLink user is speaking - that's no different from using the link radio directly. However, if more a complicated configuration is used (examples: linking two repeater systems together, joining a repeater to a conference server, etc.) things can become problematic if the link radio is required to be keyed constantly to transmit the activity happening on the "other" repeater or in the conference.
If you have a transmitter than can be keyed for long periods of time then this won't be an issue. But if not, the MicroLink system supports a configurable duty cycle limit (defaults to 50%). Once the link radio has been keyed for more than 50% of the time in any 5 minute interval the radio is un-keyed and allowed to rest.
The RP2040 has no DAC and the MCP4725 is cheap and plentiful. This could certainly be done with a fancier audio CODEC, but we'll think about that later.
As mentioned previously, it is important to deliver audio very smoothly, and with as little CPU overhead as possible. To that end, we are leveraging the TX FIFO on the I2C channel to quickly write to the I2C bus without any blocking.
This is a bit tricky because there are two completely independent data formats that need to work together:
The DAC I2C writes are done inside of the same interrupt service routine that performs the ADC read. This interrupt is set to run at exactly 8kHZ by setting the ADC FIFO depth to 1. The ADC and DAC are both running constantly, regardless of whether the system is transmitting or receiving.
There are some different ways of using the I2C bus but we're using the simple way since speed is not a big issue. What we really care about is consistency. Each audio sample will be transmitted on the I2C bus using a normal START-address-data-STOP sequence. There are fancier things you can do on the I2C bus involving restarts but we don't need that for our audio bandwidth requirements.
The MCP4725 also provides some choices to improve efficiency. The "fast mode" described in section 6.1.1 of the datasheet allows you to perform continuous data writes without addressing cycles. We don't need that for the 8kHz application (at least I don't think we do).
In the "slow" mode, the MCP4725 needs the regular I2C address byte followed by three data bytes. Actually, the first of the three data bytes is more like a command byte from the perspective of the MCP4725. So the complete sequence will need to look like this:
The START and STOP steps are commanded by bits in the RP2040 I2C_DATA_CMD word so they don't require distinct writes to the TX FIFO. Likewise, the address byte is generated automatically on start. In order to achieve the sequence above we'll need to make three distinct data writes into the I2C TX FIFO for each audio sample.
Combining the RP2040 datasheet figure 72 and the MCP4725 figure 6-2, we can determine that the three writes will look like this:
0 0 0 | 0 1 0 x x 0 0 x
0 0 0 | d11 d10 d09 d08 d07 d06 d05 d04
0 1 0 | d03 d02 d01 d00 x x x x
These writes are happening into the LSB end of the I2C_DATA_CMD register (i.e. data bits [10-0]). Bits [31-11] are not used and will be set to zero. The x's in the illustration above show where the MCP4725 has don't-cares. These will be set to zero.
The rules for DTMF are standardize by the International Telecommunications Union (ITU). The relevant standards documents are located here:
The most important details from the standards document:
This is the official binary that runs in production.
(These notes are not comprehensive yet.)
git clone https://github.com/brucemack/microlink.git
cd microlink
git submodule update --init
mkdir build
cd build
export PICO_BUILD=1
cmake -DPICO_BOARD=pico_w ..
make link-main-2
# At this point you'll have a link-main-2.uf2 that can
# be dragged onto a Pico W module. This is done by
# holding down the BOOTSEL button while powering on
# and then dragging/dropping the UF2 file onto the mass
# storage device.
#
# Or the link-main-2.elf can be flashed onto the board
# via the SWD port using a Raspberry Pi programming feature:
openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg -c "program link-main-2.elf verify reset exit"
#
# Or, more directly, using the RPi Debug/Programming Probe:
~/git/openocd/src/openocd -s ~/git/openocd/tcl -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "rp2040.dap.core1 cortex_m reset_config sysresetreq" -c "program link-main-2.elf verify reset exit"
(These notes are not comprehensive yet.)
git clone https://github.com/brucemack/microlink.git
cd microlink
git submodule update --remote
mkdir build
cd build
cmake ..
make <target>
(No longer used)
esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 /home/bruce/Downloads/ESP32-WROOM-32-V3.2.0.0/factory/factory_WROOM-32.bin
# Used to receive UDP packets
netcat -u -l 5198
# Used to send UDP packets. The printf command supports non-printable.
printf 'Hello\rWorld' | nc -u -w1 192.168.8.210 5198
# Login test
printf "lKC1FSZ\254\254xxx\rONLINE0.02MLZ(08:11)\rWellesley, MA USA\r" | nc -w 10 naeast.echolink.org 5200
# SIM7600 open TCP socket in transparent mode:
ATE0;+CIPMODE=1;+NETOPEN;+CIPOPEN=0,"TCP","54.89.121.215",8100
The SA818 is an inexpensive 1W transceiver module that is available for about $10 USD. There are VHF and UHF versions. I have tested the MicroLink system using this module and it works fine. Here is a short demo video.
I've created notes for this module on my blog.
The connection is straight-forward. Here's a picture of the module with interface wires attached:
I'm currently working on a more direct integration between MicroLink and this radio module.
This rig was installed in October of 2024 to address an ongoing problem with occasional local QRN. The RF squelch on the original (AZDEN) rig was opening sporadically, particularly during the evening hours. The advantage of the more modern Yaesu rig is that it supports CTCSS tone squelch.
The rig has a normal 3.5mm audio output jack on the back. This is used to drive the audio input on the MicroLink box.
The FT-1900 ships with a Yaesu MH-48 microphone. The rig as a 6-pin RJ12 modular microphone connector on the front. NOTE: Although this looks similar to the RJ45 connector used on many (ICOM) rigs, it is actually the smaller connector size commonly used for telephones. Unlike the telephone RJ11 connector that uses 4 pins, the RJ12 connector uses 6 pins.
The pinout is as follows, looking into the front of the rig and counting from left to right:
Pins 6, 5, and 4 are used for the MicroLink interface. Pins 3, 2, and 1 are not used.
There is no carrier detect output on the rig. MicroLink is run in soft-COS mode with this radio and we've not had any propblems.
We have saved the repeater frequency/split/tone/power level in one of the rig's memory slots so that the correct configuration is used automatically following a power cycle. It appears that the rig remembers the last memory slot that was selected after power off/on.
This has been discussed at length in other venues. The method of detecting the receive carrier depends on the radio you are using. Unless you are willing to crack it open, there is no explicit carrier detect "signal" on the Baofeng HT. My integration with this rig just listens for noise on the audio output line and triggers accordingly. That seems to work just fine. See the schematic for details.
The latest (ML4) design was created using KiCad 9.
There are a few symbols/footprints in the hardware design that are not included in the standard KiCad libraries. These parts are included in my own library located in GitHib. Please clone my GitHub project called kicad-library to get access to these additional parts.
There are a few steps that need to be taken to allow KiCad to find the custom parts:
At the request of Abdullah S21AF I've updated the design files to make assembly using parts from LCSC Electronics easier. This involved a few tweaks to the PCB to allow the use of more available parts. I've updated the schematics to include the LCSC part numbers. Please see the ML4 version of the hardware design files.
There is now an official BOM file that includes LCSC part numbers: see the CSV file here. Most of the parts listed in the BOM are available on LCSC. Here are some notes on some parts that didn't appear on LCSC when I checked:
The Gerber files for the ML4 version of the PCB are located here. NOTE: As of September 2025 I have not yet manufactured/tested this version of the PCB.
It's been tricky to interface to the audio input of some radios. Sometimes this needs to be "line level," but most of the time the audio is being fed into the microphone input. Different radios expect very different audio levels, but microphone levels are very small compared to what is coming out of the MicroLink circuit.
To improve flexibility, a resistive pi-attenuator is provided using through-hole resistors. THT parts make it easier to adjust the attenuation in the field. There is also a pot that can be used for fine adjustment. Here's the schematic:
From my experience a -10dB pad gets the audio level into the right range for a microphone level and the pot can be used to dial in the proper level.
The optional DC blocking capacitor (C10) can be installed if your radio provides a DC bias voltage on the microphone cable as is often the case when powering an electret/condenser microphone. If you don't use the DC block then a short should be installed instead.
So far everything on this page has been related to EchoLink. I have made good progress on AllStarLink support. At the moment the ASL firmware is separate from the EL firmware but I will merge them once things are working well. More to follow later.
No comments yet. Be the first to ask about this board.