Instructables

FM Radio the easy way

Picture of FM Radio the easy way
module1.png
imagejpeg 4.jpg
imagejpeg_3.jpg

Recently I bought an FM Reciver from ebay for about $3 is a RDA5807 from EIModule, no offense but their documentation is useless.  How ever it has an I2C interface and its compatible with the TEA5767. Sorry about the pics using my cellphone.

 

 

 

Specifications

(1) RDA5807 FM Radio Module

A. Input Power2.7~3.6V

B. Frequency Range: 87.5~108MHz

C. 32Ω Load Audio Output. Can drive earphone directly

D. Control Interface: I2C

E. 3.5mm Audio Jack for audio output

F. DIP28

 

(2) Arduino (mega in this case)

 

(3) Jumper wires

 

(4)Headphones or 3.5mm audio cable to drive an amplifier

 

 

 

 
Remove these adsRemove these ads by Signing Up

Step 1: The Wiring

Picture of The Wiring
imagejpeg_5.jpg
imagejpeg_6.jpg
  

Connecting to arduino is very simple

We have 28 pins  but we only need 4 or 5 if using an external antenna.

 

Module                     Arduino Mega

Pin 8 SCL                     Pin 21              

Pin 9 SDA                     Pin 20

Pin 14 GND                  GND

Pin 27  3.3V                  3.3V

 

 

Note: you can connect 5V to Pin 28 if you don’t have 3.3 available.

 

Note: The schematics found on the documentation say that   PIN 26 is GND if you connect pin 26 to ground the module WILL NOT WORK!! GND is PIN 14.

 

Note: The module uses GND from the 3.5mm jack as an antenna but you can also use an external antenna connected to PIN 15.  

Step 2:

Picture of
serialmon.jpg

 

The code is very simple and since its compatible with the TEA5767 there are tons of sketches and  documents on the web.

 

#include <Wire.h>

 

 unsigned char frequencyH = 0;

 unsigned char frequencyL = 0;

 

 unsigned int frequencyB;

 double frequency = 0;

 

 void setup()

 {

   Wire.begin();

   frequency = 96.7 ; //starting frequency

   setFrequency();

   Serial.begin(9600);

 }

 

 void loop()

 {

   setFrequency();

   Serial.println(frequency);

 }

 

 void setFrequency()

 {

   frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;

   frequencyH = frequencyB >> 8;

   frequencyL = frequencyB & 0XFF;

   delay(1000);

   Wire.beginTransmission(0x60);

   Wire.write(frequencyH);

   Wire.write(frequencyL);

   Wire.write(0xB0);

   Wire.write(0x10);

   Wire.write((byte)0x00);

   Wire.endTransmission();

   delay(1000);

 }

Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!