Tuesday, September 07, 2021

Simple WSPR Beacon using Si5351 and ESP8266 NTP for time sync

Wanting to play with a simple WSPR Beacon in the house where I can't receive GPS for time synchronisation, I've hacked together a beacon using an Si5351 oscillator and an ESP8266 board that joins my Wifi and gets the time from an NTP server.

Here's the rig:


It starts off by joining Wifi, then requests the time from time.nist.gov. Next it figures out how many seconds to wait before the next 2 minute slot and delays that long. The WSPR signal is transmitted followed by a 10 second delay before requesting the time again. Assuming the NTP server replies, WSPR transmission is every second 2 minute slot.

The Si5351 generates a square wave into 5cm of wire and there's massive hum on the signal presumably due to the USB power. Here's how it looks decoding off air:

I got this going using a WeMos D1 R2 board which is basically an ESP8266 on an Arduino style board. I tried to use an ESP32 but for some reason (possibly power voltage) I couldn't get it to talk to the Si5351 although it could see it on the I2C bus.

Just a toy really but might be useful for something. The source code is here.

I'm using Arduino 1.8.15 and the following libraries are installed:

  • Etherkit JTEncode 1.3.1
  • Adafruit Si5351 1.2.1
  • Other libraries for UDP were bundled with the board, in my case LOLIN(WeMos) D1 R1

6 comments:

caulktel said...

Thanks for this Peter. I gave it a try as I had all the parts in my shack, it works great, (I think),I've never done any WSPR stuff before. I left the frequency set to what it was in your sketch, 7.038.600 which appears to be correct but it shows on the frequency counter to be 7.040 which I think is right. I need to do more research. BTW, one of the contributors to the library for this is an old friend from Portland Oregon, Jason NT7S in fact I'm using one of his Si5351A breakout boards to test with. I think I will build a small LPF and put this on the air to see if anybody hears it.

Joel
N6ALT

Peter Marks said...

Thanks Joel,

My Si5351 was a fair way off frequency so I had to tweak it to get within the band.
Great that you know Jason, he is a legend.

73
Peter

caulktel said...

I just checked and got six spots, so it must be working!

Joel
N6ALT

Peter Marks said...

Great to hear that!

Unknown said...

Thats a neat project. Could you fit this code into an ATMega328? I tried this, using Jason's JTEncode library, but couldn't make it fit memory. Just a thought! VK3HN.

Peter Marks said...

Paul, I will try and let you know.