Advertisement

The Arduino FM Radio Build

What do you pick when you want to make something with a nostalgic touch? A radio, of course! Well, the project presented here is about building a compact Arduino FM Radio with the help of an astonishingly cheap (eBay) radio module. Recently, I built one for my needs and was very pleased with the preliminary results.

 

Hardware Overview

My good old radio design was based on the TEA5767 radio chip. Recently, I got another simple RDA5807M (radio chip by RDA Microelectronics) FM radio module from eBay cheaply enough to give it a try. The RDA5807M — a single-chip broadcast FM stereo radio tuner with fully integrated synthesizer, IF selectivity, RDS/RBDS and MPX decoder — supports frequency range from 50 MHz to 115 MHz. It works with 3.3 V and can directly drive 32-Ω headphones. Furthermore, it can be controlled using the I2C bus and can decode stereo signals and radio data system (RDS).

Because some hardware setup is required to build up a functioning radio, an Arduino can be used to supply the voltage and control the radio chip. The 3.3-V power can be taken from the Arduino’s onboard voltage regulator, and the I2C bus connections SDA and SCL can be used directly without additional level shifters (at least I had no problems using it this way). However, the datasheet specifies I2C interface level to a maximum of VCC (3.3 V), so you should consider using a logic-level translator in between (cheap logic-level translator/shifter modules are available on eBay). Shown below is the basic hardware setup diagram. Here, Arduino’s (Uno R3) A4 (SDA) and A5 (SCK/SCL) pins are used for the I2C control, and the module is 3.3 V powered by the Arduino itself. It seems that external pull-up resistors for I2C lines are not needed because the module already has resistors for this. If you want to attach an antenna, ~96-centimeter-long wire (just fine) should be attached to the antenna (ANT) pad.

The stereo headphone socket is to connect a 32-Ω headset with no amplification. It would be better to tweak the audio output by adding suitable audio AC couple capacitors (and optional limiter-resistors) between the module and the headphone socket (refer to the datasheet). However, my setup worked without that accession just because my headphone socket (TRS socket) module bears such supporting components onboard.

 

Initial Tryout

Sending instructions to the radio module from a microcontroller like the Arduino is not an easy task for tyros. Fortunately, Matthias Hertel (http://mathertel.blogspot.in) has designed an amazing library for the Arduino platform. Surprisingly, in addition to the RDA5807M, the library also supports other popular radio modules such as TEA5767, SI4703, and SI4705. The Radio Library for this project can be downloaded as a zip file from here: https://github.com/mathertel/Radio/archive/master.zip

 

The following is a test sketch for the initial tryout. This lucid sketch shows how to select the receiver frequency (setBandFrequency), set the volume (setVolume), etc. Before uploading the sketch to your Arduino board, be sure to change the 1019 (101.9 MHz) frequency with a frequency that is easy to pick up from your location; i.e., the frequency of your favorite local station!

/*

   - Arduino FM Radio with RDA5807M

   - Sketch for Initial Tryout

   - Based on a Library created by Matthias Hertel

   - More documentation is available at http://www.mathertel.de/Arduino

   - Compiled & Tested by T.K.Hareendran

*/




#include <Arduino>;

#include <Wire>;

#include <radio>;

#include <RDA5807M>;




#define FIX_BAND     RADIO_BAND_FM   //Radio Band - FM

#define FIX_STATION  10190            //Station Tuned - 101.9 MHz

#define FIX_VOLUME   4               //Audio Voulme Level - 4




RDA5807M radio; 




void setup() {

  // open the Serial port

  Serial.begin(57600);

  Serial.println(“My FM Radio”);

  delay(200);




  radio.init();




  radio.debugEnable();




  radio.setBandFrequency(FIX_BAND, FIX_STATION);

  radio.setVolume(FIX_VOLUME);

  radio.setMono(false);

  radio.setMute(false);

}




void loop() {

  char s[12];

  radio.formatFrequency(s, sizeof(s));

  Serial.print(“Station:”);

  Serial.println(s);




  Serial.print(“Radio:”);

  radio.debugRadioInfo();




  Serial.print(“Audio:”);

  radio.debugAudioInfo();




  delay(3000);

}

Enhancement

Sooner or later, you will probably need a compact, low-frequency audio power amplifier to be integrated into your radio. A small but mighty solution here is the usage of an astonishingly cheap PAM8403 stereo audio amplifier module from eBay. Because the module already has requisite capacitors and resistors at the line (L&R) input, you can directly connect the headphone output (AFL and AFR) of the radio to the line input of the PAM8403 audio module. Finally, pick an external 5-VDC/USB power supply to run the audio module.

Quick tip: Because the RDA5807M module is fabricated as a tiny circuit board with castellated mounting holes, it’s not easy to solder standard male-header strips. That’s why I extended the required connections as shown here (thanks to my microscope and steady hands):

 

 

Get Inspired…

This is not a write-up of my latest Arduino Radio project because I am now working on more advanced versions of the project with buttons, knobs, display, and some other opulent features. I’ve put a tremendous amount of time and effort into creating this resource, so please be cool and do the right thing, and stay tuned for the upcoming part planned to be published here after a short break!

9 Comments

Join the conversation!

Error! Please fill all fields.
  • T.K.Hareendran

    @braselectron: @braselectron:

    Thank you for your insightful comments and suggestions!

    & Best wishes for your future endeavors!

  • braselectron

    Thank you for sharing. Since you are from India, how about a DRM+ receiver project ?

    • Adam Carlson

      I am not familiar with this standard, I will have to go and look it up. I am guessing that it is a broadcast standard common in India?

    • T.K.Hareendran

      @braselectron: In yesteryear, I decided to try something on DRM (and SDR), now you just rekindled the spark. Thank You!

      Regarding my inspiration, the best catch by far was a diy article “A digital radio for 500 kHz to 22 MHz” published in Elektor Electronics (3/2004).

      Hope I can take readers to a simple yet promising diy project on DRM within a few months. Frankly, I need some time to brush up my (rusty) RF skills 🙂

  • T.K.Hareendran

    Shortcut! The test sketch can also be downloaded ( .ino file ) from my Google Drive account.
    Here is the link:
    https://drive.google.com/open?id=0B0wlhgHy2y3lYzRDVHlId2JUQkk

    • braselectron

      Dear TKHareendran,

      TK for the reply. I am from Brazil. I have been checking the progress of DRM for some time now, and India is very advanced in there commercial implementation.

      I believe DRM30/DRM+ is the future of radio broadcast stations. Here in Brazil, it could become also the standard too if we can make reception cheap and accessible for all (home users, car units and low income people), like a analog receiver is today.

      The problem is that there no available “off-the-shelf” radios tuners for sell (any more or at low price), and it looks like a “political/market” challenge for the standard, as usual.

      I have checked many implementations, but the one I believe will trigger the interest of Ham community and electronics enthusiasts will be using SDR and Gqrx and maybe a plugin for Gqrx.

      I have found even a chip maker NXP Semiconductors that have ofers of (TEF701x) and (SAF360X) which is the basic building blocks for a commercial device.

      The best SDR to use, in my understanding (and on the tests I have done, so far) is the NooElec USB NESDR Nano2+. I was even been able to decode TV ISDB-Tb/SBTVD using a Gqrx model from a university of Uruguay.

      For DRM there is a DREAM code on sourceforge but I was not able yet to compile it on my Ubuntu 14.04.5 (32bits) distribution. I am still figuring out how to fiz the compiling errors.

      For now, the goal could be a kit using a Rpi3, NESDR USB Nano2+, a LCD screen, keypad, amplifier and speakers, all this using Gqrx so that we can get help from Opensource enthusiasts and make it the “killer kit” for DRM30 and DRM+

      Cheers!

  • Adam Carlson

    TK, this looks like a really fun project. I will be following this closely. Are you planning on adding a small screen with it? If so, I will be really interested to see how that is done.

Looking for the latest from TI?