The amateur radio Automatic Packet Reporting System (APRS) is typically used for position and weather reporting. It can also handle eight digital and five analog telemetry channels. The IoT Kits© solar-powered weather stations have four APRS analog telemetry channels for LiPo cell voltage, time awake, WiFi signal strength, and light intensity. Four digital channels are used for warning alarms: low cell voltage, low signal strength, and sensor failures.
Analog telemetry is transmitted as an 8-bit word, therefore, the analog signal must be mapped to a range of 0 to 255. A good example is the mapping of LiPo cell voltage in the range of 0 Vdc to 5 Vdc. The weather station simply scales the cell voltage by multiplying by a factor of 51. (51 = 255 / 5). For example, a cell voltage of 4.2 is sent as a byte value of 214 (214 = 51 * 4.2). The receiver must divide the byte value by 51 to interpret the cell voltage as 4.196 volts. Close enough!
How does the receiver know that it must divide by 51 to determine the voltage? Two approaches are possible: we can send the telemetry “blind” since WE know how to interpret it, or we can send instructions so that anyone can understand our telemetry. The IoT Kits weather stations use the second method by sending instructions every two hours so that APRS services such as aprs.fi can correctly plot our data.
It actually takes four messages to completely define the analog telemetry:
T – T is the APRS symbol for telemetry. It is followed by a three-digit sequence number. Earlier versions of the D1M-WX1 weather stations sent a sequence number from 000 to 999. Current versions send a number from 000 to 255.
PARM – Defines the name of the parameter. APRS limits the name to three to six characters depending on the particular channel. Vcell, RSSI, Light, etc.
UNIT – Defines the units for each channel with the name limited to 3 to 6 characters: Vdc, dBm, lux, etc.
EQNS – Each analog channel has a quadratic equation that tells listeners how to interpret the 8-bit value associated with each channel.
A quadratic equation is a polynomial of the second order. That means that it is a polynomial function in one or more variables in which the highest-degree term is of the second degree. APRS uses this quadratic equation to interpret the received telemetry data: a·x2 + b·x + c where x is the received byte value.
The EQNS message transmits the three coefficients of each quadratic: a, b, and c
For the Vcell channel, the EQNS message looks like this: 0, 0.01961, 0 meaning a = 0, b = 0.01961, and c = 0.
The receiver understands this to mean Vcell = 0·x2 + 0.01961·x + 0
The 0.01961 term is the reciprocal of 51 (0.01961 = 1 / 51). Multiplying by a number’s reciprocal is the same as dividing by that number.
Let’s try it with a byte value of 214 representing 4.2 volts:
Vcell = 0·2142 + 0.01961·214 + 0
Vcell = 0 + 4.196 + 0 = 4.196
This is exactly what we had planned! This is how engineering and applied mathematics work in the real world.
Here is a sample of telemetry definitions from a D1M-WX1 weather station: