Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Audio with white noise

Status
Not open for further replies.

electr0dave

Junior Member level 1
Joined
Aug 31, 2016
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
126
Hello everyone.

I made a small circuit to be able to test some experience with signal processing.

Basimente I do input audio (with its analog circuit) using a STM32 (STM32F030) I digitize the signal and generate a PWM. This PWM passes through a low pass filter and is then delivered to a small audio amplifier (TPA6205A).

In this direct soundcheck test, I'm having some white noise in the output, along with the music.

Some data:
All RC filters were calculated for fc = 10KHz;
The sampling frequency (cycle) is 40KHz;
The frequency of the PWM signal is 187KHz;
The ADC is to take readings of 8bits, and PWM is written in 8-bit too.

Does anyone have any idea or advice I can follow?


In this link you can download a short video that shows the circuit and its audio output.

**broken link removed**

**broken link removed**

Thank you very much.



Greetings,
 

with 8 bit and max SNR of 256:1 or ~46 dB
How much signal and noise do you have?
Record with audacity and do a spectral analysis ( free download)
 

Hello.

I apologize for the delay.

I played a frequency of 1 kHz (http://www.youtube.com/watch?v=PyD9cMarVJk) for 30 seconds, then I did the spectral analysis.

On the left of the peak 1kHz, I have 2 peaks at 120HZ and 410Hz, but I have no idea what it might be.

The frequency is 40KHz loop, evidenced by a logic analyzer ...

Any idea?


Thank you.

**broken link removed**
 
Last edited by a moderator:

Hi,

Read about quantisation noise.

Klaus
 

Ok, I am still reading about this.

But for now if I change my sampling to 12bit, the noise power will be reduced by 1/256 (-24dB)?

It is what you suggest me to do?

but I still do not find explanation to the peaks of the frequencies of the last post....
 

Hi,

From the chart it seems that your sampling frequency is more than 40kHz, maybe 44.1kHz or 48kHz..
Please give the exact sampling frequency.
Your FFT frequency resolution is about 5Hz.

Your peaks.
120Hz might be from 60Hz mains frequency..
410Hz. I don't know. Maybe n enterferance of your sampling frequency and the PWM frequency.

Klaus
 

Hello.

Each time the pulse 1 changes its state, the program began a new cycle.

The PWM pulse is 2.

So:
sampling frequency
1 / (26.5417uS) = 37.677KHz

frequency PWM
1 / (5.3333uS) = 187.500KHz


**broken link removed**
 

Here in Portugal the frequency of the power grid is 50Hz.
So this peak of 120Hz, may be generated by the buck converter on USB ....
 

Hi,

1 / (26.5417uS) = 37.677KHz

Your FFT chart shows frequencies above your given f_sample/2 (above 18.8 kHz) wich is not possible.

Klaus
 

Hello.

I dont understand...

I recorded using a microphone ... maybe I should put the sign on the microphone input and record again?

Thus there may be no signal above fs / 2 ....
 

Hi,

I dont understand...

With every ADC sampling system Nyquist theorem is true: You only can decode analog signal frequencies less than f_sample /2.

So with f_sample of 37.677kHz you are limited to a analog max frequency of 18.8kHz.
But your chart shows frequencies up to 22kHz --> something must be wrong.

Klaus
 

OK, this is true and I understand the Nyquist theorem.
That is why my sampling frequency is 40KHz and I want to do experiments with signal only up to 5KHz. So I guarantee minimum quantity sampling.

But this chart is generated by audacity with recorded sound from the microphone.
The microphone sampling frequency of my computer is much higher than mine. Of that I am sure.
So it is normal that appears signal above 18KHz.

The only way to reduce this would be to connect the output of my circuit to the audio input of the computer and make new sampling.

I am right?
 

Any ideas or literature for me to read ?

Thank you
 

I suggest you record and FFT your power supply noise, then replace mic with a resistor then use a sine signal from a sig generator and compare results.

8 bit PWM will be quite poor for sound quality. It should be a sigma delta type.
 

Hello.

I recorded the sound (direct to the microphone input) after the low pass filter PWM.

The frequency analysis chart was quite different.
But still some peaks appear without explanation ...

Test with 1kHz input.

**broken link removed**
 

Hi,

Now that you see that the microphone had a lot of influence on thd result...

You could just do some measurements as a reference:
* measure at the same point, but without 1kHz input signal, then you see how much the input has influence
* measure at the sane point but without input signal and without running pwm (but supplied with power, to see how much the pwm influences the signal)
* measure at the same point, but power supply VCC disconnected, but GND connected (no signal is generated at your application, so you only see the influence of mains connection, (maybe GND loops,...) and the errors caused by the measurement equippment)

Klaus
 

Noise spurs are down relative to signal by 37dB
Harmonic distortion down by 25 dB at 2kHz means asymmetry of amplifier is poor and main problem.

Improved 1/f noise with low impedance source means front end had excessive noise current before.

This means a better linear, low noise preamp is needed.
Consider an OpAmp with clean supply
 
Last edited:

I've done the measurements.
See the following images.

* measure at the same point, but without 1kHz input signal, then you see how much the input has influence

**broken link removed**

* measure at the sane point but without input signal and without running pwm (but supplied with power, to see how much the pwm influences the signal)

**broken link removed**

* measure at the same point, but power supply VCC disconnected, but GND connected (no signal is generated at your application, so you only see the influence of mains connection, (maybe GND loops,...) and the errors caused by the measurement equippment)

**broken link removed**

I'll do more tests. I noticed that the little TPA6205A puts some noise in the audio output.

I'll test without using this IC.

- - - Updated - - -

Input audio 1kHz.
Recorded after the low pass filter PWM without connection to TPA6205A.

**broken link removed**
 

Hello.

How can I do to reduce the harmonics?

Input 1 kHz sine wave.

This image represents my output.

**broken link removed**
 

Hi,

It seems to be clipped.

How does the signal look like?

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top