Projects / Digital FM radio with TEA5767

Digital FM radio with TEA5767

Beginner1.5 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. NANOHelloPCF8574

    Wire the I2C bus

    TEA5767 and LCD share A4 and A5.

  2. NANO

    Add the buttons

    Three buttons to D2, D3 and D4 and ground.

  3. NANO

    Connect the audio

    TEA5767's headphone jack to the LM386 module with a 3.5 mm lead, and the speaker to the module.

  4. NANO

    Attach an antenna

    Use the module's antenna wire or a 75 cm piece of wire.

  5. NANO

    Upload and tune

    Press UP and DOWN to move across the band. The signal level on line 2 rises when you hit a station.

  6. NANO

    Save favourites

    Tune to a station, hold FAV for one second to save in the current slot, then tap FAV to move between slots.

In short

How do you build a digital FM radio with TEA5767?

An Arduino tunes a TEA5767 FM chip, shows the frequency on an LCD and saves favourite stations. You need Arduino Nano, TEA5767 FM radio module, 16x2 LCD with I2C backpack (PCF8574), Tactile push button 6 mm × 3, LM386 amplifier module, Speaker 8 Ω 0.5 W, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 6 steps and about 90 minutes.

Level
Beginner
Time
About 90 min
Parts
8

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
TEA5767 VCC and GNDNano 5V and GNDSupply (check your module takes 5 V)
TEA5767 SDA and SCLNano A4 and A5I2C, address 0x60
LCD SDA and SCLNano A4 and A5Shared bus, address 0x27 or 0x3F
LCD VCC and GNDNano 5V and GNDDisplay supply
TEA5767 audio out (jack)LM386 module audio in3.5 mm lead
LM386 module + and -Nano 5V and GNDAmplifier supply
SpeakerLM386 module outputSound
UP buttonNano D2 and GNDTune up 0.1 MHz
DOWN buttonNano D3 and GNDTune down 0.1 MHz
FAV buttonNano D4 and GNDTap for next favourite, hold to save

Code

Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "LiquidCrystal I2C" (Frank de Brabander). Most LCD backpacks use address 0x27, some 0x3F. The TEA5767 uses a typical PLL formula for high-side injection, which is used in many example sketches. The stations in the favourites list are placeholders, so replace them with local stations.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <EEPROM.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
const byte UP = 2, DOWN = 3, FAV = 4;
float freq = 98.3;                       // MHz
float favs[4] = {98.3, 91.1, 94.3, 104.0};
byte favIndex = 0;

void tune(float f) {
  unsigned int pll = (unsigned int)(4UL * ((unsigned long)(f * 1000000.0) + 225000UL) / 32768UL);
  Wire.beginTransmission(0x60);
  Wire.write(pll >> 8);
  Wire.write(pll & 0xFF);
  Wire.write(0xB0);                      // high-side injection, stereo
  Wire.write(0x10);                      // 32.768 kHz crystal
  Wire.write(0x00);
  Wire.endTransmission();
}

byte signalLevel() {
  Wire.requestFrom(0x60, 5);
  byte b[5];
  for (byte i = 0; i < 5 && Wire.available(); i++) b[i] = Wire.read();
  return b[3] >> 4;                      // ADC level, 0 to 15
}

void show() {
  lcd.setCursor(0, 0); lcd.print("FM "); lcd.print(freq, 1); lcd.print(" MHz   ");
  lcd.setCursor(0, 1); lcd.print("Signal "); lcd.print(signalLevel()); lcd.print("  Fav "); lcd.print(favIndex + 1);
}

void setup() {
  pinMode(UP, INPUT_PULLUP); pinMode(DOWN, INPUT_PULLUP); pinMode(FAV, INPUT_PULLUP);
  lcd.init(); lcd.backlight();
  Wire.begin();
  for (byte i = 0; i < 4; i++) {         // restore favourites if saved before
    int v; EEPROM.get(i * 2, v);
    if (v >= 875 && v <= 1080) favs[i] = v / 10.0;
  }
  tune(freq); show();
}

void loop() {
  if (digitalRead(UP) == LOW)   { freq = freq >= 107.9 ? 87.5 : freq + 0.1; tune(freq); show(); delay(200); }
  if (digitalRead(DOWN) == LOW) { freq = freq <= 87.5 ? 108.0 : freq - 0.1; tune(freq); show(); delay(200); }
  if (digitalRead(FAV) == LOW) {
    unsigned long t = millis();
    while (digitalRead(FAV) == LOW) {}
    if (millis() - t > 1000) {           // long press: save here
      int v = (int)(freq * 10 + 0.5); EEPROM.put(favIndex * 2, v); favs[favIndex] = freq;
    } else {                              // tap: next favourite
      favIndex = (favIndex + 1) % 4; freq = favs[favIndex]; tune(freq);
    }
    show();
  }
  static unsigned long lastShow = 0;
  if (millis() - lastShow > 1000) { lastShow = millis(); show(); }
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Tune to a strong local stationClear sound and a signal level above 8
Tune between stationsHiss and a low signal level
Save a favourite and power cycleIt is restored from EEPROM
Hold UPThe frequency steps across the band and wraps at the top

If it does not work

LCD blank

Wrong address. Try 0x3F or run an I2C scanner, and adjust the contrast trimmer.

Only noise

The antenna is missing or too short. Use a longer wire.

Frequency off by about 0.2 MHz

The module uses a different crystal. Check the data byte 0x10 against your module.

Hum in the speaker

Power the amplifier from a separate supply or add a 100 µF capacitor.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the digital FM radio with TEA5767?

Arduino Nano, TEA5767 FM radio module, 16x2 LCD with I2C backpack (PCF8574), Tactile push button 6 mm × 3, LM386 amplifier module, Speaker 8 Ω 0.5 W, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the digital FM radio with TEA5767 take to build?

About 90 minutes for a beginner maker, in 6 steps.

How do I know the digital FM radio with TEA5767 works?

Tune to a strong local station: Clear sound and a signal level above 8. Tune between stations: Hiss and a low signal level. Save a favourite and power cycle: It is restored from EEPROM.

LCD blank: what should I check?

Wrong address. Try 0x3F or run an I2C scanner, and adjust the contrast trimmer.

Only noise: what should I check?

The antenna is missing or too short. Use a longer wire.

Frequency off by about 0.2 MHz: what should I check?

The module uses a different crystal. Check the data byte 0x10 against your module.

Hum in the speaker: what should I check?

Power the amplifier from a separate supply or add a 100 µF capacitor.