DIY PIRA32 Based RDS Encoder

The completed STLTX1 device

NOTE: This was written in 2016. Since then software alternatives such as Stereotool have almost completely replaced the need for a dedicated encoder.

There are loads of cheap RDS encoders on Ebay and the internet is full of plans for PIC based circuits, however I tested several of these and they were all either junk, lacked essential features needed, or (most commonly) produced an output too poor for use at a licensed station.

Some of the most important features are:

The ability to sync to an existing stereo pilot and extract this from an existing multiplex signal (a key legal requirement that was missing from all the cheap encoders on Ebay I bought or looked at). A "Pure" output with harmonics below 80dB of the main carrier (another essential legal requirement). Full control of the TP/TA flags both by software and hardware, with a built in timer to avoid accidentally leaving the TA flag set (another legal requirement). Ability to provide the RDS CT (clock time) service with a battery backed hardware clock to ensure the correct time (essential for listeners on many car radios). RadioText and Radiotext+ with easy software integration to provide track names and other information. EEPROM storage of the PI code, PS name, AF list and stations TP flag, to ensure these are never sent incorrectly (another Ofcom broadcast code requirement). RDS output level adjustment for only the RDS signal (the adjustments on some cheap boards do all sorts of crazy things to the audio and stereo pilot). Relay loop through of the entire multiplex in case of encoder or power failure (not present on any of the cheap Ebay boards and essential if the device is to be looped through the multiplex chain, as would normally be the case) and active output levels exactly matched the looped through signal. High quality circuit with "proper" filtering of the final RDS signal. AF lists, the option to add EON and other future RDS services. Etc. Etc.

There are plenty of commercial products starting at around £200 that meet the minimum of these criteria (i.e. the cheaper DEVA encoders), however to fulfil the whole list would typically cost over £1000. However, an RDS encoder is a relatively simple thing and this retail cost seemed to bare no relationship to that of manufacturing. After some searching, I found the website who produce some superb products, including the encoder chip used in many of the cheaper Ebay boards. However, the cheapest "professional" product they sell which meets all of the above is their PIRA32 encoder that costs just €145 as a fully built unit and even less (€82) for just the encoder board alone.

However being a bit of a cheapskate and loving a challenge, PIRA also sell some of the key components (PCB, encoder chip, etc) on their own and even provide plans for self assembly (they used to provide a full kit, but I understand the support costs might have been too high)... so with about €25 of components from Pira and another £25 or so from my own stores, I decided to build the board. I would recommend for most people, you just buy the board ready-built and fit it in your own case.

Initial PCB
Initial PCB and components

Completed board
Completed PCB. Note that the LEDs and C31 are just for testing. I've soldered connections direcly to the board rather than using connectors for greater reliability. The audio cables are connected to chassis mount BNC connectors on the rear of the case, power is wired directly to the power supply (an external 12v PSU) and the serial connector is wired to a socket directly connected to the RS232 to USB converter, housed inside the case.

Board setup
Using an oscilloscope we can adjust and check that the RDS signal is locked and in phase with the stereo pilot tone (essential for reliable reception and a licensing requirement). The PCB is at an angle as it's not yet been fixed to its mounts.

Board fitted to case
The PCB fitted to the case. Once again, my trademark hot glue gun is used very generously to ensure nothing can come loose. :-)

You just need one other item to configure the encoder and (optionally) connected to the RadioTools STL systen, an RS232 to USB converter costing about £2 on Ebay!

Total cost of the ready-built board and a 1U rack-mount case should be less than £100. Our RDS encoder cost a total of about £50 including al parts and the case was re-used from an old audio interface box.

Initial setup of the encoder can be performed using the Windows software. Once configured all settings should be retained indefinitely. The devices USB (serial) connection can be connected to one of the USB ports on our Raspberry Pi based STL for automatic updates of RadioText, TA flags etc.

RDS diagnostics

It's essential (and a licensing requirement) that all your RDS information is correct and accurate. In particular, unlike the PS name and TP codes which can be seen on most car radios, it's vital to ensure that your PI code is set correctly according to your licence. Setting this wrongly might not be visible to most listeners but can cause substantial interference to (for example) car radio users (both to your listeners and those of any other stations) as their radios attempt to search for the strongest signal. Expect a large fine from Ofcom if you get this wrong. Luckily many radios and tuners (especially some Sony HiFi models) have a menu or diagnostic function which reveals this vital hidden information. In this photo, the standard radio of a Volvo S60 placed in diagnostic mode shows the PI code for Destiny 105 in Oxford of CF89 (also note the very strong signal level of E2 from both of the car's diversity antennas, as I was parked next to the transmitter site at the time).

Final note: NEVER use a dynamically changing PS name. Use RadioText instead as that's what it's designed for! Dynamic PS causes issues on many radios and means your station will not be listed by name on many high-end car radios systems. It can also be distracting and dangerous, it's explicitly prohibited in the RDS specification and is a breach of Ofcom rules! Don't lose your licence or risk harming your listeners, if they can find you at all due to your station name not showing correctly.