2
\$\begingroup\$

I have read this article about why and how protect input pins. The article mentions the specific scenario of industrial electronics, with the input pin conneted to a long wire.

However, if the input pin is connected through a short wire to a sensor or a pot. do the rules in the above article be applied as well?

\$\endgroup\$
5
  • \$\begingroup\$ How short? Which sensor or pot? Which MCU? How harsh environment will the system be in? \$\endgroup\$ Commented Apr 1, 2021 at 22:36
  • \$\begingroup\$ Also consider if there is a possibility of the sensor being powered with the MCU off. \$\endgroup\$ Commented Apr 1, 2021 at 22:52
  • \$\begingroup\$ The longer wire the higher chance to induce voltage to wire from environment. It is always some compromise how far in protection you want to go. The advantage protection will usually bring some disadvantage into system like limited speed, increased power consumtion, cost... Even in 1 meter wiring i would consider some type of protection. \$\endgroup\$ Commented Apr 1, 2021 at 23:07
  • \$\begingroup\$ Generally it's bad juju to connect an IC input or output pin directly to an unprotected connector that goes to the outside world (as opposed to something internal to the product). There are various ways of providing protection, of which a simple resistor might be an appropriate one in some circumstances. \$\endgroup\$ Commented Apr 1, 2021 at 23:25
  • \$\begingroup\$ As a practical matter, there is almost no down side to putting a resistor in series. You can always replace it with a 0 Ohm jumper if you need to. But if you don't have a resistor and you find out you need one, that is a big deal causing you to redo the layout and build new PCB's. Even in high volumes the cost of a single resistor or jumper is almost negligible. Space constraints would be the only thing that would drive me to omit the resistor (or if I forgot about it). \$\endgroup\$ Commented Apr 2, 2021 at 20:04

4 Answers 4

8
\$\begingroup\$

The simple rule is that if the input pin is going to something that's 100% under your control and guaranteed not to misbehave, then no, you don't need protection. If you can't guarantee that, then yes, you need protection.

The only time I'd advocate violating that principle is if, for some reason, you're designing an instrument whose measurements won't work right if you use protection (i.e., if you're building a $100 4-1/2-digit voltmeter, then it should be designed so that nothing can break it. But if you're building a $100,000 10-digit voltmeter, then it can break if a grad student sneezes three feet away from it, as long as it says so in the manual).

Generally, "under your control" means that said input pin is inside the box, and it's going to something that you put in the box. So if your pot or sensor are inside the product, and you can guarantee that they won't apply a voltage/current combination that exceeds the input pin's parameters, then you're fine.

If the input pin goes to something outside the box -- for example, if you're building a multimeter, or even a box that uses your bespoke cable with a sensor at the end of it -- then you should protect the input pins.

\$\endgroup\$
2
\$\begingroup\$

If you look at the data sheet of an MCU or chip that provides IO lines, you'll usually find somewhere in that data sheet a limit value for current into an IO line. Now if the IO is configured as an input, that limit current might be specified as 1 mA. If it's an output port then maybe something in excess of 10 mA might be specified.

But ask yourself the question; why is the chip supplier telling you this information - why is the chip supplier telling you that when you use a port as an input you should ensure the current into it is less than (say) 1 mA. After all, you'd expect that when applying Vcc to the port, that just a few nA will flow. That would be true under normal circumstances of course.

The 1 mA limit (if that is what the specified limit is) tells you how much current you can push/pull in/out of that pin should the input voltage rise a little above Vcc or fall a little below 0 volts.

So, if you protect an input line with a 10 kohm resistor and the pin is rated to withstand 1 mA, you could, in effect push 1 mA through that 10 kohm resistor without sweating about the device failing. That means, on the outside world the external voltage could be something around 10 volts higher than Vcc and the pin would be protected. Similar story for going below 0 volts.

if the input pin is connected through a short wire to a sensor or a pot

Do an analysis on how that short wire can be influenced by external surges and EMI and, if you conclude that you are safe without a resistor then don't place one. However, my advice is to place a resistor and play safe. You can always fit a zero ohm link and, if you screw up on something and need to bodge a solution, then those extra pads could be a lifesaver in terms of modifications.

\$\endgroup\$
1
\$\begingroup\$

One reason for using a series resistor that has not been mentioned is to provide some current limiting and protection that may result from power supply sequencing.

If device 1 is powered by power supply 1 (PS1), 3.3V, and device 2 is powered by PS2, providing Vcc2, also at 3.3V, what happens if PS1 and device 1 comes up before device 2? If the outputs of device 1 are high, then current will be forced through the forward biased input protection diodes of device 2, since Vcc2 is 0V. This current, if not limited could cause damage or subtle wear out of device 2. Hence this is a place were series resistors may be warranted.

Note that this situation can also arise inside of a box or even on the same board, entirely under your control, and frequently comes about when you need to use 3.3V and 5V devices.

\$\endgroup\$
1
\$\begingroup\$

I nearly always use a series resitor. It also has another use: It increases the rise-time. This is nearly always a good thing. Cross-talk, EMI, power decoupling, and signal propagation is all rooted in the risetime of a signal.

If you have a peripheral device that has high-speed communication or for some other reason has requirements for the flank of the signals; then, and only then, would I not use a series resistor.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.