Toggle Nav

Interfacing TEA5767 FM Radio Module with Arduino

Author

TEA5767, FM Radio , Arduino

Table of Contents

TEA5767 FM Radio Module Features

The TEA5767 module is an FM radio receiver that can be connected to a microcontroller using the I2C protocol to search for radio stations. This module has a headphone output.

You can download the TEA5767 FM Radio Module datasheet here. 

TEA5767 FM Radio Module Pinout

This Module has 4 pins:

  • VCC: Module power supply – 5 V
  • GND: Ground
  • SLC: Synchronization for I2C protocol
  • SDA: Data for I2C protocol

You can see pinout of this module in the following image.

Required Materials

Hardware Components

Arduino UNO R3 × 1
TEA5767 Stereo FM Radio Module × 1
Male to Female Jumper Wire × 1

Software Apps

Arduino IDE

Interfacing TEA5767 FM Radio Module with Arduino

Step 1: Circuit

Connect the module to Arduino according to the following image.

Note

To receive signal, you should connect a headphone or antenna to the antenna jack.

Step 2: Installing Library

Install following library on your Arduino board.

https://github.com/big12boy/TEA5767.git

Suggested Reading

If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library

Step 3: Code

Upload the following code to Arduino.

/*   
modified on Sep 7, 2020
by big12boy Examples from https://github.com/big12boy/TEA5767.git
https://electropeak.com/learn/ 
*/ 

#include 
TEA5767 radio = TEA5767();

//User changeable
short minlvl = 14; //Required Signal Level (0-5=unuseable, 6-9=poor, 10-12=good, 13-14=really good, 15=excellent)
long baud = 250000; //Baudrate of the Serial Interface
//---------------

void setup() {
  Serial.begin(baud); //Initialize Serial Connection
  
  radio.init(minlvl); //Initialize needed Features and search for Stations

  //Print the result
  Serial.print("Found ");
  Serial.print(radio.getStations()); //Get Number of Stations from Library
  Serial.println(" Station(s):");
  Serial.println();

  //Print all available Stations
  listStations();
  
  Serial.println("Send something to change to the next Station!");
}

void loop() {
  //Wait for User Input
  if(Serial.available()){
    radio.nextStation(); //Switch to next Station

    delay(50);    //Wait for the Signal to stabilize
    printStation(); //Print Station Details

    while(Serial.available())Serial.read(); //Clear the Serial Buffer
  }
}

void listStations(){
  short stations = radio.getStations(); //Get available Stations
  for(short i = 0; i < stations; i++){ //Go through all Stations
    delay(50);  //Wait for the Signal to stabilize
    printStation(); //Print Details
    radio.nextStation(); //Jump to the next Station
  }
  Serial.println("----------------------"); //Finish of the List
}

void printStation(){
  Serial.print("Frequency:   ");
  Serial.println(radio.getFrequency()); //Print current Frequency
  Serial.print("Signallevel: ");
  Serial.println(radio.getSignalLevel()); //Print current Signal Level (0-15)
  Serial.println();
}

After running the code, you will see the following image in the serial output.

Liked What you see?

Get updates and learn from the best

More To Explore

Leave a Reply

Your email address will not be published. Required fields are marked *