Decoupling Capacitors

Discussion in 'General Electronics Chat' started by adam555, Nov 1, 2013.

Aug 17, 2013
858
39
I'm having problems with an OpAmp used as a buffer in a function generator. It seems that the ripples or noise in the supply line are interfering with the output; which is specially noticiable at high frequencies and small output voltages. it already has 2 decoupling capacitors of 10nF on the V+ and V- (I know I probably should have used 100nF), and they are not doing the job well. But apart from that problem, I have 2 questions about decoupling capacitors:

- Is there any formula to calculate the value of these caps?
I found this formula C=it/V, but on the same website it also recommends not to use; just use 10nF for each IC (which is what I have).

- Can you use one shared decoupling cap for 2 ICs, instead of one for each? I mean, if 2 ICs share the same line, and are placed near each other; would there be much difference if instead of using 2 decoupling caps on the same line, you just use 1 twice the size?

Apr 5, 2008
15,806
2,389
3. MrChips Moderator

Oct 2, 2009
12,646
3,458
Power supply decoupling capacitors are mandatory. This is not an option.

Your aim is to reduce the resistance and inductance between the IC power and ground pins and the decoupling capacitor, including that inherent in the capacitor itself.

100nF is the value usually recommended. For high frequency applications it is common practice to use a 10nF and 100nF in parallel.

The important point is that the trace and lead length be as short as possible between the IC pins and the capacitor. For this reason, SMD capacitors are your best solutions plus solid power and ground planes.

With that in mind you would use a decoupling capacitor for every IC unless the power and ground pins of two ICs are so close to each other that the one capacitor is physically as close as you can get to both ICs.

No, you do not use one twice the size.

There is no acceptable formula that determines the correct value to use. There are too many variables that cannot be applied in a formula.

4. ronv AAC Fanatic!

Nov 12, 2008
3,404
1,478
I would be surprised if your problem is decoupling. Most op amps have power supply noise rejection in the order of 90 to 100 DB. On the other hand it can't hurt.

5. ramancini8 Member

Jul 18, 2012
447
119
You can calculate the required value of decoupling cap, but the engineering cost for one design would buy several boxes of caps, so use 0.1uF per IC for safety. Also, the cap dielectric must be good for very high frequencies---a good ceramic.
That said, the noise on the op amp output comes from the supply because the PSRR is terrible at high frequency. The solution is to insert a small value resistor, about 51 ohms, in series with each supply line and add a second cap to ground from the resistor/op amp supply lead.

Aug 17, 2013
858
39
Thanks a lot for all that good info.

From reading thatoneguy's post I realized I'm also missing a decoupling cap for the PCB itself, as it's separate from the main power supply.

In any case I need to redesign the PCB, as I made the mistake of using shared capacitors for both ICs and not placing them next to the supply pins.

