I resisted microcontrollers in my ham projects for years. Seemed like unnecessary complexity — why add a processor when a 555 timer or a handful of logic gates would do? Then I built an antenna switch controller with an Arduino Nano, and the revelation wasn't the switch itself — it was that I could change the behavior with code instead of rewiring hardware.
Now nearly every project on my bench has a microcontroller in it somewhere. Here's what's actually useful (not just cool demos) for working ham radio operators.
Choosing Your Platform
Arduino Nano/Uno: The Workhorse
Use for: Simple control tasks, CW keyers, antenna switches, display interfaces, sequencers.
Specs that matter: 5V logic (interfaces directly with older TTL-level radio accessories), 16 MHz clock, 14 digital I/O, 6 analog inputs, USB programming.
Cost: $3-5 for a clone, $25 for genuine Arduino.
Limitation: No networking. No wireless. Limited memory. But for dedicated embedded tasks in a shack, these limitations don't matter.
ESP32: The Connected Brain
Use for: Anything needing Wi-Fi, Bluetooth, web interfaces, MQTT telemetry, remote monitoring.
Specs that matter: Dual-core 240 MHz, Wi-Fi, Bluetooth, 34 GPIO, ADC, DAC, I2S audio. Runs on 3.3V (level shifters may be needed for 5V interfaces).
Cost: $5-8 for a generic DevKit board.
Killer feature for hams: Built-in Wi-Fi means your project can have a web interface, log to a server, or be controlled from your phone — without additional hardware.
ESP8266: The Budget Networked Option
Use for: Simple web-connected projects where ESP32 is overkill.
Specs that matter: Single-core 80 MHz, Wi-Fi, fewer GPIOs than ESP32.
Cost: $3 for a D1 Mini clone.
When to pick over ESP32: When you only need Wi-Fi and a couple of I/O pins. The D1 Mini's small form factor is perfect for cramming into existing equipment.
Raspberry Pi Pico: The New Contender
Use for: Dual-core tasks, PIO-based precise timing, USB HID devices.
Cost: $4 for the basic, $6 for Pico W (with Wi-Fi).
Unique advantage: The PIO (Programmable I/O) subsystem can generate or decode arbitrary signal protocols at precise timing. CW decoders, RTTY decoders, and signal generators benefit from this.
Project 1: Smart Antenna Switch Controller
My six-position antenna switch needed a controller that:
- Selects antenna based on band (auto-sensing from radio CAT)
- Provides manual override
- Shows current antenna on a display
- Protects against hot-switching (inhibits TX during switching)
Hardware
- ESP32 DevKit
- 6-channel relay board (5V coils, optically isolated)
- 0.96" OLED display (I2C, SSD1306)
- Rotary encoder for manual selection
- Radio CAT interface (3.5mm to USB serial adapter)
How It Works
The ESP32 reads the radio's frequency via CAT (CI-V for Icom, CAT for Yaesu). Based on the frequency, it selects the appropriate relay for that band's antenna. A band-to-antenna mapping table in code makes configuration easy:
struct BandAntenna {
uint32_t lowFreq;
uint32_t highFreq;
uint8_t relayPin;
const char* name;
};
BandAntenna antennaMap[] = {
{1800000, 2000000, RELAY_1, "160m Inv-L"},
{3500000, 4000000, RELAY_2, "80m Dipole"},
{7000000, 7300000, RELAY_3, "40m Yagi"},
{14000000, 14350000, RELAY_4, "20m Yagi"},
{21000000, 21450000, RELAY_4, "20m Yagi"}, // shared
{28000000, 29700000, RELAY_5, "10m Vert"},
};
The TX inhibit works by dropping PTT for 50ms during relay switching. A separate GPIO connects to the radio's inhibit pin.
The web interface (served from the ESP32's internal web server) shows current antenna, allows remote override, and logs band-change events.
Project 2: CW Memory Keyer with Contest Features
The QCX has a built-in keyer, but for contest operating I wanted more memories, adjustable weighting, and N1MM+ integration.
Hardware
- Arduino Nano
- 4×4 membrane keypad (16 memories!)
- Small speaker for sidetone
- Paddle input (tip-ring-sleeve 3.5mm jack)
- Key output (to radio's key jack)
Features Built in Code
- Iambic A and B modes (switchable)
- Speed adjustable 5-50 WPM via potentiometer
- 16 programmable memories (stored in EEPROM, survive power cycling)
- Weight adjustment (default 50%, adjustable 30-70%)
- Automatic serial number increment
- Beacon mode (CQ + listen interval)
- Potentiometer for sidetone frequency
The entire project fits in a small ABS box. Total parts cost: about $12.
Code Architecture
The keyer runs on a timer interrupt for precise dit/dah timing. The main loop handles:
- Paddle input debouncing
- Memory playback (interruptible — pressing a paddle stops playback)
- Serial number management
- Sidetone generation via tone() function
Key timing at 20 WPM: dit = 60ms, dah = 180ms, inter-element gap = 60ms. The timer interrupt fires every 1ms and handles the state machine that tracks dit/dah/space/word boundaries.
Project 3: Rotator Controller with Web Interface
My old Hy-Gain rotator had a failing analog controller. Rather than buy a $200 replacement controller box, I built one with an ESP32.
Hardware
- ESP32 DevKit
- Motor driver board (L298N H-bridge, handles the 24VAC rotator motor)
- ADS1115 16-bit ADC (reads the rotator position potentiometer more accurately than the ESP32's built-in ADC)
- External 24VAC power supply for the rotator motor
- 12VDC supply for the electronics
Software Features
- Web interface with compass rose showing current heading
- Preset buttons for common DX headings (Japan, Europe, South America, etc.)
- Integration with N1MM+ via UDP (auto-rotates to the correct heading for spotted DX)
- Soft start/stop to reduce mechanical stress
- Overlap handling for rotators that go past 360°
- Calibration routine accessible via web interface
The position accuracy is within ±2 degrees — better than the original analog controller's ±5 degrees. The soft start/stop alone was worth the build.
Project 4: Band-Decoded Amplifier Sequencer
Running a linear amplifier requires proper sequencing: antenna relay first, then amplifier bias, then TX. On receive, the reverse. Get the timing wrong and you transmit into an unswitched relay — expensive mistake.
Hardware
- Arduino Nano
- 4-channel relay module
- Band data input from radio (BCD or voltage levels)
- LED indicators for each stage
Timing Sequence (configurable in code)
- Radio asserts PTT → Arduino detects (T=0)
- Antenna relay energizes (T+5ms)
- Amplifier bias relay closes (T+15ms)
- TX line to radio closes, allowing RF (T+25ms)
On release:
- TX line opens immediately (T=0)
- Amplifier bias opens (T+10ms)
- Antenna relay opens (T+20ms)
Total TX delay: 25ms — imperceptible for voice, fine for CW above 35 WPM, not ideal for QSK CW (for that, you need PIN diode switching with microsecond timing).
Project 5: Remote Station Monitor
When I'm away from my shack, I want to know: temperature, SWR, power output, and whether the amplifier has faulted.
Hardware
- ESP32
- DS18B20 temperature sensors (3 of them: amplifier, shack ambient, outdoor)
- ADS1115 ADC reading the SWR bridge voltage
- Digital input from amplifier fault relay
- Relay output for remote power cycling
Software
- MQTT client publishes all values every 30 seconds to a broker
- Home Assistant integration for dashboards and alerts
- Telegram bot sends alerts if temperature exceeds threshold or amplifier faults
- Web interface for direct access on LAN
I get a Telegram message if my shack temperature exceeds 35°C or if the amplifier faults. Saved me from a failed cooling fan last summer — I shut down remotely before anything cooked.
Project 6: WSPR Beacon
A GPS-disciplined WSPR beacon using just an SI5351 clock generator and an Arduino:
Hardware
- Arduino Nano
- SI5351 clock generator module ($5)
- GPS module (NEO-6M, $8) for precise timing
- Low-pass filter for the target band
- Small PA transistor (BS170 for 200mW or IRF510 for 1-2W)
The SI5351 generates the RF, the Arduino creates the WSPR FSK modulation (4-FSK, 1.46 Hz spacing), and the GPS provides the precise 2-minute slot timing that WSPR requires.
Total cost: about $25 for a working WSPR beacon on any HF band. Put it on 30 meters (10.1387 MHz) and watch your signal propagate on wsprnet.org.
Practical Tips for Microcontrollers Near RF
RFI Problems and Solutions
Microcontrollers in a ham shack will generate RFI and will be susceptible to RF from your transmitter. Mitigation:
- Shielding: Put the microcontroller in a metal enclosure. A simple tin box works.
- Ferrite chokes: Every cable entering/exiting the enclosure gets a ferrite snap-on. Multiple turns through the ferrite is better.
- Decoupling: 100nF caps on every power pin, close to the IC. Add a bulk 100µF on the power input.
- Keep digital traces short: Long wires are antennas. Keep the microcontroller close to whatever it's controlling.
- Ground the enclosure: Connect to your station ground bus.
- Bypass on I/O pins: A 1nF cap from each I/O pin to ground suppresses RF ingress. May slow signal edges slightly — fine for relay control, not ideal for high-speed serial.
Power Supply
Don't power your microcontroller from a USB cable running across the shack — that cable is an antenna picking up RF from your transmitter. Use a local regulated supply or a ferrite-choked short USB cable from a nearby hub.
For ESP32 projects, a quality 5V/2A supply is essential. The Wi-Fi transmit draws 300-500mA peak — underpowered supplies cause brownouts and random resets.
Code Reliability
For projects that run unattended:
- Enable the watchdog timer (reboots if code hangs)
- Store critical settings in EEPROM/NVS (survives power loss)
- Add error handling on all I/O operations
- Log uptime and restart count to detect instability
Getting Started
If you've never programmed a microcontroller:
- Buy an Arduino Nano clone ($3-5 on AliExpress or Amazon)
- Install the Arduino IDE
- Blink the LED (the "Hello World" of hardware)
- Build a CW practice oscillator (paddle input → tone output)
- Add a display
- Graduate to your first real project
The learning curve is gentle if you take it step by step. And once you've built your first useful shack gadget, you'll see microcontrollers everywhere there's a problem to solve.
Reader field notes — share yours
Log in to share your field notes and photos.