Cara Membuat Radio FM Stereo Reciever dengan Arduino dan module TEA5767

Author : Ila MulyandiNo comments


TEA5767 adalah module Stereo FM Receiver
Yang dapat kita gunakan bersama Arduino.
Komunikasi dengan Arduino menggunakan i2C
interface dengan i2C address (0x60).

Module TEA5757 sudah dilengkapi BreakoutBoard dengan 2 port audio 3.5mm.1port untuk audio out dan 1 lainya untuk Antena yang sudah disertakan dalam paket penjualanya.

 Berikut adalah Spesifikasi Lengkap dari Module FM Stereo TEA5767 :
  • power supply: 5V
  • Frequency range: 76-108MHZ
  • PCB size: 31*30mm
  • With reverse polarity protection diode
  • With power output filtering sensor
  • Directly plug antenna interface
  • I2C bus communication
  • Multi capacitor combined filter
  • Blue LED power indicator
  • FM chip module TEA5767
  • Onboard 3.5mm audio interface
  • If connects with singlechip, only connect the Power Ground and two I2C communication cable
Features:
  • LC harmonic oscillator use low cost fixed chip
  • No need to adjust Intermediate frequency
  • High sensitivity(low noise RF input amplifier)
  • High power auto gain control AGC circuit
  • Soft mute

Module ini dilengkapi dengan 4 Pin Header yaitu VCC,GND,SDA & SCL
Penyambunganya dengan Arduino adalah Sbb :
TEA5767 <--> Arduino Uno/Mega
VCC <--> 5V
GND <--> GND
SDA <--> A4 uno / D20 Mega
SCL <--> A5 uno / D21 Mega

Frekeunsi Gelombang Radio pada module TEA5767 dapat di set melalui program pada arduino
dengan format


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <TEA5767.h> //library FM Module
#include <Wire.h> //library i2C Connection

TEA5767 Radio;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
Radio.init();
Radio.set_frequency(93.6); 
Serial.print("Radio Frequency set at 93.6Mhz")
}

void loop() {
  // put your main code here, to run repeatedly:

}

Berikut adalah Contoh Project Digital Radio FM menggunakan Module TEA5767 dengan tombol Up dan Down untuk mencari Sinyal Radio secara Otomatis dan menampilkan beberapa info pada layar LCD.



Berikut Wiring Projectnya :
 Berikut Coding Sketch Arduino nya :


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
#include <TEA5767.h>
#include <Wire.h>
#include <Button.h>
#include <LiquidCrystal_I2C.h>   

LiquidCrystal_I2C lcd(0x27, 20, 4);
#define PULLUP true
#define INVERT true 
#define DEBOUNCE_MS 20
#define Next_Button 11
#define Prev_Button 12

TEA5767 Radio;
double old_frequency;
double frequency;
int search_mode = 0;
int search_direction;
unsigned long last_pressed;
int ch = 0;

Button btn_forward(Next_Button, PULLUP, INVERT, DEBOUNCE_MS);
Button btn_backward(Prev_Button, PULLUP, INVERT, DEBOUNCE_MS);

void setup() {  
  Wire.begin();
  Radio.init();
  Radio.set_frequency(93.6); 
 pinMode (13, OUTPUT);
 digitalWrite (13, HIGH); //get VCC from pin 13 to button led
  lcd.begin();
  lcd.clear();
}


void loop() {
btn_forward.read();
btn_backward.read();

  unsigned char buf[5];
  int stereo;
  int signal_level;
  double current_freq;
  unsigned long current_millis = millis();
  
    if (Radio.read_status(buf) == 1) {
    current_freq =  floor (Radio.frequency_available (buf) / 100000 + .5) / 10;
    stereo = Radio.stereo(buf);
    signal_level = Radio.signal_level(buf);
    //deskripsikan frekuensi dan nama Channel radio di daerahmu
    lcd.setCursor(0,1); 
    if (current_freq == 87.60){
    lcd.print("Hard Rock ");ch=1;}
    if (current_freq == 88.00){
    lcd.print("Mustang   ");ch=1;}
    if (current_freq == 88.30){
    lcd.print("M2 Radio  ");ch=1;}
    if (current_freq == 88.80){
    lcd.print("RRI JKT 3 ");ch=1;}
    if (current_freq == 89.60){
    lcd.print("i-Radio   ");ch=1;}
    if (current_freq == 90.00){
    lcd.print("Elshinta  ");ch=1;}
    if (current_freq == 92.40){
    lcd.print("Pass FM   ");}
    if (current_freq == 93.60){
    lcd.print("Gaya FM   ");ch=1;}
    if (current_freq == 98.70){
    lcd.print("GEN FM    ");}
    if (current_freq == 101.0){
    lcd.print("Jack FM   ");ch=1;}
    if (current_freq == 102.2){
    lcd.print("Prambors  ");ch=1;}
    if (current_freq == 100.3){
    lcd.print("El Gangga ");ch=1;}
    if (current_freq == 104.6){
    lcd.print("Trijaya   ");ch=1;}
    if (ch==0){lcd.print("Unregistered");}

    lcd.setCursor(0,0);
    lcd.print("FM:"); lcd.print(current_freq);
    lcd.setCursor(0,2);
    if (stereo) lcd.print("STEREO "); else lcd.print("MONO   ");
    lcd.setCursor(0,3);
    lcd.print("Signal: ");lcd.print(signal_level);
  }
  
  if (search_mode == 1) {
      if (Radio.process_search (buf, search_direction) == 1) {
          search_mode = 0;
      }
  }
  
  if (btn_forward.isPressed()) {
    last_pressed = current_millis;
    search_mode = 1;
    search_direction = TEA5767_SEARCH_DIR_UP;
    Radio.search_up(buf);
    delay(300);
  }
  
  if (btn_backward.isPressed()) {
    last_pressed = current_millis;
    search_mode = 1;
    search_direction = TEA5767_SEARCH_DIR_DOWN;
    Radio.search_down(buf);
    delay(300);
  } 
  //delay(20); 
  delay(50);
}

Berikut data pendukung untuk Library nya :

Library TEA5767 FM Module :
https://drive.google.com/open?id=0B7t_g4hdtuILX1loNWVUblo5dFE

Library Button Module (Low Active/Internal Pullup type):
https://drive.google.com/open?id=0B7t_g4hdtuILdlR1dk53aUlhcm8

Library i2C LCD :
https://drive.google.com/open?id=0B7t_g4hdtuILeEc3Uk9ZUkVKYmM

Button Menggunakan Jenis Push Button / Tactile Switch dengan Low Aktif
(aktif jika dihubungkan ke GND) dan menggunakan internal PULLUP di arduino sehingga tidak butuh resistor pullup ke VCC.
Posted On : Sunday, January 22, 2017Time : 9:46 PM
SHARE TO :
| | Template Created By : Rajendroid | CopyRigt By : ARDUINO | |