A Windows receiver for a GPS-locked optical beacon. It turns a low-cost USB soundcard into a GPS-timed, coherent receiver with a spectrum and waterfall display, a precise carrier measurement, a built-in EbNaut decoder and automatic Q65 decoding.

The beacon
The beacon is a light source modulated with audio tones. Its timing comes from GPS: a u-blox module’s timepulse output runs at 8 MHz and clocks an STM32 “Blue Pill” board, which generates the tones. Because everything is derived from GPS, the beacon’s frequency is as accurate as the GPS itself.
The Blue Pill makes each tone by toggling its output pin on timer compare matches. The time to the next edge is held as a 32.32 fixed-point count, with the fraction carried from edge to edge. So the average frequency is exact, not just the nearest whole timer count, and tone changes are phase-continuous. The receiver now measures the carrier at 2010.0000 Hz.
It sends three modes around 2010 Hz:
| Mode | What it is | In OpticalBeaconRx |
|---|---|---|
| Carrier | A plain, steady tone | Measured to a fraction of a millihertz, with S/N in 1 Hz |
| EbNaut | Very slow phase-modulated text, built for very weak signals | Decoded |
| Q65-300A | A slow WSJT-X digital mode: 85 symbols of 3.456 s, about 4 min 54 s per message, sent every 10 minutes | Decoded every 5-minute period using WSJT-X’s jt9 on GPS-timed audio |
A Raspberry Pi switches the Blue Pill between steady carrier and Q65. The Q65 message starts when the GPS time reaches a whole ten minutes.
The problem it solves
EbNaut sends a short text message as very slow phase changes on a single tone, here at 2010 Hz with 2-second symbols, so one message can take 20 minutes. To decode it the receiver has to keep track of the tone’s exact phase for the whole message.
A normal soundcard can’t do that alone. Its sample clock is typically tens of ppm out, so its idea of “2010 Hz” drifts by around a tenth of a hertz, and over 20 minutes the phase spins round many times. The Behringer UCA222 used here takes its sample clock from the USB bus, which also wanders slightly from moment to moment. OpticalBeaconRx fixes both by timing every second of audio against a GPS receiver at the receiving end too.
How it is connected
Three things plug into the PC: the optical receiver’s audio into the UCA222’s left channel, the GPS pulse-per-second (PPS) into the right channel through a resistor divider, and the GPS module’s serial data into a USB serial adapter.

