## input protection resistors

16 posts / 0 new
Author
Message

The datasheet says that the absolute maximum input voltage on a pin is Vcc+.5.

If I place a resistor (e.g. in series) on the input pin, will it increase the maximum voltage a pin can withstand?

I'm asking because I have a circuit which I believe is a 5V circuit but also uses a 9V supply. I'd like to protect my uC pins from inadvertent connection to a 9V signal.

Thanks!

You need to limit the current to less than 1 mA.

If you think education is expensive, try ignorance.

Use Zener Diode at 5.1V to protect uC's pins.

Quote:

Use Zener Diode at 5.1V to protect uC's pins.

Preferably an ideal Zener. :roll:

If you think education is expensive, try ignorance.

I agree with all of the above.

Ideally you should know what signal(s) you are injecting into your uC!

If it is a constant ON, then you could read it with a voltmeter, (e.g. an alarm state, triggered and stays high). If it is a pulse stream it is easiest to check with a scope, if you had one available.

If you have a schematic you can post it, and you might have several people look at it to see what they expect the peak voltage to be.

If you know that the (digital) signal varies between low, (Ground); and a high of 9V, another option is to use a two resistor divider to bring the voltage into the desired range. Signal feeds into one resistor, connected in series to the second resistor, which then ties to ground. You take your signal into the uC from the junction of the two resistors. (As an example: If the first resistor, tied to the incoming signal, is 39K ohms, and the other is 47K ohms, the output signal to the uC will be 4.9 ohms)

JC

A voltage divider is good when you need to scale down a voltage, and the voltage levels in questions are well defined. Regarding protectio against spikes, inadvertent connection and such, a forum search for clamping diode might be a good idea. You should get a lot of useful information, such as this thread:
https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=69346&highlight=clamping+diode

Using the above information, the correct way to protect the micro would be to connect the zener directly to the uC pin and then put the resistor in series with the pin. Here's why:

The resistor limits the current, the zener limits the voltage. Without the resistor, the zener will limit the voltage at the pin, but will not allow the supply to stay at 9volts. This could caause large current draw damaging either the zener, or the power supply, or both.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

emuler wrote:
You need to limit the current to less than 1 mA.

Does this mean that for a 9V max signal a 10K resistor would suffice?

What I'd really like to have is a model of the input pin which would help me understand in what way over-voltage can damage it.

The model of the input for this situation is a very small junction diode between the I/O pin and VCC. It is reverse biased when the pin is below Vcc. The diode cannot withstand a lot of current; too much current melts it into a little blob of silicon.

So, to limit the input current to 1ma from a possible accidental 9V connection, you would need a resistor which has a MINIMUM value of (9V-5V)/1ma = 4V/1ma = 4K. Thus, 10K would be just fine. The only problem with larger resistor values is slow rise and fall times and this could hurt if the normal input signals to that pin are very fast (say, 100KHz or higher).

Everyone proposes using a zener but zeners have such poor tolerance and, below about 6.8V, they have a rather round "knee" which makes them rather non-ideal. But, what folks also do not realize is the fact that zener diodes have a MUCH higher junction capacitance than you would expect. Ditto Transorbs.

I would use a small Schottky diode between the pin and Vcc (cathode to pin). This diode will turn on before the internal diode does and take the current. Even cheap ones, like BAT54, will take several hundred milliamps, so you can use a much smaller series resistor.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

ka7ehk, thanks for that info. It does seem a little ironic, though, that you need a protection resistor to protect the protection diode :-)

I decided just to use a ULN2003 to buffer the inputs until I have a better understanding of the circuit works. I can logically invert the outputs in the uC.

There are two concerns being discussed, and it still isn't clear, at least to me, which addresses the OP's question.

Is the input a digital signal, or an analog signal, and what is it's High level voltage, if it is a digital input. ESD/Spike prevention is different from signal conditioning / pre-processing.

JC

JC,

VERY good question

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

The OP referred to "accidental connection to 9V" or something close to that. So, it sounds like it falls into that grey (or gray) area in between.

To CircuitMangler, you need to consider what the "protection diodes" are intended to protect against. They are designed to deal with light ESD so that simple handling does not break the IC, inside. A lot of the human ESD is very energy limited and limited by source resistance, so the protection diode will generally survive. The diodes are not intended to protect against extended excess voltage input. That is where you are running into problems.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Quote:
Using the above information, the correct way to protect the micro would be to connect the zener directly to the uC pin and then put the resistor in series with the pin. Here's why:

The resistor limits the current, the zener limits the voltage. Without the resistor, the zener will limit the voltage at the pin, but will not allow the supply to stay at 9volts. This could caause large current draw damaging either the zener, or the power supply, or both.

This will prevent any of the OP's trepidations short of plugging the pin into a wall socket.

The 'other' Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

DocJC wrote:
There are two concerns being discussed, and it still isn't clear, at least to me, which addresses the OP's question.

Is the input a digital signal, or an analog signal, and what is it's High level voltage, if it is a digital input. ESD/Spike prevention is different from signal conditioning / pre-processing.

JC

Those are good questions, and if I knew the answers the problem would be a lot simpler.

I'm interfacing to a circuit with incomplete information. I don't have a schematic, but I know the signals I am connecting to are outputs. Figuring out what kind of signals they are is part of the puzzle. I only have one copy of the circuit, so I don't want to damage it, and, of course, I don't want to damage my uC's.

Th signals appear to be digital, and the ULN2003 is working well.