Searching \ for '[EE] PIC Input protection.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=input
Search entire site for: 'PIC Input protection.'.

Exact match. Not showing close matches.
PICList Thread
'[EE] PIC Input protection.'
2007\03\21@235857 by John Dammeyer

flavicon
face
Hi all,

Quick question here.

 http://www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg

The link to the above circuit shows how I plan on changing the
Electronic Lead Screw circuit to protect the processor inputs from
transients.  I can see someone accidentally putting 12V onto an input
pin with switch that should close to ground instead closing to 12V.

The circuit using R45 and R43 limit the current through the diode but a
spike might still trash the processor.

The circuit using R44 and R46 forces the power supply to absorb the
input and perhaps can trash the diode with excess current but R46 limits
the current into the processor.

Suggestions or alternatives?

Thanks

John Dammeyer


2007\03\22@003653 by Doug Metzler

picon face
How about a 5.1v Zener?

DougM

-----Original Message-----
From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu] On Behalf Of
John Dammeyer
Sent: Wednesday, March 21, 2007 8:57 PM
To: 'Microcontroller discussion list - Public.'
Subject: [EE] PIC Input protection.

Hi all,

Quick question here.

 http://www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg

The link to the above circuit shows how I plan on changing the Electronic
Lead Screw circuit to protect the processor inputs from transients.  I can
see someone accidentally putting 12V onto an input pin with switch that
should close to ground instead closing to 12V.

The circuit using R45 and R43 limit the current through the diode but a
spike might still trash the processor.

The circuit using R44 and R46 forces the power supply to absorb the input
and perhaps can trash the diode with excess current but R46 limits the
current into the processor.

Suggestions or alternatives?

Thanks

John Dammeyer


2007\03\22@011522 by Orin Eman

picon face
On 3/21/07, John Dammeyer <johndspamKILLspamautoartisans.com> wrote:
> Hi all,
>
> Quick question here.
>
>  http://www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg
>
> The circuit using R44 and R46 forces the power supply to absorb the
> input and perhaps can trash the diode with excess current but R46 limits
> the current into the processor.

Let's see.  12V one side of the diode, VCC the other.  Either VCC will
get pulled up towards 11.4V or VCC holds its own, the diode goes boom
and goodbye protection.

Orin.

2007\03\22@012219 by John Dammeyer

flavicon
face
Hi Doug,


I still want the RC filtering so yes a Zener would work too.  Question
though is still on which side of the pull up resistor is optimum for the
series resistor?

Thanks.

John Dammeyer


> Subject: RE: [EE] PIC Input protection.
>
>
> How about a 5.1v Zener?
>
> DougM
>
> {Original Message removed}

2007\03\22@014852 by Forrest W. Christian

flavicon
face
John Dammeyer wrote:

>The circuit using R45 and R43 limit the current through the diode but a
>spike might still trash the processor.
>
My experience is that circuit consisting of the input through a resistor
(I use a 330 typically, although 1K or 10K isn't unheard of) and then to
a pair of schottky diodes - one to vcc and one to vss tend to provide
more than enough protection from about anything you can throw at it.  
The schottky diodes have a lower Vf  (~340mv vs ~1V @100ma) and switch
faster - primarily only

You also need to make sure that you have enough capacitance onboard such
that any "spikey" current which gets coupled into Vcc gets absorbed by
the cap before it can raise the voltage.  This should be a cap across
the supply rail.  I'd probably use a low-ESR type just because I like my
caps to act like caps, and not caps with resistors in them.   Remember
that there still needs to be somewhere for the current (wattage)
generated by the wrong-voltage to go.  If your power supply can't sink
(i.e. it only sources) power, this needs to be your circuit.  12V into
330 is something like 36ma or so.  So for a VCC+12V wrong input you
would have to have a minimum load of 36ma (assuming the 330 I use, not
the higher value you used).

-forrest

2007\03\22@033730 by Vasile Surducan

face picon face
On 3/22/07, Orin Eman <.....orin.emanKILLspamspam.....gmail.com> wrote:
> On 3/21/07, John Dammeyer <EraseMEjohndspam_OUTspamTakeThisOuTautoartisans.com> wrote:
> > Hi all,
> >
> > Quick question here.
> >
> >  www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg
> >
> > The circuit using R44 and R46 forces the power supply to absorb the
> > input and perhaps can trash the diode with excess current but R46 limits
> > the current into the processor.
>
> Let's see.  12V one side of the diode, VCC the other.  Either VCC will
> get pulled up towards 11.4V or VCC holds its own, the diode goes boom
> and goodbye protection.

Probably we should start understanding the signals directions.

Based on drawing  ES-I is input and E_O is output and here the
protection could be OK.
Orin, a stabilizer circuit (even the three terminal one) has a
negative feedback, so the voltage can't grow to 11.4V even in bad
dreams. If the supply is based on a three terminal stabilizer the
reverse diode between Vin and Vout will become on and the spike will
be absorbed in the filtering cell.

This is another example about insufficient data for a right answer.
The originator should draw complete the whole supply schematics.

There is probably a mistake here: L_I should be input and L_O output
which could be wrong from the protection circuit perspective. But if
the signals are reverse than is ok.

Vasile

2007\03\22@075332 by Russell McMahon

face
flavicon
face
>> Let's see.  12V one side of the diode, VCC the other.  Either VCC
>> will
>> get pulled up towards 11.4V or VCC holds its own, the diode goes
>> boom
>> and goodbye protection.

http://www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg

Assuming that _I means input and _O means output, as is clearly the
intention then:

As shown it is definitely bad IF L_I is low impednace and/or high
energy..
Even if the regulator can absorb the energy you are indeed attempting
to use a diode to pass an indefinitely large current.
It may be that L_I is impedance / resistance limited outside the
circuitry shown.

A possibly important other issue is that L_O will rise to about 5.6v
for values of L_I much above 5.6V. Depending on what L_I is driving
this may cause problems with current flowing in body protection diodes
in connected ICs. As D4 is (almost) obviously attempting to protect a
circuit from voltages above 5V then odds are L_I is driving an IC with
VDD or Vcc = 5V.

Better solutions, given the limited information here are:

1.    Connect the anode of D4 to the other side of R46 which will
protect it against higher energy inputs and limit the amount by which
Vcc can be pumped up. This protects D4 and Vcc but still exposes L_I
to excessive overvoltage.

2. As per 1. but make it a Schottky diode.  This will work well enough
in almost every case where L_I drives a 5V IC.

Here's the Yahoo Groups Electronic Lead Screw page showing what this
is part of

       http://tech.groups.yahoo.com/group/E-LeadScrew/

Notably

       Member John Dammeyer has led the way in these discussions. He
has designed a system, which is described in a comprehensive article
"Electronics Gear Control" in the magazine "Circuit Celler" -
Nov/2006, Issue 196, pp 36-43.




       Russell McMahon


_______________


     "ELS" - Electronic Lead Screw - is an alternative to full CNC
for simple bench lathes - especially those lathes which do not have a
"Quick Change Gear Box". For such lathes, it would be very useful to
have a cheap method of sychronizing spindle speed to lead screw speed.
If this can be realized electronically, then all threading can be done
without the necessity of changing manual gears. Also, all saddle
traverse speed ratios become possible.

     The aim of this group is to develop a simple, cost-effective
electronic and mechanical system for implementing ELS - which in
theory would be cheaper than CNC, and which can be ported to
hobby-class bench lathes.

     Member John Dammeyer has led the way in these discussions. He
has designed a system, which is described in a comprehensive article
"Electronics Gear Control" in the magazine "Circuit Celler" -
Nov/2006, Issue 196, pp 36-43.

     Suggestions and fresh perspectives are welcomed. Please follow
posting guidelines to maximize readability and archiveability of your
ideas.

     The photo at right is of a Taiwanese lathe with Electronic Lead
Screw.

2007\03\22@101919 by Matt Pobursky

flavicon
face
On Wed, 21 Mar 2007 20:57:20 -0700, John Dammeyer wrote:
> Hi all,
>
> Quick question here.
>
> http://www.pacificsun.ca/~john/ELS/photos/IO_Circuit.jpg
>
> The link to the above circuit shows how I plan on changing the Electronic
> Lead Screw circuit to protect the processor inputs from transients.  I
> can see someone accidentally putting 12V onto an input pin with switch
> that should close to ground instead closing to 12V.
>
> The circuit using R45 and R43 limit the current through the diode but a
> spike might still trash the processor.
>
> The circuit using R44 and R46 forces the power supply to absorb the input
> and perhaps can trash the diode with excess current but R46 limits the
> current into the processor.
>
> Suggestions or alternatives?

I always hate *any* circuit that possibly exposes a PIC pin to the outside
world or has any chance of causing current flow through the pin protection
diodes.

By adding a transistor buffer to your circuit and reworking it a bit you
can make a nearly bulletproof input circuit to the outside world. You also
will never see a voltage higher than VCC at the PIC input.

The following circuit is a suggestion. CR2 is optional and it protects
against inputs below ground.

http://www.mps-design.com/misc-images/buffer1.gif

The following circuit is a possible improvement on the first, I think, as it
uses one less component (which may or may not be a concern). The positive
input voltage limit will be about 60V (limited by the reverse breakdown of
the diode - 75V). Input voltages below ground are OK, provided R1 is sized
so you don't exceed the maximum base current of Q1.

http://www.mps-design.com/misc-images/buffer2.gif

I've used both these circuits (or variations of them) many many times in
industrial and automative products that operated in some pretty nasty
environments with totally reliable operation and nary a blown PIC input.

Matt Pobursky
Maximum Performance Systems


2007\03\22@125802 by John Dammeyer

flavicon
face
Hi Russell,

Seems the consensus is that the circuit on the E_x path but with a
Schottkey diode is the best way to go other than perhaps also adding a
second Schottkey for negative polarity signals.

The L_x path will quite rightly toast the diode if the power supply is
low impedance.

I've gone to a 74LS245 type driver simply because the pins allow the
signals to go straight through the package as compared to the 74LS240
driver at the extra cost of only a few pennies.

The circuit is from the ELS schematic block called Filters.sch and the
two lines of interest are the ESTOP input and LIMIT switch Input.  Full
schematics, layout, BOMs and Gerbers will be published on the
E-Leadscrew group in the near future.  Processor is a PIC18F4680.
Software, also to be published under GNU license is compiled with MCC18.

John Dammeyer


{Quote hidden}

2007\03\22@131741 by Orin Eman

picon face
On 3/21/07, Vasile Surducan <piclist9spamspam_OUTgmail.com> wrote:
> Based on drawing  ES-I is input and E_O is output and here the
> protection could be OK.
> Orin, a stabilizer circuit (even the three terminal one) has a
> negative feedback, so the voltage can't grow to 11.4V even in bad
> dreams. If the supply is based on a three terminal stabilizer the
> reverse diode between Vin and Vout will become on and the spike will
> be absorbed in the filtering cell.

Well, that all depends on Vin to the regulator which is undefined...
as you note, the supply schematics aren't given.

Then the problem being protected against was a short to 12V, not just
a spike.  What if Vin to the regulator is the same 12V?

Orin.

2007\03\22@132910 by John Dammeyer

flavicon
face
Hi Orin,

>
> On 3/21/07, Vasile Surducan <@spam@piclist9KILLspamspamgmail.com> wrote:
> > Based on drawing  ES-I is input and E_O is output and here the
> > protection could be OK.
> > Orin, a stabilizer circuit (even the three terminal one) has a
> > negative feedback, so the voltage can't grow to 11.4V even in bad
> > dreams. If the supply is based on a three terminal stabilizer the
> > reverse diode between Vin and Vout will become on and the spike will
> > be absorbed in the filtering cell.
>
> Well, that all depends on Vin to the regulator which is undefined...
> as you note, the supply schematics aren't given.
>
> Then the problem being protected against was a short to 12V, not just
> a spike.  What if Vin to the regulator is the same 12V?
>
> Orin.

It's currently a 7805 regulator.

If I had designed the board with through hole parts I'd just suggest
that the processor be in a socket.  But it's SMT and so a little more
effort is needed to prevent that accidental zap when someone is first
wiring up their lathe.

John Dammeyer

> --

2007\03\22@143919 by Orin Eman

picon face
On 3/22/07, John Dammeyer <KILLspamjohndKILLspamspamautoartisans.com> wrote:
{Quote hidden}

I just replaced a L4940V85 regulator that had literally split in two
due to an indirect short on its output and those things are supposed
to be protected against shorts and overheating!  Still wondering how
that happened, but it probably was a short on the output to greater
than its Vin, but it also took out a circuit trace and a TCA2465 power
op-amp (also supposedly protected against shorts and overheating).

BTW, that's rather a long time constant with the 100k pullup and 0.1
uF cap.  Since you don't seem to be low power, I'd go for a lower
pullup.  Careful where you put it or it ends up as a voltage divider
with the series resistance.

Orin.

2007\03\22@150844 by David VanHorn

picon face
>
> I just replaced a L4940V85 regulator that had literally split in two
> due to an indirect short on its output and those things are supposed
> to be protected against shorts and overheating!


Output short to ground, yes.  Output short to >Vin.. No.

2007\03\23@010601 by Roy

flavicon
face
Matt I Like your transistor buffer's.

Do you have one for bidirectional signals?

_______________________________________

Roy Hopkins             ZL2RJH
Tauranga
New Zealand
_______________________________________

http://www.mps-design.com/misc-images/buffer1.gif

http://www.mps-design.com/misc-images/buffer2.gif

>
> Matt Pobursky
> Maximum Performance Systems
>

2007\03\23@015900 by Vasile Surducan

face picon face
On 3/22/07, John Dammeyer <spamBeGonejohndspamBeGonespamautoartisans.com> wrote:
{Quote hidden}

We are splitting here the wire in four for a simple power supply problem.
Unfortunately I've falled in your game...

If the current is limited on the PIC IO through a simple serial
resistor (and nothing else) would be just fine. Because the output of
the 7805 will never be 12V.
If do you want we coud write this with equations but I let dr. Skip to do it
using hamiltonians ?
:) (no offense please, just an inocent joke)
For those who don't know how we can use superposition theorem or
Millman's theorem, or even ohm's theorem written right.

