FM Radio the Easy Way
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 Power:2.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
The Wiring
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.
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);
}
Conclusion
Overall it is a very good module with a 96cm long antenna it gets great reception. You have to take in to account that we are using it as a TEA5767 compatible mode.
There are three different ways to control the chip via I2C-bus:
a) Address 0x60 (TEA5767 compatible mode)
b) Address 0x10 (sequential access / RDA5800 mode)
c) Address 0x11 (Random access / RDA5807 mode)
TEA5767 compatible way is the easiest way. But there are a lot of controls you can enable using RDA modes.
Like Bass boost
Standby mode
Stereo Noise Cancelling (SNC)
And a lot more controls.
Well that’s all for now.