Saturday, December 1, 2018

WSPR Weather Telemetry Beacon

Over the past few months I have been working on a simple weather station to transmit temperature and humidity data via HF Radio. I am using components I already had like an Arduino UNO, serial GPS, Adafruit Si5351 clock, etc.

The first version used JT65 and the JTEncode library with the telemetry encoded into the 13 character message field but I later decided to use WSPR after discovering a telemetry method described HERE and HERE. The key take away for me was the use of call signs starting with zero "0" or "Q". Since I just need to send temperature and humidity I will not be using the suggested more complex encoding method.

Normal WSPR Frame is:

<call sign> <grid> <dbm>

Example:

WA6PZB DM03 13          

My Telemetry Frame is :

<0A0hhh> <Rttt> <dbm>

Example:

0A0CEF RR20 13


I will fix the prefix of the call sign field to 0A0 (you could change the last digit for more channels if needed) then use the next three characters of the call sign for humidity and use the grid field for temperature. The data values will have only 3 significant figures and will be multiplied by 10 to remove the decimal point.

Humidity is encoded with the letters A to Z (A=1,B=2,C=3...,Z=0),  here are a few examples:

35.6 % = times 10 = 356 = CEF   full call sign becomes --> 0A0CEF
50.0% = times 10 = 500 = EZZ    full call sign becomes --> 0A0EZZ
80.3% = times 10 = 803 = HZC    full call sign becomes --> 0A0HZC

Temperature (in Celsius) is encoded with the first two digits using the numbers of the grid and the last digit as letters A to R (A=1, B=2,C=3..., R=0) as the second letter of the grid with the first letter fixed to  "R" since it is not needed , here are a few examples:

19.4 C = times 10 = 194 = D19    full grid becomes --> RD19
20.0 C = times 10 = 200 = R20    full grid becomes --> RR20
23.5 C = times 10 = 235 = E23    full grid becomes --> RE23


The full weather report will be two WSPR transmissions. The first is a normal message (for Identification) followed by the telemetry frame:

0200 7.040165 WA6PZB DM03 13        <-- Identification
0204 7.040165 0A0CEF  RR20 13         <-- Telemetry channel 0

This data can be extracted from the WSJT-X application log directory in the file WSPR_ALL.txt

As mentioned above you could have multiple telemetry channels and as long as you ID every 10 minutes you could fit several more channels. For example:

0200 7.040165 WA6PZB DM03 13 
0204 7.040165 0A0CEF  RR20 13        <-- Channel 0
0206 7.040165 0A1EZZ  RD19 13        <-- Channel 1
0208 7.040165 0A2HZC  RE23 13        <-- Channel 2

Hardware Description

The hardware consists of the Arduino UNO connected to a serial GPS receiver, an Si7021 temperature and humidity sensor and a Si5351 clock generator. The Si5351 generates approximate 10 mW to 20mW and when connected to a Low Pass Filter (LPF) like THIS it will produce a clean signal that can be heard for thousands of miles with a decent antenna. I originally tried a basic DHT11 temperature and humidity sensor but the libraries conflicted with the Si5351 library. The Si7021 sensor is more accurate and works well with the Si5351 and is on the same I2C bus since the default addresses are different.



Software Description

As normal the software took a bit longer. This projects uses multiple libraries and would not be possible without all those great people that built them for us to use (I am just standing on the shoulders of giants!). I am using TinyGPS which makes working with GPS strings simple and of course JTEncode to generate the WSPR messages. I did encounter some issues with decoding my early JT65 messages and came across KJ6FO's blog HERE that fixed my issue (and hair pulling) so I carried that over to the WSPR code as well. Basically I read the GPS and wait for the top of the hour, 10, 20, 30, 40, and 50 minutes past the hour and send my identification WSPR frame followed by my Telemetry frame. The code is far from optimized but it is working for me. I need to make some minor timing adjustments for the start of the first frame and between frames because I actually start processing before the actual times so that the time spent on checking the time and getting the sensor readings give me the lead time to end as close as I can to the exact second (we need to be within +/- 2 seconds).

My version 1.0 code is on Github -->  HERE. I included as many comments as possible to help me and anyone else working with it. I ran this with the Arduino 1.8.0 IDE along with the needed libraries. Just the call sign and grid will need to be changed to use it with the same hardware.


2 comments:

  1. Do you have this weather beacon deployed somewhere? How does it work?
    Inspired by the balloons sending modified WSPR, I've wanted to deploy something like this unattended in a far off grid location.

    ReplyDelete
  2. It’s not clear how negative temperatures are transmitted?

    ReplyDelete