Adafruit Si4713 FM Radio Transmitter With RDS/RDBS Support

Skip to main content Adafruit Si4713 FM Radio Transmitter with RDS/RDBS Support Arduino Code
  • Overview
  • Pinouts
  • Assembly
  • Arduino Code
  • Python & CircuitPython
    • Python Docs
  • Downloads
  • Single page
  • Feedback? Corrections?
  • Text View
Featured Products view all
  • Top down view of a Adafruit Stereo FM Transmitter with RDS/RBDS Breakout next to a 11-pin header and under blue string coiled up. Adafruit Stereo FM Transmitter with RDS/RBDS Breakout - Si4713 No Longer Stocked
  • Stereo 3.5mm Plug/Plug Audio Cable Stereo 3.5mm Plug/Plug Audio Cable - 6 feet $2.95 Add to Cart
50 Intermediate Project guide 😍 1

Arduino Code

Arduino Wiring You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, just make sure it has I2C, then port the code - once the low level i2c functions are adapted the rest should 'fall into place'

adafruit_products_wiring.jpg

  • Connect Vin to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
  • Connect GND to common power/data ground
  • Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
  • Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2
  • Connect the RST pin to digital 12 - you can change this later but we want to match the tutorial for now
The Si4713 has a default I2C address of 0x63 - you can change it to 0x11 by connecting CS to ground but don't do that yet! Get the demo working first before making changes Download Adafruit_Si4713

To begin reading sensor data, you will need to download the Adafruit si4713 library from the Arduino library manager.

Open up the Arduino library manager:

adafruit_products_1library_manager_menu.png

Search for the Adafruit Si4713 library and install it

adafruit_products_si4713.png

We also have a great tutorial on Arduino library installation at:http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

Load Demo

Open up File->Examples->Adafruit_Si4713->adaradio and upload to your Arduino wired up to the sensor

