cancel
Showing results for 
Search instead for 
Did you mean: 

Speaker audio distorted even though it is quiet

rickymcmuffin
Associate

I'm doing a project where I want to have a toy say audio clips when a button is pressed. Right now I'm trying to accomplish this with an STM32F407G-DISC1. I have a small speaker (16 ohms, 0.25 W) connected to my breadboard with the DAC OUT1 of the MCU powering it by playing audio clips. I have managed to play the audio but the issue is, the speaker is very quiet and distorted. However, when I put a 220 ohm resistor on it, it sounds much better but is even more quiet.

I just wanted to ask if there was anything I'm doing wrong. I'm new to this so bear with me. Would an amplifier help? I would assume not as the audio would just become more distorted. Any help would be appreciated!

5 REPLIES 5
AScha.3
Principal III

you have STM32F4DISCOVERY board - right ?

and put audio out with DAC OUT1 of the MCU - ?

so this needs an output amp ! see ds , minimum load is 5K , with buffer ON .

why not use the onboard audio DAC (CS43L22) ( this has some amp also) ?

If you feel a post has answered your question, please click "Accept as Solution".
STTwo-32
ST Employee

Hello @rickymcmuffin 

As @AScha.3 Said, you should use a Resistive load of 5K ohm minimum and a Capacitive load of maximum 50pf (with buffer ON).

Screenshot_2023-11-19-19-47-48-21_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Screenshot_2023-11-19-19-48-38-96_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

For more details, take a look at the part 5.3.25 of the DS8626.

Best Regards.

STTwo-32.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

rickymcmuffin
Associate

Thank you so much @STTwo-32 and @AScha.3 . You're really clearing things up.

 

> why not use the onboard audio DAC (CS43L22) ( this has some amp also) ?

I am planning on eventually getting a different MCU and designing my own PCB which is why I'm trying to figure this out with only the built in DAC.

 

Just to be clear. I do need an amp. And when I use that amp, I will need to add a resistor with a minimum of 5K ohms. Is this all correct?

Hi again, 

>I do need an amp. And when I use that amp, I will need to add a resistor with a minimum of 5K ohms. Is this all correct?

As you Can see under the figure53:

"The DAC integrates an output buffer that can be used to reduce the output impedance and to drive external loads directly without the use of an external operational amplifier".

I think this answer your question.

Screenshot_2023-11-19-19-48-38-96_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

no, nothing to add!   the amp should have high-impedance input , minimum is 5k . 

so you want drive a speaker ?  then you need a small power amp.

ie...

AScha3_0-1700427245587.png

 

If you feel a post has answered your question, please click "Accept as Solution".