Tagged: rtl-sdr

Measuring Traffic in a Neighborhood with KerberosSDR and Passive Radar

KerberosSDR is our four tuner coherent RTL-SDR product made in collaboration with Othernet. With KerberosSDR applications like radio direction finding and passive radar are possible, and our free open source demo software helps to make it easier to get started exploring these applications. In this post we explore how a simple passive radar setup can be used to measure how busy a neighborhood is in terms of vehicular traffic.

KerberosSDR is currently available from the Othernet store for US$149.95, and the setup guide is available at www.rtl-sdr.com/ksdr.

Passive radar makes use of already existing strong 'illuminator' signals such as broadcast FM, DAB, digital TV and cellular. When these signals reflect off a moving metallic object like an aircraft or vehicle, it distorts the signal slightly. By comparing the distorted signal to a clean signal we can determine the distance and speed of the object causing the reflection. Wide reaching digital signals like DVB-T and DAB are often the best illuminators to use. Wideband cellular signals can also be used to detect more local targets.

In a simple passive radar system we use two directional antennas such as Yagi's. One Yagi points towards the broadcast tower and receives the clean non-distorted reference signal. This is known as the reference channel. A second Yagi points towards the area you'd like to monitor for reflections, and this is called the surveillance channel.

In our setup we point the reference channel Yagi towards a 601 MHz DVB-T transmitter roughly 33 km away. A second Yagi is placed on a vantage point overlooking a neighborhood. The Yagi's used are cheap DVB-T TV Yagi's that can be found in any electronics or TV retail store (or on Amazon for ~$30 - $60 USD).  In the software we used a bandwidth of 2.4 MHz and adjusted the gains for maximum SNR.

It is important that the surveillance channel is isolated from the reference signal as much as possible. We improve the isolation simply by placing a metal sheet next to the surveillance Yagi to block the reference DVB-T signal more. Note that putting the antennas outside will obviously result in much better results. These walls and windows contain metal which significantly reduce signal strength. We also added our RTL-SDR Blog wideband LNA to the surveillance channel powered by a cheap external bias tee to improve the noise figure of the surveillance channel.

KerberosSDR Passive Radar Setup
KerberosSDR Passive Radar Setup
Surveillance Antenna View
Surveillance Antenna View

The resulting passive radar display shows us a live view of objects reflecting. Each dot on the display represents a moving vehicle that is reflecting the DVB-T surveillance signal. In the image shown below the multiple colored objects in the left center are vehicles. The X-Axis shows the distance to the object, and the Y-Axis shows the doppler speed. Both axes are relative to the observation location AND the transmit tower location.

Vehicles on the Passive Radar Display
Vehicles on the Passive Radar Display

When there are more moving cars on the road during the day and rush hours, there are more blips seen on the passive radar display. Larger vehicles also produce larger and stronger blips. By simply summing the matrix that produces this 2D display, we can get a crude measurement of how busy the neighborhood is, in terms of cars on the road since reflections are represented by higher values in the matrix. We logged this busyness value over the course of a day and plotted it on a graph.

The resulting graph is as you'd intuitively expect. At 6AM we start to see an increase in vehicles with people beginning their commute to work. This peaks at around 8:30AM - 9am with parents presumably dropping their kids off to the neighborhood school which starts classes at 9AM. From there busyness is relatively stable throughout the day. Busyness begins to drop right down again at 7PM when most people are home from work, and reaches it's minimum at around 3am.

Traffic Busyness detected with KerberosSDR Passive Radar
Traffic Busyness detected with KerberosSDR Passive Radar

One limitation is that this system cannot detect vehicles that are not moving (i.e. stuck in standstill traffic). Since the doppler speed return will be zero, resulting in no ping on the radar display. The detection of ground traffic can also be distorted by aircraft flying nearby. Aircraft detections result in strong blips on the radar display which can give a false traffic result.

It would also be possible to further break down the data. We could determine the overall direction of traffic flow by looking at the positive and negative doppler shifts, and also break down busyness by distance and determine which distances correspond to particular roads. In the future we hope to be able to use the additional channels on the KerberosSDR to combine passive radar and direction finding, so that the the blips can actually be directly plotted on a map.

If you want to try something similar on the KerberosSDR software edit the RD_plot function in the _GUI/hydra_main_window.py file, and add the following simple code before CAFMatrix is normalized. You'll then get a log file traffic.txt which can be plotted in excel (remember to convert Unix time to real time and apply a moving average)

CAFMatrixSum = np.sum(CAFMatrix)
trafficLog = open("traffic.txt", "a")
logString = str(round(time.time())) + "," + str(round(CAFMatrixSum)) + "\r\n"
trafficLog.write(logString) 
trafficLog.close()

Running an RTL-SDR On up to 100 Meters of USB Ethernet Extension Cable

