Usage Monitoring of a UHF CB Repeater

| quozl@us.netrek.org | up |

2008-01-12

Update: changed the AA batteries in the UHF CB radio, again, last time. Plots below updated.

2008-01-06

Update: changed the AA batteries in the UHF CB radio.

2008-01-04

Update: the cumulative recording method was discarded in favour of resetting the counters each recording interval, and further scripts were written for plotting and totalling.

Some time spans were not sampled correctly, and these turned out to correlate to activity on the motion detecting camera. In the graph below the purple spots show the time between samples ... the gaps show were samples were not happening. The camera was turned off today, and the purple spots have stabilised.

Analysis of the data:

sample begins 1225492331 unix epoch seconds
sample ends 1226874781 unix epoch seconds
sample time 5529800 quarter seconds, or 384.014 hours
transmit time 118022 quarter seconds
receive time 4992905 quarter seconds
clipping time 22673 quarter seconds
total sample count 5133600 quarter seconds
transmit ratio 0.0229901
receive ratio 0.972593
clipping ratio 0.00441659
duty cycle 2.74067 %
nee01.log raw data file, each line represents a sample interval ending at the given time, values are UNIX epoch time in seconds, count of quarter seconds of transmit time, count of quarter seconds of receive time, count of quarter seconds of clipping which occurs as mute opens.

The current version of the data capture script:

#!/bin/sh
while true; do
arecord \
--period-size=2000 \
--rate 8000 \
--verbose --verbose --verbose \
/dev/null 2>/dev/null | \
awk 'BEGIN { crx = 0; ctx = 0; clp = 0; n = 0; }
{ st = systime(); pk = int($7);
  if (pk > 10) { if (pk > 99) { clp++; } else { ctx++; } } else { crx++; };
  n++; if (n > 1199) { n = 0; print st, ctx, crx, clp; ctx = 0; crx = 0; clp = 0; fflush(); }} '
done
2008-10-31

So the local ham radio club operates several radio repeaters around the outback, some of which are solar powered, and some powered by expensive electricity generated some distance away. We pay for that.

The repeaters are generally on the tops of mountains. Kinda difficult to get to for a quick check.

Question was, if the ham radio club had to convert a particular site to solar, how much solar panel power would be needed?

Well, we can estimate, if we knew how much the transmitter part of the repeater was being used. We know the transmitter emission power. What we don't know is how often it is used ... because amateur radio operators tend to avoid UHF CB frequencies just because they can. You can only listen to so much radio.

So Quozl builds a repeater usage monitor, using a spare handheld UHF CB connected to a laptop audio input.

Parts

(Design flaws that were discovered as part of the production testing ... flaws in this context are natural and expected, nobody is expected to generate a prototype with nothing wrong with it!)

Research

Glue

The following script was written:

#!/bin/sh
arecord \
--period-size=2000 \
--rate 8000 \
--verbose --verbose --verbose \
/dev/null 2>/dev/null | \
awk '
BEGIN { crx = 0; ctx = 0; n = 0; }
{
  st = systime();
  pk = int($7);
  if (pk > 10) { ctx++; } else { crx++; }
  n++; if (n > 1199) { n = 0; print st, ctx, crx; fflush(); };
}'
The arecord program is being used to record at 8000 samples per second, in 2000 sample chunks, but the audio output is being discarded to /dev/null, along with any error messages. The arecord output looks like this:

Max peak (2000 samples): 0x00000000 #                    0%
Max peak (2000 samples): 0x00000000 #                    0%
Max peak (2000 samples): 0x00000000 #                    0%
Max peak (2000 samples): 0x00000000 #                    0%
In the triple verbose mode, the arecord standard output stream consists of VU meter measurements, and these are processed by an awk script that counts the number of chunks that are silent, and the number that are not.

The cumulative counts are then displayed, along with the current time, every 1200 chunks, which since a chunk is a quarter of a second, this means every five minutes. The output is going to a file, which is flushed.

1225446807 0 1200
1225447107 0 2400
1225447407 0 3600
1225447707 0 4800
1225448007 0 6000
The result shows no activity for 25 minutes.

There is a flaw. It does not count silent audio transmissions, or the silences in a transmission. For that, some other means is needed.

There is another flaw. Because there is no AC coupling, opening of the squelch at the start of a transmission generates clipping for about a second. But this could be considered to be a useful feature ... if the clipping too is captured. Let's make a third column:

1225448986 0 1200 0
1225449286 0 2400 0
1225449586 0 3600 0
1225449886 24 4772 4
1225450186 24 5972 4
1225450486 24 7172 4
So, one transmission, consisting of one second of clipping and six seconds of non-clipping.


| quozl@us.netrek.org | up |