adafruit_products_demo.png You may want to update the FM station transmission. By default the library transmits on 102.3MHz FM, but that might be 'taken' in your area. Find this line
#define FMSTATION 10230 // 10230 == 102.30 MHz
And change it to an unused frequency. This number is in 10KHz so for example 88.1MHz is written as 8810Upload it to your Arduino and open up the Serial console at 9600 baud adafruit_products_usage.jpg adafruit_products_sitest.png As long as you get to the RDS On! message that means everything works, pipe some audio into the 3.5mm jack and make sure you see the InLevel audio volume range from 0 to about -10 (dB)The fastest way to test the RDS message sending is using an RTL-SDR (that's how we debugged the breakout!) or a phone/radio that can do RDS decoding adafruit_products_g0thradio.png Using the RPS Scanning function The Si4713 has the ability 'scan' the FM band and measure the input power. You can use the RPS functionality to locate a good unused station. Find this section in the adaradio demo and uncomment the for loop: Download File Copy Code // Uncomment below to scan power of entire range from 87.5 to 108.0 MHz /* for (uint16_t f = 8750; f<10800; f+=10) { radio.readTuneMeasure(f); Serial.print("Measuring "); Serial.print(f); Serial.print("..."); radio.readTuneStatus(); Serial.println(radio.currNoiseLevel); } */ // Uncomment below to scan power of entire range from 87.5 to 108.0 MHz /* for (uint16_t f = 8750; f<10800; f+=10) { radio.readTuneMeasure(f); Serial.print("Measuring "); Serial.print(f); Serial.print("..."); radio.readTuneStatus(); Serial.println(radio.currNoiseLevel); } */ Reupload and look at the serial console: adafruit_products_RPS.png The larger the number the higher the transmission power. For example, 96.3MHz is a higher number than the others (FYI, its Univision 96.3 FM!) whereas 95.1 MHz is nice as low, that's not used for any transmission. Try to find a number that's also not surrounded by high numbers, since it can get 'drowned out' by the nearby frequencies. Library Reference

Radio Transmitter control

Start out by initializing the Si4713 chipset with
begin()
This will return true if the radio initialized, and false if the radio was not found. Check your wiring if its not 'showing up'Then you can turn on the radio transmitter with
setTXpower(txpwr)
the txpwr number is the dBμV transmission power. You can set this to 88-115dBμV or 0 (for off)Of course, you'll want to tune the transmitter! Do that with
tuneFM(freq)
That will set the output frequency, in 10's of KHz. So if you want to tune to 101.9 the frequency value is 10190You can check in on the radio with
readTuneStatus()
Whcih will set the currFreq currdBuV adnd currAntCap variables in the radio object. The first two are the frequency and power output, the third variable is the tuning antenna capacitor it set for the best output. This number will vary with antenna size and frequency.

RPS (Radio Power Sensing)

This function is used with two procedures.
readTuneMeasure(freq)
begins the measurement, freq is in units of 10KHz so 88.1MHz is written in as 8810Then you have to call
readTuneStatus()
which will wait until the chip has measured the data and stick it into the currNoiseLevel variable

RDS/RBDS (Radio Data Broadcast)

The Si4713 has great support for sending RDS data and we made it real easy too. Initialize the subsystem with
beginRDS()
Then you can set the "station name" with
setRDSstation("AdaRadio")
The radio station name is up to 8 charactersYou can also send the main buffer which usually contains the song name/artist.
setRDSbuffer( "Adafruit g0th Radio!")
You can send up to 32 characters, but you can continuously send new data, just wait a few seconds before each data rewrite so the listener's radio has received all the data

GPIO Control

There's two GPIO pins you can use to blink LEDs. They are GPIO1 and GPIO2 - GPIO3 is used for the oscillator. To set them to be outputs call
setGPIOctrl(bitmask)
where the bitmask has a 1 bit for each of the two pins. For example to set GPIO2 to be an output use setGPIOctrl((1<<2)) to set both outputs, use setGPIOctrl((1<<2) || (1<<1))Then you can set the output with
setGPIO(bitmask)
same idea with the bitmask, to turn both on, use setGPIOctrl((1<<2) || (1<<1)). To turn GPIO2 on and GPIO1 off, setGPIOctrl(1<<2)

Advanced!

We, by default, use the built-in AGC (auto-gain control) system so the audio level is maxed out. This may be annoying to you if have a good quality line level and the volume is fluctuating (it should be quiet, but isnt)in the Adafruit_Si4713.cpp file find these lines
//setProperty(SI4713_PROP_TX_ACOMP_ENABLE, 0x02); // turn on limiter, but no dynamic ranging setProperty(SI4713_PROP_TX_ACOMP_ENABLE, 0x0); // turn on limiter and AGC
and uncomment the first one, and comment the second. This will turn off the AGC

Page last edited March 08, 2024

Text editor powered by tinymce.

Assembly Python & CircuitPython Related Guides Adafruit VL53L0X Time of Flight Micro-LIDAR Distance... By lady ada intermediate Adafruit MCP4728 I2C Quad DAC By Bryan Siepert beginner Adafruit DS3231 Precision RTC Breakout By lady ada intermediate Adafruit Radio Bonnets with OLED Display - RFM69 or... By Kattni Rembor beginner Adafruit QMC5883P - Triple Axis Magnetometer By Liz Clark beginner Adafruit Qualia High Res Displayport Desktop Monitor By lady ada beginner Adafruit Terminal Block Breakout FeatherWing By lady ada beginner NES Cart RetroPie Game Console By John Park intermediate MCUME Emulators on Fruit Jam By Tim C intermediate FeatherWing Proto, Doubler and Tripler By lady ada intermediate Adafruit PCF8591 Basic 4 x ADC + DAC Breakout By Bryan Siepert beginner Adafruit TMP007 Sensor Breakout By lady ada intermediate Adafruit DPI Display Kippah By lady ada beginner Adafruit ENS160 MOX Gas Sensor By Liz Clark beginner Introducing the Adafruit WICED Feather WiFi By lady ada intermediate
Create Wishlist
× Title Description Close Search Search
Categories

Tag » Arduino Fm Transmitter Rds