1
\$\begingroup\$

I'm designing a very simple microcontroller breakout board. I wonder how can I protect microcontroller output pins against accidentally connecting another signal to one of them and burning the pin's output driver (because it's an output not input) ? Would a small (say 10 ohm) resistor in series to the pin be enough to protect it ?

EDIT: For example mistakenly switching UART RX and TX line.

\$\endgroup\$
3
  • \$\begingroup\$ What do you want to protect against, exactly? Is it ONLY a worry about touching another output pin? Or a power supply rail? Or static zap from someone touching the pin? Or what kind of external signal? \$\endgroup\$
    – jonk
    Jun 20 '18 at 19:29
  • \$\begingroup\$ What are the absolute maximum output current ratings for the microcontroller? What is the operating voltage of the microcontroller? What is the highest voltage that a pin might accidentally be connected to? \$\endgroup\$ Jun 20 '18 at 19:29
  • \$\begingroup\$ Operating voltage is 3V3. It's about someone accidentally touching the output line with another line allready having 3V3 itself. The GPIOs can have their voltage in the range GND -0.3V to VCC + 0.3V . \$\endgroup\$ Jun 20 '18 at 19:32
2
\$\begingroup\$

Typical microprocessor GPIOs look like this:

enter image description here
Source: http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications

the first thing to go in an over voltage situation is usually the protection diodes, which have a power and\or current rating (or a general GPIO current rating) that you can find in the datasheet. If the protection diodes go out then its a guess to figure out what goes next as this is dependent on the IC. But a good design should prevent the diodes shouldn't be burned up.

10V to 3.3V through a 10 ohm resistor is still 670 mA which is enough to burn out any microprocessor.

You'll need a little more than 10Ω, try 10kΩ then you would get 6.7mA which would probably be acceptable in most applications.

Another thing would be to put another pair external diodes to protect the inputs in conjunction with the resistor to make sure they don't get overloaded.

If a higher resistance value won't cut it because of speed issues, then you may want to go with an buffer that can tolerate a wider input range.

\$\endgroup\$
2
  • \$\begingroup\$ An inline resistor will help prevent damage, but will also slow down the signal rise and fall times. 10KΩ is probably too much for a UART pin to function correctly, unless it's operating at very slow data rates. \$\endgroup\$
    – bmow
    Jun 20 '18 at 22:22
  • \$\begingroup\$ Did I not put my buffer comment in there? \$\endgroup\$
    – Voltage Spike
    Jun 20 '18 at 22:26
3
\$\begingroup\$

If you are only worried about connecting two outputs together, where both of those signals are guaranteed to be operating at 3.3V with a common ground, then you just need to choose a resistor that will limit the pin output current to something below its maximum value...you don't need to worry about damaging the input protection diodes. A 100\$\Omega\$ resistor would limit the current to 33mA in the absolute worst case. I would think that something like 200\$\Omega\$ would be a safe choice for general use.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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