| | | |

Building a Fox Keyer with ESP32 and React – Because Sometimes You Need a Robot to Send Morse Code

Fox Keyer v2.0 – Automated Morse for Lazy Fox Hunters

I’ve been tinkering in the garage again, and this time I built something that’ll make your fox hunting buddies jealous. Meet Fox Keyer v2.0 – an ESP32-powered automated Morse code transmitter that’s more reliable than my old radio and twice as fun to build.


What the Heck is Fox Hunting Anyway?

For those who aren’t familiar, amateur radio “fox hunting” is where we hide transmitters (the “foxes”) and folks try to track them down using radio direction finding. It’s like hide-and-seek for grown-ups with engineering degrees.

Problem is, somebody’s gotta sit by that transmitter sending Morse code every 30 seconds for hours. That gets old real quick, especially when it’s hot outside and you’d rather be doing literally anything else. So naturally, I thought “there’s gotta be a robot for this.”


The Brain of the Operation


ESP32 Development Board
ESP32: Small, cheap, and smarter than you’d expect.
  • Generates precise Morse code timing
  • Hosts its own WiFi network for configuration
  • Serves up a slick modern web interface
  • Remembers settings across power loss

I picked the ESP32 for its dual-core setup – one handles web tasks, the other keeps Morse timing tight.


The Circuit – Simple but Effective


Fox Keyer Schematic
Schematic for the final build – cleaner than my workbench.

Field Testing

The PTT Version


PTT Circuit on Breadboard
Prototype PTT version on a breadboard. Ugly, but effective.

The Software – Two Parts, One Brain

ESP32 Firmware (The Workhorse)

// This runs on Core 1 - dedicated to Morse timing
void transmitterLoop(void *pvParameters) {
  while (true) {
    if (isTransmitting) {
      if ((now - lastPlay) >= (currentInterval * 1000UL)) {
        playMessage();
        lastPlay = millis();
        currentInterval = getNextInterval();
      }
    }
    delay(100);
  }
}

One FreeRTOS task runs on Core 1 for CW precision; Core 0 handles the WiFi and UI.

React Web Interface (The Pretty Part)


Dashboard Screenshot


Features That’ll Make You Grin


Settings Breakdown

Message Configuration

  • Messages 1–5: Define up to five Morse code messages to be sent in rotation. These should include your callsign to comply with ID regulations.

Transmission Parameters

  • Speed (WPM): Controls the Morse code speed in words per minute. Beginners usually stick to 5–15 WPM; advanced ops can crank it up to 40.
  • Tone Frequency (Hz): The pitch of the Morse audio tone. Most radios are clearest between 600–800 Hz.

Carrier Tone Settings

  • Enable Carrier Tone: Sends a brief tone before each message. This helps trigger VOX or PTT circuits on some radios, especially HTs.
  • Carrier Tone Duration (ms): Duration of the tone in milliseconds. Typical values range from 300–1200ms depending on your radio’s VOX response time.

Timing Configuration

  • Interval Mode: Choose between a Static Interval (same delay every time) or Random (adds variety for realism during fox hunts).
  • Interval Between Messages (seconds): Base delay between message transmissions. Can be set between 10–60 seconds typically.

Safety & Compliance Support

  • Maximum Active Time (minutes): Prevents the system from transmitting indefinitely by setting a hard cutoff time. Required by many regulations.
  • Operator Responsibility Notice: Reminder that while the device supports compliance, the operator is ultimately responsible for legal use.
  • Regulatory Reminders:
    • Station Identification: Ensure call signs are included per FCC/ITU rules.
    • Time Limits: Follow local rules on unattended transmissions.
    • Power Limits: Match your transmitter power output to legal guidelines.
    • Band Plans: Stay within legal CW subbands.
    • Third Party Traffic: Don’t transmit messages for others unless explicitly allowed.

The Build Process

Step 1: Build the Circuit

6 parts, an hour, and a messy bench – you got this.

Step 2: Flash the ESP32

Use Arduino IDE or Platform.IO. Don’t forget the SPIFFS data upload!

Step 3: Configure and Test

Connect to FOX-KEYER WiFi, visit fox.local, and you’re off to the races.


Performance in the Field

Ran this for 12+ hours on a power bank. Rock-solid CW timing. Random mode adds challenge. Works like a charm.


What’s Next?

  • GPS logging
  • Band-specific frequency configs
  • Hardware buttons for field use
  • Solar charging for marathon deployments

Parts List

Electronics

  • ESP32 dev board
  • 2N2222 NPN transistor
  • 330Ω resistor
  • 470Ω resistor
  • 0.1µF and 100µF electrolytic caps
  • Perfboard or breadboard
  • Connectors for power/audio

Tools

  • Soldering iron
  • Wire strippers
  • Multimeter
  • Computer with Arduino IDE or Platform.IO

Code & Docs

Fox Keyer v2.0 – GitLab Project

MIT licensed. Tweak it, sell it, teach with it. Just don’t blame me if it makes your fox too sneaky.

Fair warning: You’re still responsible for legal operation. Include your callsign. Don’t be that guy.


Technical Details

Architecture

  • Dual-core: Web + timing split across cores
  • FreeRTOS: Timing on dedicated task
  • Persistent config: Stored in flash
  • Async web: Snappy and non-blocking

Web Interface

  • React: Clean and modular
  • Bootstrap: Mobile-friendly layout
  • Polling: Real-time updates
  • REST API: Neatly separated backend

Bottom Line

This thing is smarter than it has any right to be. More fun to build than most commercial rigs, and it’s wide open for modding.

Think my code stinks? You’re probably right. But it works. Now go build one and make your own version better.

73,
AJ3JA

Check out more fun builds at soldercode.dev

Fox Keyer v2.0.1 – Because manual CW is for people with too much free time.

Similar Posts