Written: 11 June 2015
Last Updated: 2 Sept. 2015
Update History (newest on top):
-Added "Upfront Caveat", 2 Sept. 2015
-Added lots of extra info, & the Figures, 21 July 2015
- Click the Table of Contents link above --> then look under the "Arduino" heading
- Quick Tip: A Comprehensive List of Helpful Arduino Learning Links - New!
- Arduino Power, Current, and Voltage Limitations
- The Power of Arduino
- Using the Arduino Uno’s built-in 10-bit to 21-bit ADC (Analog to Digital Converter)
- eRCaGuy_ButtonReader Library for Arduino - Debounce and read the current button state, & most recent action ("just pressed" or "just released") easily!
- Arduino micros() function with 0.5us precision - using my Timer2_Counter Library
- Quick Tip: 4 Ways to Power an Arduino
- Recommended Soldering Kit & Tutorials (for Arduino, Electronics, & Radio Control)
- A Few Tips & Tricks: Arduinos, PCB Tricopter Frames, Home-made Acid Etchant for Copper
Here I present a pin protection method for very high and low input voltages that I learned from Atmel themselves, in their Application Note "AVR182: Zero Cross Detector."
If you've read my article titled "Arduino Power, Current, and Voltage Limitations" you know that the pin input voltage limits are as follows:
Maximum Input Voltage: Vcc + 0.5V, or +5.5V for a 5V Arduino
Minimum Input Voltage: -0.5V
However, if you simply add a single resistor in series with any input pin, you can protect it against higher or lower input voltages, with some caveats!
Ex: simply by placing a 10k resistor in series on an input pin, you get input voltage protection up to +15.5VDC and down to -10.5VDC. With a 100k resistor you get input voltage protection up to +105.5VDC, and down to -100.5VDC. Keep reading to learn more.
-FOR YOUR PERSONAL SAFETY, WHEN USING THIS TECHNIQUE, I RECOMMEND THAT YOU DO NOT WORK WITH INPUT VOLTAGES GREATER THAN APPROXIMATELY 100VDC OR 20VAC UNLESS YOU KNOW WHAT YOU ARE DOING AND HAVE READ ALL OF MY WARNINGS HEREIN, INCLUDING THE ADDENDUM AT THE END OF THIS ARTICLE.
-REGARDLESS OF WHAT INPUT VOLTAGES YOU ARE USING, YOU AND ONLY YOU ARE RESPONSIBLE FOR YOUR PERSONAL EXPERIMENTS, PRODUCTS, DESIGN DECISIONS, AND THE SAFETY OF YOU AND YOUR CUSTOMERS.
Though this technique may work, and be good for home-projects or quick prototyping, better techniques are recommended, especially if you are producing a commercial product. Redundancy is your friend. Using external, rated clipping diodes is certainly a better option than relying on the internal, integrated and unrated ones. For better protection techniques, including using *external* clipping diodes for redundancy, and adding transient voltage suppression, read more here: Science Prog: Using current limiting resistors on AVR I/O pins. Also see the AVR182 Application Note for references to additional sources to read in order to add extra pin protection.
Background & Concept: