Suppressing digital pin switching noise

Is a capacitor a satisfactory means of suppressing digital pin switching noise?

Is there a preferred way of suppressing transient spikes during switching? For example, in sensitive analog digital mixed circuits and noise suppression is important.

Capacitors and ferrites and chokes seem to be the preferred methods.

Caps can smooth a spike but the calculations for size and type are beyond me but seem to be in the range .01 to .1 mF as low voltages.

Cable type and shielding can also play a very big part in keeping noise out.
Again selection will vary depending on application and voltages.

There are some very good sites out there for these types of information.

If you are talking Arduino, a choke can be placed in series with the AVCC pin.

Edit
10uH should be sufficient.
.

Thanks for the confirmation. My schematic reflects the same.

PCB layout techniques play a large role in mixed signal noise suppression.
With digital signal ringing, a series resistor is usually used.
Other solutions might be avoiding ground loops, onto isolation, ferrite core, snubber, filter, debounce, deglitch, etc. Finding the ideal solution usually requires identifying and understanding the cause of the noise problem.

Yes. It can be tricky. Working through it bit by bit.

You should not use capacitors on a raw pin output because at switch on a capacitor looks like a dead short and you will exceed the maximum current ratings in the pin. That is why you put a series resistor in the gate of an FET and those have a much smaller capacitance than we are talking about here.

Also reducing the input impedance to the audio circuit helps.

Grumpy_Mike:
You should not use capacitors on a raw pin output because at switch on a capacitor looks like a dead short and you will exceed the maximum current ratings in the pin.

You should not put capacitors on an output because it will do no good, not because you will exceed current ratings. Current ratings are for DC conditions. It is impossible to specify peak transient current.

When I was designing an output driver for a high capacitor load the designers of the next level of assembly became alarmed at the high peak currents being generated. They commissioned an analysis of the effects of the high peak currents. Conclusion: no problem.

As usual you know best with advice that contradicts the consensus. I would be very interested in seeing the report that says high peak current on processor output pins are no problem. Untill then I should warn beginners that you are well known here for crap and confusing advice.

Grumpy_Mike:
As usual you know best with advice that contradicts the consensus. I would be very interested in seeing the report that says high peak current on processor output pins are no problem. Untill then I should warn beginners that you are well known here for crap and confusing advice.

How many memos did you keep from the '80s? But, since you asked, I can send you a link to the patent I got for the driver. At the time there was no CMOS. It was necessary to drive NMOS chips with 9V signals. No one could figure out how to drive rail to rail with a bipolar driver (a darlington pull-up actively drives only to within 2 Vbe's of +V). I came up with a circuit. If you scroll down through two pages you will come to the "Bootstrapped Driver Circuit", my first patent. My driver had a high fan-out load to memory cards. Thanks for asking.

@charliesixpack
You have been a very busy boy.

I hope you had time to kill a few six packs :wink:

.

Fantastic, but nothing to back up what you say. I have a few patents myself so I know the exact value that they embody. ::slight_smile:

A more advanced chip, such as the ones used in the Teensy 3.x series can have variable drive strength. It is possible to configure the output pin driving capability so that you don't get rapid rises and ringing.

I used this recently on a long SPI bus where the standard drive strength was making all sorts of nasty waves down the wire, which were interfering with the signals on the adjacent wires. Changing the drive strength made it work.

But a series resistor also does the same thing.

MorganS:
A more advanced chip, such as the ones used in the Teensy 3.x series can have variable drive strength. It is possible to configure the output pin driving capability so that you don't get rapid rises and ringing.

Good observation. I suspect the output driver switches in variable series resistances. The rule of thumb we used is to not exceed 1 V/nS for transition rates to avoid crosstalk and ringing. At light capacitive loads or heavy inductive loads you need more resistance.

I was curious so I looked at the digital output of an Uno. I put capacitors up to the value of 1000 microfarads on an output and looked at the transitions. No external series resistance. Nothing blew. I saw the same output impedance for rise and fall. Looks like 70 ohms to me. The output current limits itself to 80 mA. That is the nominal peak value the output can supply.