Vasile



>
> If I had designed the board with through hole parts I'd just suggest
> that the processor be in a socket.  But it's SMT and so a little more
> effort is needed to prevent that accidental zap when someone is first
> wiring up their lathe.
>
> John Dammeyer
>
> > --

2007\03\23@024658 by Orin Eman

picon face
On 3/22/07, Vasile Surducan <RemoveMEpiclist9spamTakeThisOuTgmail.com> wrote:
{Quote hidden}

With enough series resistance, the PIC will survive - but may not work
while the short is present.  Which in this case is fine.  No quibbling
there.  The problem case was the diode to VCC with no series
resistance, which even the original author said might trash the diode.

We did just have another thread that concluded that using the series
diodes put you outside the spec for input pins and was right on the
absolute max ratings.

Orin.

2007\03\23@030126 by Jinx

face picon face

> If the current is limited on the PIC IO through a simple serial
> resistor (and nothing else) would be just fine. Because the output
> of the 7805 will never be 12V

Hi Vasile, I have had a couple of 7805 that failed shorted and
killed PICs and other innocent bystanders. Nearly always they
fail open though

2007\03\23@031300 by John Dammeyer

flavicon
face
Hi Vasile,

See below....

{Quote hidden}

I originally had the circuit designed as shown in the L_I (input) and
then started second guessing my self.  So I changed the E_I (input)
circuit to be different just to demonstrate two possible options.

