# Exceeding voltage ratings on microcontroller pins using series resistor

I've been designing a circuit which requires a microcontroller to read a voltage above its current VDD or below its current VSS. I've done this once or twice before by putting a large-ish resistor in series between the high voltage source and the microcontroller pin. My understanding is that this works by limiting the current through some protection diodes on the input pins.

I could use a voltage divider, but it looks ugly and prone to mishaps with the way my circuit works (the ground reference of the microcontroller shifts around...I really don't like it, but that's how things are wired...I'm kinda stuffing this microcontroller in where another part used to go). I'm also trying to reduce my part count.

The voltage that would be read is either high or low and could go as high as 0.7V above VDD or 0.7V below VSS. Does anyone know a way to calculate a size for a series resistor for this situation? I'd like to avoid relying on the guess and check since I have a limited supply of microcontrollers.

• It will be on the datasheet as to how much current the pin diodes can handle. I know it is for PIC 8 bit processors anyway. (On the PIC, some pins handle more than others) – CL22 Apr 7 '15 at 22:50
• It shows the diodes on the datasheet, but I've been unable to find anything but the current rating of the pin, which I'm pretty sure isn't the current rating of the diodes. The microcontroller in question is an ATTiny13A. – Los Frijoles Apr 7 '15 at 22:52
• what is the signal like? fast? slow? analog? VDD/VSS max ratings for Atmel microcontroller pins like that are usually +-1V, so you may already be within the "safe" range anyway. – KyranF Apr 7 '15 at 23:08
• If it's a slow digital signal a simple 10K resistor will work fine - remember digital inputs are already very high impedance op-amp inputs, it's only the protection diode clamps you are trying to protect with the series limiting resistor. – KyranF Apr 7 '15 at 23:09
• It's relatively slow, based on the 1-wire protocol except on the ground wire instead of the power wire (I feel really uncomfortable with that, but it's the way it is for the moment), so a larger resistor wouldn't be a big issue. Looking around some more, I've managed to find one application note stating offhandedly that they are rated to 1mA (and without good grammar either). I'm now looking around for some confirmation of that, but I'm not sure where to find it – Los Frijoles Apr 7 '15 at 23:12

Cutting corners in this area is well summed up by a metaphor based on a long ago Bell Helmets ad - "If you have a $10 head then buy a$10 helmet"

Specifications that allow body diode conduction ALWAYS relate to worst case specifications - ie will not DIE but are not guaranteed to WORK.

Allowing body diodes to conduct during NORMAL operation violates ALL products' data sheet specs* and even a tiny current MAY cause some sort of maloperation SOMETIMES.

Some people will argue strenuously that it does not matter if the current is small enough.
They are just plain wrong.
Once forward biased, body diodes inject current into the substrate and it MAY turn up anywhere and do anything.
*-Manufacturers CAN design to make this not so and some do, but if they do not specify they have done so there are no guarantees. A few microamps injected into an insulated node can turn n a floating gate for a parasitic MOSFET that causes xxx to happen when yyy, with Murphy in charge of both xxx and yyy. Do it at your peril.

_________________________________________________

Using ICs correctly:

From the TI wiki.
Similar advice is included in all reputable data sheets.
Failure to understand this advice and to apply it in all "designs" leads to them not being 'designed' in the sense that that term is usually intended.

The International Electrotechnical Commission (IEC) weigh in:

Absolute Maximum Ratings

The absolute maximum rating (AMR) section in the datasheet includes limits on operational and environmental parameters, including power, power derating, supply and input voltages, operating temperature, junction temperature, and storage temperature.

The International Electrotechnical Commission (IEC) [5] defines absolute maximum ratings as “limiting values of operating and environmental conditions applicable to any electronic device of a specific type as defined by its published data, which should not be exceeded under the worst possible conditions. These values are chosen by the device manufacturer to provide acceptable serviceability of the device, taking no responsibility for equipment variations, and the effects of changes in operating conditions due to variations in the characteristics of the device under consideration and all other electronic devices in the equipment. The equipment manufacturer should design so that, initially and throughout life, no absolute-maximum value for the intended service is exceeded with any device under the worst probable operating conditions with respect to supply voltage variation, equipment component variation, equipment control adjustment, load variations, signal variation, environmental conditions, and variation in characteristics of the device under consideration and of all other electronic devices in the equipment.” In other words, the part manufacturers select the AMR values, and the companies, which integrate electronic parts into products and systems, are responsible for assuring that the AMR conditions are not exceeded.

Zilog & Philips (in this case) then add:

Recommended Operating Conditions (ROC)

Recommended operating conditions provided by part manufacturers include voltage, temperature ranges, input rise and fall time. Part manufacturers guarantee the electrical parameters (typical, minimum, and maximum) of the parts only when they are used within the recommended operating conditions and standard operating conditions. Philips notes, “The recommended operating conditions table [in the Philips datasheet] lists the operating ambient temperature and the conditions under which the limits in the “DC characteristics” and “AC characteristics” will be met” [6]. Philips also states that “The table (of recommended operating conditions) should not be seen as a set of limits guaranteed by the manufacturer, but the conditions used to test the devices and guarantee that they will then meet the limits in the DC and AC characteristics table.”

ZiLOG [7] states, “Recommended operating conditions are given so customers know the maximum and minimum conditions where normal performance is still available from the device. Once the normal operating conditions are exceeded, the performance of the device may suffer.”

From here

Allegro concur - of course

Cypress

Oracle

___________________________