论坛风格切换切换到宽版
  • 911阅读
  • 7回复

有大佬看下我画的 SI4732 外围电路原理图 & PCB 吗? [复制链接]

上一主题 下一主题
离线bg4lgx
 
只看楼主 倒序阅读 0楼 发表于: 03-16


不响不响就不响,调了半个多月。换了好几块芯片
连烙铁都换了,实在找不到原因了。还请各位大佬看下????
主控 ESP32-S3,程序:
2 楼
原理图:


PCB;
正面




反面
本主题包含附件,请 登录 后查看, 或者 注册 成为会员
离线bg4lgx
只看该作者 1楼 发表于: 03-16
#include<Arduino.h>
#include<Wire.h>
#include<SI4735.h>

#define RESET_PIN 42              // GPIO12

#define TOUCH_BAND_BUTTON_UP 13   // Next band (GPIO13)
#define TOUCH_BAND_BUTTON_DOWN 14 // Previous band (GPIO14)

// I2C bus pin on ESP32
#define ESP32_I2C_SDA 15     // GPIO21
#define ESP32_I2C_SCL 16     // GPIO22

#define CAPACITANCE 30


#define AM_FUNCTION 1
#define FM_FUNCTION 0

uint16_t currentFrequency;
uint16_t previousFrequency;
uint8_t bandwidthIdx = 0;
const char *bandwidth[] = {"6", "4", "3", "2", "1", "1.8", "2.5"};

SI4735 si4735;

void showHelp()
{

  Serial.println("Type F to FM; A to MW; L to LW; and 1 to SW");
  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 B to change Bandwidth filter");
  Serial.println("Type ? to this help.");
  Serial.println("==================================================");
  delay(1000);
}

// Show current frequency
void showStatus()
{
  si4735.getStatus();
  si4735.getCurrentReceivedSignalQuality();
  Serial.print("You are tuned on ");
  if (si4735.isCurrentTuneFM())
  {
    Serial.print(String(currentFrequency / 100.0, 2));
    Serial.print("MHz ");
    Serial.print((si4735.getCurrentPilot()) ? "STEREO" : "MONO");
  }
  else
  {
    Serial.print(currentFrequency);
    Serial.print("kHz");
  }
  Serial.print(" [SNR:");
  Serial.print(si4735.getCurrentSNR());
  Serial.print("dB");

  Serial.print(" Signal:");
  Serial.print(si4735.getCurrentRSSI());
  Serial.println("dBuV]");
}



int touchUp, touchDown;


int readX(int pin) {
  int val;
  val = 0;
  for (int i = 0; i < 50; i++ )
    val += touchRead(pin);
  return (val / 50);  
}



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

  digitalWrite(RESET_PIN, HIGH);
  
  Serial.println("AM and FM station tuning test.");

  showHelp();

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

  delay(500);
  si4735.setup(RESET_PIN, 0, FM_FUNCTION, SI473X_ANALOG_AUDIO, 1,0);
  // Starts defaul radio function and band (FM; from 84 to 108 MHz; 103.9 MHz; step 100kHz)
  si4735.setFM(8400, 10800, 10390, 10);
  delay(500);
  currentFrequency = previousFrequency = si4735.getFrequency();
  si4735.setVolume(55);
  showStatus();
}


// Main
void loop()
{

  touchUp = readX(TOUCH_BAND_BUTTON_UP);
  touchDown = readX(TOUCH_BAND_BUTTON_DOWN);
  
  if (Serial.available() > 0)
  {
    char key = Serial.read();
    switch (key)
    {
    case '+':
      si4735.volumeUp();
      break;
    case '-':
      si4735.volumeDown();
      break;
    case 'a':
    case 'A':
      si4735.setAM(570, 1710, 810, 10);
      break;
    case 'f':
    case 'F':
      si4735.setFM(8600, 10800, 10390, 10);
      break;
    case '1':
      si4735.setAM(9400, 9990, 9600, 5);
      break;
    case 'U':
    case 'u':
      si4735.frequencyUp();
      break;
    case 'D':
    case 'd':
      si4735.frequencyDown();
      break;
    case 'b':
    case 'B':
      if (si4735.isCurrentTuneFM())
      {
        Serial.println("Not valid for FM");
      }
      else
      {
        if (bandwidthIdx > 6)
          bandwidthIdx = 0;
        si4735.setBandwidth(bandwidthIdx, 1);
        Serial.print("Filter - Bandwidth: ");
        Serial.print(String(bandwidth[bandwidthIdx]));
        Serial.println(" kHz");
        bandwidthIdx++;
      }
      break;
    case 'S':
      si4735.seekStationUp();
      break;
    case 's':
      si4735.seekStationDown();
      break;
    case '0':
      showStatus();
      break;
    case '?':
      showHelp();
      break;
    default:
      break;
    }
  } else if ( (touchUp < CAPACITANCE) ) // goes to the next band
  {
    si4735.seekStationUp();;
    delay(100);
  }
  else if ( (touchDown < CAPACITANCE) ) // goes to the previous band
  {
    si4735.seekStationDown();
    delay(100);
  }
  
  delay(100);
  currentFrequency = si4735.getCurrentFrequency();
  if (currentFrequency != previousFrequency)
  {
    previousFrequency = currentFrequency;
    showStatus();
    delay(300);
  }
  
}
离线bg1fkv
发帖
226
只看该作者 2楼 发表于: 03-17
找deepseek试试
离线shtsunwu
发帖
1219
只看该作者 3楼 发表于: 03-17
没研究过这玩意,看着挺好的
呼号BG2CRP
黑龙江省五常市
TG-UV2   X108G   弯石接收   x5105  xpa125  ft891使用中
离线chenerbox
发帖
1151
只看该作者 4楼 发表于: 03-19
立创好像有个开源项目,不行买个板回来,在人家板上试,试好了再查自己的板
BH4VEP
离线mr7
发帖
1309
只看该作者 5楼 发表于: 03-25
3年前我用ESP8266一次过搞掂
我的QQ:510844822(请注明来意),来自广州的mr7。
我的微博:http://weibo.com/mr7mr7
我的BILIBILI视频:https://space.bilibili.com/633310079
离线BG9FU
发帖
1092
只看该作者 6楼 发表于: 03-25
要有一个好天线,不然白费。
人是老,又不是大佬,CW、SSB、FT8都玩过,都不熟。
且行且珍惜
EMAIL:BG9FU@QQ.COM;
Tel: 15398065639
离线bd2bo
发帖
683
只看该作者 7楼 发表于: 03-27
程序是4735的呀。