I was about to set up a copy of that circuit in a breadboard to test if the noise in the opamp output comes only from the decoupling caps or also from somewhere else (as this problem didn't happen with another opamp that I used before on the same circuit), but now I'm unsure if the results will be the same on the breadboard and the PCB; am I right?

Aug 17, 2013
858
39
Yes, I was also considering that possibility. The reason is that I had another opamp before in that circuit, and I didn't notice that problem. I had to change the opamp because the previous one was not suitable for 300KHz, but now I wondering if I overlooked another feature of the new opamp.

8. MrChips Moderator

Oct 2, 2009
12,646
3,458
There is a lot more to noise suppression than just choice of decoupling capacitor and placement.

What is the frequency range?
What opamp are you using?
What power supply are you using?
Can you show your PCB layout?
Are you using extensive power and ground planes?
Are signal cables and PCB shielded?

Aug 17, 2013
858
39
It's a function generator.

50Hz to 300KHz

It's basically this one... with minor modifications.

The problem starts at IC5

The circuit was designed with an EL2045CN; but since I couldn't get one I temporarily use an UA741CN that I found at home -which was unsuitable for frequencies over 20KHz- and now bought a LM6171... and that's when I noticed the problem at the highest end of the frequency range (which I couldn't reach before with the other opamp).

The power supply of that circuit, but separated on a different PCB, and connected by a cable with +12, -12, and GND (J2 in the PCB layout below).

I know I need to redesign the PCB... but this is what I had:

J1 is the sine and triangular waves input
J2 is the power supply in
J3 is the wave selector switch
VR8 is the amplitud range switch, its resistors and adjust pot (all external)
J4 is the digial 5V output
J6 is the main output

I don't know what they are...

Yes, I used shielded cables for everything carrying a signal and normal cables for everything else... wait, now that you mention it I didn't use it on the wave switch. But, I've been probing the whole circuit with an oscilloscope, and I don't see the interference until I reach the output of the buffer opamp (pin 6 of IC5).

Last edited: Nov 1, 2013
10. MrChips Moderator

Oct 2, 2009
12,646
3,458
Thanks for the detailed responses.

I need to go back and view your post #1 and see exactly what are the symptoms.

Can you described the noise problems you are experiencing?
I assume the noise is on the output signal. Can you categorize the noise? Frequency, voltage?

How does it change with the frequency of the 8038?

Do you have an oscilloscope?
Can you quantify the signal you observe on the power rails?

(Sorry if I ask a lot of questions. For me that is the only way you can get to the root cause of your problem.)

Aug 17, 2013
858
39
I was going to post a picture of the output, but I have the device dismounted at the moment.

The noise looks exactly like what you would get of a tank circuit resonating, but in the middle of the wave generated by the function generator. At low frequencies and at high end of the voltage range it's barely visible; but at high frequencies you can clearly see it all across the output signal.

Just made an approximate drawing of how it looks on a square wave (left) and on a triangular wave (right); maybe later I can take a picture of the oscilloscope.

Last edited: Nov 1, 2013
12. #12 Expert

Nov 30, 2010
16,704
7,354
Just a general statement: If the world was perfect, you wouldn't need decoupling capacitors. Second best would be to add a surface mount ceramic capacitor on the back of the board, between pins 4 and 7, then stack a 10 uf capacitor on top of it.

The problem is caused by the fact that wires and circuit board traces have resistance and inductance, and the inductance is the worst of the two. The larger the capacitor is, the more internal inductance it has. That is why a 10 uf aluminum electrolytic capacitor is useless at 100 MHz. The cure is to place another, smaller capacitor in parallel with it. Something that has high frequency characteristics that take over as the larger capacitor reaches the frequencies it can't do.

anhnha likes this.

Aug 17, 2013
858
39
I just tried the circuit on its own (disconnected from the power supply and the function generator inside the device) and I don't see that noise anymore; I see another that seems related to the pot that's immediately after the IC's output pin to adjust the amplitude, and which is connected through a cable to the PCB along the range switch.

At this point I don't think it's related to the decoupling caps, but some other fault or interference in either the pot, the range switch, or the cables.

Apr 5, 2008
15,806
2,389
Hello,

Is the power supply a switched one?
Switched power supplies can generate some noise on the power lines.

Bertus

Aug 17, 2013
858
39
It's the linear power supply in the circuit from post #9 but on a separate PCB. All sections are in separate PCBs (power, function generator, and amplifier).

I just put it back together and I'm still getting the same noise from the drawing, but now on top it's not working on the lowest 2 amplitud ranges...

I'm going to redesign and rebuild the PCB taking into account all the info and tips I got from this thread; which was really useful for me, as I had no idea about the subject. Thanks a lot for all your help.

Apr 5, 2008
15,806
2,389
Hello,

Do you have the red annotated capacitors mounted very close to the regulators?
These will prevent the regulators from oscillating.

It can also help to lower R2 to 120 Ohms.
The resistors to ground on the regulator should also be smaller (R1 and VR1).

Bertus

• Powersupply.png
File size:
12.5 KB
Views:
258

Aug 17, 2013
858
39
The 2 main capacitors (C1 and C3) are fairly close, but the other 2 a not that close. It's quite a small PCB anyway.

I'm only a beginner, but I don't think the problem is the power supply. The reason is because I've been following the outputs with an oscilloscope and I can't see any interference. I did have a coupling problem with the power supply because I added a digital display to the design that's not included in the schematic, but I solved it time ago and this one persists even without the display.

I really think I need to make that board again, I already had to fix 2 broken lines, and I don't trust the contacts of any connectors. I also need to replace one of the pots and shield the cables that go to the pots and switches.

18. ronv AAC Fanatic!

Nov 12, 2008
3,404
1,478
A couple of things you could look at.
It looks like they may have had trouble with the square wave coupling thru the switch - hence SW3B to short it out when not in use. Do you have that switch. It would seem you do since you say you see the noise on the square wave as well. In any case I would have a look at the comparator outputs (LM393) to see if they are in sync with the noise. You could also add a small cap - say 100pf across R21 to see if it reduces the noise. It will screw up the rise time on the square wave but it might tell us if it is pickup or something else.

Last edited: Nov 1, 2013

Apr 5, 2008
15,806
2,389
Hello,

I only see the electrolitic capacitors on your PCB.
I see none of the 100 nF capacitors ( C2, C4, C5 and C6 ) on your PCB.
They are a must for stability.

Bertus