Why am I getting noise on the LM48100Q audio amplifier, even from a flashing LED ?

Thread Starter

freeflyer

Joined Sep 9, 2016
169
Can I double check
The board you used as pattern , has by the looks of things a ferite bead, and then capacitor filtering to analog ground , with a very carefully placed connection between the analog and digital ground such that the led digital ground current does not flow through the analog ground .
On phone so difficult to read the layout , can you confirm you have done this analog ground / power split ?
My board has a ferrite bead and capacitor filtering which I copied from this youtube video...


This is the youtube schematic....
1756201983714.png

This is my schematic....

1756202042749.png

The ST development board has a ferrite bead and capacitors....


1756201853196.png


1756202475083.png

The AGND to GND (net tie) on my board was mentioned in my earlier post, where I originally took a track back to the battery negative terminal...

1756202277207.png

But Rf300 said this was wrong and to solder a short wire link to local ground which I did as shown in the picture below...

1756202384311.png
 

drjohsmith

Joined Dec 13, 2021
1,680
My board has a ferrite bead and capacitor filtering which I copied from this youtube video...


This is the youtube schematic....
View attachment 354797

This is my schematic....

View attachment 354798

The ST development board has a ferrite bead and capacitors....


View attachment 354796


View attachment 354803

The AGND to GND (net tie) on my board was mentioned in my earlier post, where I originally took a track back to the battery negative terminal...

View attachment 354801

But Rf300 said this was wrong and to solder a short wire link to local ground which I did as shown in the picture below...

View attachment 354802
Grounding / power is the most likely reason for the led noise , hiss .
Have you looked how the analog power was routed on the boards you used as reference ?
It would be normal to have a isolated ground and analog power set of planes around the dac terminals and power of the stm.
What do the chip manufacturers recommend for layout ?

The suggestion of @Rf300 is quiet correct , if you isolated the aground lovely , else wise you have now made a ground loop .

You are unfortunately into the area of trying to rectify a design. Rectification is 1000 times worse than designing right .
Conceptually , analog is very suitable to noise on power and ground , where as the cpu and the LEDs are big noise producers on ground and power
You need to understand where the current is flowing in both the power supplies and grounds .
A word of warning .
Doing patches like adding ground shorts or other patches , is liable to get your design through this test. It's no guarantee that long term it will be a fix .
It might be , but it might not.
Back to the simple short grounds together near dac . Unless you know what the cause was and why this is a fix, it's a patch ..
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
Grounding / power is the most likely reason for the led noise , hiss .
Have you looked how the analog power was routed on the boards you used as reference ?
It would be normal to have a isolated ground and analog power set of planes around the dac terminals and power of the stm.
What do the chip manufacturers recommend for layout ?

The suggestion of @Rf300 is quiet correct , if you isolated the aground lovely , else wise you have now made a ground loop .

You are unfortunately into the area of trying to rectify a design. Rectification is 1000 times worse than designing right .
Conceptually , analog is very suitable to noise on power and ground , where as the cpu and the LEDs are big noise producers on ground and power
You need to understand where the current is flowing in both the power supplies and grounds .
A word of warning .
Doing patches like adding ground shorts or other patches , is liable to get your design through this test. It's no guarantee that long term it will be a fix .
It might be , but it might not.
Back to the simple short grounds together near dac . Unless you know what the cause was and why this is a fix, it's a patch ..
Yes this was already discussed in the earlier posts.

On the ST development board, VSSA (pin 12) for the DAC has a track to a header pin on the top layer...

1756203778193.png

And has a solder bridge (SB56) to main ground on the bottom layer....

1756203810493.png

This is the schematic for the development board...

1756204117652.png

I don't understand why using a solder bridge to connect AGND to GND makes any difference, I assume its so the connection between AGND and GND can be disconnected ?

I used development boards for prototyping, so I could test the hardware and software before designing the PCB in the hope I could get the design right first time.

I also wrote this post asking for help with the grounding but responses were inconclusive.......

https://forum.allaboutcircuits.com/...luetooth-receiver-and-audio-amplifier.207288/

