TEA5767 FM Radio Breakout Board for Arduino
by smonk1 in Circuits > Electronics
136193 Views, 131 Favorites, 0 Comments
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
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
Break the Links on the Stripboard
First cut the tracks on the back like this:
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.
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.
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.
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.
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.
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);
}
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);
}