The criteria for the project (Electronic Lead Screw) is low cost above
all else other than functionality.  So ideally, I should have no input
protection which is the way it is with my first prototypes.

But, now I'm almost ready to release the schematics, layout and a set of
Gerbers to the members of the E-Leadscrew group.  Hence, I've added an
output buffer for various signals used for controlling high voltage
stepper motor drivers and some input buffering for limit and ESTOP
switches.  

One extra diode or resistor doesn't sound like much but if the cost is
0.10 for the diode and 0.15 for pick and placing it then it doesn't take
long before a few more dollars are added to the project.

The buffer to give me both isolation and a through hole device on an SMT
board allows fried devices to be replaced by the end users who are
primarily hobbiests.  Matt's circuit with the PNP is interesting.
That's the sort of help I was initially asking for.  

Thanks for your comments.

John Dammeyer





2007\03\23@051858 by Vasile Surducan

face picon face
part 1 1062 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)

On 3/23/07, Jinx <RemoveMEjoecolquittEraseMEspamEraseMEclear.net.nz> wrote:
>
> > If the current is limited on the PIC IO through a simple serial
> > resistor (and nothing else) would be just fine. Because the output
> > of the 7805 will never be 12V
>
> Hi Vasile, I have had a couple of 7805 that failed shorted and
> killed PICs and other innocent bystanders. Nearly always they
> fail open though

I haven't such problems. And you should not have too if:
- assure the lowest drop voltage across the stabiliser to minimise
dissipated power
- mount the antioscillating capacitor at the 7805 output

This subject annoyed me. So here is self explanatory schematic.
A resistor is enough to protect any IO input even if Vcontrol is 1KV DC
(with the remark that resistor shoud be HVR or a group of series
resistors. However using divider is safely than series resistors for
high voltage sensing)
The output impedance of the 7805 has a  miliohm magnitude order on KHz
range and a few ohms near DC. No more comments.


part 2 6810 bytes content-type:image/png; name=IO.png (decode)


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2007\03\23@062211 by Jinx

face picon face
> > Hi Vasile, I have had a couple of 7805 that failed shorted and
> > killed PICs and other innocent bystanders. Nearly always they
> > fail open though
>
> I haven't such problems

I can't say what caused them to fail short. It happens rarely though.
And at least one I can remember wasn't my circuit, I got it after it
failed. I do use caps and a reverse diode routinely now, plus a
dropping resistor if Vdiff wattage is too high

> A resistor is enough to protect any IO input even if Vcontrol is
> 1KV DC

Well, you do see such current-limiting in connections of PIC pins
to 110 and 230 mains (dimmers, cycle counting etc). I generally
use - 1k resistor, 5V1 zener, Schottky diodes, electro / ceramic
caps in various combinations, depending on what sort of voltage
or rubbish I might expect on that pin. In general usage that is. If
you've got relays or solenoids or something similar right near the
PIC I/O wires you might need a little extra

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...