Here's a thought....

For the development board prototype setup, the connections between the STM board and Audio board is shown below.

The ground of the input jack on the LM48100Q development board is connected to AGND on the STM32 header pin....

1756206755778.png



Whereas on my custom PCB the connections is shown below.

The grounds of the LM48100Q are all connected to the inner ground plane and there is a separate track from the VSSA pin on the STM32 back to the negative battery terminal (connector P2).

1756205798961.png



Should all the grounds of the LM48100Q be connected to GNDA, so that only amplifier current returns via the GNDA path ?
 
Last edited:

drjohsmith

Joined Dec 13, 2021
1,680
Yes this was already discussed in the earlier posts.

On the ST development board, VSSA (pin 12) for the DAC has a track to a header pin on the top layer...

View attachment 354804

And has a solder bridge (SB56) to main ground on the bottom layer....

View attachment 354805

This is the schematic for the development board...

View attachment 354807

I don't understand why using a solder bridge to connect AGND to GND makes any difference, I assume its so the connection between AGND and GND can be disconnected ?

I used development boards for prototyping, so I could test the hardware and software before designing the PCB in the hope I could get the design right first time.

I also wrote this post asking for help with the grounding but responses were inconclusive.......

https://forum.allaboutcircuits.com/...luetooth-receiver-and-audio-amplifier.207288/

Here's a thought....

For the development board prototype setup, the connections between the STM board and Audio board was as follows...

View attachment 354811

The ground of the input jack on the LM48100Q development board is connected to AGND on the STM32 header pin.

Whereas on my custom PCB the connections are as follows...

View attachment 354809

The grounds of the LM48100Q are all connected to the inner ground plane and there is a separate track from the VSSA pin on the STM32 back to the negative battery terminal.

Should all the grounds of the LM48100Q be connected to GNDA, so that only amplifier current returns via the GNDA path ?
thanks ,
the problem i have is that the schematic shows Vdda going via a ferrite beed to the decoupling, whilst the track you have highlighted goes direct to the decoupling , no need.

im wondering if you have highlighted the wrong track ?

what you need to do is look at the power loop.
power goes into the dac , then out of the analog ground .
what you dont want is the analog ground to be bouncing up and down or the power to be contaminated by led ground current or cpu current .
the dac output is single ended ?
how are you ensuring the dacs ground is same as the amplifiers ground and that ground does not have led current flowing on it ?
and its hard to see on the phone how you have achieved this.

the bottom line is, its extremely difficult to find a magic bullet to noise problems.

im impressed you did a block diagram of power domains , but am worried that you evidently have leakage back powering, this implies that you have chips , pull ups, diodes to the wrong power supply.

im assuming your switching bits off to save power and this has shown the back powering problem you highlighted.
classic problem if you have one chip on a psu, driving another chip on another psu. what happens when you turn off the drivers power supply, ? if you have a pull up to the receiver power suplly, then thats a back current source to the driver chip.
 
Last edited:

Thread Starter

freeflyer

Joined Sep 9, 2016
169
thanks ,
the problem i have is that the schematic shows Vdda going via a ferrite beed to the decoupling, whilst the track you have highlighted goes direct to the decoupling , no need.

im wondering if you have highlighted the wrong track ?

what you need to do is look at the power loop.
power goes into the dac , then out of the analog ground .
what you dont want is the analog ground to be bouncing up and down or the power to be contaminated by led ground current or cpu current .
the dac output is single ended ?
how are you ensuring the dacs ground is same as the amplifiers ground and that ground does not have led current flowing on it ?
and its hard to see on the phone how you have achieved this.
The track I highlighted on the PCB is the VSSA track on pin 12 (GNDA).

For the VDDA track on pin 13 (+3.3V) see below...

1756207371913.png

The DAC is single ended.

The DAC ground for the STM32 is the track GNDA, which I originally routed back to the battery terminal so that no other current flows through that track other than analogue current.

The ground of the amplifier is connected to the ground plane of the PCB.

Does this architecture help you understand my power and ground scheme....

1756208654518.png
 
Last edited:

drjohsmith

Joined Dec 13, 2021
1,680
The track I highlighted on the PCB is the VSSA track on pin 12 (GNDA).

For the VDDA track on pin 13 (+3.3V) see below...

View attachment 354814

The DAC is single ended.

The DAC ground for the STM32 is the track GNDA, which I originally routed back to the battery terminal so that no other current flows through that track other than analogue current.

The ground of the amplifier is connected to the ground plane of the PCB.

Does this architecture help you understand my power and ground scheme....

View attachment 354816
thats a great diagram, well done,
looking at that bit of pcb.
you have the two decoupling capacitors connected to gnda,
but I would have expected the capacitors to be across the analog power of the ic, yet I see no connection,
you need to follow the current, it goes in the +ve, out the -ve.
that loop, from the ferrite, through the decoupling , through the chip, and back to the decoupling needs to be as short as possible.
what does the stm chip supplier say about analog decoupling and placement? have you followed that ?

2nd, your amplifier,
its amplifying the voltage onnits input with reference to its ground.
the dac is sending a voltage with reference to its analog ground .
if there is any noise / voltage difference between the two grounds, the amplifier is going to amplify that noise !

this is where theory and practise and reality are a problem,
for every circuit that follows "the rules " and passes , I can show you one that breaks every rule and passes!! and also converse.

so, if your amplifier was connected to analog ground , what about the Bluetooth analog input?

at this stage in you design, its impossible or at best very unlikely to find a simple fix,
sorry but that's my experiance having been called in many times to fix this sort of problem.
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
thats a great diagram, well done,
looking at that bit of pcb.
you have the two decoupling capacitors connected to gnda,
but I would have expected the capacitors to be across the analog power of the ic, yet I see no connection,
you need to follow the current, it goes in the +ve, out the -ve.
that loop, from the ferrite, through the decoupling , through the chip, and back to the decoupling needs to be as short as possible.
what does the stm chip supplier say about analog decoupling and placement? have you followed that ?

2nd, your amplifier,
its amplifying the voltage onnits input with reference to its ground.
the dac is sending a voltage with reference to its analog ground .
if there is any noise / voltage difference between the two grounds, the amplifier is going to amplify that noise !

this is where theory and practise and reality are a problem,
for every circuit that follows "the rules " and passes , I can show you one that breaks every rule and passes!! and also converse.

so, if your amplifier was connected to analog ground , what about the Bluetooth analog input?

at this stage in you design, its impossible or at best very unlikely to find a simple fix,
sorry but that's my experiance having been called in many times to fix this sort of problem.
Thanks drjohsmith,

I am not sure what you mean by " I would have expected the capacitors to be across the analog power of the ic, yet I see no connection"

The capacitors after the ferrite bead (C45 & C36) are across +3.3VA and GNDA...
1756210833856.png

1756210913498.png

1756210947335.png



Your question "if your amplifier was connected to analog ground , what about the Bluetooth analog input?" is what I was asking in the separate post about grounding, but the responses were inconclusive. So I don't know what I would do with the bluetooth ground.

The STM recommends the following...

1756211153577.png

1756211183533.png

1756211447260.png

See here...

https://www.st.com/resource/en/appl...s-hardware-development-stmicroelectronics.pdf

The STM32L433 does not have a separate VREF pins (VREF+ is the same pin as VDDA and VREF- is the same pin as VSSA)....

1756211310905.png
 

drjohsmith

Joined Dec 13, 2021
1,680
ok, you've routed the ground through the ic pad. missed that.

so how big is the loop for the connection between the ground for the amplifier and the dac(s)

sorry you have the details of what's required above ,
this is the difference between a schematic and layout, but if i remember, you have fair experiance in this and dont require help

having talked with you a while now , I have impression you think the board is almost right and just need a little change .

I think you have many more hurdles to overcome here , and coming up with statements like, but xyz said do this , is not conductive to good feelings in this free forum.

personaly, id be looking at a new layout, not a patch ,
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
ok, you've routed the ground through the ic pad. missed that.

so how big is the loop for the connection between the ground for the amplifier and the dac(s)

sorry you have the details of what's required above ,
this is the difference between a schematic and layout, but if i remember, you have fair experiance in this and dont require help

having talked with you a while now , I have impression you think the board is almost right and just need a little change .

I think you have many more hurdles to overcome here , and coming up with statements like, but xyz said do this , is not conductive to good feelings in this free forum.

personaly, id be looking at a new layout, not a patch ,
The amp is in the bottom right and the vias to the ground plane (green) are highlighted by a blue circles (10 vias).

The STM32 is in the top left and the VSSA pin is highlighted by a blue rectangle.

So its not a loop as in a track, its a ground plane on layer 2.

1756221726388.png


The board functions correctly other than the noise on the audio which I realise could need a re-design but was hoping I might at least be able to improve it on the board I have. It costs £200 to get a board made, then import tax was £50. So I dont want to keep wasting money on PCBs that dont work properly.

Plus I'm not sure how to re-design it to ensure I dont get the noise next time.
 

drjohsmith

Joined Dec 13, 2021
1,680
The amp is in the bottom right and the vias to the ground plane (green) are highlighted by a blue circles (10 vias).

The STM32 is in the top left and the VSSA pin is highlighted by a blue rectangle.

So its not a loop as in a track, its a ground plane on layer 2.

View attachment 354847


The board functions correctly other than the noise on the audio which I realise could need a re-design but was hoping I might at least be able to improve it on the board I have. It costs £200 to get a board made, then import tax was £50. So I dont want to keep wasting money on PCBs that dont work properly.

Plus I'm not sure how to re-design it to ensure I dont get the noise next time.
I agree with you respins, I have always been lucky in my younger years to have had experts to talk with and review ,
im not certain the open forum is a substitute for that.

you have said the cpu / dac is in one corner of the board ,
amplifier in opposite.
and we have seen that the amplifier amplifies any difference / noise between the analog and digital grounds !
so you have there the perfect gound noise amplifier.

at this point , the only/ desperate suggestion, is
to do away with the analog ground, strap every point of the analog ground as many times as you can as short as you can to the digital ground ,
it might work,

for the re spin,
look at keeping the single ended analog as short as possible, and the ground difference as little as possible.

a plane is no answer , current still. flows by the shortest path, if the path from the led ground to the power source ground is via the area the amp is in, it will cause a difference in ground potential between the analog and digital grounds,
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
at this point , the only/ desperate suggestion, is
to do away with the analog ground, strap every point of the analog ground as many times as you can as short as you can to the digital ground ,
it might work,
Thanks drjohsmith,

There is only one analog ground track (GNDA) that goes from the VSSA pin on the STM32 (and filter caps) to the battery negative terminal...

1756292344835.png


I tried connecting GNDA to GND with a short wire link, as Rf300 suggested. I was not sure whether to cut the GNDA track that goes back to battery negative, so thats still connected...

1756292362164.png


The actual modification is shown below...

1756292068156.png

This modification made no difference to the interference, but I don't know if cutting the GNDA track that goes back to battery negative would make any improvement ?
 

drjohsmith

Joined Dec 13, 2021
1,680
Thanks drjohsmith,

There is only one analog ground track (GNDA) that goes from the VSSA pin on the STM32 (and filter caps) to the battery negative terminal...

View attachment 354896


I tried connecting GNDA to GND with a short wire link, as Rf300 suggested. I was not sure whether to cut the GNDA track that goes back to battery negative, so thats still connected...

View attachment 354897


The actual modification is shown below...

View attachment 354893

This modification made no difference to the interference, but I don't know if cutting the GNDA track that goes back to battery negative would make any improvement ?
As mentioned , your layout is so far from optimal , your into the area of trying different things and hoping ..
Try cutting .
..
 

drjohsmith

Joined Dec 13, 2021
1,680
a thought
think some one suggested similar,

