Tito Dal Canton

Physics is reverse engineering

High audio sample rates with bt878 cards

Several PCI TV grabbers are based on the bt878 chip, and so was the one I had available. On the net, I discovered with surprise that the bt878 can digitize mono audio at the remarkably high frequency of 890 kHz! I had to try it on my card and these are my results.

At the time of the experiment, a simple hack on the btaudio Linux kernel driver was needed: it is described here. The ALSA way proved unsuccessful, so I had to revert to the old OSS, but the software hack worked and I could really sample the input at 890 kHz. This is of course well beyond what even the coolest human can hear and normally such data would be decimated to the standard 44100 Hz sampling rate.

Once the software part was done, I performed a small hardware hack as well, which can be found in detail here. In fact, the bt878 audio input was connected to the TV tuner audio output. So I found the interested tuner pin, I cut it and soldered a thin shielded cable to the line towards the bt878. This excluded the tuner audio and made available the bt878 audio input, except maybe for a few capacitors and resistors which I could not figure out.

With such a sampling rate many applications come to mind: we can sample up to 890/2 = 445 kHz! My first idea was hooking up a simple antenna (just a 10 m long wire) and study the broadband spectrum from baseband to 445 kHz. I expected a lot of noise and disturbances and several radio transmissions as well, like AM stations and non-directional beacons. Indeed, this is really what I found.

I used baudline as signal analyzer; too bad, it could not directly read from the bt878 audio device (in my case /dev/dsp3) so I recorded with sox to the stdout and sent the data to baudline through a UNIX pipe. I used an x86 machine with a 1 GHz CPU and 256 Mb of RAM. It performed very well on the CPU side but was a bit chocked on the RAM side, because baudline filled it quickly once set to 16-bit FFT. Swapping thus became a problem and I had to resort to less precise FFTs, at least during recording. I was amazed by how quickly you get huge WAV files with such a setup!

This is a typical spectrogram I could see with my setup.


You can see several features.

I was annoyed by the non-flat noise background and I decided to flatten it using the baudline equalizator. To achieve this one needs a good model of the spectrum, so I grounded the bt878 input and took an averaged FFT. However, several narrowband features and disturbances were still present, so I put together a dirty function to quickly approximate the smooth noise background. The function I found was a horrible combination of exponentials of 1/f, but it provided a good enough model to equalize the noise floor.

Noise background

After these steps the spectrogram is "whitened" and high-frequency features are more visible.

Equalized spectrogram

Radio signals seem to be stronger at night. Some were so strong I could actually listen to the broadcasts by translating the carrier to baseband and then decimating the data to a few kHz (other steps you can perform with baudline). I found the following stations:

Carrier (kHz) Type
153.2 radio
162.2 radio (french)
171.2 radio
177.2 radio
180.2 radio
183.2 radio (french)
207.3 radio
216.3 radio
225.3 radio
234.3 radio
252.3 radio
261.3 radio
270.4 radio (sometimes)
279.4 radio
Carrier (kHz)Type
285.4 NDB .__. _.. ..._ PDV (Padova)
301.9 NDB _ ._. . TRE (Treviso)
306.4 NDB
335.4 NDB
340.4 NDB .. ... ._ ISA (Istrana)
352.0 NDB .__. ._.. ._ PLA (Pola)
˜370 NDB
375.0 NDB?
379.5 NDB ..._ . _. VEN (Venezia)
390.5 NDB
408.5 NDB
413.5 NDB
417.5 NDB ..._ .. _._. VIC (Vicenza)
420.5 NDB
423.5 NDB
429.5 NDB

During nights with particularly good weather I could see real NDB showers like this:

NDB shower

Last update: 2005-09-06