3
\$\begingroup\$

I've read that digital I/O pins should have a resistor in series in order to limit noise. Should one also use such approach when interfacing with the I/O pins of an arduino, or is that already done on the arduino board?

\$\endgroup\$
5
  • 3
    \$\begingroup\$ Where did you read this gem? \$\endgroup\$
    – Andy aka
    Jul 18, 2014 at 9:37
  • 2
    \$\begingroup\$ Limit noise? And how does that work? Add a device which is inherently noisy to limit noise?! \$\endgroup\$
    – Majenko
    Jul 18, 2014 at 9:44
  • 1
    \$\begingroup\$ ti.com/lit/an/szza009/szza009.pdf section 2.2.5. "The goal here is not so much to reduce the noise of the edge switching, but to mute the noise of the clock glitches when the pin is static" so maybe I have not phrased it correctly \$\endgroup\$
    – joaocandre
    Jul 18, 2014 at 9:53
  • 1
    \$\begingroup\$ What they're talking about there is not just a series resistor, but forming a low-pass filter with a resistor and capacitor to reduce high frequency switching noise. \$\endgroup\$
    – Majenko
    Jul 18, 2014 at 9:58
  • 1
    \$\begingroup\$ Documentation on the Arduino hardware design is readily available. Do you see any resistors? \$\endgroup\$
    – Dave Tweed
    Jul 18, 2014 at 10:31

2 Answers 2

9
\$\begingroup\$

What that snippet seems to be talking about is restricting the propagation of noise generated inside the microcontroller (or other similar clock-based chip) into external circuitry.

To that end the recommendation in that document is not just to add a series resistor, but to form a low pass filter close to the chip using a series resistor and parallel capacitor (for high speed switching they don't recommend the capacitor, in which case the capacitance of the trace itself forms the capacitor).

This helps prevent some of the internally generated switching noise from getting any further from the chip than the low-pass filter, thus reducing the possibility of radiated EMI.

It does, of course, have the knock-on effect that it limits the maximum switching frequency you can perform with any IO pin set up in that way, which is why they specifically say it is "to mute the noise of the clock glitches when the pin is static", so not for high speed clock or data pins on busses like SPI, I²C, etc, or things like PWM, but simple low speed IO pins used for switching and signalling external devices.

Should you add them to an Arduino? No. Not unless you are designing your own Arduino-esque board and have some very tight EMI requirements. The whole point of those low pass filters is that they are placed extremely close to the chip, not off on some daughter board somewhere.

\$\endgroup\$
12
  • \$\begingroup\$ I²C has a high speed option (up to 3.4Mb/s). \$\endgroup\$
    – Majenko
    Jul 18, 2014 at 17:38
  • \$\begingroup\$ The document recommends the LP filter only on lines with an edge rate not faster than 100ns. For a square wave that'd be a clock period of 200ns or 5MHz. High speed I²C just fits under that, but I'd still not like it. Yes, I know high speed I²C is rare, but it does exist, and you have to know to consider these things. \$\endgroup\$
    – Majenko
    Jul 18, 2014 at 18:04
  • \$\begingroup\$ Oh definitely, the values of R and C should be checked against the signal speed called for in the specific design. Note of course that the data lines (SDA / MISO / MOSI) have edges at half the frequency of the clock (SCL / SCLK). And on I2C, having weak pullup resistors instead of active drive tends to already slow down rising edges. \$\endgroup\$
    – Ben Voigt
    Jul 18, 2014 at 18:20
  • \$\begingroup\$ Really though, if the only concern were stray edges on the digital lines, I wouldn't worry about filtering. Glitches rarely have high enough amplitude to confuse a digital input. But fast digital square-waves wreak havoc on nearby (or coupled via power supply) analog signals. \$\endgroup\$
    – Ben Voigt
    Jul 18, 2014 at 18:23
  • \$\begingroup\$ While I agree with you there, that isn't the point of the recommendations in the document. They are to counter outgoing EMI from the chip to the traces that could cause you to fail your EMI tests, or cause interference with other devices and signals. They're not about protecting the chip from interference but stopping the chip's noise from escaping. \$\endgroup\$
    – Majenko
    Jul 18, 2014 at 18:27
2
\$\begingroup\$

Probably not a good idea in most circumstances. Here are a couple of examples: -

  1. Inputs - adding a resistor will slow down the propagation of the digital signal into the input due to the inherent input capacitance of the IO gate - a resistor could be used to "bodge" bad hardware design of course i.e. it slows down edges so that glitches don't have an effect.
  2. Outputs - if transmitting serial data some folk would consider adding a series resistor to a data output IO in order to match impedance to the transmission line but, this is not required - matching only needs to be done at the receive end and, adding a resistor at the transmit end just reduces the amplitude and makes the system more susceptible to noise.
\$\endgroup\$
3
  • \$\begingroup\$ @apalopohapa if you have a transmission line perfectly terminated at the receive end you will receive a bigger signal if you don't have a source termination. If you don't care about the size of the signal received and can live with 50% then sure, put a source impedance in. \$\endgroup\$
    – Andy aka
    Jul 18, 2014 at 10:23
  • \$\begingroup\$ @apalopohapa I'm not talking about transmitting to a receiver without a termination resistor at the receiver. I'm not sure what you are talking about. \$\endgroup\$
    – Andy aka
    Jul 18, 2014 at 11:04
  • 3
    \$\begingroup\$ termination at the source is perfectly valid also. \$\endgroup\$
    – Phil Frost
    Jul 18, 2014 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.