building a telecom Transmission Impairment Measuring Set (TIMS) with arduino nano III

Telecom frequency generator and counter using arduino nano
Telecom frequency generator and counter using arduino nano

I have a working hand-held arduino based telecom test set made out of a plastic capacitor kit case.  It generates audio frequency tones from 0-3000 Hz.  The tone() function produces  audio frequencies at about -9.5dBm from what I have observed.  That level is very useful to my for my intended purposes.  I also need it to generate tones at a level of -16dBm.  To achieve this,  I put a selector switch to attenuate the level to -16dBm by putting the output of the tone() pin in series with 30K Ohms of resistance.

It measures the frequencies that it generates in TX mode, but also measures frequencies from other devices from it’s RX port.   The RX port must have a level of -3dBm or greater to work at this time.  I will be experimenting with an amplifier stage to measure weaker signals.

Arduino telecom frequency counter and generator
Arduino telecom frequency counter and generator
Schematic of telecom test set using arduino nano
Schematic of telecom test set using arduino nano

building a telecom Transmission Impairment Measuring Set (TIMS) with arduino nano II

arduino nano frequency counter
arduino nano frequency counter

I have considered several design possibilities for myTIMS project.  I was going to use the TimerFreeTone library because of the timer conflict between tone() and the FreqCount library, and have the user type in the desired frequency using a keypad.  I do not have enough GPIO on my nano for this as I need 6 pins for my LCD and seven for my 4-column 3-row keypad.  (I know I could get an i2c display, but I’m using what I have laying around!)

Anyway, the two nano approach is acutally looking better.  I am using one nano to generate the desired frequency when the TIMS is in transmit / generate mode.  I am using a 10-K potentiometer to tune to the desired frequency and basically copied and pasted the tonePitchFollower example sketch with a few modifications.  The other nano does the frequency counting and drives the LCD.  As you can see above, the nano frequency counter is only off by 1 Hz from a professional TIMS.

Here is the frequency counter sketch ->

     
     1	#include \<FreqCount.h\>
     2	#include \<LiquidCrystal.h\>
       
     3	const int rs = 12, en = 11, d4 = 10, d5 = 4, d6 = 3, d7 = 2;
     4	LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
       
       
     5	void setup() {
     6	  lcd.begin(16, 2);
     7	  lcd.print("Freq:");
     8	  FreqCount.begin(1000);
     9	}
       
    10	void loop() {
    11	  if (FreqCount.available()) {
    12	    unsigned long count = FreqCount.read();
    13	    lcd.setCursor(0, 1);
    14	    lcd.print(count);
    15	    lcd.print(" Hz       ");
    16	  }
    17	}
       

building a telecom Transmission Impairment Measuring Set (TIMS) with arduino nano I

telecom transmission impairment measurement test set
Ameritech AM-48 telecom transmission impairment measurement test set

SO MUCH has changed in the telecom world over the course of my 20-year career.  Back in the day, we had monstrous Fujitsu PBX’s with dozens of 50 – 100 pair copper cables snaking through our buildings and across our campuses  that were punched down and cross-connected to workstation cables that ended up at a clerk’s telephone.  VoIP has long since replaced this paradigm.

Not only that,  I worked on an analog 6Ghz microwave system that multiplexed hundreds of analog circuits on an archaic concept called the ‘baseband’ which consisted of amplitude modulated channels (using either upper or lower sideband)  that modulated the 6GHz carrier.

A totally indispensable piece of test equipment at that time (in addition to my frequency selective volt meter) was the TIMS set (transmission impairment measurement test set).

It is mostly used for generating / measuring audio frequencies at a precise dBm level.  In today’s world where copper cable is an increasingly  unused medium for data / voice transmission,  and older analog technologies (such as land line phones) are migrated to IP,  new TIMS sets are getting harder to find. Most I can see are refurbished.

In spite of all the changes over the years,  I still need a TIMS set for various analog FSK  systems that I work on.  In particular,  I still have many 300 baud and 1200 baud (202t) systems in wide deployment, so measuring VF frequencies and their levels  is essential to maintaining theses systems.

Anyone familiar with the arduino’s ‘tone’ function knows how incredibly easy it is to generate a variable audio frequency tone (a great demo is the included ‘tonePitchFollower’ program in the examples included in the IDE).  That is half of the TIMS set.  For the frequency counter side of the TIMS,  I found an awesome library called FreqCount.  It works great, and compares well to my professional TIMS set.  However, when I try to use ‘tone()’ and FreqCount together, I get a nasty message when I try to compile:

Multiple libraries were found for "TimerFreeTone.h" Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
error when using tone() and FreqCount.cpp

The problem is a conflict using ATMega328’s timer 0.  Bottom line is that you cannot use FreqCount (awesome) and tone() at the same time.  I could use two nano’s:  one to do the TX and one to do the frequency counting.  However, I found the TimerFreeTone library.   I am experimenting with it, and it may suit my needs.  Not as accurate as tone(),  but it might be ok for what I am doing.  I am in the bread boarding stage right now, and hope to have more to show soon.

experimenting with a DHT11 temperature & humidity sensor with perl and raspberry pi zero w

using perl and a pi zero to interface with a dht11 temperature and humidity sensor
using perl and a pi zero to interface with a dht11 temperature and humidity sensor

I personally think that the raspberry pi zero w is the best choice for data logging projects.  You can use any programming language,  file IO is siimple,  it’s easy to send your data to the cloud, and best of all: it is very inexpensive.  For example an adafruit feather M0 is $20, and you are restricted to programming in C.

I am developing a data logging project that will use a dht11 temperature + humitidy sensor to measure the effects of temperature and humidity on the RF propagation of a 900MHz radio system.  The dht11 will log the temp / humidity, and I will measure the RSSI (received signal strength indication)  with an MCP3004 analog to digital converter.  The rssi is rendered as a DC voltage; the higher the voltage, the greater the signal strength.  Frequencies at 900MHz are highly susceptible to moisture in the atmosphere and I want to analyze the effect of humidity on the rf path of this radio system .

Im in the beginning stages, and just getting started with the dht11.  I am using the  awesome RPi::DHT11 cpan module by Steve Bertrand.

#!/usr/bin/perl -w
use strict;
use RPi::DHT11;

my $env = RPi::DHT11->new(18);

for(my $i=0;$i<20;$i++){ print "sample $i\t"; my $temp = $env->temp('f');
	my $humidity = $env->humidity;

	print "temp: $temp\thumidity: $humidity \n";
	print "----------------------------------------------\n";

	sleep(2);
}#end for

Can’t get much easier. This script samples the dht11 every 2 seconds and prints the results to STDOUT.

dht11 perl script output
dht11 perl script output

When the pi drives the output line of the dht11 low for 20ms, it outputs a 40-bit data string that contains the readings (most of the time).

dht11 communications process
dht11 communications process

Here is a close up of the process using PulseView.

dht11 40-bit data
dht11 40-bit data

And here is a close up of the data above:

dht11 40-bit data close up
dht11 40-bit data close up