Noise with OEP30W amplifier

Hello,

I'm trying to play sound with my dfplayer mini and an esp32, it worked well but I want it to be louder.
I bought an 8ohm 30W speaker and an OEP30W amplifier.
but I'm only producing noise. Some help would be appreciated

Here's the wiring diagram I came up with (i have little to no knowledge about this topic)
Maybe there are some obvious mistakes

I'm using the example of the dfplayer mini library

#include "Arduino.h"
#include "DFRobotDFPlayerMini.h"

// Define the Serial2 pins for UART communication
#define RXD2 16
#define TXD2 17

// Create a DFPlayer instance
DFRobotDFPlayerMini myDFPlayer;

void setup() {
  // Initialize Serial Monitor for debugging
  Serial.begin(115200);
  Serial.println("Initializing DFPlayer Mini...");

  // Initialize Serial2 for DFPlayer Mini
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);

  // Begin DFPlayer communication
  if (!myDFPlayer.begin(Serial2)) {
    Serial.println("Unable to begin communication with DFPlayer Mini!");
    Serial.println("1. Please check the wiring.");
    Serial.println("2. Insert an SD card with MP3 files.");
    while (true); // Stop here if initialization fails
  }
  
  Serial.println("DFPlayer Mini initialized successfully.");
  
  // Set volume (0 to 30)
  myDFPlayer.volume(10);
  Serial.println("Volume set to 10.");
}

void loop() {
  // Play the first song
  Serial.println("Playing track 1...");
  myDFPlayer.play(1); // Plays the first track on the SD card
  delay(10000);
}

Here is something that might work:
Looking at the schematic, the signal from the DFPlayer goes in, but has no way of going back to the player.

If you read this topic, @PerryBebbington and a few others explain how signals need a closed loop.

In this case, it looks like your signal is going into the amplifier, but it can't get back out because you switched the IN- signal to a new loop.

Possible fixes: Try connecting the IN- on the amplifier to the GND of the player instead of to the battery so you have a closed loop.

I hope this helps!
@rlsieben

1 Like

Thanks for your message, I can now hear the desired audio but I still have a lot of noise that I didn't have without the amplifier.
I'm not sure where to go next.
an DC-DC isolated converter to avoid ground loop maybe ?
some condensators to filter out some frequencies ?

What type of noise? White noise, rattle, mains hum? Something else?
In your first setup, you had a return path. Via the buck converter. But that is a bad idea...
Can you try to connect in- to the gnd of the df player? (I see now that someone else gave you this hint already..).
Do you have a datasheet for the amplifier? You might need to add a capacitor in series with the signal...
And what impedance does your df player expect?
Maybe add a redistor from the point where L and R are mixed to ground... same value as the other 2 resistors..
Did you try to set volume to 30?

1 Like

here's a youtube link to listen to the noise (it was with the volume at 5)

Can you try to connect in- to the gnd of the df player?
the in- to the gnd of the df player worked for me. i just have some noise

Do you have a datasheet for the amplifier?
I was not able to find a detailed datasheet of this amplifier i tying to take inspiration from this video

And what impedance does your df player expect?
it's for a 8ohm speaker (i'm not sure if it's what you are asking)

Did you try to set volume to 30?
It's better at a high voulume because the volume of the noise is constant.
so when my audio is louder it makes the noise less audible

There are ducks in your amplifier!

But most sounds like digital noise...
Do you have 100nF capacitors from vcc to gnd near each device?

You could also add some ferrite rings with a few windings in series with the power supply to the dfplayer...

And use a star configuration. Feed each device from one point...
And keep signal and gnd from dfplayer to amplifier close together and short...

1 Like

haha it's for an animatronic of the seagull from Finding Nemo

thanks for the replies
the noise is barely noticeable on high volume and with an amplified version of the audio
I'm expecting some 100nf and 1000uf to try to filter the remaining noise

I'm marking the first reply as the solution but it was a combination of that and a higher volume that you proposed that fixed it for me

Thank you !

Most amplifiers have "extra gain".

Is there a volume control knob? If not you may want to add one. It will turn-down any noise coming from the DFPlayer along with the signal and you can probably still get the full amplifier power at less than 100% volume.

BTW - You can't get 30W from 12V into an 8-Ohm speaker... With a bridge amplifier you can get about 8.5W. With a single-ended amp 1/4 that, or little more than 2W.

Power can be calculated as Voltage Squared/Resistance. That's RMS voltage which is 0.354 x peak-to-peak. With a regular single-ended amplifier the peak-to-peak can't exceed the power supply voltage. With a bridge amp you double the peak-to-peak voltage for 4 times the power.

I cannot find a schematic of the board or a datasheet on the chip. But maybe you can reduce the gain of the amplifier... (by adding a redistor somewhere) and then put your dfplayer near max volume. That should increase signal/noise ratio...

Found a similar schematic (for a stereo version).


As you can see, you can set the gain via g0 an g1...
Here it is set to max (g0 and g1 tied to vcc). Put g0 and or g1 to gnd to decrease gain...
No idea if your board is wired like this one.
Forget my earlier suggestion for a resistor to gnd and series capacitor. It is probably already there...

1 Like

I don’t have an ESP32, but are you sure you have RX/TX connections right. Look like you have TX to TX and RX to RX?
Probably a typo, as I don’t see how it would work at all otherwise.

Oh thank you !
it's the schematic for a pcb i was about to order, i'm going to fix that
i did not make the mistake while prototyping on breadboards

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