Over on Aliexpress and eBay there are now multiple USB2.0 extenders that work using Ethernet cable. These extenders advertise that is is possible to use up to 100m of Ethernet cable. Extending the USB connection rather than using coax cable is desirable as coax cable introduces signal losses the longer it is. Extending the digital side of the SDR (the USB cable) results in no signal being lost.

However, the USB2.0 specification notes that the maximum limit of the length of an extension cable is only 5 meters. We can go beyond 5 meters by using active repeater cables, but even this has limits of up to 30 meters maximum only.

So how can these USB2.0 Ethernet extenders advertise a length of up to 100m? These devices essentially convert the USB signal into an Ethernet network signal. Ethernet cable for network connections has a limit of 100 meters. Using this Ethernet extender is quite similar to using a Raspberry Pi and running the RTL_TCP software over an Ethernet cable, except that the network connection is handled entirely by the hardware.

We purchased a $45 USB2.0 extender from Aliexpress to test (there is also a cheaper $32 unit that we saw recently that should work too). The extender comes with a 1.5m USB Male to Male cable, a transmit box, a receive box and a 5V plug pack. The transmit side plugs into the PC via the USB Male to Male cable. The receiver end is placed up to 100m away, and this side must be powered by the 5V plug pack. In between you can run up to 100m of Ethernet CAT cabling.

USB2.0 Ethernet Extender from Aliexpress
USB2.0 Ethernet Extender from Aliexpress

In our testing we purchased a 50m CAT6 cable and tested to see if the extender would work with an RTL-SDR Blog V3, Airspy and SDRplay. Initially we had trouble getting SDR# to connect to the RTL-SDR. Eventually we found out that the provided USB Male to Male cable provided was of poor quality. After replacing it with a higher quality cable the extender began working properly. We also found that some USB ports on our PC wouldn't run the unit. The USB3.0 ports on the back of the PC connected directly to the motherboard worked best.

USB2.0 Ethernet Extender
USB2.0 Ethernet Extender Test

Using SDR# the RTL-SDR Blog V3 worked exactly like it was connected directly to the PC. There was no lag noticed at all, with tuning being instant. Sample rates up to 3.2 MSPS worked fine, although of course 2.56 MSPS was the limit without drops. As the receiver box is powered by a 5V plug pack, there was plenty of power available to power a 100 mA LNA via the V3's bias tee as well.

Reliability was a bit of an issue. Sometimes we'd need to replug the USB port several times before it would connect to the RTL-SDR. But once running everything appeared to be stable, and we left it running overnight at 2.56 MSPS without any problems.

Unfortunately the lower bit rate and sample rate of the RTL-SDR appears to be the limit of what the extender can handle. The Airspy with it's higher data transfer requirements due to it's 12-bit ADC didn't work properly, with audio stuttering from dropped packets (even at the lower 3 MSPS sample rate with packing enabled). The SDRplay also wouldn't work, with the SDRUno software being unable to detect the RSP1A. Even using a shorter 2M Ethernet cable did not help for these SDRs. In theory it should work since Ethernet can support a much higher data rate, but perhaps the converter chipset used in the cheap extender unit that we have isn't fast enough.

If you want to try this out, be very careful of what you purchase on Aliexpress/eBay/Amazon. There are some very very cheap USB to Ethernet extenders out there that are advertised as USB2.0, but not all of them are truly USB2.0. The very cheap ones under $5 won't work. Those cheap units actually degrade USB2.0 down to USB1.1 which will not work for an RTL-SDR or any other common SDR. The extender units that will probably work properly are all priced over $30.

It's also possible that some of the more expensive units available on Amazon (e.g. [1][2][3]) may be implemented better and might work with the Airspy and SDRplay. If you've tried one of the pricier units please let us know in the comments if it works. In particular this $156 KVM unit which claims a high data rate and also supports PoE may work (although PoE may cause switching noise). For extreme extensions of up to 250m, USB2.0 fiber optic extenders such as this $359 unit, or this $459 fiber optic unit which can go up to 5km (3.1 miles) might also work. If you've tried any of these please let us know in the comments.

In Testing: Customized Drivers for RTL-SDR Blog V3 SDRs

We've recently released a modified version of the Osmocom RTL-SDR drivers that has a few enhancements particularly for RTL-SDR Blog V3 units. The changes merge improvements to L-Band PLL locking performance which may be necessary for operating units in high ambient heat environments and the RTL_TCP performance enhancements by Stephen Blinick.

If you want to toggle the bias tee ON/OFF in SDR#, we've also made use of the "Offset Tuning" checkbox in the RTL-SDR settings. This checkbox is unused for R820T2 RTL-SDRs, so we've added code that will toggle the bias tee ON/OFF with this checkbox. 

