Oct 29, 2012

Enchanting subcarriers on FM, part 2

As explained in the previous post, I modified my Sangean ATS 909 receiver by equipping it with a digital RDS output. May it now be told in pictures.

Of course everything had to start from reading some service manuals and data sheets. Energy drinks were also necessary. Yes, I colored the board schematic with color pencils for ease of use!

I figured I would need four separate outputs from the decoder (data, clock, quality bit, and ground) so I chose a 4-pin mini-DIN plug in one end of the cable. The other end is a familiar DB-25. Data is input via the parallel port's ACK, BUSY, and Paper Out pins; I picked a random GND pin for the ground.

The RDS circuit is hidden under the corner of an RF shielding plate. It would have been tedious and mistake-prone to remove the shielding, so I just used my precision soldering skillz and left all the wires outside the plate. Now the chip was wiretapped.

The front cover has a mini-DIN-sized placeholder-looking feature that I used for this purpose. Probably it was related to the speaker's airflow though. I hotglued the 4-pin connector in place. Holes in the control board came in handy when wires needed to be taken through.

The socket fits nicely in the front cover. I had to remove the Sangean logo from its place but hotglued it back next to the connector. (If something else looks dissimilar to the classic ATS 909, it's because I've also replaced the default backlight LEDs with super bright ones!)

I'm relieved the radio still works! Next it will be time to test the connection. It won't happen until my cheap parallel-to-USB converter arrives in the mail, since my laptop is new enough not to have a parallel port.

But even now already, when I wiggle the connector around, the speaker audio gets superimposed by data! Of course this isn't exactly what's supposed to happen since it means I've shorted a connection, but OMG! It's audible and even more evident in the oscillogram:

Update: The converter (idVendor=1a86, idProduct=7584) arrived, but apparently it just emulates a USB printer and low-level parallel bit-banging is not even possible. So I took the thing apart and built a simple twin-channel voltage divider in place of its internals that I then attached to a stereo phone jack (all parts salvaged from an old radio). Data goes to left channel, clock to the right; I'll just have to ignore the quality bit.

I connected this to the sound card's line in and behold! The clearest possible data and clock signals on separate channels!

There is slight crosstalk, probably via ground since I used quite small resistors for the voltage divider. But the data is good:

This means I can completely comment out my software clock recovery and PLL. I rolled the FM dial and logged some stations.

Now I'm going to bed.

Oct 24, 2012

Enchanting subcarriers on FM

RDS has been my main object of interest in the field of FM listening for years now. RDS is the reason you can read the station name on a radio as soon as you tune onto it. It contains a lot of other info about the station and ongoing program as well (Wikipedia article). My interest is more in the decoding process than in the data it can reveal, although I like logging the data as well.

My radio (Sangean ATS 909) conveniently produces an alias of the 57 kHz RDS subcarrier around the stereo pilot tone at 19 kHz. This can be digitized using an ordinary sound card and demodulated + decoded in software (it's on GitHub, I named it redsea). However, the signal is very weak and suffers from interference due to its proximity to the audio band. Also, the radio already has an RDS decoder chip designed by someone wiser, so why not exploit it!

I plan to replace my sound card hack by redirecting the actual data from the decoder chip directly to a parallel port -- which happens to use the same logic voltage levels (0/+5 V). Today I got the first components and already built part of the cable! So more updates soon.

My main concern is what happens to the voltage levels if they're fed both to the CPU in the radio and the parallel port at the same time. Will they still be over the threshold? We'll see! Ideas for amplifying the signal back to 5V are welcome.