The divider drops the GPS module’s 3.3 V pulse to a few hundred millivolts so it doesn’t overload the line input. The optional 470 nF capacitor turns the pulse into a smooth hump for centroid timing.
| Connection | From → to | What it carries |
|---|---|---|
| Signal | Optical receiver audio → UCA222 left | The beacon tones near 2010 Hz, plus noise |
| PPS | NEO-6M PPS → 10 kΩ / 1 kΩ divider → UCA222 right | A pulse at the start of every UTC second |
| NMEA | GPS TX → adapter RX, adapter TX → GPS RX | Date and time of each second, fix status; module identification and setup |
The second serial wire (adapter TX to GPS RX) only matters for sending commands, such as “Detect module” or setting the u-blox pulse width. Receiving NMEA needs just GPS TX.
How it works
Everything happens in software, in this order, as the audio arrives.
- Capture the audio untouchedThe soundcard is opened as a Windows “raw” stream. This skips Windows’ audio enhancements, such as automatic gain and noise suppression, for this program only. Those effects would otherwise reshape the PPS pulse and disturb the tones.
- Find each PPS pulseBefore detection, an adaptive filter removes any beacon audio that has leaked across from the left channel into the right. In the default edge mode, the program learns which way the pulse goes and times its leading edge to a fraction of a sample. In centroid mode, the way vlfrx-tools does it, the pulse is first smoothed by the RC filter and then timed by its centre. Every sample of the hump then counts, which gives sub-microsecond timing.
- Label it with UTCThe NMEA sentence that arrives just after each pulse says which second it was. Now every pulse has an exact UTC time, and the number of samples between pulses gives the soundcard’s true sample rate.
- Smooth the timingA USB soundcard’s clock wobbles by a few microseconds. Each second is placed using a straight-line fit through the pulses 15 seconds either side, which averages that wobble away.
- Resample and mix downThe left channel is resampled onto exact UTC time, then mixed with a 2010 Hz reference whose phase is also tied to UTC. What’s left is a slow “baseband” signal, 100 values a second, in which a perfect GPS-locked tone would sit still.
- Store and recordThe baseband is kept in memory, which is only a few megabytes per hour, and written to disk in 15-minute files. So a message can be decoded straight away, decoded later, or decoded again with different settings.
- Decode EbNautFor a decode, the baseband is summed over each 2-second symbol, the reference phase is found, and a soft-decision Viterbi decoder recovers the most likely message. If its checksum fails, list decoding tries the next most likely messages, which gains about 2 dB on weak signals.
- Decode Q65Alternatively, the GPS-timed audio is filtered down to 12 kHz and cut into exact 5-minute periods starting on UTC boundaries. Each period is handed to WSJT-X’s jt9 decoder, and its messages appear alongside the EbNaut decodes.
Why the GPS timing matters
Timing errors turn straight into phase errors on the tone. At 2010 Hz one microsecond is 0.7° of phase. A raw 48 kHz soundcard edge is only good to a fraction of a 20.8 µs sample, and the UCA222’s USB-derived clock wanders by tens of microseconds, so without the GPS and smoothing the phase would jump around by tens of degrees. With GPS at both ends, transmitter and receiver share one timebase, so the received carrier sits still and can be integrated for minutes.
+0.8 ppmsoundcard sample rate error, measured
≈1 µsPPS edge jitter, edge mode
0.4 µscentroid jitter in simulation, RC-shaped pulse
±5°carrier phase over a 20-minute message
On the air
With the corrected transmitter, both decoders work on the real optical path:
| Mode | Result |
|---|---|
| EbNaut, 8K19A | Messages decoded, Eb/N0 at 18 dB, phase steady to ±5° |
| Q65-300A | M0DTS IR850 decoded at -29 dB (WSJT-X scale) with df +0.0000 Hz, carrier 2010.0000 Hz |
WSJT-X reports S/N against the noise in a 2500 Hz bandwidth. The optical signal is about 40 dB above the noise in 1 Hz, which only reads as 10–20 dB on that scale.
Using it
Pick the soundcard and the GPS serial port and press Start. Within about 20 seconds the status bar should show PPS LOCKED and the UTC time. In the Decoder area, tick EbNaut or Q65.
- EbNaut: set the decoder to match the transmitter (carrier, symbol period, number of characters, code) and the start time. Then press Decode at or after the end of the message; pressing it early pads the rest. A Decode quality tab plots the signal’s level, phase and S/N through the message.
- Q65: decodes automatically about half a minute after each period ends.
The spectrum can be decimated around the carrier, down to sub-hertz spans, and zoomed with its +/− buttons. “Show full band” adds a 0 to 24 kHz strip above it.
The PPS scope tab triggers on each pulse and overlays the last eight pulses in a close-up. A clean, repeatable pulse once a second, well above the dashed line, is what it needs.
With no GPS connected (port set to “none”) it still runs, using the PC clock and the soundcard’s nominal rate. That’s good enough for monitoring and Q65, but not for long EbNaut messages.
Sources
- EbNaut, the coding scheme and the original encoder and decoder, by Paul Nicholson. OpticalBeaconRx’s coding layer (character set, CRC, convolutional codes, interleaver, list decoding and amplitude normalisation) is a port of ebnaut.c v1.1.
EbNaut software page and source (ebnaut.c) - vlfrx-tools, also by Paul Nicholson: the established way to record GPS-timestamped audio with a PPS on a spare soundcard channel. OpticalBeaconRx uses the same idea, including centroid timing of an RC-shaped pulse.
vlfrx-tools - WSJT-X by Joe Taylor K1JT and the WSJT development group: the Q65 mode and the jt9 decoder that OpticalBeaconRx runs for it.
wsjt.sourceforge.io/wsjtx.html - NAudio by Mark Heath, used for soundcard enumeration on Windows; capture uses WASAPI directly in raw mode.
github.com/naudio/NAudio - GPS module protocols: NMEA 0183 sentences for time and fix, plus each maker’s own identification command (u-blox UBX MON-VER, MediaTek $PMTK605, CASIC $PCAS06, SiRF $PSRF125). The u-blox pulse width is set with UBX CFG-TP5.
OpticalBeaconRx 1.1 is written in C# (.NET 8, WinForms). It decodes the same message format as ebnaut.
Download Zip: