AX.25 Packet Modem
A software-defined AX.25 packet radio modem built entirely on Arduino with PWM audio output and ADC decoding.
During late 2012, I built a packet radio modem for 1200 baud AFSK (AX.25) from scratch on an Arduino. The goal was to accomplish as much as possible in software with minimal external components.
Why Build a TNC?
Commercial packet radio TNCs (Terminal Node Controllers) are expensive, and most of the classic designs from the 80s and 90s are getting hard to find. The Arduino has enough processing power to handle 1200 baud packet decoding in software, which means you can build a functional TNC for under $30 in parts.
Plus, there’s something deeply satisfying about building your own radio equipment. The emulator project scratches a similar itch—understanding how things work by building them from scratch.
Design
The design keeps external components to a minimum:
- Hardware PWM creates output waveforms using direct digital synthesis—no DAC required
- Low-pass filter smooths the PWM output into clean audio tones
- ADC samples receive audio at 8kHz for software decoding
- External SPI SRAM chips (512kbit 23LC512) provide packet memory buffer
The audio decoder is based on code from the BeRTOS AX.25 stack, adapted for standalone use without the full BeRTOS operating system. This gave me a solid foundation for the correlation-based bit detection that makes AFSK decoding work reliably.
How AFSK Works
AX.25 uses Audio Frequency Shift Keying at 1200 baud:
- Mark (binary 1): 1200 Hz tone
- Space (binary 0): 2200 Hz tone
The modem generates these tones for transmit and detects them on receive. The tricky part is reliable detection—radio signals are noisy, and the tones can be distorted by the radio’s audio stages. The software uses a correlator that compares incoming samples against reference waveforms, which is more robust than simple zero-crossing detection.
(If this sounds familiar, it’s because I later implemented similar FSK techniques for the Bell 103 modem in the emulator project. Audio modems are audio modems, whether they’re talking to phone lines or radio waves.)
Software
The source is available on GitHub. Built with Atmel Studio rather than the Arduino IDE for more flexibility with modules and better control over memory management. While originally designed for APRS, it evolved into a generic TNC with APRS capabilities.
This project has 80+ stars on GitHub and has been forked by many other amateur radio operators for their own packet radio experiments.
Integration with Raspberry Pi
As mentioned in my Raspberry Pi APRS article, the plan was always to combine this Arduino TNC with a Raspberry Pi for a complete low-power APRS station. The Pi handles the networking and APRS-IS connectivity while the Arduino handles the radio interface.
See Also
- Amateur Radio hobby page - More about my ham radio activities
- Raspberry Pis and APRS - The companion article about the Pi side
- RTL-SDR TCP Multiplexer - Another radio project
- Deep Dive: Bell 103 Audio Modem - Similar FSK concepts for phone modems