I am trying to build a speaker using ESP32, uda1334 dac and Amplifier. I am getting noise from speaker when dac is active .When the audio is played after that the noise exist .like something tapping at high speed.and a sound that is high pitch kind leave ear tingling . Many said it is due to SMPS power supply i am using i tried to add many filters as possible but the noise is still there .Adding filters is reducing noise .some time the audio itself and i am not good with electronics either .i am trying to find the cause of this noise ,Tried many things like
Pulling up/down I2S lines
Using Low pass filter ,High pass filter
Tried to make power supply using 12v transformer (Successfully failed though)
Tried to make bridge amplifier thinking ground loop was issue (Noise still existed)
Tried star grounding (I think i done was star connection i hope )
UDA1334 for has I2C interface also tried to pullup/down it (thinked noise was due to floating pins)
thought it was RF noise tried by disabling esp32 wifi and bluetooth capabilities (Still noise existed)
though my dac was complaint bhought a new one still same issue
Using MAX98357 has no noise it gives clean out but it has an output of 3W.Same code is given to uda1334 .when the ear phone is plugged in its aux jack audio has no noise .only few cuts and breaks when i reset the esp32 board. But when i try to connect it using amplifer from lout/rout to amp with Agnd to gnd the noise exist even in its idle state .
I dont know how to solve this issue and what is the cause of this noise .Any one help me finding cause of noise and solve it
You could try adding an external bandpass filter, a poor substitute for saving a dollar and buying from a seller that does not support the cloned product.
You need much better than a simple RC filter, which is known as a first order filter which only attenuates noise at 3dB per octave. That is half the sound at double the frequency. Other filter designs can have a much faster attenuation away from the break off point. These are called second, third, forth (and so on) order filters.
I think I would want to power the amplifier from a separate linear power supply .
You are taking a lot of power through the processor board and the 3v supply won’t be very clean , especially under high load .
I am using 5v 5A SMPS module to power them .It is not linear power supply .I am powering the dac ,esp32 and amp using the SMPS .I think that much power is enough for it to run.I ll try bandpass filter and let you know the result.Can you suggest me any linear power supply modules .I even tried seperate power supplies (pc power and mobile charger) doesn't give any good audio quality.maybe my poor configuration.let me try it with bandpass .by the way can any one tell me what is vref pin in uda1334
this is my current connection .I changed the amplifier with tda2030 .With different power supply most of noise is gone and left is a buzz sound like a wind is blowing something. but it is too light .only hear if we place ear next to speaker .For linear power supply i tested with 12v transformer .Noise still exist if both device in single power supply .
I want to use single power supply rather than two .but using it as one makes weird noise like a high pitch hum and some kind of engine sound like the sound when engine is turned on and staying idle state without acceleration .Can you tell me why is that . I am using 12v 1amp power supply and for 5v devices i tried to use with 7805 /buck converter but the noise came up like i explained .When separate power supplies noise much is reduced can you tell me why?
So you have to have a virtual ground somewhere in the system, because a sound signal is essentially one that goes positive and negative. This is often done by biasing the signal at half way between the voltage rails like this:-
The two resistors to the rails provide the bias, and the coupling capacitor isolates this virtual ground from the real ground. Note this works both ways, that is the audio signal can be an input or an output, it just depends on the pin you use on the Arduino, and what it is doing, either outputting a signal or inputting a signal.
So should i place this in out put of dac,or the outpin of esp32 the i2s pins.from your explanation i am think you are saying to add them to audio signals in my case it is output of dac