Remote DATV station parameters monitoring (PART 1)

Many of us have their final stage DATV amplifier installed very close to the dish to reduce to a minimum the inherent RF losses in the transmission line.

At the same time, many of us would like to nevertheless have the possibility to continuously monitor different parameters such as currents, voltages, temperatures, forward, and reverse power, etc. from their shack.

This is my case, and as a first approach, I developed a solution consisting in a mini standalone webserver using an ESP8266 module (low-cost Wi-Fi microchip, with built-in TCP/IP networking software, and microcontroller capability), together with INA219/INA226 current/voltage monitoring modules, and DS18B20 1-Wire digital temperature sensors.

With this it was possible to monitor in real time Currents, Voltages, and Temperatures on responsive webpages (with a dedicated one to be used as an overlay in OBS).

Everything was working fine until I went to air.

Why? I just forgot that when broadcasting to OSCAR, we are working within the same frequency range as Wi-Fi, so that my ESP module was randomly no longer accessible due to RF “leakages” of my experimental transmission equipment.

To overcome this inconvenience keeping the idea of monitoring my station remotely in wireless mode, I started to carry out some trials using so called HC-12 module.

The HC-12 is a 100mW half-duplex wireless serial communication module with 100 channels in the 433.4-473.0 MHz range that can transmit up to 1 km according to “AliExpress” specs.

This page describes my first trials using an Arduino Nano at one end (data acquisition side), and an old Raspberry PI at the other end (in the shack for receiving & processing the data).

Arduino Nano & HC-12 module on data acquisition side. Raspberry Pi 2011 & HC-12 module on monitoring side

First Trials

This first trial consists in sending a set of variables at 1 second intervals from the acquisition side to see if they can be retrieved at the monitoring side.

Arduino Sketch

#include <SoftwareSerial.h>;
#define RX 2 //Connect to the TX pin of the HC-12
#define TX 3 //Connect to the RX pin of the HC-12
SoftwareSerial HC12_Serial(RX, TX);

// define variables
String packet;
int temperature_ambient;
int temperature_heatsink;
int temperature_other;
int voltage_5V_Line;
int amperage_5V_Line;
int voltage_12V_Line;
int amperage_12V_Line;
int voltage_28V_Line;
int amperage_28V_Line;
int PTT_Relay_status;
int other_parameter_1;
int other_parameter_2;
int other_parameter_3;

void setup() {
  Serial.begin(115200);    // just for monitoring on console
  HC12_Serial.begin(9600); // this will coresspond to a wireless transmission in the air of 15,000bps
  // higher baud rate would reduce the communication distance

void loop() { // run over and over
  // Assigning Random values to the variable
  temperature_ambient = random(100, 350);
  temperature_heatsink = random(100, 450);
  temperature_other = random(0, 1000);
  voltage_5V_Line = random(0, 300);
  amperage_5V_Line = random(0, 300);
  voltage_12V_Line = random(0, 300);
  amperage_12V_Line = random(0, 300);
  voltage_28V_Line = random(0, 300);
  amperage_28V_Line = random(0, 300);
  other_parameter_1 = random(0, 1000);
  other_parameter_2 = random(0, 1000);
  other_parameter_3 = random(0, 1000);
  PTT_Relay_status = random(0, 1);

 // Contructing packet with delimiters
  packet = "X|" + String(temperature_ambient) + "|";
  packet = packet + String(temperature_heatsink) + "|";
  packet = packet + String(temperature_other) + "|";
  packet = packet + String(voltage_5V_Line) + "|";
  packet = packet + String(amperage_5V_Line) + "|";
  packet = packet + String(voltage_12V_Line) + "|";
  packet = packet + String(amperage_12V_Line) + "|";
  packet = packet + String(voltage_28V_Line) + "|";
  packet = packet + String(amperage_28V_Line) + "|";
  packet = packet + String(other_parameter_1) + "|";
  packet = packet + String(other_parameter_2) + "|";
  packet = packet + String(other_parameter_3) + "|";
  packet = packet + String(PTT_Relay_status) + "|";
  packet = packet + "X\n";

  Serial.print("Sending Packet "); Serial.println(packet);
  delay(2000);  // packet intervals in ms, will be shortened at a later stage
Module is successfully sending packets on 433 Mhz

Python Code on Raspberry Side

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import serial
import time

ser = serial.Serial(
    timeout=1  # seconds     # <-- HERE

while 1:
    packet = ser.readline().decode()[:-1]
    print("Received Packet:", packet)
    print("Checking Integrity (Should Start with 'X|' and end with an '|X' ")
    if packet[:2] == 'X|' and packet[len(packet) - 2:] == '|X':  # good packet
        print("Packet seems Good, let's decode it")  # very basic way to check packet integrity not involving a ckecksum
        split_packet = packet.split("|")
        print("Split packet with delimitator '|'    -->    ", split_packet)
        print ("Decoded Values")
        print ("--------------")
            temperature_ambient = int(split_packet[1])/10
            temperature_heatsink = int(split_packet[2])/10
            temperature_other = int(split_packet[3])/10
            voltage_5V_Line = int(split_packet[4])/10
            amperage_5V_Line = int(split_packet[5])/10
            voltage_12V_Line = int(split_packet[6])/10
            amperage_12V_Line = int(split_packet[7])/10
            voltage_28V_Line = int(split_packet[8])/10
            amperage_28V_Line = int(split_packet[9])/10
            other_parameter_1 = int(split_packet[10])/10
            other_parameter_2 = int(split_packet[11])/10
            other_parameter_3 = int(split_packet[12])/10
            PTT_Relay_status = int(split_packet[13])
            print("Temperature_ambient:", temperature_ambient)
            print("Temperature_heatsink:", temperature_heatsink)
            print("Temperature_other:", temperature_other)
            print("Voltage_5V_Line:", voltage_5V_Line)
            print("Amperage_5V_Line:", amperage_5V_Line)
            print("Voltage_12V_Line:", voltage_12V_Line)
            print("Amperage_12V_Line:", amperage_12V_Line)
            print("Voltage_28V_Line:", voltage_28V_Line)
            print("Amperage_28V_Line:", amperage_28V_Line)
            print("Other_parameter_1:", other_parameter_1)
            print("Other_parameter_2:", other_parameter_2)
            print("Other_parameter_3:", other_parameter_3)
            print("PTT_Relay_status:", PTT_Relay_status)
            print("Error in packet")
        print("Bad packet, we ignore and continue")
Packets are received all in good order and can also be decoded

Success!! Tansmitter was loacted in the garden at about 100 meters from the shack.

Next Step: integrate current, voltage, and temperature sensors on Arduino side

Go to PART 2