I’ve been having fun testing my data radio system over the air for the first time. This involved a few false starts, careful testing, tracking down a few bugs, and tuning the system to handle local EMI and strong pager signals. The good news is – it works! Using 10mW of transmitter power I have established a 1 kbit/s link over a 15km urban path using a RpiTx transmitter and RTL-SDR receiver. Plus lots of software.
My aim for this phase of the project was: don’t expect miracles with 10mW, but it should work down to the predicted Minimum Detectable Signal (MDS) over real world urban paths.
The configuration was similar to the previous post:
Terminal 1 (T1) uses a HackRF Tx and RTL-SDR Rx. Instead of a T/R switch I just use a hybrid combiner. I’ve also added a small “PA” to boost the HackRF signal to 10mW. Terminal 2 (T2) is the prototype pirip terminal. This uses a RpiTx transmitter (10mW output after the low pass filter), and RTL-SDR receiver, and a home made T-R switch.
I installed T2 at my home, connected to a vertical dipole about 8m high via some low loss coax. I installed T1 in my car with a commercial 2m antenna, and took it mobile so I could try to establish a link from various sites.
The frame repeater service on T2 allows me to “ping” it from T1. T2 responds to any valid packet it receives and sends one right back to T1. The system also gives me signal and noise power estimates from both ends of the link. I worked up some maths to estimate the Rx signal power in dBm from the FSK detector output. This lets me monitor received signal levels – and the local noise floor (noise spectral density) in real time.
So off I went for a drive, pinging away at 10 kbit/s. However the system was a bit deaf, I couldn’t get further than 500m before losing the signal. Even given a non line of sight path, that didn’t feel right. I tried reducing the data rate to 1 kbit/s. This was a bit better, out to 1.5km if I chose my location carefully. However the reported receiver powers didn’t look right, and I could see a big difference in the sensitivity at the two ends of the link.
Over the Cable Tests
A radio system has a lot of moving parts. A lot can go wrong, and when you do over the air tests it’s really hard to spot the problems. So I’ve learnt to perform Over the Cable (OTC) tests first. The basic idea is you connect the Tx and Rx via coax and enough attenuators to reduce the Rx power down to the predicted MDS. You keep working through the bugs until it works at the MDS.
So I took T1 and T2 back to the test bench to perform a bi-directional MDS test. At 1 kbit/s, this system should have a Minimum Detectable Signal (MDS) of -132dBm. I placed the two terminals in different rooms, and connected them via coax and lots of attenuation. The usual fun and games occurred, it’s quite hard to attenuate even 10mW (10dBm) down to -132dBm without some RF leaking around the attenuators.
The RF from the Pi was particularly hard to contain. I think it’s pretty poorly coupled into the coax, so the coax shield and Pi itself radiates a lot. So I installed T2 into a metal box, powered it from a battery, and provided just one hole for the SMA connector. With the lid firmly screwed down, this formed a nice Faraday cage.
That helped, I could now attenuate the signals right down to -132dBm. However T2 was quite deaf – about 8dB off theory. I traced this to EMI from the Pi getting into the antenna switch, which was stuffed into the box close to the Pi. To fix this I built a little shielded box from PCB material for the switch. Yayy – now both ends of the link were behaving, with packets getting through right down to the MDS of -129dBm for T1 and -132dBm for T2. T1 is 3dB less sensitive as it has a hybrid splitter instead of a T/R switch. This means the Rx signal is attenuated by 3dB before it hit’s the LNA of the RTL-SDR.
I found another problem that was making the system deaf. When T1 transmits a packet, some of that transmitted signal leaks through the hybrid to the T1 receiver. Turns out the leakage is really quite strong, and is enough to make the FSK demodulator deaf to any off air signals for the next few hundred ms. So T1 becomes deaf to the weak replies from T2. This is due to some averaging code in the FSK demod frequency offset estimator that gets “pumped up” to the mean received level. The work around was to put a delay in the T1 frame repeater service. When it receives a packet from T1, it waits a second before sending back the reply. This is not a practical solution for a real world use, so I’ll need to have another lap around the acquisition code in the near future. However good enough to let me proceed with the aims of the current round of tests.
Urban RF Nasties
My receiver has a fixed gain, set by the “-g” parameter on the RTL-SDR. A high gain means a low noise figure, but makes the receiver prone to overload. I hooked my antenna up to my spec-an and could see two problems that would impact my experiments:
- A very strong signal: -22dBm on 148.33 MHz, I think a pager from a multi-story hospital just 700m away.
- A lot of noise – the antenna “noise” temperature was equivalent to a noise figure of 20dB. I presume this is urban EMI. That really sucks, as it’s a big hit to my link budget. At the input to the RTL-SDR at full gain we have a 6dB noise figure. Added to that LNA noise is now the urban EMI that is 20-6 = 14dB higher. So the urban EMI will dominate, meaning roughly 14dB off my link budget, the equivalent of dropping my MDS from -132 to -118dBm.
I hooked up my antenna to my RTL-SDR and fired up gqrx to get a feel for what the RTL-SDR was “seeing”. Sure enough at full gain it was suffering a lot of overload problems when that pager fired up. I could actually listen to a local AM radio station quite clearly, that was being mixed up to VHF by the overload distortion. I could also see the level of a beacon being shifted down when the pager transmitted, a sign of receiver desensitisation. So I backed off the RTL-SDR gain to “-g 40” for T1 and T2. Based on my earlier measurements this means a RTL-SDR noise figure of 11dB. Note that at the T1 end (installed at my home), the urban EMI noise from the antenna (20dB) dominates, so the receiver noise figure doesn’t matter much. We would expect a MDS of around -118dBm.
So I hopped in my car and went mobile again. The system was breathing a little easier now. I parked at a few places around my suburb and by moving the car back and forth a few metres could often find a place where multipath worked for me and establish a link. However at these power levels I really need a line of site path, and where I live is quite flat. So I drove across town to the hills that overlook Adelaide. I started the system “pinging” from my car and sure enough I found a few spots that have a clear view over the plain and the link came up at a range of 15km!
Now 15km at 144MHz is a very neat 100dB attenuation over a line of site path (assuming 0dB gain antennas). So we would expect +10dBm-100dB = -90dBm at the receiver. Here is the log from my ping service:
1634971678 Rx Frame Rxloc: -116.08 Noloc: -157.56 snrloc: 11.48 Rxrem: -115.22 Norem: -153.21 snrrem: 7.99
1634971699 Rx Frame Rxloc: -112.90 Noloc: -157.50 snrloc: 14.60 Rxrem: -115.14 Norem: -153.46 snrrem: 8.32
1634971706 Rx Frame Rxloc: -114.00 Noloc: -157.30 snrloc: 13.29 Rxrem: -111.90 Norem: -153.30 snrrem: 11.40
1634971720 Rx Frame Rxloc: -120.02 Noloc: -157.54 snrloc: 7.52 Rxrem: -115.07 Norem: -153.36 snrrem: 8.29
Rxloc and Noloc are the local Rx and No (noise density) power estimates (the T1 terminal in my car). Rxrem and Norem are the Rx and No power estimates at the remote T2 terminal (at my house), 15 km away. The Rx power levels are nice and symmetrical. You can see the noise levels are bit higher at my house (Norem), due to all that urban EMI. This makes the remote SNR lower. The MDS of the system was estimated at -118dBm, a good match to our Rx power.
I didn’t have a perfect line of site path, so instead of the expected -90dBm, it was about -115dm, which means an extra 25dB of loss somewhere. However the link budget stacks up, and have a working link over the top of a noisy urban RF environment. Yayyyyyy!
This is not a practical system yet, there are still quite a few building blocks to stitch together, and some more code (like a better acquisition system) to be written. However it’s clear the concept works, we really can send data over meaningful distances with simple hardware and open source software. A 2V red LED with 5mA of current consumes 10mW – the same Tx power as this system.
I’m really enjoying the sheer breadth of technologies in this project (propagation, antennas, EMI, shielding, RF hardware, link budget and strong signal analysis, modems, software decimators, power estimation maths, service scripts, Raspberry Pi). It’s fun being in control of and actually building so many layers in the system. A lot of moving pieces, a chance to learn many skills, and a lot that can go wrong too! Makes you appreciate what is inside commercial radios and chipsets, that we take for granted when we press the PTT button, or send an IP packet on our phones.
Next steps:
- Rework the acquisition system so it can handle strong signal immediately followed by a weak signal.
- A semi-permanent installation that runs for a month to gather long term stats and make sure nothing breaks in real world operation.
- A better link that can sustain 100 kbit/s. We need about 20dB more link budget for that. A directional antenna would be useful to try. My current antennas collect EMI power from all directions. A directional antenna would suppress EMI, and reduce the power from local strong signals, allowing me to bump up the RTL-SDR gain and enjoy a lower noise figure. A directional antenna would also increase the wanted signal receive power, further improving the link margin.
Reading Further
[1] Open IP over VHF/UHF Part 1 Part 2 Part 3 Part 4
[2] GitHub repo for this project with build scripts, a project plan
from Hacker News https://ift.tt/3pIjmNw
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.