Understanding 'decoupling'

Started by ethrbunny, July 04, 2005, 12:08:19 AM

Previous topic - Next topic

ethrbunny

Im working to debug a circuit that has two Vcc - analog and digital. Both take 5V. Its a phrase recorder: problem - the playback is very noisy. I wrote to the manufacturer for advice on this issue and they responded that I was probably not 'decoupling' the voltage supply properly and this was causing problems with an internal 'charge pump'.

I am pulling both 5V lines off of the same 7805 and immediately tieing them to ground with a .1uf el cap for each. I put the power lines on my o-scope and am not seeing any AC. What purpose does the 'decoupling' capacitor serve and how can I improve it? The datasheet says that the lines should be 'decoupled as close to the chip as possible'. Close in what sense?

Thanks for any suggestions.
--- Dharma Desired
"Life on the steep part of the learning curve"

niftydog

QuoteWhat purpose does the 'decoupling' capacitor serve and how can I improve it?

decoupling is simply trying to stop noise or power supply fluctuations from one system from entering and upsetting another, closely related system.

Digital tends to place high transient demands on power supplys, which can cause a lot of noise in the power supply, which can cause analog systems to misbehave.

Decoupling in this case aims to reduce the transient demand on the power supply be providing some sort of resevoir to assist the power supply.

Many digital chips require decoupling caps to be placed physically very close to the chips power supply pins. The idea being that the cap attempts to fill the glitch in the power supply line when the digital chip does a fast switch - causing a transient spike in the current consumption.

Often you will see many small value caps in parallel decoupling a digital power supply line. The idea being that smaller caps respond to transients much quicker than larger caps, but many in parallel make up the same amount of capacitance as one large cap.

If you can, add small value decoupling caps as physically close as possible to each digital chips power supply pins, as well as adding a few caps in parallel back at the regulator IC. Try combinations of small caps, like a 0.1µF and a 1µF in parallel.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

Paul Perry (Frostwave)

What was the 'noise' like? if it a just a hiss, then it might just be that the chip doesn't have a very good signal/noise ratio. Telephone answering machines aren't hi-fi..

Eb7+9

Quote from: ethrbunnyThe datasheet says that the lines should be 'decoupled as close to the chip as possible'. Close in what sense?

you need a cap duo right at the pins of the chip - acting as a local reserve of charge ...  you should see a large electrolytic cap and a fast polyprop 0.1uF cap together in parallel placed between any Vcc and Gnd pins right next to the chip so the current spikes don't have to travel down the line (or to the adjacent analogue circuit) to stick charge ... this way local decouling minimizes "ground bounce" from the common resistance of a single ground line ... I'd use two regulators to further decouple the Vcc supply lines ...

~jc

ethrbunny

The noise in question is a periodic 'grinding'.. maybe a fast low pitched hum? Otherwise the recording is working fine.. Its just a bit concealed by the background. I think its more than just analog noise though. It makes the playback almost useless.
--- Dharma Desired
"Life on the steep part of the learning curve"

Paul Perry (Frostwave)

OK, 'grinding' sounds like maybe the charge pump.
If you are running the systm from 9v, then having sepearate 5v regulators forthe two supplies might help.
Plus using 'star' ground wiring, that is all the ground connections go seperately to the one point.

ethrbunny

From the datasheet for the ISD2560:

Supply voltage: to minimize noise, the analog and digital circuits in the ISD2500 devices use separate power busses. These voltage busses are brought out to separate pins and should be tied together as close to the supply as possible. In addition these supplies should be decoupled as close to the device as possible.

Heres a link to the datasheet.

Normally when using voltage regulators they (VR maker) want .1u and .22u between supply / ground and output / ground. In this schematic its .1u 10u from output to ground and 100u from supply to ground. Maybe this is a problem? But as I said, Im not seeing any AC on the output line. Would this AC be a temp surge or an ongoing problem?  

About 1/2 way into the above .PDF there is a link to a sample schematic. They do some different decoupling but not wholly off from what Im doing.

Edit: schematic I am using.
--- Dharma Desired
"Life on the steep part of the learning curve"

niftydog

QuoteMaybe this is a problem?

highly unlikely.

The transient (not AC) that the digital might be causing is likely to fast for your CRO to respond to, but you have to assume it's there.

You cannot really have too many decoupling caps. I've seen circuits with like 30 or 40 0.1µF caps in parallel. Ok, that's extreme, but it's not going to necessarily cause you a problem.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

puretube

layout-problem: you have digi-ground (pin12) mixed with ana-ground (pin13) right at the ISD-chip - that`s not good;

pin 13 should go to pin2 of the 7805 seperately,
and pin 12 (plus the trace coming from pin4 of the LM386) separately, too.
These two should only meet right at the regulator (or it`s associated caps).

ethrbunny

puretube - Im going to show my ignorance here - what is the difference between connecting the two leads at one point vs another? IE connected at the chip or connected at the voltage regulator? won't they 'experience' the same line either way? (caveat - i haven't looked at Maxwells equations / laws in many years.. )

