waveform appearing on output of

Hello all. I just got round to testing my PAM8304 boards output with my new oscilloscope and was surprised at what i have found.
When measuring the output of the amp, both terminals( + and - ) register as + 2.5v with reference to the power ground. This suggest that like the mp3 module i have been using, it is a bridged amplifier(i think).
However whereas when looking at the mp3 modules output there is a clean +2.5v output, when i look at the PAM8403's output there is a waveform.
I have included the picture from my oscilloscope. It appears to feature a full cycle at about 230KHZ.
Now I would have thought that a frequency at this speed would be undetectable to my ear but there is a distinct high pitched noise which i can hear which increases as the voltage which i provide to the amp increases(non surprisingly).
At first i thought it may have been something to do with the input signal but this recording was taken when the amp wasn't connected to anything.
it is also interesting that the waveform does not appear to change much when the amp is connected to an input. could it be that this is the waveform of the power signal?
But then how might i troubleshoot the high pitched whining sound i hear as the waveform takes up the whole of my oscilloscope screen when the timeframe is increased....
any help on this would be much appreciated, thanks.

Hi I think the waveform I am seeing is something intriguing but unrelated to the reason why i am hearing interference. I believe the problem is to do with my bridged amplifier output. the two terminals are both at 2.5v so there is no potential between them. this works fine for a speaker output and effectively doubles the potential power from +5v to -5v. but when i take a single channel then the potential of the speaker is 2.5v as referenced to ground. i cant feed the other 2.5v channel into the ground channel for obvious reasons.
at least i think this is the problem.
is there any way i could convert my bridged amplifier output into a normal one? i know that one can do something with capacitative coupling...
I'll do my research but any help would be very much appreciated.
(note: i am still intrigued by that waveform, if anyone still has information about it i would be grateful for that also)
Thanks!

Where does the Arduino come into this?

The 230kHz signal is the Class-D switching (a special kind of PWM). It should be filtered out! You don't want that going into your tweeters. You're right that you can't hear it, but you could be hearing sub-harmonics or some kind of side-effect/resonance, especially if you are feeding an amplifier or something other than a speaker. Or, the audible noise could be something else entirely.

If you have a 2-channel 'scope check to see if it's out-of-phase on the other output (it may not be present differentially). And if you don't have a speaker connected, check it with a speaker because the speaker-load is part of the filter. Or, your 'scope may have an option to look at the difference between the 2 channels.

it is also interesting that the waveform does not appear to change much when the amp is connected to an input.

Does the audible noise change? (Is the audible noise coming from the MP3 module?)

It could also be power supply noise. If you have an appropriate battery, try running it of a battery... Or, try running it from your car battery (without the engine running so there's power-supply noise).

I believe the problem is to do with my bridged amplifier output. the two terminals are both at 2.5v so there is no potential between them. this works fine for a speaker output and effectively doubles the potential power from +5v to -5v.

Right. Except, doubling the voltage gives you 4 times the power (+6dB) because when you double the voltage you also double the current (Ohm's Law). (Power is Voltage x Current.)

Is there any way i could convert my bridged amplifier output into a normal one? i know that one can do something with capacitative coupling...

**Right.**A capacitor will do it. DC current can't flow through a capacitor... You're making a high-pass filter... To get the full frequency range,

With a speaker-load, you'll need around 1000uF. (Of course, the positive end goes to the amp-output.) Lower-value capacitors will block the bass (you can look-up RC filters if you want to calculate a value).

Depending on the amplifier design and the source of the noise, you may get more noise with a single-ended output. i.e. If the noise, such as power supply noise, is identical in both output it get's canceled differentially (with a bridged connection).

Where does the Arduino come into this?

yes sorry about that. its a project containing an arduino but this post doesnt mention it.

The 230kHz signal is the Class-D switching (a special kind of PWM). It should be filtered out!

ive just checked out the PAM8403 description here and it says it requires no external filters. what would be your opinion on this DVDdoug?

If you have a 2-channel 'scope check to see if it's out-of-phase on the other output (it may not be present differentially)

i am a mere hobbyist and my scope is of the most basic kind and lacks that functionality unfortunately.

Does the audible noise change? (Is the audible noise coming from the MP3 module?)

yes the noise does change. making me think that this is a power based waveform which can only be seen when the scope is sampling at a very high rate.

ok i posted something before but i was confusing myself.
i made a discovery. when i plugged my computers output into the amp it worked flawlessly when the setup was being powered by a battery but when powered over usb there was the noise again.
i think it might have something to do with grounding issues....

ok i gave the amp a separate power source(battery) from the module(usb). now when i linked up the ground rails the shame problem happened. but then i removed that and linked the amp input ground (not power ground) to the mp3 module power ground and it works! there is still a small amount of high pitched whining but a million times better than it was.
could anyone explain what might be happening here?

When measuring the output of the amp, both terminals( + and - ) register as + 2.5v with reference to the power ground. This suggest that like the mp3 module i have been using, it is a bridged amplifier(i think).
However whereas when looking at the mp3 modules output there is a clean +2.5v output, when i look at the PAM8403's output there is a waveform.

Yes, that's class D, its a purely digital waveform using PWM.

I have included the picture from my oscilloscope. It appears to feature a full cycle at about 230KHZ.
Now I would have thought that a frequency at this speed would be undetectable to my ear but there is a distinct high pitched noise which i can hear which increases as the voltage which i provide to the amp increases(non surprisingly).

The audible tone needs a spectrum analyzer to characterize, I suspect you have break-through from
the Arduino's digital switching on the input. Or perhaps inadequate decoupling on the PAM8304's rails,
or ground currents due to failing to implement a star-ground for the audio signal.

At first i thought it may have been something to do with the input signal but this recording was taken when the amp wasn't connected to anything.

On page 6 of the datasheet: https://www.diodes.com/assets/Datasheets/PAM8304.pdf
it shows how to reduce EMI (and reduce high frequencies going to the speaker too of course).

You can add a proper LC filter to the output too - the reason this isn't described in the datasheet
is that this chip is designed for miniature equipment where the extra bulk isn't desirable.