but what you need to do is determine if the noise is coming out of the dac, or by the ground difference / long track to the amplifier.

do you have a scope,
isolate the dac output , and look with scope, with probe earth on the analog earth ,
do you see noise, or "pop" when the leds turn on / off

alternately , did you say you have a separate amplifier board ?
wire up that coax that was mentioned to that board, see if it clicks/ hiss
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
a thought
think some one suggested similar,

but what you need to do is determine if the noise is coming out of the dac, or by the ground difference / long track to the amplifier.

do you have a scope,
isolate the dac output , and look with scope, with probe earth on the analog earth ,
do you see noise, or "pop" when the leds turn on / off

alternately , did you say you have a separate amplifier board ?
wire up that coax that was mentioned to that board, see if it clicks/ hiss
I do have a scope (a Rigol DS1074Z+), the biggest difficulty will be isolating the track and then reconnecting it without completely damaged the board as everything is so small.

I didnt see noise or pop from the LED on the DAC output when I scoped it originally which is why it confuses me more so.

The scope captures can be seen here...

https://www.dropbox.com/scl/fi/6j7q...ey=czaukal56ih5fx6if4ra5zc36&st=ha6wp8pu&dl=0

I do have a separate amp board which is wired to the STM dev board and that does not have the hiss or pop as explained in my earlier post (#23)
 

drjohsmith

Joined Dec 13, 2021
1,680
I do have a scope (a Rigol DS1074Z+), the biggest difficulty will be isolating the track and then reconnecting it without completely damaged the board as everything is so small.

I didnt see noise or pop from the LED on the DAC output when I scoped it originally which is why it confuses me more so.

The scope captures can be seen here...

https://www.dropbox.com/scl/fi/6j7q...ey=czaukal56ih5fx6if4ra5zc36&st=ha6wp8pu&dl=0

I do have a separate amp board which is wired to the STM dev board and that does not have the hiss or pop as explained in my earlier post (#23)
ta, apologies im on phone , so going on memory of previous posts , hard to jump up and down without loosing what I've typed, and no option here to save without posting .

the thing looking with the scope, is did you connect the earth of the probe to the analog ground pin or the digital ground pin, or did you use the long earth wire of the probe ?
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
ta, apologies im on phone , so going on memory of previous posts , hard to jump up and down without loosing what I've typed, and no option here to save without posting .

the thing looking with the scope, is did you connect the earth of the probe to the analog ground pin or the digital ground pin, or did you use the long earth wire of the probe ?
No problem I appreciate your support :)

The earth of the scope lead was connected to the battery negative terminal on the 2 pin connector. This is the point where the GNDA track joins to GND

I did use the ground lead of the scope probe

Why does the scope not appear to show the hissing interference or LED pop noise ?
 

drjohsmith

Joined Dec 13, 2021
1,680
No problem I appreciate your support :)

The earth of the scope lead was connected to the battery negative terminal on the 2 pin connector. This is the point where the GNDA track joins to GND

I did use the ground lead of the scope probe

Why does the scope not appear to show the hissing interference or LED pop noise ?
good question,
my bet would be that your either grounding the thing by the lead , or its hard to see.

you really need to use the short hook clip on the probe, 10mm max, and pin that to the analog ground on the cpu,

if your scope has a fft capability, that's more likely to show the hiss,
you might se it if you output a dc level around mid value from the dac , and ac couple the trace , so you can see the 10mV or so of noise ,
 

Thread Starter

freeflyer

Joined Sep 9, 2016
169
good question,
my bet would be that your either grounding the thing by the lead , or its hard to see.

you really need to use the short hook clip on the probe, 10mm max, and pin that to the analog ground on the cpu,

if your scope has a fft capability, that's more likely to show the hiss,
you might se it if you output a dc level around mid value from the dac , and ac couple the trace , so you can see the 10mV or so of noise ,
Finally got round to measuring the FFT of the STM32 DAC output, but it does not mean much to me...

1757335197941.png

The measurement was taken at the STM32 DAC output pin and a local ground....

1757335271535.png
 
Top