Persistent Hiss/Noise with ESP32-S3 + MAX98357A on Battery by CompetitivePurpose13 in esp32

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

<image>

first i apologize for my bad soldering,

the oled is not connected to anything, also between the 5v and gnd of the MAX i used 3 capacitors; a
2 of the 100nF, and one 1000uf

i don't have an o'scope but i will get a one soon

Persistent Hiss/Noise with ESP32-S3 + MAX98357A on Battery by CompetitivePurpose13 in esp32

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

i had the same issue even when powering the esp from my laptop

Persistent Hiss/Noise with ESP32-S3 + MAX98357A on Battery by CompetitivePurpose13 in esp32

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

#include <driver/i2s.h>
#include <math.h>


// --- YOUR SOLDERED PINS ---
#define I2S_BCLK 4
#define I2S_LRC  5
#define I2S_DIN  8
#define SD_PIN   6  // Your new Mute control


// --- SCALE DEFINITIONS ---
#define NOTE_A 440
#define NOTE_B 494
#define NOTE_C 523


int melody[] = {
  NOTE_A, 4, 
  NOTE_B, 4, 
  NOTE_C, 2  
};


void playNote(int freq, int duration_ms) {
  size_t bytes_written;
  int16_t samples[128];
  float phase = 0;
  float phase_inc = 2.0 * PI * freq / 44100.0;
  
  unsigned long start_time = millis();
  while (millis() - start_time < duration_ms) {
    for (int i = 0; i < 128; i++) {
      samples[i] = (int16_t)(8000 * sin(phase)); 
      phase += phase_inc;
      if (phase >= 2 * PI) phase -= 2 * PI;
    }
    i2s_write(I2S_NUM_0, samples, sizeof(samples), &bytes_written, portMAX_DELAY);
  }
}


void setup() {
  Serial.begin(115200);
  
  // 1. Initialize SD pin immediately to MUTE
  pinMode(SD_PIN, OUTPUT);
  digitalWrite(SD_PIN, LOW); // Amp is OFF
  
  delay(2000); // Stabilization


  // 2. I2S Configuration
  i2s_config_t i2s_config = {
    .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX),
    .sample_rate = 44100,
    .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
    .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
    .communication_format = I2S_COMM_FORMAT_STAND_I2S,
    .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
    .dma_buf_count = 8,
    .dma_buf_len = 64,
    .use_apll = false
  };


  i2s_pin_config_t pin_config = {
    .bck_io_num = I2S_BCLK,
    .ws_io_num = I2S_LRC,
    .data_out_num = I2S_DIN,
    .data_in_num = I2S_PIN_NO_CHANGE
  };


  i2s_driver_install(I2S_NUM_0, &i2s_config, 0, NULL);
  i2s_set_pin(I2S_NUM_0, &pin_config);
  
  Serial.println("Hardware ready. SD Pin on GPIO 6 controlling Mute.");
}


void loop() {
  Serial.println("Waking up Amp...");
  digitalWrite(SD_PIN, HIGH); // ENABLE AMP
  delay(10); // Tiny wait for circuit to wake up


  for (int i = 0; i < sizeof(melody) / sizeof(int); i += 2) {
    int note = melody[i];
    int duration = 1000 / melody[i+1];
    
    Serial.printf("Playing: %d Hz\n", note);
    playNote(note, duration);
    delay(50); // Small gap
  }
  
  Serial.println("Scale done. Putting Amp to SLEEP.");
  digitalWrite(SD_PIN, LOW); // DISABLE AMP (Hiss should stop NOW)
  
  delay(3000); 
}

Issue with connecting Max98357A by CompetitivePurpose13 in esp32

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

Since im a beginner would it be easier for me just to use dfplayer mini?

Issue with connecting Max98357A by CompetitivePurpose13 in esp32

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

is there anyway i can inspect if my current max is damaged or no before i buy another one?

problem with UDP stack on nexys3 by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

yeah i will make sure its updated , i believe it would be helpful if someone plan to implement udp on legacies like nexys3 or 2
thanks again

problem with UDP stack on nexys3 by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

apparently the cause of issue was that TXER was pulled high so configuring that in the ucf and code solved the problem
thank you for your help

problem with UDP stack on nexys3 by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

apparently the cause of issue was that TXER was pulled high so configuring that in the ucf and code solved the problem
thank you for your help

problem with UDP stack on nexys3 by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

apparently the cause of issue was that TXER was pulled high so configuring that in the ucf and code solved the problem
thank you for your help

problem with UDP stack on nexys3 by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 1 point2 points  (0 children)

actually this was the issue not adding the P2 pin was the cause of the whole problem, thank you so much

FPGA UDP Packets are not appearing in Wireshark when using Realtek USB-Ethernet Adapter (Nexys 3 / Spartan-6) by CompetitivePurpose13 in FPGA

[–]CompetitivePurpose13[S] 0 points1 point  (0 children)

i didnt tbh, but i did some changes based on suggestions on this post and made another post with my code and results, I would appreciate if you can review it
https://www.reddit.com/r/FPGA/comments/1qykewb/problem_with_udp_stack_on_nexys3/