Audio amp pops and static - Page 1
Forum section: electronics / beginners

author: uChip
author_rank: Contributor
timestamp: June 04, 2015, 04:36:48 pm
content: I'm building a software controlled audio preamp that feeds a 50W amp module. The preamp takes line in to a digital pot for volume control. Everything works fine except that the circuit gives a loud pop or click at power up and a static or scratching sound when changing the volume. I'd like advice on eliminating these annoying artifacts. Commercial amps don't make these noises. How do they do it?Thanks,Chip

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 04, 2015, 04:43:02 pm
content: You did not reveal what digital pot you are using, so we are unable to make any meaningful response.However, in general, note that for controlling audio, there are special devices that detect the waveform of the audio and only perform a change during the waveform zero-crossing. That is done specifically to eliminate "zipper-noise" which is typical when ordinary chips are used to control live audio.

author: uChip
author_rank: Contributor
timestamp: June 04, 2015, 04:45:59 pm
content: Sorry, I thought the pots were all the same. The one I'm currently using is an MCP4551 10k Ohm. Are there pots with zero crossing noise suppression built in? [Edit: Found some. Thanks] Thanks. - Chip

author: BradC
author_rank: Super Contributor
timestamp: June 04, 2015, 05:11:11 pm
content: I might be thick, but you have one side of the pot at GND and the other at +5v, so as you move the pot you will be creating a significant DC shift in the output. I thought in general that was a no-no.

author: uChip
author_rank: Contributor
timestamp: June 04, 2015, 06:09:51 pm
content: From a purely DC standpoint you are absolutely correct, however the DC component is blocked by C1 and C3 from having any effect upstream or down. From an AC standpoint the 10k pull-up looks like it's in parallel with the pot so LINE IN is effectively across the pot. The wiper then takes the voltage division off the pot to the next stage. The pot does not like to see negative voltages so the 10k pull-up is used to bias the AC input up to 2.5V. As long as the AC component does not have a magnitude greater than 2.5V (LINE is nominally 0.5 or 1.75 Vpk) then all is well. Empirically the circuit works great except for the volume change noise (which Richard solved) and the initial power-up pop.Thanks,Chip

author: PeterFW
author_rank: Frequent Contributor
timestamp: June 04, 2015, 06:25:21 pm
content: Quote from: uChip on June 04, 2015, 04:45:59 pmWrong part, you have to use a pot that is designed to work with audio signals.They will not make noise when changeing volume.The "plop" when powering on and of is caused various stuff in your circuit, the ususal solution is a relay disconnect.The relay turns on with a delay and turns imediately of when disabling, this will prevent the "off-plop".

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 04, 2015, 09:07:13 pm
content: Trying to bias it above ground by running DC through the pot (whether a traditional mechanical pot or an electronic pot of any kind) is a TERRIBLE idea. It is almost certainly greatly increasing the amount of zipper noise you are hearing.Go and get yourself a DS1807 which is MADE for audio controlling via I2C.http://datasheets.maximintegrated.com/en/ds/DS1807.pdfhttp://hackaday.com/2009/02/16/parts-i2c-audio-volume-potentiometer-ds1807/

author: Bassman59
author_rank: Super Contributor
timestamp: June 04, 2015, 09:34:47 pm
content: Quote from: uChip on June 04, 2015, 04:36:48 pmThose 0.47uF caps are way too small! You probably want something on the order of 47uF or greater.-a

author: wraper
author_rank: Unknown
timestamp: June 04, 2015, 09:57:41 pm
content: Quote from: Bassman59 on June 04, 2015, 09:34:47 pmIt is ok. Probably 1-2.2uF would be better but there is no reason to put something huge like 47uf. Also 47uF means electrolytic cap what is not the best idea in the signal Path.As of the source of the issue, DC biasing it is.Quote from: uChip on June 04, 2015, 06:09:51 pmIt works like crap, not great. You get the noise from the power rail into the signal. C3 doesn't block this DC offset at all (as it becomes AC) when you are changing volume (DC output voltage of the resistive divider changes too) -> scratching sound. Basically this resistive divider becomes a kind of DAC. If you stream some audio data instead of volume level into this divider IC you would hear the music. Pop when switching on is because of C1 and C3 charging on power on, your "innocent" DC offset again.

author: uChip
author_rank: Contributor
timestamp: June 05, 2015, 06:07:02 am
content: Thanks Richard. The DS1807 is the one I found as well. For those following along, there is a app note discussing the changes needed to ensure the zero crossing detection:http://pdfserv.maximintegrated.com/en/an/REFD161.pdfThe app note focuses on the DS1802 but the principles are the same.Thanks again for the pointer.- Chip

author: macboy
author_rank: Super Contributor
timestamp: June 05, 2015, 03:13:38 pm
content: As mentioned you should use an audio-specific pot. Not only will it reduce clicks and pops but it may have a logarithmic taper. Some don't and depend on your software to handle it. Sometimes a mechanical linear pot has a resistor added from wiper to ground to provide a quasi-log response that is very suitable for a volume control; you can't do this with a digital pot because it loads the output too much. For best performance (lowest distortion and noise) from digital pots of all kinds, you should drive them with a very low impedance and load them with a very high impedance. You are driving with 10 k plus the output impedance of your source (probably between 100 ohm to 1k) = BAD. You are loading the output with about 47 k = OK but Not great. The best way is to buffer the signal with another op-amp and drive the pot directly from its output, and connect the output of the pot to the positive input of the op-amp to provide the lowest possible loading.I'd also suggest adding some power supply isolation by adding a larger (10 to 100 uF) cap in parallel with the small decoupling cap at each IC, then add a 10 to 22 ohm resistor in series with the supply (supply -> resistor -> decoupling -> IC power pin). Adding a ferrite bead wouldn't hurt too. This series impedance helps block noise crossing from digital the side to the analog. You will commonly see this type of filtering on the power supplies in high end audio gear, especially for the digital input switching and volume control ICs but sometimes on the op-amps too.AC couple the output by adding a series cap (~ 1 uF) and a large resistor to ground (~ 100 k). This will remove your 2.5 V DC bias.

