RDS Monitor and Traffic Flag Detector - New Arduino Based Version

Build a USB controlled FM tuner and RDS monitor for around £10

With Windows software that can save the current TA flag status and now playing Radiotext info to files for use by other systems.

Screenshot


Page created: 28/08/2023.

Introduction
This project uses an Arduino Nano and an Si4703 FM module, both available for around £5 each on sites like Ebay, to create a USB controlled FM RDS tuner. This device then links to a Windows application that not only displays multiple RDS parameters, but will also save the current RDS traffic TA flag and Radiotext "now playing" info to text files which can be polled by other systems and software.

In order to create this you will need to be familiar with electronics, soldering (although you could use solderless jumper wires) and Arduino devices. This page should contain everything needed including the required software, however I'm unable to give any free support. Attempt this at your own risk.

Completed Device Arduino Inside Device Si4703 Module Inside Device

Parts used
Arduino Nano V3.0 ATmega328 5V 16MHz CH340 and a suitable USB cable.
Si4703 FM & RDS Radio Tuner Module such as the one in the photo below.
A cable with a stereo 3.5mm plug or a pair of headphones with a 3.5mm plug to act as an antenna.
A case of some sort. I used two small Arduino sized plastic boxed glued together with a hole drilled between them for the wires, since I had them spare.


Arduino Nano Si4703 Module

Connect the Arduino Nano to the Si4703 board as follows:
Arduino / Si4703
GND / GND
3.3v / VCC
A5 / SCLK
A4 / SDIO
D2 / RST

Download the following files to your computer:
SerialRadio.zip v1.01
radio-master.zip Custom Library
rdsmonitor_setup_203.exe Windows Software V2.03

File Details and Instructions
SerialRadio.zip is our Arduino sketch which is the firmware needed to run on the device itself. Unzip this to a folder somewhere convenient called SerialRadio.
radio-master.zip is a customised library for the tuner that will allow us to access all RDS data. This does not need to be unzipped.
rdsmonitor_setup_203.exe is the Windows executable for the desktop application. This will be used later.

Connect the Arduino to a computer and identify it's allocated COM port by checking in Windows Device Manager.

Launch the Arduino IDE by double clicking on the SerialRadio.ino sketch file in the folder you unziped above and set the COM port as identified above and the board type to Arduino Nano.

In order to compile the Arduino sketch you will need to add the customised version of the Si4703 radio library radio-master.zip, which has been modified to allow access to the raw RDS data

Add this file to the Arduino Development Environment by clicking the "Sketch" menu and then "Add Library" and selecting the downloaded radio-master.zip file. Note this will replace any existing version if installed, so may need to be removed later when compiling other projects that use similar modules. If you have any issues, search for the "Radio" module by Matthias Hertel and remove it before installing the customised version. Note the IDE may then prompt you to update back to the official version. Don't do this until you've successfully loaded the sketch onto the Arduino.

Write the file to the Arduino. If there are any errors, check the correct library is installed as described above.

Once installed, using the Arduino Serial Monitor, set the baud rate to 115200 and type a question mark (?). You should either see a menu, or possibly if there are strong stations nearby some hex coded RDS data may already be shown.

Now you can install the Windows software. By default it will install to: C:\readyformed\rdsmonitor

Once the Windows software is installed, edit the C:\readyformed\rdsmonitor\rdsmonitor.ini config file to contain the correct COM port number and frequency of the station you wish to monitor. Connect a 3.5mm cable or headphones to the device to act as an antenna. Run the Windows application and after about 10 seconds RDS information should start to be shown if the signal is strong enough.

The Windows software writes a text file called "traffic.txt" which contains either a 0 or 1, with 1 indicating the traffic flag is raised. This file is updated whenever the flag changes and can therefore be polled by other software to establish the RDS TA status. It also writes the current RDS Radiotext (typically "Now Playing" or other programme related information) to a file called "metadata.txt". This is updated approximately every 20 seconds when valid Radiotext data is present. See the readme.txt and rdsmonitor.ini file for more info.

Notes:
The ground wire of the headphone socket on the Si4703 module is used as the antenna. This means if it's connected to an external ground such as the audio input on another device, the antenna input may be effectively be connected to ground preventing a signal from being received. We use a simple piece of wire connected to a 3.5mm socket as antenna for monitoring RDS, since the device is located in very close proximity to the transmitter and we also don't use the audio. However if you wish to use the received audio or connect the device to a grounded external antenna, additional circuitry will be required to buffer the signal which is outside the scope of this article.

The "Change Freq" button will not modify the INI file. This is by design as when restarting the app, most stations will want the preset frequency from the ini file to always be used. This ensures that even if a user unfamiliar with the system changes the frequency in the app, a restart will restore the system to the originally configured frequency.

The current firmware enables "stereo blend" on the FM module audio output. This means that if the signal is weak, stereo separation will be poor or non-existent in order to try and eliminate hiss. This could be changed in firmware but is the most common configuration when using these modules.

If your station uses EON then depending on your RDS encoder config the TA/TP flags may not act as expected. This is due to the way EON uses multiple flags to flag traffic broadcasts on other stations. Since this usually only affects national broadcasters, details of how to resolve this are beyond the scope of this document.

We set audio de-emphasis to the international standard of 50us in the firmware. If you're in North America this may affect sound quality very sightly unless changed in the Arduino code, though this device is not designed to be a hifi audio tuner.

The Windows software supports RDS as used in Europe and around the world but note that the USA uses a custom subset of RDS called RBDS, which while technically compatible with RDS has some minor cosmetic changes and major ommissons (such as lacking AF Method B, so no generic linking to offer users similar alternative stations when a preset is out of range). This software should mostly still work in the US as the RBDS physical and data-link layers are a direct copy of RDS, but it will show standard RDS PTY descriptions rather than the customised American ones due to these changes. This is exactly the same issue experienced by anyone travelling with an RDS radio to the US. If there's demand for US PI descriptions I'll add a config option in a later version.