In addition we've also made use of some unused EEPROM flags to create a method that allows you to force the bias tee to be always ON if a certain EEPROM flag is set. You can also force direct sampling mode with another EEPROM flag. Note that these force flags will only work if you are using these drivers.

A Windows release is available on the Github Releases. To use with SDR#, simply replace the rtlsdr.dll file in the SDR# folder with the one in the Release.zip file. To install on Linux, follow the instructions in the Readme, and remember to follow the instructions to remove librtlsdr-dev if you previously installed drivers via the package manager.

If there are any problems or feedback, please open an issue on GitHub. List of changes shown below.

1) VCO PLL current fix - Improves stability at frequencies above ~1.5 GHz https://www.rtl-sdr.com/beta-testing-a-modified-rtl-sdr-driver-for-l-band-heat-issues/

2) RTL_TCP ring buffer enhancement by Stephen Blinick https://www.rtl-sdr.com/significantly-improving-rtl_tcps-performance-with-ring-buffers/

3) Enabled direct sampling for rtl_tcp

4) rtl_biast program added, including the ability to turn on/off any GPIO

5) Hack to force the bias tee to always be on by setting the unused IR endpoint bit to 0 in the EEPROM. Example to force the BT to be always ON "rtl_eeprom -b y", to remove forced BT "rtl_eeprom -b n"

6) Hack to force direct sampling to be always on by setting the unused remote-enabled bit to 1 in the EEPROM. Example to force direct samping always "rtl_eeprom -q y". To remove forced direct sampling "rtl_eeprom -q n"

7) Repurposed "offset tuning" to toggle bias tee ON/OFF. We can now use the "offset tuning" button in SDR# and other programs to toggle the bias tee if there is no specific button in the GUI.

Dash Mounted ADS-B With an RTL-SDR Blog V3

Reddit user [Bobcalamarie] recently [posted] about how he uses his car dash mounted Android tablet along with an RTL-SDR Blog V3 and a magnetic mount antenna while sitting in traffic to track aircraft overhead.

We’ve seen something similar to this once before when [Signals Everywhere] uploaded a video showing off ADS-B reception (among other things) to a dash-mounted Windows tablet and an Android head unit.

The software used by Bobcalamarie is the Android [Avare ADS-B] software which can be found in the Google Play Store. However, other applications exist for Windows, Linux, and other operating systems as well. Some software such as [Virtual Radar Server] even allows you to set-up alerts for specific types of aircraft. Which while we wouldn’t condone it, it might come in handy for someone in traffic.

What would you do if you had an SDR installed in your vehicle? We would love to hear what you have to say in the comments below.

Dash Mounted ADS-B Reception

ORBCOMM Receiver: New Open Source Software for Monitoring Orbcomm Satellites

Thank you to Frank for submitting his new RTL-SDR compatible Orbcomm Satellite monitor software called "Orbcomm Receiver". Orbcomm is a low earth orbit satellite communications system that operates in the 137 - 138 MHz frequency range. The satellites specialize in remote IoT and machine to machine (M2M) connectivity, an example use case being a GPS tracker on a shipping container regularly uploading GPS coordinates from anywhere in the world via the Orbcomm satellites. Orbcomm satellite signals are fairly strong and can easily be received with an RTL-SDR and V-Dipole antenna.

We haven't posted about Orbcomm on this blog since 2015 since there is not many interesting things to say about it. The data is all encrypted, and the only information you can really see is Orbcomm satellite ID, frequency and positioning data. Franks software doesn't change this fact, but his software is all open source, so it may be a useful tool for learning about satellite signal DSP processing. Frank writes:

There are a couple different projects out there to decode ORBCOMM signals (Orbcomm-Plotter and MultiPSK). What makes my project different from these is that I wrote it as a learning project. So all of the signal processing, written in Python, is available to the user and is decently documented. I hope this can be a good learning resource for people who want to see a practical example of satellite communications signal processing. Also, my software is open source and free to use.

Currently, the software can do offline or real-time decoding of a single ORBCOMM downlink channel. The transmitted bits of the ORBCOMM signal are demodulated and when the packet type is known, the packet information is decoded. There are a lot of ORBCOMM packets that can't be decoded and of course the message data is encrypted so that information is not available. But, there is still a ton of interesting information available.

The project is still in development so it has some limitations. For real-time recordings, I only support RTLSDRs currently. Also, I'm having trouble getting the real-time processing to work on mac OS, so currently that mode is only supported on linux. However, I have included a couple data files in the repo, so even without an SDR, users can experiment with the signal processing. I welcome any bug reports or suggestions.

Orbcomm Packet Decoding. Showing Realtime Satellite Position.
Orbcomm Packet Decoding. Showing Realtime Satellite Position.

r2Cloud: Software for Automatically Decoding APT/LRPT Weather Satellites and Cubesats on a Raspberry Pi with RTL-SDR

Thanks to a tweet by @rf_hacking we recently came across an interesting project called "r2cloud". This is an open source program provided on a ready to use image for the Raspberry Pi that can be used to set up an automated satellite recording station for NOAA APT and Meteor LRPT signals, as well as for CubeSats.

The software presents a web based user interface that is easy to setup and view decoded images on. It appears that the software also communicates with a public server that can aggregate and log your data, and also provide it to SatNOGS and provide FunCube satellite telemetry to FunCube Warehouse.

Block Diagram for the r2cloud software.
Block Diagram for the r2cloud software.

A Motorized Backyard Radio Astronomy Telescope made with an RTL-SDR

A Geostationary Satellite Imaged with the RTL-SDR Based Mini Radio Telescope
A Geostationary Satellite Imaged with the RTL-SDR Based Mini Radio Telescope

Just a few days we posted an update on the PICTOR open source radio telescope project. That project makes use of an RTL-SDR and a small dish antenna to receive the Hydrogen line, and is able to measure properties of our galaxy such as determining the shape of our galaxy.

Now over on Hackaday another amateur radio telescope project has been posted, this one called the "Mini Radio Telescope" (MRT) which was made by Professor James Aguirre of the University of Pennsylvania. This project makes use of a spare Direct TV satellite dish and an RTL-SDR to make radio astronomy observations. What makes this project interesting in particular is the automatic pan and tilt rotor that is part of the design. Unlike other amateur radio telescopes, this motorized design can track the sky, and map it over time. This allows you to create actual radio images of the sky. The image on the right shows a geostationary satellite imaged with the dish.

In the past we saw a similar project by the Thought Emporium YouTube channel which used a tracking mount and a HackRF to generate images of the WiFi spectrum. This was to be a precursor to a motorized tracking mount for radio astronomy but it doesn't seem that they completed that project yet.

Professor James Aguirre 's project including designs for the rotor is fully open source and can be found over on GitHub.

The Miniature Radio Telescope Setup
The Miniature Radio Telescope Setup

An Active Low Cost HF Loop Antenna Made in the UK

Cross Country Wireless is a UK based company that has created an active HF loop antenna for only $70 USD including international shipping. The loop appears to have already been for sale for a while now, but recently they've created a new version that can be easily powered by a 5V bias tee with at least a 67 mA current capacity. This makes it very easy to use with radios that have built in bias tee's such as our RTL-SDR Blog V3 and SDRplay and Airspy units. The page reads:

The Loop Antenna Amplifier contains all the electronics needed for home DIY construction of an active loop (magnetic loop) low noise receiving antenna.

The amplifier consists of two units, a weatherproofed outdoor unit for connection to a suitable loop and a base unit to further amplify the signal and to provide DC power up the coaxial cable to the outdoor unit.

The outdoor unit is housed in a polycarbonate box with stainless steel antenna connections and a BNC socket. The indoor unit is a PCB with two BNC connectors and a USB socket to take 5V from a USB socket on a PC or phone charger.

Like our other active antenna products it has RF overload protection to allow it to be used very close to transmit antennas without damaging the amplifier or the attached receiver.

The loop depends on what the user has available. We have tested it with simple wire loops or deltas, coax loops and an alloy loop made from a bicycle wheel rim. We supply a 3m (10 ft) length of wire as a simple loop to make a first loop for testing.

The photograph on the right shows the prototype with a 1m diameter loop of LDF4-50 coax cable as a test loop.

With a simple wire loop or delta and a small USB powerbank it makes a very compact and portable receiving antenna for holiday listening or covert use.

The latest version can now have the head unit powered directly from receivers with a 5V bias-tee such as the SDRplay receivers or some RTL-SDR dongle receivers with a bias-tee option.

Specifications:

  • Frequency range: 10 kHz to 30 MHz
  • Loop amplifier input impedance: 0.3 ohms
  • Output impedance: 50 ohms
  • Supply voltage: 5 V from USB socket or charger
  • Supply current (head and base unit): 112 mA
  • Supply current (head unit fed with 5V bias-tee): 67 mA
  • Loop antenna outdoor unit connectors: Two M6 stainless steel threaded studs and BNC female (RF out 50 ohms)

There is no comparison yet that we've seen on how this loop compares against the cheaper US$45 Chinese made MLA-30 loop. In a previous post Martin (G8JNJ) reviewed the MLA-30 and noted several design flaws after reverse engineering the circuit. He has let us know that he will also be reviewing the Cross Country Wireless Active Loop and will let us know his thoughts in the future.

Cross Country Wireless Loop
Cross Country Wireless Loop

Cross Country Wireless Loop Antenna Amplifier VLF test with 1m diameter coax loop