Pale blue cloud  




Electronics projects not centered around Arduino.

Noise measurement on DVB-T dongle with rtl_power



This article measures the effect on RF noise levels of various modifications on my DVB-T radio dongle, an "R820T2 RTL2832U" acquired at

Noise levels are measured with a 75Ω coax terminator connected (with a pigtail) to the dongle in stead of an antenna. The dongle itself is connected by 75 cm of USB cable to a Beaglebone Black, powered by a wall wart.

Noise levels will probably be better when the dongle is connected to a battery-powered computer (e.g. laptop), but that's not how I will be using it. So instead of going for the lowest absolute noise levels I want to know the realistic noise levels for my situation.

Thus hooked up and given at least fifteen minutes to warm up, I'll run the rtl_power (command line) software for a period of time over the whole bandwidth of this little radio. The resulting data is graphed with gnuplot.

Vanilla dongle

These measurements are made without any modifications to the dongle.

The following command runs the sample for a one-shot, twenty minute interval with the gain at 50 (the maximum) and measuring the range of 24MHz to 1.7GHz with a 1MHz resolution (a.k.a. bucket size), saving the output to a file noise-unmodded.csv:

debian@beaglebone:~$ rtl_power -f 24M:1.7G:1M -g 50 -i 20m -1 noise-unmodded.csv
Number of frequency hops: 1676
Dongle bandwidth: 1000000Hz
Downsampling by: 1x
Cropping by: 0.00%
Total FFT bins: 1676
Logged FFT bins: 1676
FFT bin size: 699499.00Hz
Buffer size: 16384 bytes (8.19ms)
Reporting every 1200 seconds
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to 49.60 dB.
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!

User cancel, exiting...

Plotting the results

The CSV file thus generated is processed with gnuplot, using the following settings:

set term jpeg size 1200, 600
set size 1,1
set output "noise-unmodded.jpg"
set grid
set title "noise levels R820T"
set xlabel "freq. [MHz]"
set ylabel "noise [dB] (relative)"
#set xtics 200000000
set format x "%2.0f"
plot "noise-unmodded.csv" using (($3+$4)/2)/1000000:($7+$8)/2 with lines title "unmodded"

This creates the following noise plot for the unmodded dongle:

The spikes around 800 and 950MHz are pronounced and I think they are caused by nearby GSM network towers.

USB extension cable mod

The first modification consists of modifying the USB extension cable that is used to connect the dongle to the Beaglebone. A comment on this page inspired me to (carefully) remove the shielding from a small part of the USB cable, right next to the dongle, in stead of messaing with the connectors themselves. This is to prevent the shielding from acting as an antenna.

The mod looks like this:


Measured the noise levels again, the same way as above and plotted the results.

  • red line: unmodded dongle
  • blue line: unmodded dongle with USB cable modification

This is interesting. Noise levels are slightly lower in certain areas, mostly below 200 MHz, and a bunch of spikes are distinctly lower, around 900 MHz with as much as 5 dB.

Noise increased between 200 MHz and ~ 300 MHz and some of the spikes are a lot higher (the one around 1090 MHz, where ADS-B sits, is particularly worrying me).

Adding copper tape shielding

Next I wrapped the dongle in copper tape, ensuring that both the USB chassis and the antenna bus are touched. I also covered the (taped) area of the USB extension chord from where I removed the shielding.

I measured the results again with rtl_power and plotted them against the unmodified dongle:

The results are disappointing. There's some noise reduction in isolated areas (780-950 MHz) but overall this looks pretty bad.

- to be continued -

Resources for I2C and HYT-271/HYT-221


Here's a list of some resources for the Raspberry Pi I2C stuff in general and the Hygrochip HYT-271 digital humidity and temperature sensor in particular.

Mains frequency clock time base


20110910141849_04Years ago I rescued an old, two-faced Simplex clock from a dumpster. It is a so-called slave clock: it has no time-keeping mechanism from itself so it must receive a 24 volt clock pulse from a remote master clock once every minute.

Not having rescued the master clock I had to make an hour myself.

The first version consisted of a 32.768 kHz chrystal, a 4060 binary counter, a 555 integrated circuit, and some assorted TTL ICs. The idea was to divide the 32.768 kHz time base from the chrystal by some factor and end up with one clock pulse per minute.

This version broke down after 16 years of good service: the rectifier, transformer and probably some other components burnt out for reasons I have not been able to discover. Unfortunately I lost the original schematic and I did not feel like reverse engineering it, so I had to make a new hour from scratch.


Read more: Mains frequency clock time base

Installing the birdhouse webcam: 'nestcam'



After modifying the webcam and figuring out how to stream the images to a website with the Raspberry Pi, it was time to build a birdhouse and put the webcam into it.

I copied the dimensions from a birdhouse in which a couple of blue tits previously successfully raised a family, and made it a bit higher to accomodate the webcam. I used 16 mm multiplex and protected it on the outside only with clear (boat) lacquer. The outside dimensions are: 

  • width: 125 mm
  • height (front): 300 mm
  • height (rear): 350 mm
  • depth: 125 mm
  • diameter entrance hole: 28 mm
  • height of entrance hole from bottom: 195 mm

The nest had already been out for a couple of weeks, and when opening it I discovered that it was already being used because there was a lot of poop in it.

The hole for the webcam can be seen at the top. That little plate can be easily removed in case I ever want to put in another cam.

Read more: Installing the birdhouse webcam: 'nestcam'

An MBI5168 primer for Arduino


This is a small and very simple program that illustrates the use of an MBI5168 constant current LED sink driver with Arduino. All it does is (1) switch on all LEDs, (2) switch on the LEDs in succession.

Although I use an Arduino Duemilanove, the code should work for other versions of Arduino as well, although you may have to change pin numbers.

Read more: An MBI5168 primer for Arduino

© Palebluedot