ESP32 + Si4703 FM module not responding

Hi guys, first time poster, long time reader.

I'm trying to test a FM receiver module, however I'm running into an issue where the Si4703 stops responding to inputs.
Quick run down of my equipment:

ESP32-S3
Si4703

I tried multiple libraries, all just example code, with pins as described in the example where possible, or with pins defined by me, and with different starting frequencies. I also tried an ESP32 DevKit1 board. Outcomes are the same.
I'll post my exact code from the SI470X library, just because it's the last one I've been messing with. It "hangs" at the line:

rx.setFrequency(10250);

If I comment out that line the code will actually allow me to enter a command, however only volume up and down. If I try to seek or change frequency, it becomes completely unresponsive, no errors.

I've also tried the SparkFunSi4703 library. That one takes me to the menu, only responds to volume up or down and stops responding when I adjust frequency.

Lastly I've tried the Radio library by mathertel. This one provides some sort of error message, however I don't know what it means:

>RADIO::initWire()
>SI4703::init()
_wireExists(16): err=2
Write Fail:2
>setBand(1)
Write Fail:2
>setFrequency(10250)
Write Fail:2
>_waitEnd()
>Seek limit hit
Write Fail:2

Can anyone provide any insight in what is going on, where I messed up or what I should try next? Is my module defective?
Any help is greatly appreciated!

Here is the example sketch I have been using with the SI470X library:

#include <SI470X.h>

#define RESET_PIN 16      // On Arduino Atmega328 based board, this pin is labeled as A0 (14 means digital pin instead analog)  

// I2C bus pin on ESP32
#define ESP32_I2C_SDA 17
#define ESP32_I2C_SCL 18


#define MAX_DELAY_RDS 40   // 40ms - polling method

long rds_elapsed = millis();

SI470X rx;


void showHelp()
{
  Serial.println("Type U to increase and D to decrease the frequency");
  Serial.println("Type S or s to seek station Up or Down");
  Serial.println("Type + or - to volume Up or Down");
  Serial.println("Type 0 to show current status");
  Serial.println("Type ? to this help.");
  Serial.println("==================================================");
  delay(1000);
}


// Show current frequency
void showStatus()
{
  char aux[80];
  sprintf(aux,"\nYou are tuned on %u MHz | RSSI: %3.3u dbUv | Vol: %2.2u | %s ",rx.getFrequency(), rx.getRssi(), rx.getVolume(), (rx.isStereo()) ? "Yes" : "No" );
  Serial.print(aux);
}


void setup()
{
    Serial.begin(115200);
    while (!Serial) ;

    // The line below may be necessary to setup I2C pins on ESP32
    Wire.begin(ESP32_I2C_SDA, ESP32_I2C_SCL);
    
    rx.setup(RESET_PIN, ESP32_I2C_SDA);

    rx.setVolume(6);

    delay(500);

    // Select a station with RDS service in your place
    Serial.print("\nEstacao 106.5MHz");
    rx.setFrequency(10250); // It is the frequency you want to select in MHz multiplied by 100.

    // Enables SDR
    rx.setRds(true);
    rx.setRdsMode(0); 
    rx.setSeekThreshold(30); // Sets RSSI Seek Threshold (0 to 127)

    showHelp();
    showStatus();
  
}

void loop()
{
  if (Serial.available() > 0)
  {
    char key = Serial.read();
    switch (key)
    {
    case '+':
      rx.setVolumeUp();
      break;
    case '-':
      rx.setVolumeDown();
      break;
    case 'U':
    case 'u':
      rx.setFrequencyUp();
      break;
    case 'D':
    case 'd':
      rx.setFrequencyDown();
      break;
    case 'S':
      rx.seek(SI470X_SEEK_WRAP, SI470X_SEEK_UP);
      break;
    case 's':
      rx.seek(SI470X_SEEK_WRAP, SI470X_SEEK_DOWN);
      break;
    case '0':
      showStatus();
      break;
    case '?':
      showHelp();
      break;
    default:
      break;
    }
    delay(200);
    showStatus();
  } 
  delay(5);
}

Hi !

I have an ESP32-S3 (ESP32-8048S050 TFT display) and the same Si4703 board.

I did the same tests as rockinman66666 and I can't get the Si4703 board to work.

There seems to be some kind of incompatibility between ESP32-S3 and the Si4703 board. (Perhaps at the level of the SI470X.h library)

I ran the Si4703 board with a WeMos D1 Mini ESP32 without any issues.

Can anyone test ESP32-S3 board with an Si4703 board ?

Thank's a lot !

Michel

Hi rockinman66666 !

I found a solution for ESP32-S3 and Si4703...

I installed this Sparkfun library that I found on this page: Si4703 FM Tuner Evaluation Board - BOB-10344 - SparkFun Electronics

I modified the file "Si4703_Breakout.cpp" by changing " Wire.begin(); " to " Wire.begin(_sdioPin, _sclkPin); "

I looked at the example in the directory and adapted my program. In my case, it looks like this:

#include <Si4703_Breakout.h>
#include <Wire.h>

int resetPin = 13;
int SDIO = 19;
int SCLK = 20;

Si4703_Breakout radio(resetPin, SDIO, SCLK);

void setup()
{
   radio.powerOn();
   radio.setVolume(5);
   radio.setChannel(933); //93.3mhz
}

void loop()
{
}

If you have other I2C devices, you must do a " radio.powerOn(); " before starting the other I2C devices.

Bye !

Michel

@rockinman66666
I am having the same issue with esp32-s3. As far as I can tell, it is in the waitAndFinishTune()- in this line of code:

do
    {
        getStatus();
    } while (reg0a->refined.STC == 0);

The code is executing getStatus(); but it seems reg0a->refined.STC == 0 condition is the problem.
Anyone have any luck with this?

After more digging, I can confirm the same issue when running other libraries such as Radio GitHub - mathertel/Radio: An Arduino library to control FM radio chips like SI4703, SI4705, RDA5807M, TEA5767.

Either this is an issue with esp32-s3 or we are making the same newb mistake.
I will be happy to troubleshoot, but have been trying different things for about 2 days and am out of ideas
It is going to take someone a lot smarter than me to fix this.

Fish

Thanks for looking into this. It's been a while since I last looked into this issue, life got busy. But I still haven't been able to get around this issue. Just like you I was able to reduce it down to a single line for all three of the libraries I tried, it's always the STC line where the frequency to tune to is supposed to be set if I remember right.

At this point I've kinda given up on this, but if someone can provide additional insight I would gladly pick this back up and have another go at it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.