EASY Radio Receiver Arduino

5,456

56

10

Introduction: EASY Radio Receiver Arduino

Hi,

this is my first instructable, but isn't the first Arduino project...

Let's Go...

Step 1: Get All Needed Parts (Parts List)

1 - Arduino Uno/Nano

1 - 10k Potenciometer

1 - Radio Receiver TEA5767

Some Wires

Step 2: Connect Wires

Connect all wires as shown in the picture...

Step 3: Build Code

This is the code that you will use.

You will need TEA5767Radio.h library for arduino

So, the includes will be:

#include <Wire.h>
#include <TEA5767Radio.h>
#include <math.h> //this is to round readed values

then we will declare variables:

TEA5767Radio radio = TEA5767Radio(); //declare radio as TEA5767Radio type
float freq, lastfreq; //freq and lastfreq should be float because we will use decimal values in MHz
int sensorValue; // this is to read potenciometer value

Now let's setting up arduino:

void setup(){

Wire.begin();

Serial.begin(9600);

}

Then let's create our loop:

void loop() {

sensorValue = analogRead(A0);
freq = (sensorValue * (20.5 / 1023.0))+87.5;
freq = freq*10.0f;
freq = (freq > (floor(freq)+0.5f)) ? ceil(freq) : floor(freq);
freq = freq/10.0f; //round the freq value to a 1 decimal place

if(lastfreq!=freq){

lastfreq=freq; //save frequency to check if frequency was changed
radio.setFrequency(freq); //sett choosen frequency
Serial.print("Frequency: ");
Serial.print(freq);
Serial.println("MHz");

}

}



Step 4: Finally

Finally connect your headphones, start your Arduino, and start to listen your favourite radio...

Amps and Speakers Contest 2016

Participated in the
Amps and Speakers Contest 2016

Circuits Contest 2016

Participated in the
Circuits Contest 2016

Be the First to Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest

    10 Comments

    0
    tonkatu59
    tonkatu59

    1 year ago on Step 4

    Hello
    I can change the long-awaited reception frequency in this article.
    My sketches so far have only been fixed for one station.
    I was in addition to this sketch LCD, an LCD has been added to display the received frequency. I2C connection. As a result, reception and frequency display can be performed only with a 5V power supply.
    This took almost two years.
    (Although there was a break on the way)
    Thank you very much.

    IMG_20191108_124124.jpg
    0
    magnocampos
    magnocampos

    Reply 1 year ago

    That's nice... Go on, and good job.. :D

    0
    varung42
    varung42

    3 years ago

    What is the range of frequencies that we can hear?

    0
    magnocampos
    magnocampos

    Reply 3 years ago

    I'm sorry for later answer...

    you want to know the range that we can hear ou we can set on this?

    we can hear 20hz to 20000hz +/-

    In the project we can set between 76Mhz and 108MHz

    0
    cubetron
    cubetron

    4 years ago

    Very good project, simple and effective to start using the radio module. I suggest that you add a couple of lines to the wiring description to state that each Arduino board has different SDA and SCL pins, so if you do not use UNO (or Nano) you have to change wiring accordingly. For example MEGA has:

    SDA pin 20

    SCL pin 21

    0
    magnocampos
    magnocampos

    Reply 4 years ago

    Thanks for your tip...

    I'll update the post... But I need to test it first.. :P

    0
    Nematic!
    Nematic!

    4 years ago

    Nice project :)

    0
    magnocampos
    magnocampos

    Reply 4 years ago

    Thanks... :D

    1
    DIY Hacks and How Tos

    Cool Arduino project. Where can you buy the reciever module?

    0
    magnocampos
    magnocampos

    Reply 4 years ago

    Hi, Thanks,

    I bought on ebay for $US 4...
    http://www.ebay.com/itm/TEA5767-FM-Stereo-Radio-Module-for-Arduino-76-108MHZ-With-Free-Cable-Antenna-/221944971609?hash=item33acf38159:g:c1MAAOSwZVhWTXJZ