Go Down

Topic: Remove background noise/static when not playing anything (Read 4264 times) previous topic - next topic

Allorean

I found the datasheet which took some digging to find.

According to it there is a 10uF capacitor between pins 1 and 8 on the LM386. Also looks like the Pot is on/part of the input to the amplifier as well so it's not just straight from the DAC0 to the inverting terminal of the LM386.

Grumpy_Mike

Quote
which took some digging to find.
What?
Put
LM386
into google and the data sheet is the top hit.
You need to do something with the input you are not using if you only have a single ended input. The data sheet suggests a capacitor to ground.

Allorean

The CIRCUIT I am using is THAT in the datasheet, it is PRE-BUILT as per the link I provided earlier to Amazon.

This LM386 device

Grumpy_Mike

No idea sorry, the data sheet describes the chip. I notice from the reviewes someone said it didn't work.
The design dosn't seem good but it is hard to be definitive without a schematic. I would try some extra decoupling capacitors on the supply.
However tracing where noise is getting in is a bit of an art, nothing is garenteed to work. However I am supprised that lowering the input impedance didn't help. It worked very well for me with the audio amp I made with this chip.

Allorean

Sorry, let me reiterate, this circuit layout is for the LM 386 amplifier module circuit that I am using, it has all the resistors and capacitors already.

Allorean


tmd3

I'm guessing no one else has any ideas?
Here are some good ideas that have already been presented to you:

The datasheet for the LM386 says that the inputs are ground-referenced.  That means that the input should be centered around ground.  The Due's DAC outputs a positive voltage.  In order to get the input voltage to be centered around ground, it will be necessary to put a capacitor between the DAC output and the amplifier input.  The amplifier input has a 10K potentiometer connected between it and ground, so the input impedance of the amplifier is 10K, resistive.  A 1 uF capacitor in series with that input will give you a ground-referenced source as seen by the amplifier module, and will pass frequencies above about 15 Hz.  The positive pin on the capacitor will connect to the Due's DAC output, because the DAC output will always be positive relative to the amplifer module input.  That might fix your problem with noise, or maybe not.  Intuitively, I don't think it will, but I think you should add the capacitor in order to get the amplifier module to operate in its normal range.  Others have already suggested a series capacitor on the input.  Maybe you have one, and maybe you don't.  You've never posted a wiring diagram of your setup, and your descriptions have generally referred us to a schematic of the amplifier module.  So, we don't know what you have.

Another is to apply power supply decoupling capacitors across the VCC and GND inputs of the amplifier module.  Power supply decoupling capacitors are often called, "bypass capacitors."  I don't see any such capacitor(s) on the schematic you posted.  The purpose of decoupling capacitors is to provide a degree of isolation between the digital load of the Due and the analog load of the amplifier.  The Due, being a sequential digital device, draws current in short, high bursts when its internal transistors switch.  That generates disturbances on the power supply leads.  You may be hearing that as noise on the output.  Typically, bypass capacitors will be made up of two devices - a larger electrolytic capacitor, to deal with lower-frequency disturbances, and a smaller ceramic capacitor, to deal with higher-frequency disturbances.  Typical values might be 22 uF and 0.1 uF for an application like this, but best values will depend on the output circuit load, and the level of disturbance.  You may want to experiment a bit.  You'll get better results with decoupling capacitors installed close to the amplifier module, as opposed to, say, on a breadboard with long wires running to the amplifier module.  Maybe you have power supply bypass capacitors, or maybe not; we don't know.

For further help, I'd suggest that you post a short sketch that demonstrates the problem - something that, say, generates a tone for a second, and then is quiet for a second, and repeats forever.  Verify that this test sketch compiles and runs on the Due, and that you observe the problem that you're asking about when the sketch runs.  Since we'll be analyzing that code, and maybe even trying it out, the simpler the sketch, the better.  You'll get more participation with a simple, straightforward sketch than with a long an complicated sketch with a lot of sections that aren't relevant to this problem.  None of us have seen any of your code that controls the DAC, and it's entirely possible that the issue resides in the code.

And, post a wiring diagram of exactly how you've connected the Due to the amplifier.  Be sure to show any other connections that you have, even if you think that they're not relevant.

Go Up