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!

[Image: Papers titled BLOCK DIAGRAM and SCHEMATIC DIAGRAM lying on the table or floor. The schematic diagram is colored in. A bottle of energy drink to the right.]

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.

[Image: The schematic diagram with the part containing the RDS decoder chip magnified. The chip has 16 pins, 4 of which are encircled and labeled Qual, Data, Ground, and Clock.]
[Image: A cable with a  Mini-DIN connector on one end and a DB-25 connector on the other.]

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.

[Image: Logic board of the radio with four red botch wires going under an RF shielding plate. The wires are secured using cellotape.]

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.

[Image: Another part of the insides of the radio, with the addition of a hotglued Mini-DIN socket.]

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!)

[Image: The radio, now with its cover closed and operational, and the cable connected.]

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:

[Image: Oscillogram showing a signal alternating rougly between two states, with a lot of noise superimposed.]

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.

[Image: Schematic diagram of the cable and connector setup with a voltage divider. Pins 10 and 12 of a DB-25 are connected to arbitraty points A and B, respectively, via 1 k-ohm resistors. Point A and B are both connected to point C via 200 ohm resistors each. Point C is connected to pin 23 of the DB-25. Points A and B are connected to terminals 1 and 2 of a 3.5mm socket, respectively.]
[Image: The above voltage divider in a series of photos, showing how it fits inside the casing of a parallel port printer adapter.]
[Image: The voltage divider connected to the radio's DB-25 cable. A LED indicator is on.]

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

[Image: A two-channel oscillogram. One channel shows a square wave with regular transition intervals, the other one transitions only at some transition points of the first one.]

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

[Image: Screenshot of a terminal and a small GUI window. The terminal is showing a stream of text describing RDS information. The little window is showing the text YLEYKSI and Muistojen bulevardi.]

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.

Enchanting subcarriers on FM

YLESUOMI

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.

Continues on the next post