author: dantherookie
author_rank: Newbie
timestamp: June 05, 2015, 03:46:21 pm
content: I'm just a rookie, and I had that issue when making a small amp on a Breadboard using breadboard wires and alligator leads. My issue to cause the crackle fart and pop was due to the wires connecting the components being TOOOOO long, after soldering all the components down to a proper PCB that I printed, the fart crackle & pop went away, I'm just a rookie though, my instance my be different to yours

author: bson
author_rank: Unknown
timestamp: June 05, 2015, 06:01:00 pm
content: The scratching is possibly coupling noise from your I2C bus. Check the I2C signals on a scope and put e.g. 1k series resistors on SCA,SCL if they overshoot and ring. The easiest way to determine a good value is simple trial-and-error, just scope it and see what different values do to it. Also decouple the DAC and use separate digital and analog ground planes; if on the same layer keep them separate and connect them together as close to the regulator/decoupling cap as possible.Edit: I2C can be quite overdampened to where it's decidedly rounded-looking. This is just fine and can significantly reduce mixed-signal circuit noise.

author: Zero999
author_rank: Super Contributor
timestamp: June 05, 2015, 07:44:20 pm
content: Yes, the noise when the potentiometer is adjusted is due to the change in bias voltage on the amplifier input.At the moment the easiest fix is to bias one side of the potentiometer at half the power supply and AC couple it to 0V.0.47µF doesn't seem too small for a 47k resistance, go for 1µF if you like but no more.A logarithmic potentiometer designed for audio would be better.The pop noise when the circuit is turned on is due to the bias voltage stabilising on the AC coupling capacitors.

author: uChip
author_rank: Contributor
timestamp: June 06, 2015, 03:45:50 pm
content: Thanks everyone for the wealth of responses! I think Mr.Crowley nailed it right out of the gate. I'll be using a DS1807 instead of the MCP4551 in my next revision. BTW, as if the comments here aren't enough, the app note I referenced has a good description of why zipper noise happens in addition to showing how to fix it.That said, I did design in or experiment with several of the other suggestions made:- The power supply is not shown, but it is indeed- filtered with multiple 10uF caps on inputs and outputs of the- separate low noise LDO regulators for digital and analog sections- with ferrite beads separating the regulator inputs.- Looking at the supply, the noise on A5V is below the noise-floor of my scope.- The layout uses a single ground pour however- analog and digital sections are well separated and- current  paths have been accounted for and separated between digital and analog.- For instance, I2C signals are routed well away from analog signals.- I have kept signal lengths as short as I can, for instance from digpot wiper to opamp input is about 1.25cm including the cap and resistor.The I2C drives more than just the digital pot and the noise occurs only when changing the volume. That would indicate to me that it is not crosstalk from the SDA or SCL lines. The lines are terminated.For those who indicated that the 0.47uF caps were too small: Yes, they were. With a 10k pot and 10k bias the f-cutoff was 68Hz. In the new design the pot is 45k and the caps have been up'ed to 1uF. The calculated f-cutoff is now under 11Hz. The speakers aren't that good anyway.The MCP4551 is a linear taper with 256 levels. I am implementing only 16 levels so it's pretty easy to choose audio taper steps in a lookup table. The DS1807 only has 64 levels but is already audio taper so that's fine.I'll report back on the results with the revisions.Thanks again everyone.- Chip

author: John Coloccia
author_rank: Super Contributor
timestamp: June 06, 2015, 04:38:24 pm
content: Don't you want to AC couple the output as well? When you turn it on, you'll whack the input of whatever it's feeding with 2.5V, and it will pop every time. I only had a second to glance at it, but off the top of my head that's the first thing that stands out. Perhaps I'm just not thinking about it clearly.edit: yeah, nevermind...it will just couple through whatever cap you put there and still whack the input anyhow. Honestly, whenever I've had to do things like this where you can't control the order of things turning on, I've just used a simple mute circuit to make sure everything on my end is happy before sending any output.

author: uChip
author_rank: Contributor
timestamp: June 06, 2015, 04:56:04 pm
content: That's a good question. My thinking would be that the cap won't help since the rise from 0V to 2.5V will be fast enough that the cap passes it through.More generally, I thought that the cap needs to be matched to the input impedance of the amp module and therefore needs to be part of that input circuit. Putting a cap also on the pre-amp output would put a second cap in series which would actually decrease the capacitance.Is there a general rule for line connections that are separate components / modules?Thanks,- Chip

author: John Coloccia
author_rank: Super Contributor
timestamp: June 06, 2015, 06:31:11 pm
content: You'd worry about impedance matching for something like a balanced XLR input. There, the entire point is to have a differential signal impedance matched on both ends so that you can drive a LONG cable. For line level, the input is generally a relatively high impedance, and the output is generally a relatively low impedance....and you forget impedance matching all together. A large output cap will have very little effect on a reasonably sized input cap.I'd have to dig around to see if there's any spec that calls it out, but I seem to remember that you generally expect to see line out AC coupled, though in practice it may not matter much since you expect all your inputs to also be AC coupled. Still, if nothing else, it keeps a cable from shorting out in DC.I don't do much design work for line level stuff, so hopefully someone else will chime in, but I always like seeing a small resistor (1k or less) on the output to offer at least some current limiting in case of a short, and AC coupled if it makes sense.