Introduction: TEA5767 FM Radio Breakout Board for Arduino
I recently failed to resist buying two TEA5767 FM Radio modules from eBay for almost nothing. These little modules use the I2C serial protocol and so are ideal for connecting to an Arduino.
There is more information and other Arduino projects over on my blog: http://srmonk.blogspot.co.uk/2012/03/tea5767-fm-radio-breakout-board-for.html
You will need:
* Stripboard
* a TEA5767 FM Radio module from eBay
* An Arduino Uno
* 0.1 inch header socket strip
* Wire
* soldering equipment
* audio amplifier
* optional 10k linear pot
* optional stripboard
Step 1: Break the Links on the Stripboard
First cut the tracks on the back like this:
Step 2: Solder Links Between the Breakout Board and the Module
Then solder short lengths of solid core wire in place, either side of the breaks in the strips.
Bend the cut ends inwards so that they will meet the connectors on the module. Trim the ends of so they just reach the module. I actually cut mine a bit short (see below) which made thins more difficult.
Before trying to solder the leads to the module, fit a crocodile clip over the leads to act as a heat sink, otherwise the leads are likely to become detached from the strips beneath.
Step 3: Solder Link Wire and Header Sockets
When all the pins are soldered, solder in a link wire between pins 3 and 6. This is also the ground connection.
Step 4: Attach to Arduino
Here is the pinout for the finished module. On the left we have the IC2 connections SDA and SCL that will go to pins A5 and A4 respectively on the Arduino Uno.
The right hand side has a connection ANT (antenna) left and right audio and ground.
Connect all the left hand connections to the Arduino as described above.
If you want to be able to control the tuning of your radio (you don't have to, you can just set the frequency in the sketch) then optionally use a solderless breadboard to hold a pot (I used 10K linear).
The pot should be connected with the center slider to Arduino pin A0 and one end to GND and the other to +5V. Turning this pot will change the frequency.
Step 5: Conclusion
Note that I actually used a Freetronics USB Droid board, as that was what I had to hand, rather than an Uno, but an Uno will work fine.
On the right-hand side of the breakout board (top in the picture above) I attached a 3.5mm socket to one channel and GND and poked a length of wire into the ANT socket to act as an antenna.
The sketch is very simple, all the real action is in the function setFrequency().
In the 'loop' the analog reading from the pot is converted into the frequency range and then rounded to 1 decimal place, to make it easier to tune.
The output from the module requires amplification. An iPod dock with aux-in will work fine and I was surprised at the quality of the sound, given the price.
For a similar but more advanced project have a look at: http://www.electronicsblog.net/arduino-fm-receiver-with-tea5767/ I found this very useful when making this project.
Here is the sketch. Note you need Arduino 1.0
#include <Wire.h>
unsigned char frequencyH = 0;
unsigned char frequencyL = 0;
unsigned int frequencyB;
double frequency = 0;
void setup()
{
Wire.begin();
frequency = 93.0; //starting frequency
setFrequency();
Serial.begin(9600);
}
void loop()
{
int reading = analogRead(0);
//frequency = map((float)reading, 0.0, 1024.0, 87.5, 108.0);
frequency = ((double)reading * (108.0 - 87.5)) / 1024.0 + 87.5;
frequency = ((int)(frequency * 10)) / 10.0;
setFrequency();
Serial.println(frequency);
}
void setFrequency()
{
frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;
frequencyH = frequencyB >> 8;
frequencyL = frequencyB & 0XFF;
delay(100);
Wire.beginTransmission(0x60);
Wire.write(frequencyH);
Wire.write(frequencyL);
Wire.write(0xB0);
Wire.write(0x10);
Wire.write((byte)0x00);
Wire.endTransmission();
delay(100);
}
17 Comments
Question 3 years ago
I made it.Frequency is viewed in Serial monitor. But there is not any sound. I tried to using 3 modules. Please help
Question 4 years ago on Step 5
Is the TEA 5767 capable to work as FM transmitter? I have a
6 years ago
I made this and controlled it with a ESP-01, use a web interface to control it, now trying to link up a TDA7313 audio processor ic and a YX5300 Mp3 decoder. Looking for a DAB module next.
6 years ago
I want to do this with Raspberry Pi but with one difference, I want HD radio reception. Is there a board that will do this? I know of the SI4777 but that's a SMD chip and I have no way to work with those, I need a breakout board like this.
9 years ago on Step 5
if you wanted to really make this a smaller project, you could use an ATTiny, 8 pin atmel MPU with an internal 8mhz clock. there is a software I2C bus library written for it. you'd even have 3 IO pins left for buttons, or software serial.
Has anyone had success obtaining RDS station info from one of these FM modules?
Reply 6 years ago
i did it with an attiny85. Didnt look at RDS
7 years ago
Got this radio module, added a supercheap amplifier
http://www.aliexpress.com/item/Super-Mini-PAM8403-...
and am controlling it with an Attiny85
8 years ago on Introduction
nice tutorial, i orderd one to. now i solderd it to the prototype board. but it doesnt work. is there any way i can check if its broken or did i solder something wrong?
any tips?
8 years ago on Introduction
Good job! Congratulations. Where should I put the power ? at the output of the potentiometer or TEA ? Thank you! From Argentina!
9 years ago on Introduction
Hello. Does the module TEA5767 support AM?. Thank you. Very nice instructable.
9 years ago on Introduction
Great documentation, thank you for this!
I clamped the frequency set call so that it only set a new frequency in case the analogue read has changed.
(and with my 50k pot it is still changing every then and now when I do nothing)
double frequency_set = 0;
if ( frequency != frequency_set) {
setFrequency();
Serial.println(frequency);
frequency_set=frequency;
}
9 years ago on Introduction
Any idea if this would work in an automotive setting?
10 years ago on Introduction
Hi, no not Australian, I'm a brit - but I do like the Freetronics kit - well designed and high build quality.
11 years ago on Introduction
Thank you Smonk1... Your Arduino code allowed me to get up and running quickly. Now I just need to tackle to tech docs to really get to know this chip :-)
By the way, I took a slightly different route with regards to mounting the chip... Instead of stripboard I used an IC socket... Same job, just smaller footprint, and it is a little less fragile.
11 years ago on Introduction
Hi, it lets you connect the difficult to solder to FM radio module to an Arduino so that you can make an Arduino controlled FM radio.
11 years ago on Introduction
yeah same question as keimel
11 years ago on Introduction
So, um...
What does it do? Besides... break things out?