fox-hunt-web

Pins

The fox is a Seeed XIAO ESP32-C3 wired to a NiceRF SA868. This firmware uses the dc34fox pin map as it is, and nothing here is configurable: the one build targets the one board. Two pads on the SA868 are not routed on the fox PCB, and each is one optional wire away from a page feature.

XIAO ESP32-C3, seen from the top, USB at the top

USB-C ESP32-C3 D0 · GPIO2 — free (strapping pin: leave it) D1 · GPIO3 — MIC: PWM tone into the SA868 D2 · GPIO4 — SQ wire (optional, pulled-up input) D3 · GPIO5 — PTT (low = transmit; held high) D4 · GPIO6 — PD (high = module awake) D5 · GPIO7 — H/L power select D6 · GPIO21 — UART TX → SA868 RXD (pin 16) 5V — from USB GND 3V3 D10 · GPIO10 — status LED D9 · GPIO9 — BOOT button (strapping) D8 · GPIO8 — free (strapping pin: leave it) D7 · GPIO20 — UART RX ← SA868 TXD (pin 17)

used by the firmwareoptional wirefree or power

Three pads are free: D0, D2 and D8 (D9 carries the BOOT button). D0 (GPIO2) and D8 (GPIO8) are ESP32-C3 strapping pins — their level at reset picks the boot mode, so anything hanging on them can stop the board booting or reflashing. D2 (GPIO4) is the only free pad with no job at reset, which is why the SQ wire goes there.

SA868, as the datasheet numbers it

NiceRF SA868 / SA868S · 1 W / 2 W FM transceiver module RF: pin 12 ANT → the fox's antenna connector 1Audio ON(SQ) 2NC 3AF_OUT 4NC 5PTT← D3 6PD← D4 7H/L← D5 8VBAT 9GND 10GND 11NC 12ANT 13NC 14NC 15NC 16RXD← D6 17TXD→ D7 18MIC_IN← D1

Pin numbers follow the NiceRF datasheet; where each pad physically sits on the fox PCB depends on the board revision, so find pins 1 and 3 on the silkscreen or by continuity to the module's edge before soldering. Pins 1–3 are unrouted on the current fox PCB, which is what makes them available.

The two wires

For the next PCB revision: a four-pin header — GND, AF_OUT (pin 3), MIC_IN (pin 18), 3V3 — and pin 1 (Audio ON) routed to D2. Then nothing here is a solder job: the header takes the sound-card cable for the page, or a plain earpiece (through 10 kΩ) for listening without any page at all, and the 3V3 pin can run a small amplified speaker. The transmit side's third wire, sound card out → pin 18 MIC_IN (for SSTV from the page), shares the same header; the firmware floats D1 while keyed in mic line mode so the two never fight.

WireFromToWhat it gives the page
AudioSA868 pin 3, AF_OUT (≈700 mV into 200 Ω)a USB sound card's line or mic input, through a 10 kΩ series resistor, with a groundThe CW decoder (the fox's Morse ID) and the SSTV decoder. No firmware involvement; also works from any receiver's speaker jack.
SQSA868 pin 1, Audio ON — the datasheet's name for the squelch output: it goes low while a signal opens the squelch, to switch on an external audio amplifierXIAO D2 (GPIO4), directly; the firmware enables the internal pull-upHardware-timed carrier edges (events), so the Next burst countdown is exact. Tick SQ wire soldered to D2 under Setup once; it is kept on the board. Firmware 0.4.0+.
The firmware never reads D2 until the wire is declared (sq on), so a fox without it behaves exactly as before. Declare it on the wrong fox and the page just sees a steady "quiet". The SA868's squelch setting (Receiver section) decides what counts as a carrier on that pin — at squelch 0 it is open all the time and the wire reports nothing useful.

Checking the wire

  1. Connect, tick SQ wire soldered to D2. The light beside it should read quiet with the antenna on a dead channel.
  2. Key a handheld nearby on the tuned frequency: the light goes carrier; unkey, it goes quiet. If it reads the opposite, the pad is active-high on your module — say so in an issue, the fix is one line in sq_poll.
  3. In the console, events prints now … and one line per edge since the last call. Start the receiver; after two bursts the hunt panel says "· SQ wire" next to the cycle.

H/L, a note for the transmit build

NiceRF's two documents disagree on pin 7: the SA868 datasheet says leave open for high power, low for low power; the SA868S product page says low or open for low power, high for high power, and never tie it to VDD or a CMOS high. The firmware drives D5 low for power low and high for power high, like dc34fox. Before trusting the Power dropdown on a real antenna, check which way your module goes with a power meter or a dummy load and a nearby receiver's S-meter.