Go Down

Topic: Arduino Due with LM386 sounds distorted (Read 791 times) previous topic - next topic

snuu

I'm trying to use the DAC on a Due to play sound files. I hooked up an LM386 as per the schematic shown here, with a few variations: the DC blocking cap on the output is 680uF (also tried 100uF), all 10uF caps are 8.2uF, the 0.05uF cap is replaced with a 0.1uF, and the 10 ohm resistor is replaced with 100 ohms (also tried 10 ohms).

The output waveform is very distorted and noisy. The actual DAC output with no load connected appears as it should. I have also tried removing the 10uF cap between pins 1 and 8 of the amplifier, which makes no difference.

Please excuse any massive ignorance, as I don't frequently dabble in audio stuff.
(insert witty quote here)

DVDdoug

Quote
The actual DAC output with no load connected appears as it should.
What do you mean "appears"?   Are you using an oscilloscope?    If you have a pair of regular "powered" computer speakers, try those to check the quality of the audio output from the Arduino.

And, you can independently test the amplifier by connecting a line-level or headphone-level signal from your CD player, iPod, or phone, etc.

Quote
I have also tried removing the 10uF cap between pins 1 and 8 of the amplifier, which makes no difference.
That's a good idea because with the cap you'll have too much gain.  Even without the cap, you'll have a bit too much gain* and you'll never be able to turn the volume all the way up without distortion.

Quote
The output waveform is very distorted and noisy.
If you're hearing noise without the Arduino connected, or with the volume control all the way down, that's probably noise from the power supply.

Are you hearing distortion at low volumes?




* If your amplifier is using the same 3.3V power supply as the Due, you don't need any voltage  gain.    However, you do  need power/current  gain to drive a regular 4 or 8 ohm speaker.   And, if the amplifier has a higher power supply, you can make use of a little gain.

snuu

Quote
Are you using an oscilloscope?
Yes.

The power supply is not very noisy (Rigol DP712, 4mVpp). The audio input is coming from my function generator, at low output level. I never thought to check what voltage that's putting out, so I'll give that a look.
(insert witty quote here)

Go Up