nifty - whats a 'CRO'?
--- Dharma Desired
"Life on the steep part of the learning curve"

puretube

You already quoted it yourself:
QuoteSupply voltage: to minimize noise, the analog and digital circuits in the ISD2500 devices use separate power busses. These voltage busses are brought out to separate pins and should be tied together as close to the supply as possible.
the following example isn`t exactly what I suggested:
http://www.winbond-usa.com/products/isd_products/chipcorder/applicationinfo/apin11.pdf, but with your design (all digital grounds gathering at pin12, and all analog grounds at pin 13, in your design it is the best point to separate these two, and make them join at the supply (voltageregulator with its caps).

See it this way: the minuspole of the P.S. caps is the point of no noise.
On the way from there to the digi-ground pin of the ISD, a lot of digi-noise is flowing (it gets shorted/neutralized at/by the cap).
Now when the ana-ground bus (from pin4 of the LM386 to pin13 of the ISD) is being led through the same trace as the digi-ground towards the "no-noise-point", it will "ride on the spikes".

niftydog

CRO = cathode ray oscilloscope.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

ethrbunny

PT - duly noted! I will give it a shot and report back.

Turbines to power! Engines to speed! To the bat cave!

Duh-nuh-nuh-nuh-nuh..
--- Dharma Desired
"Life on the steep part of the learning curve"

puretube


R.G.

Let's take a step sideways.

There are two reasons that we need decoupling and separated and separated analog and digital grounds.

(1) There are no perfect conductors.
The copper we use for PCB traces has quite low resistance, but it does have some. And according to Ohm's law, it generates a voltage across it in proportion to the current through it. While the voltage is small, we commonly use amplifiers with enormous gains, and they will happily pick up and amplify this tiny voltage to a range where our 120db-range ears can hear it and hate it. The only way to avoid this effect is to separate the flow of ground currents so that only nice sounding analog currents flow through analog grounds. Digital circuits are especially bad at suddenly pulling high currents through ground when the digital clock ticks. This phenomena can pull the ground voltage at the digital chip up; in digital design, it's called ground bounce. Imagine then amplifying that into your analog circuits. Gotta separate analog and digital grounds.

When they are connected at the supply, at least there is no common PCB trace to cause ground shift voltages. Connecting them at one place **is** different from connecting at another. You have to visualize **where** the current is flowing.

(2) Decoupling at the chip minimizes the size of the current loop that power supply transients must flow through.
This is mandatory in digital systems because the clock and digital signals change so fast that the power supply filter caps, separated from the chip by inches of copper trace simply can't get charge carriers to the chip as fast as the chip needs it. All conductors have parasitic inductance. This inductance prevents the current from changing instantly in the conductor. All you can do to prevent huge changes in power supply voltage out at the chip is to put a reservoir capacitor right at the chip so there's a local pool of charge for the chip to use when it changes state. Digital systems are one place where we run into speed-of-light problems. The speed of light - OK, electromagnetic field propagation speed - in copper is about one nanosecond per foot. If you have as much as six inches of power supply between the power supply filter cap and your digital circuit, when the clock ticks at the digital chip, it takes a nanosecond before the power supply even knows anything has happened.

Think a nanosecond is insignificant? A 1GHz clock's entire clock cycle is one nanosecond. You can't build those neato computers you're sitting at with nanosecond delays built in. They simply won't work. A lot of engineering went into just the PCB traces on that motherboard just to get it to work at all.

But I digress.

The second facet of local decoupling is EMI sensitivity. A conductive loop is an antenna. When the current in the loop changes, it radiates radio waves. When radio waves cut across the loop, it receives them. You can't change this, as Mother Nature has said that this is just The Way It Is. What you can do is take note of the fact the Mother Nature said that the smaller the loop, the more poorly the antenna works at any given frequency. And we want *bad* antenna operation here. So we make the antenna loop small by short-circuiting it right at the chip with a capacitor ( a capacitor is a short circuit at high enough frequencies). The same capcitor acts like a short circuit to keep the antenna loop from chip power pin to power supply through the capacitor back to the chip power pin tiny, so it does a really poor job of sending and receiving RF, and also acts as a local reservoir to keep charge carrier changes off the main power supply path.

Taken together, you have to
(1) separate analog and digital grounds for low frequency, signal kinds of reasons
(2) provide local decoupling to keep the chips happy and RF-interference-free.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ethrbunny

Ok. I disconnected pin 12 (Vssd) from the common ground and ran a lead directly to the place on the board where the .1u and 10u caps come off the 7805. Unfortunately this didn't change the noise problem. From looking at the layout of the board it appears that there are decoupling caps about as close the to the Vcc and Vss for analog and digital as is possible.

I have an o-scope, and meters (both analog and digital) - are there any measurements I can take to determine where this noise is coming from?
--- Dharma Desired
"Life on the steep part of the learning curve"