Searching \ for '[PIC]: Input clamp current (was Schmitt Trigger (R' 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: 'Input clamp current (was Schmitt Trigger (R'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Input clamp current (was Schmitt Trigger (R'
2001\02\10@085431 by Bob Ammerman

picon face
> There is a SPEC for the absolute max voltage allowable to
> connect to a PIC pin and your 170 vdc peaks (not to mention
> spikes) are way out of spec. All you need is a 5.1v 1w Zener
> from the pin to gnd. This will give reverse voltage protection
> (zener forward conduct) and will limit the max voltage that
> can ever appear at the PIC pin to about 5v. Always use a
> zener when there is a possibility that the volts could exceed
> spec. I don't want to hear about internal clamp diodes, I
> feel strongly about this like Bob does about overclocking
> and Olin does about comments.
>
> -Roman


Roman,

As you note re: overclocking, I am a stickler for sticking to the specs.
Just out of curiosity I scanned the datasheet for a couple popular PICs: the
16F87x and 16F84A. In both of them, I found the following in the 'absolute
maximum ratings' section:

Voltage on any pin with respect to VSS
(except VDD, MCLR. and RA4)
-0.3V to (VDD + 0.3V)

Input clamp current,
IIK (VI < 0 or VI >VDD)
+/- 20mA

Now to me, these two specs seem to contradict each other.

From the latter, for example I would think that a 15V signal thru a 100K
resistor could safely be connected to the PIC, since the clamp current of
the protection diode would only be (15V-5V)/10K = 0.01ma, which is orders of
magnitude below the 20mA specified.

But of course, this connection would then drive the pin to one diode drop
above Vdd, which exceeds the voltage spec.

What gives? Why specify a nonzero maximum clamp current when the voltage
spec implies that you can never apply  an input that forward biases the
clamp (ie protection) diode?

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\02\10@101950 by Olin Lathrop

face picon face
> Voltage on any pin with respect to VSS
> (except VDD, MCLR. and RA4)
>  -0.3V to (VDD + 0.3V)
>
> Input clamp current,
> IIK (VI < 0 or VI >VDD)
> +/- 20mA
>
> Now to me, these two specs seem to contradict each other.
>
> From the latter, for example I would think that a 15V signal thru a 100K
> resistor could safely be connected to the PIC, since the clamp current of
> the protection diode would only be (15V-5V)/10K = 0.01ma, which is orders
of
> magnitude below the 20mA specified.
>
> But of course, this connection would then drive the pin to one diode drop
> above Vdd, which exceeds the voltage spec.
>
> What gives? Why specify a nonzero maximum clamp current when the voltage
> spec implies that you can never apply  an input that forward biases the
> clamp (ie protection) diode?

Hmm.  Good point.  I think maybe they are trying to say that if you connect
a PIC pin to a voltage source with 0 impedence, don't go more than 300mV
outside the supply range (probably because the can be SURE that the diodes
won't conduct and therefore exceed current).  However, if you are going to
connect a current source, all is well as long as it is limited to +-20mA.

In other words, it is really a current spec, and the voltage spec is a
guaranteed limit within which the current won't be exceeded.

If this is indeed true (maybe it isn't), then I don't see the problem with
connecting a PIC pin to 170V via 5Mohm.  That's only 34uA.  The voltage at
the other end of the resistor is irrelevant (as long as the resistor can
handle it) because that voltage never shows up at the PIC.

I don't see Roman's point about not wanting to rely on the protection
diodes, as long as the relevant parameters are specified and guaranteed by
Microchip.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\02\10@144159 by Bob

flavicon
face
From what I've read of MicroChip's data sheets, I'd have to agree with Olin
about using a 5Mohm resistor to a digital PIC input.

Take a look at AN521, where MicroChip explains why a high ohm resistor is not
only economical, but also that its most likely failure mode (blown open) is
actually better than using an in series cap or even a transformer.  A failure
can also easily be compensated for by using two or more resistors in series (one
dead shorts, the other is still there).  For example, if you use two 2.5Mohm
resistors in series, and one were to fail by dead shorting for some reason
(unlikely according to MC), the other 2.5Mohm resistor would still keep the
injected current going into the port to only 0.000082 amps (or 82uA) at "205"
volt peaks, which is still well within the 500uA specs of the internal clamping
diodes of the PIC.  Even with a 1000 volt spike, at 2.5Mohms, there would only
be a 400uA current surge at the port, which is still within spec's.  And MC
tends to understate there maximum "guaranteed" specs (i.e.: their on chip EEPROM
is "guaranteed" at 1,000,000 writes, but they've been tested to last upwards of
10,000,000+ write cycles).

Actually, I'm currently having to use another resistor from B0 to ground any
ways (another 5Mohm), so I'm cutting that voltage in half, to 85 to 100 volt
peaks.

Good point though about most resistors only being rated at 100 volts, although
I've been using 1/2 & 1/4 watt carbon film resistors in high voltage (120VAC)
analog triac circuits for some time now, and have never seen one fail (unless
the circuit wasn't designed right to begin with).

Sorry Roman, I checked with the tech guys at ST, and there absolutely can NOT be
any caps between the bridge and the VB409 (PLEASE, NO MORE STUFF ABOUT PUTTING A
CAP IN BETWEEN THERE GUYS ;-).  That device is pretty safe any ways, as it has
several failsafe modes inherently built into its design (thermal, current, and
voltage shut down modes, to name a few).  It can be enhanced a bit more than the
way I have it setup currently, by using a small inductor in the circuit, but I
haven't looked into that as of yet.  Remember, I'm still in the prototype phase,
and the end circuit will probably be much safer than what I'm currently doing.
Besides that, the only "direct" physical contact a user would have with the
unit, will be through plastic capped tactile buttons housed in a plastic case (I
suspect that they'd have a fairly high impedance).

However, instead of futzing around with resistors, or a zener setup like Roman
mentioned, I was thinking that I could use some sort of Opto circuit/chip to
relay the zero crossing event to B0 instead.  This would probably give me a
better chance of getting it UL/CSA approved if/when I decide to do that (5000V+
isolation trumps most anything).  I'm sure that any type of direct connection
setup would probably scare the PooPoo out of UL & CSA too ;-).  Any ideas on how
to do it that way?  What part(s) to use?  Anyone?

Thanks again for everyone's input on this.


{Original Message removed}

2001\02\10@172357 by Harold M Hallikainen

picon face
On Sat, 10 Feb 2001 13:52:39 -0600 Bob <.....op1cwkKILLspamspam.....FLASHMAIL.COM> writes:
> However, instead of futzing around with resistors, or a zener setup
> like Roman
> mentioned, I was thinking that I could use some sort of Opto
> circuit/chip to
> relay the zero crossing event to B0 instead.  This would probably
> give me a
> better chance of getting it UL/CSA approved if/when I decide to do
> that (5000V+
> isolation trumps most anything).  I'm sure that any type of direct
> connection
> setup would probably scare the PooPoo out of UL & CSA too ;-).  Any
> ideas on how
> to do it that way?  What part(s) to use?  Anyone?
>
> Thanks again for everyone's input on this.
>

       Since the power supply is non-isolated, it doesn't seem that an opto
gains you anything. The whole PIC circuit is going to be at line
potential. There is nothing wrong with this as long as you meet clearance
and creepage distances. So, I don't think UL or CSA would have a problem
with it, but I think it's a lot easier with a transformer (then you'd
need the opto, such as an MOC3023 to get back up to the triac).

Harold

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2001\02\10@215845 by Roman Black

flavicon
face
Bob Ammerman wrote:
{Quote hidden}

I have no idea what gives, but I still would not
exceed the first spec. For the cost of a 5.1v zener,
either 1w or 400mW types only cost a few cents.
They are A LOT more rugged than the 20mA spec
internal diodes, and can be tested separately.
Even the tiny 1N4148 glass diodes are 100mA and
these are too weak and unreliable to be a good
choice as input circuit protectors (for a size
example). All things weighed up, I can't see why
someone would not use external zener. It is the
only way to stay within all specs.

My opinion is that the internal clamp diodes are
a nice quality feature that Microchip added to
help protect the PIC from BADLY DESIGNED CIRCUITS...
:o)
-Roman

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\02\10@224404 by Roman Black

flavicon
face
Olin Lathrop wrote:

> guaranteed limit within which the current won't be exceeded.
>
> If this is indeed true (maybe it isn't), then I don't see the problem with
> connecting a PIC pin to 170V via 5Mohm.  That's only 34uA.  The voltage at
> the other end of the resistor is irrelevant (as long as the resistor can
> handle it) because that voltage never shows up at the PIC.
>
> I don't see Roman's point about not wanting to rely on the protection
> diodes, as long as the relevant parameters are specified and guaranteed by
> Microchip.


The problem is more real-world oriented than theory oriented,
like diodes and resistors have max voltage specs. Exposing a
small physical size resistor to a large voltage does cause
failures, there is significant current leakage, (can be well
over the current expected from it's value) there is
breakdown of the resistive material (especially carbon) and
even the paint breaks down. I replace these every day in
TVs and Monitors that use resistors exposed to more than
100v. Small resistors have a significant capacitive
reactance, you may be able to ignore this at 20v but not
on fast slewing spikes above 100v.

Theoretically the clamp diode is forward biased, so the
voltage on its anode won't get more than 0.7v over the
PIC 5v rail. But I cannot believe this part is a diode
rated for 170v, and as a designer I don't use a low
voltage diode for 170v, forward biased or not. Think
of where these diodes are and what they are attached to.
You would be connecting 170v (+ spikes) directly to
the silicon chip inside the PIC. What voltage isolation
is that silicon chip rated for?? I'll tell you, 5v.

The worst thing is that the 170v is not smoothed in any
way, mains spikes (which are often in the kV range) will
go straight through the bridge and the PIC will be
exposed to these scary peaks with only a leaky overspecced
5mohm resistor to protect it? Anyone think this is
smart design? :o)

A zener at this point will give absolute clamp especially
with a capacitor across it to help decouple the spike
energy. That system will take that punishment forever
assuming the zener is run at low average disspation.
If the zener fails they always go short, giving good
protection to the PIC. In TV's there are many sections
where a higher voltage needs to be sensed by a chip,
this solution is reliable and cheap.

The 20mA absolute max spec for clamp diodes is typical
of modern logic chips. These are safety devices to
protect the input logic from infrequent FAULTS. They
are not a design spec to be run at 10mA continuous.
Or any other continuous "fault" current. Would you
connect the input of a 74xx series gate to 170v via
a resistor??

The spec is a 5v device, DON'T exceed 5v on any pin.
Using a last resort safety component for continuous
out of spec operation gets my goat.
-Roman

PS. Olin, do Microchip provide a continuous rating
for the clamp diodes?? Or just an absolute "this is
the worst abuse before it blows" current figure?? ;o)

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\02\10@225646 by Spehro Pefhany

picon face
At 08:28 AM 2/10/01 -0500, you wrote:
>
>Voltage on any pin with respect to VSS
>(except VDD, MCLR. and RA4)
> -0.3V to (VDD + 0.3V)
>
>Input clamp current,
>IIK (VI < 0 or VI >VDD)
>+/- 20mA
>
>Now to me, these two specs seem to contradict each other.

If the voltage source is zero source impedance, do not go more than 300mV
outside the rails (which are also assumed to have zero source impedance).
At any temperature within the range, the resulting current will not be
harmful, on an absolute maximum basis.

Otherwise, it's ok, but don't come anywhere near the 20mA abs. max,
and be prepared for possible other side effects as a result (increased
Vdd due to current flowing through pins, possible leakage out of
adjacent port pins, that sort of stuff).

Best regards,


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffKILLspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\02\10@231348 by Bob Ammerman

picon face
Roman,

Microchip have an application note (AN251? or AN521?) that talks about using
just an R to high-voltage. In that note that state the diodes have a 500uA
rating, which is presumably a continuous rating.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\02\11@082513 by Roman Black

flavicon
face
Bob Ammerman wrote:
>
> Roman,
>
> Microchip have an application note (AN251? or AN521?) that talks about using
> just an R to high-voltage. In that note that state the diodes have a 500uA
> rating, which is presumably a continuous rating.
>


I'm familiar with the appnote and it makes me
shudder. Their attempt to prove that you only need
one PIC and very few extra parts to build the
circuit doesn't make it a good design. No
commercial products that I have repaired use
that system. Even the cheapest TVs use two
resistors AND a lower resistor (voltage
divider), so there is a finite max voltage
expected at the semi.

It's very common for one of the two pass resistors
to fail, generally arcing and taking the semi
with it. And the TV semi is usually a transistor
which is substantially more rugged than the
silicon inside a PIC. The better TVs use three
or four pass resistors, a zener and cap and sometimes
a lower resistor too. These pass resistors also
fail, but with less catastrophic effects on the
rest of the set.

We can all argue clamp diodes the same way we
argue commenting code, yes it probably will
work but is not the way a professional does
things. I won't expose my PIC pins or logic
chip gates to more than 5v. :o)
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@083341 by Bob Ammerman

picon face
Roman,

Would you find a schottky diode wired with its anode to the I/O pin and its
cathode to the Vdd rail an acceptable alternative to a 5.1V Zener?

If not, why not?

If so, what's wrong with putting that diode inside the chip.

That is, of course, what mChip has done.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\02\11@095211 by Roman Black

flavicon
face
Bob Ammerman wrote:

> Roman,
> Would you find a schottky diode wired with its anode to the I/O pin and its
> cathode to the Vdd rail an acceptable alternative to a 5.1V Zener?

No.:o)

> If not, why not?

I knew you'd ask. Schottky diodes are generally a low
voltage part. I do not rely on them in spike circumstances.
They are useful in switching and for some high A low V rect
apps. I also prefer to reference all voltages to gnd and
pass spike energy to gnd, pref keeping it as far from
the semi's Vdd as possible. It wasn't just a clamp diode
argument to start with, more like connecting 170vdc
and mains spikes to the clamp diode.


> If so, what's wrong with putting that diode inside the chip.
> That is, of course, what mChip has done.

Of course. The important difference is the feeding
of high voltages directly to the little silicon
chip. I understand the clamp diode mechanism but
unlike an external clamp diode that may feed it to
the filter cap (for example), you are actually
connecting a high voltage potential to the chip
itself. Then relying on microscopic etchings in
that PIC wafer (the diodes) to save the chip from
the excessive volts. I don't like it!


> Re: this input protection thread, I want you to know that what I really
> looking for is the underlying 'why' and 'how', rather than just a 'never'.

That's the problem with practical experience, you
always see the WHAT happened but usually left
guessing the WHY. :o)


> Many designs are highly cost-limited, and adding a zener could make a big
> difference. As I am sure you know, any sort of life-cycle cost analysis
> requires understanding the relative costs of prevention and cure, and the
> latter depends on failure rate. With a low-enough failure rate almost any
> prevention expenditure is a waste of money.

Fair enough I am in a different boat to most
designers. I get paid to build things that last.
Just means I have a different focus, not
that my way is better.

The thing that gets me is the ISOLATION
issue. In TV's I get to work with 240vac, 5v, 12v,
26v, 120v, 180v, 320v, 550v, 4.5kv, 24kv in every
TV set. Most TV's have ALL those voltages in
them somewhere, and connected in many ways.
I see the things that fail, and the ways the
clever designers try to protect from these
failures with their very tight budgets.

Maybe voltage specs mean more to me than many
people who usually work on battery/low powered
equipment??:o)

A simple voltage divider to the PIC pin goes
a long way towards keeping the potential pin
voltage within the 5v spec. You only need
>2.0v to guarantee high threshold so bias it
about 3.0v with a two resistor divider.
I would also stick a small (ceramic?) cap
across the bottom resistor, cheap and reasonably
small. Doesn't offer the level of protection a
zener does but is better than nothing.
Save the clamp diodes for ESD protection and
infrequent fault currents they were meant for.

A series resistor itself doesn't offer protection
from voltage. Especially high voltage spikes
which are VERY ac in terms of performance.
Connecting a high voltage through a resistor
into a chip is still exceeding it's max voltage
spec. 0v-5v. That's what my PICs get.

Sorry for the ranting! Here's my soapbox:
<soapbox> </soapbox>
;o)
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@111641 by 772-3129

face picon face
> Theoretically the clamp diode is forward biased, so the
> voltage on its anode won't get more than 0.7v over the
> PIC 5v rail. But I cannot believe this part is a diode
> rated for 170v, and as a designer I don't use a low
> voltage diode for 170v, forward biased or not.

You keep talking about the 170V as being at the PIC.  It's at the other end
of a resistor whos job is to handle the high voltage.  What the PIC sees is
essentially a current source at a few tens of microamps.

> Think
> of where these diodes are and what they are attached to.
> You would be connecting 170v (+ spikes) directly to
> the silicon chip inside the PIC.

No, not unless something physically failed.

> A zener at this point will give absolute clamp especially
> with a capacitor across it to help decouple the spike
> energy. That system will take that punishment forever
> assuming the zener is run at low average disspation.
> If the zener fails they always go short, giving good
> protection to the PIC.

I guess what you are trying to say is that if something fails and you end up
with excessive current thru the 5Mohm resistor, the zener will protect other
parts from also failing.  This may be true, but not terribly important in
most applications.  If something fails, the unit will cease to operate as
expected.  Most likely the whole board will be replaced because it's a lot
cheaper than paying someone to chase down the problem and fix it.  I other
words, if anything fails the whole unit is probably headed for the trash
heap.  In that case, it makes no difference whether just the resistor
failed, or whether the PIC failed too.  In this scenario, getting the right
resistor that is less likely to fail is worth it, but the zener is just a
waste of money and board space.

> The spec is a 5v device, DON'T exceed 5v on any pin.
> Using a last resort safety component for continuous
> out of spec operation gets my goat.

As Bob pointed out, the specs are a bit contradictory.  As I said in my post
that you are replying to, this is what I would do *IF* the max current spec
interpretation is valid.  However, I believe it is for two reasons.  First,
it makes sense based on reasonable assumptions about the electronics.
Second, Microchip has apparently shown an example of this use in one of
their app notes.  (I haven't personally seen it, nor have I looked.  I am
basing this on what others have reported here.  I would certainly check it
out first hand before I did a design like that.)


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, spamBeGoneolinspamBeGonespamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@212719 by Bill Westfield

face picon face
   You keep talking about the 170V as being at the PIC.  It's at the
   other end of a resistor whos job is to handle the high voltage.  What
   the PIC sees is essentially a current source at a few tens of microamps.

What bothers me about using the internal clamping diodes to limit the
voltage at a pin is that the energy you pump through them has to get
dissipated SOMEWHERE.  There seems to be a built-in assumption that the
overall circuit will have a high enough current consumption that it will be
dissapated throughout, and the voltage on the V+ rail will NOT creep up on
you into a range where it's out of spec for the whole circuit and
everything in it.  This is worrisome because the allowable current through
the clamping diodes is not that much smaller than what a "typical" PIC
circuit might draw.  I guess the idea is to keep the ACTUAL current through
the clamp diodes much smaller than that (I wonder if that means you need to
avoid the assorted power-saving modes?  Probably.)

You essentially wind up with a voltage divider, right?

Vline---RRR--->|-----V+-----RRR-----GND
+170V   big  clamp  "5V"    equv
            diode  rail    load

The ratio of Rbig to Rload needs to be very high, and/or the V+ regulator
has to handle "reverse" potentials...

BillW

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@215210 by Roman Black

flavicon
face
Olin Lathrop, Embed Inc, 978-772-3129 wrote:
>
> > Theoretically the clamp diode is forward biased, so the
> > voltage on its anode won't get more than 0.7v over the
> > PIC 5v rail. But I cannot believe this part is a diode
> > rated for 170v, and as a designer I don't use a low
> > voltage diode for 170v, forward biased or not.
>
> You keep talking about the 170V as being at the PIC.  It's at the other end
> of a resistor whos job is to handle the high voltage.  What the PIC sees is
> essentially a current source at a few tens of microamps.


It is at the PIC. One resistor does not provide voltage
isolation. By the letter of the SPEC you are attaching
170vdc to the PIC pin. (Two resistors in a voltage divider
is a different matter) Let me explain..

You keep talking like this is a steady state 170vdc
with the clamp diode nicely biased on. The real world
doesn't work like that. What if the 170v comes from
a mechanical switch (very fast turn on times)??
Are you saying the little clamp diode is infinitely fast
turning on?? I work with TVs and i'm constantly ordering
special diodes, fast switching, higher voltages.
Getting a diode that is both fast AND suitable for
higher voltages means a specialty diode, usually expensive
and generally large physically. There is no way the
tiny ESD diodes etched onto the PIC wafer are suitable
for this.

If the voltage increases at a rate faster than the
turn-on time of the clamp diode, and it exceeds
the miserable 20v or whatever the diodes and wafer
start to break down at, you have failure of the PIC.
And mains AC has the worst spikes and transients
you could imagine, both negative and positive spikes
up to kv's with vertical slew rates, ringing and
the works.

So when you get high voltage transients the PIC
wafer and diodes are exposed to some real nasty stuff,
and that includes high voltages. If you had a decent
capacitor from the PIC input to gnd and one series
resistor this would be safer, but it is still a bad
design compared to R:RC or R:ZC.

Those little wires inside the PIC going to the wafer
and the wafer itself are rated for a set isolation
voltage. That voltage is 5v. Connecting a high voltage
directly to a PIC pin (series resistor or not) is
very out of spec. :o)
-Roman

PS. Even the very nastiest Asian switchmode suuplies
have inductive mains filter, a number of large filter
caps, and always a cap and resistive divider or zener
before the high voltage enters the first semi.
The product would not be reliable enough to sell
otherwise. I'm sure if Microchip had to manufacture
their circuit it would look VERY different.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\12@004037 by trm

flavicon
face
Roman, I really like your dose of reality to this discussion. I worked
on a project with a PIC16C71 a couple of years ago that we ran on a
transfoemerless power supply. I based the design on some old reference
books. Their "theory" didn't quite work. We used a cap & resistor  to
drop 120VAC into a brige & 78L05 for the 5V power for the PIC. You would
not believe how BRIGHT a PIC will shine throught that little quartz
window !! I blow 2 or 3 before we got the power supply working
correctly. We alao used Microchip's AN to detect zero crossing to phase
control a TRIAC that controled a small heater. We got the prototype
working, but it never went into production. Too expensive. But I never
felt right about putting the 120VAC into the PIC pin. we did use 2
resistors in series.

Ted

Roman Black wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@030505 by Vasile Surducan

flavicon
face
>
> As you note re: overclocking, I am a stickler for sticking to the specs.
> Just out of curiosity I scanned the datasheet for a couple popular PICs: the
> 16F87x and 16F84A. In both of them, I found the following in the 'absolute
> maximum ratings' section:
>
> Voltage on any pin with respect to VSS
> (except VDD, MCLR. and RA4)
>  -0.3V to (VDD + 0.3V)
>
> Input clamp current,
> IIK (VI < 0 or VI >VDD)
> +/- 20mA
>
> Now to me, these two specs seem to contradict each other.
>
 Personaly I have nothing against of "extra" data sheet
microcontroller parameters testing.
A good example is maximum voltage rating on any pin respect to VSS.
A clamp diode will have about 0.6 to 0.7 V, it must be a damn good one to
open at 0.3 V.
 I've test on 877 the negative input voltage on AD. Surprise ! It work's
with same linearity from -0.5V to 4.5V which is pretty good if someone is
interested in bipolar signal measurements near zero.
 I've also test overcloking ( Why ? because all silicon chips are the
same, just technological brakedown will make diferences between 04, 10 or
20 Mhz devices ) So why not ?
Vasile

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@090453 by Olin Lathrop

face picon face
> What bothers me about using the internal clamping diodes to limit the
> voltage at a pin is that the energy you pump through them has to get
> dissipated SOMEWHERE.

In the 5Mohm resistor.

> There seems to be a built-in assumption that the
> overall circuit will have a high enough current consumption that it will
be
> dissapated throughout, and the voltage on the V+ rail will NOT creep up on
> you into a range where it's out of spec for the whole circuit and
> everything in it.  This is worrisome because the allowable current through
> the clamping diodes is not that much smaller than what a "typical" PIC
> circuit might draw.

That's a good point.  You do have to make sure that the 5V rail is capable
of sinking (not dissipating) the extra current.  However, 170V / 5Mohm is
only 34uA, so this is only an issue if the PIC goes into sleep and
everything else is shut down also.  This is unlikely to be necessary for a
circuit powered by the AC line, but you're right, it is something you do
have to consider.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, TakeThisOuTolinEraseMEspamspam_OUTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@090500 by Olin Lathrop

face picon face
> You keep talking like this is a steady state 170vdc
> with the clamp diode nicely biased on. The real world
> doesn't work like that. What if the 170v comes from
> a mechanical switch (very fast turn on times)??

Diodes are usually very fast in turn on.  Turn off is usually the issue when
you need high speed diodes, like in switching power supplies.  I have a hard
time believing that a power line spike after going thru a 5Mohm resistor
into a PIC pin will be too fast for the built in clamping diode to turn on
in time.

> Are you saying the little clamp diode is infinitely fast
> turning on??

Not infinitely of course, but fast enough for this purpose.

> I work with TVs and i'm constantly ordering
> special diodes, fast switching, higher voltages.
> Getting a diode that is both fast AND suitable for
> higher voltages means a specialty diode,

Yes, but again, the high voltage is on the other end of a 5Mohm resistor
that has been selected for that task.  A high voltage diode is not required.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massac J Utts
(978) 772-3129, RemoveMEolinspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@184216 by Peter L. Peres

picon face
>shudder. Their attempt to prove that you only need
>one PIC and very few extra parts to build the
>circuit doesn't make it a good design. No
>commercial products that I have repaired use
>that system. Even the cheapest TVs use two
>resistors AND a lower resistor (voltage
>divider), so there is a finite max voltage
>expected at the semi.

The extra parts are there to comply with FCC and fire protection rules.
There are two resistors because of the maximum voltage rating on each is
not enough in 220V countries. You can over-engineer your design until it
will survive direct lightning strikes but somebody is guaranteed to do the
same cheaper and then you loose. Oh, and would you care if the dimmer
still works when you dig it out of the smoking ruins of your house ? In
general, who exactly decides when a design is 'good'. Your teacher ? He
won't pay your salary, *you* probably pay *him*. Aunt Martha who plugs the
110V device under warranty into the 220V socket for the fourth time, but
you don't want to upset her because she buys lots of equipment from you ?
Your manager ? If you use two resistors insted of one you will spend the
remaining half of your life explaining him that it had to be two. You ? Me
? Who am I to decide that.

A 'good' design is a design that is as simple as possible to do the job
(W. of Ockham), reasonably cheap, that sells for as much money as possible
and performs satisfactorily in the market, and has a return rate lower or
equal to what you have calculated when designing and budgeting it. Imho.
If at this point you will reply that a zero return rate can be achieved
then it is time to patent your perpetuum mobile plans imho ;-).

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@184231 by Peter L. Peres

picon face
Look, the issue with the resistor(s) connected to the high voltage is,
that that is not just a resistor, it is a RLC group. The L is negligible,
but the C is not. Now, the PIC input has ~10pF capacitance to GND
(actually two ~5pF capacitors one to Vdd and one to GND). The resistor
will also have 3 to 30 pF parasitic capacitance in parallel with it (each
of them). Now you have a capacitive divider that can override the
resistive divider in a spike situation (like, when turning on). Even at 50
Hz the laws of capacitive dividers still work, especially with 5Meg
resistors. You also get unwanted phase shift, which can upset dimmer
operation.

Now, at high (spike) frequency the resistor plays a smaller role than its
capacitance and you get a divider of only 1/10 from the (say) 600V spike
to the PIC input. A few of these and goodbye PIC. If you connect a
capacitor between the PIC pin and GND such that the undesirable divider
becomes more favorable to the PIC (like 1/100 to make 6V of a 600V spike
with a 3pF HV resistor C), then the capacitor to GND should be 300 pF. I
would probably choose 510pF @ 12V.

Also, the point that a return path to GND must be provided from the PIC
Vdd pin to drain current injected by the input protection diodes, is
always valid. A 5V1 or 5V6 zener between Vdd and Gnd almost always makes
its way into my smaller designs unless they use a {T|G}L431 regulator ;-)

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@204237 by trm

flavicon
face
I find it interesting that your example of  uses a 600V spike. When I
was working on a PIC based product design a few years ago, UL wanted it
to withstand a 600 V spike, but they couldn't really say why. That's
just the standard. That bugged me. So I did some research & finally
found out why in a Harris MOV manual. 600 V is the arc over voltage of
the standard wall outlet. If it's greater than 600 V, it doesn't get to
your power supply, it arc's over the screws of the oulet. That's
something I would not have thought of.

Ted

Peter L. Peres wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@210152 by Spehro Pefhany

picon face
At 08:41 PM 2/12/01 -0500, you wrote:
>I find it interesting that your example of  uses a 600V spike. When I
>was working on a PIC based product design a few years ago, UL wanted it
>to withstand a 600 V spike, but they couldn't really say why. That's
>just the standard. That bugged me. So I did some research & finally
>found out why in a Harris MOV manual. 600 V is the arc over voltage of
>the standard wall outlet. If it's greater than 600 V, it doesn't get to
>your power supply, it arc's over the screws of the oulet. That's
>something I would not have thought of.
>
>Ted

Hi, Ted:-
600V sounds ridiculously low for a standard 120V outlet. I'd imagine
more like 3-6kV (TYPICAL, dry, 25'C, sea level). For reference, the
breakdown voltage of air under those conditions is typically about
3kV/mm, so you are talking about 0.2mm of gap (about 0.008").
If it is across a moist surface, of course, it will be much less.

The concept is a good one though, if you can protect it against
multi-kV voltages, any more than that can't get in because it will
arc to ground or the other wire.

Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffEraseMEspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@224437 by Roman Black

flavicon
face
Peter L. Peres wrote:

> The extra parts are there to comply with FCC and fire protection rules.
> There are two resistors because of the maximum voltage rating on each is
> not enough in 220V countries. You can over-engineer your design until it
> will survive direct lightning strikes but somebody is guaranteed to do the
> same cheaper and then you loose. Oh, and would you care if the dimmer
> still works when you dig it out of the smoking ruins of your house ?

Important point re the two resistors, even the cheap
sets use a LOWER resistor, ie voltage divider.


>In
> general, who exactly decides when a design is 'good'. ???

The guy that's been fixing them for 20 years! ;o)


> A 'good' design is a design that is as simple as possible to do the job
> (W. of Ockham), reasonably cheap, that sells for as much money as possible
> and performs satisfactorily in the market, and has a return rate lower or
> equal to what you have calculated when designing and budgeting it. Imho.
> If at this point you will reply that a zero return rate can be achieved
> then it is time to patent your perpetuum mobile plans imho ;-).


That's a good point, and I must admit i'm out of
touch with large quantity electronics maufacturing.
I probably also spend 3 times as many hours repairing
other peoples products than the hours spent designing
our own products.

With smaller scale manufacturing I do know that
generally component costs are about 10% of the
product cost. The rest is all labour, assembly,
packaging, services, marketing, shipping etc etc.

I just feel it is good sense to spend 12% instead
of 10% and have a product that is 50 times more
reliable. This is a huge improvement in quality
and product image for negligable difference in
price and profit. You want Pavarotti for 12c,
or the guy that sings in the shower for 10c?? ;o)

The original argument was regarding using one
resistor only to couple non-filtered rectified
mains into a PIC pin. The circuit has a Triac,
opto, and PIC. Total of probably $5 in resonable
production quantities.
For the sub-1 cent cost of an extra resistor to
use as voltage divider, or even 4c for a small
ceramic cap and 10c for a zener, he would improve
reliability 100 times for 1c to 15c extra.
That would be only 0.2% to 3.0% higher parts
costs. I just can't believe that is false economy.
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@230539 by Roman Black

flavicon
face
Peter L. Peres wrote:
{Quote hidden}

Don't forget the DC leakage through the resistor
as it starts to break down over 100v. Especially
when hot.

And let's not forget the turn-on time of the
clamp diode. You would be relying on the clamp
diode to be fully ON to provide voltage safety.
Olin mentioned that turn-off time is normally
the slower period but turn-on times are a very
definite factor. If I had to rely upon a diode
turning on quick enough to save my PIC I would
want to see spec sheet for the diode and compare
its switching times with the expected rate of
change of the voltage.

It's bad engineering practice to connect a high
voltage to a low voltage insulated, low PIV diode,
forward biased or not. A low voltage rated part is
just that, useful for low voltages only. The real
world is rarely a smooth predictable DC environment.
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\12@232756 by trm

flavicon
face
Yeah, we need the engineer to make the decision, not the "bean counters".

Ted

Roman Black wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\13@004704 by Bob Blick

face
flavicon
face
At 11:25 PM 2/12/2001 -0500, you wrote:
>Yeah, we need the engineer to make the decision, not the "bean counters".

Anyone old enough to remember all those Zenith televisions that caught fire?

Or should I say "anyone ever survive to remember..."

-Bob

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@041419 by Alan B. Pearce

face picon face
>The guy that's been fixing them for 20 years! ;o)

I would have thought he was the guy that decides the design is bad :)
He decides the design is good when he does not need to fix them ;)

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@082813 by Roman Black

flavicon
face
Alan B. Pearce wrote:
>
> >The guy that's been fixing them for 20 years! ;o)
>
> I would have thought he was the guy that decides the design is bad :)
> He decides the design is good when he does not need to fix them ;)

Ha ha! Ok, he's the best judge of what NOT
to do! ;o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@092047 by steve

flavicon
face
> >The guy that's been fixing them for 20 years! ;o)
>
> I would have thought he was the guy that decides the design is bad :)
> He decides the design is good when he does not need to fix them ;)

So therefore, he has probably never seen a good one. :-)

Steve.

======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680, New Lynn      http://www.tla.co.nz
Auckland, New Zealand        ph  +64 9 820-2221
email: EraseMEstevebspamtla.co.nz      fax +64 9 820-1929
======================================================

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@093244 by Djula Djarmati

flavicon
face
   I have a related experience: a few years ago I designed a HV insulation
tester - gigaohm meter (hand cranked!). The positive probe had 5kV with
12Mohm HV resistor in series, the negative had 1N4148 protection diodes to
Vcc and GND, 680k in parallel with 1uF to the ground, then low-pass RC
(1Mohm and 10nF) than the CMOS input of the ICL7106. When I jerked the
probes together (nice little sparks) the ICL died in 2 seconds. When I
connected different resistors from 0 to 10GOhm without the arcing everything
worked just fine.
   I tried fast diodes, schottky diodes, MOVs, small caps, large caps,
zeners everything (I didn't have tranzorbs then), but no luck. The solution
was two 33k resistors at the probe entry point and a 4700pF styroflex cap
from negative probe input to ground. The interesting thing was that only
styroflex worked, the polypropylene, ceramic, etc. didn't. Another thing is
that when I moved the cap to a different place on the PCB, the IC still died
every now and then so I had to leave the cap close to the input pins, far
from the ICL. It went to production and I've never had a problem with the
ICL after that.
   The Microchip App. note design as it is, is just not suitable for
production IMO.


Regards,

Djula

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@171820 by Peter L. Peres

picon face
Ted, you are right about where I got my 600V info from but I think that
you should not rely on anything arcing over at 600V. I have seen 220V
power strips run at 1500V ac indefinitely in humid atmosphere for testing
purposes. They were the normal $10 kind you can buy anywhere. The
breakdown voltage of air is rumored to be about 1kV/mm but it depends on
too many things. Based on this, the mentioned powerstrip should withstand
20kV (but the cables won't and it won't either, spraying and ion
currents build discharge paths very quickly above about 5kV). I feel
that using 1.5kV rated parts in the input side of anything connected to
spiky mains is the way to go.

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@171823 by Peter L. Peres

picon face
>Important point re the two resistors, even the cheap
>sets use a LOWER resistor, ie voltage divider.

Which is utterly useless against spikes as its parallel capacitance is the
same as the upper resistor's and they form a 1:2 divider together at spike
frequencies.

I aggree that it is a good idea to over-engineer 'prestige' products where
the opinion of the buyer about you is more important than anything else.

Imho any pricing calculations are futile on the 'dry'. Your 2% part price
increase might cause problems due to tight budgeting if not known
beforehead. It would also mean a 2% decrease in production at the same
cost, which is an unreasonable amount since established products have a
(post-quality control) failure rate under 0.5% afaik.

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\13@193154 by trm

flavicon
face
Yes, I agree with you. I didn't put it to a test, I was just telling
where the idea came from. I think there was some other spec.'s about the
source of the 600V & current & risetime , etc. But it just didn't "feel"
right, but it met UL's standard at the time.

Ted

Peter L. Peres wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\02\15@132823 by Spehro Pefhany

picon face
At 08:41 PM 2/12/01 -0500, you wrote:
>I find it interesting that your example of  uses a 600V spike. When I
>was working on a PIC based product design a few years ago, UL wanted it
>to withstand a 600 V spike, but they couldn't really say why. That's
>just the standard. That bugged me. So I did some research & finally
>found out why in a Harris MOV manual. 600 V is the arc over voltage of
>the standard wall outlet. If it's greater than 600 V, it doesn't get to
>your power supply, it arc's over the screws of the oulet. That's
>something I would not have thought of.

Hi, you were probably thinking of 6,000V (peak), which would agree
with  IEEE Recommended Practice on Surge Voltages in Low-Voltage
AC Power Circuits  (IEEE C62.41-1991, formerly IEEE Standard 587).

[You should allow for up to 6,000V peak (open circuit) for both
Category A and B transient events; and short circuit currents
can exceed 500 and 3,000 amperes respectively. In a category B
event, the rise to 6kV can happen in 1.2 usec.]

If your resistor(s) and whatever else you use can survive that,
it should be pretty reliable in practice.

Best regards,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffEraseMEspamEraseMEinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


2001\02\16@155310 by Peter L. Peres

picon face
>[You should allow for up to 6,000V peak (open circuit) for both
>Category A and B transient events; and short circuit currents
>can exceed 500 and 3,000 amperes respectively. In a category B
>event, the rise to 6kV can happen in 1.2 usec.]
>
>If your resistor(s) and whatever else you use can survive that,
>it should be pretty reliable in practice.

Show me a off the shelf commercial use SMPSU or a dimmer that can
withstand that. Or a TV or VCR. 6000V and 500A is in the exploding wire
detonator category land. Rather far inside it afaik. The question is not
whether your parts will take it, the question is, whether you will be able
to identify their remains. Even if nothing bad will happen in the input
the EMP from 500A passing even through the ground lead of the enclosure
will kill many CMOS devices in the box. I think that I am speaking from
experience here.

If I'd have any hint of living in a place whose powergrid allows such
horrors I'd simply pack and move or become a herbalist or something
non-electronic. I remember quite distinctly TVs and VCRs stacked 4 high, 4
wide, and 3 deep in front of a TV repair shop (there was no room left
inside) after a small thunderstorm that hit a powerline. This was a few
years ago. There were no failed lightbulbs though. Not sure about
fluorescent ballasts.

Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\16@165336 by Eisermann, Phil [Ridg/CO]

flavicon
face
I think that standard is for surge surpressors. And the duration of the
surge is 1.2us, repeated 50 times. The 500A is for 8us, repeated 20 times.
It does not imply that these devices will continuously operate under these
conditions.

the ability to continuously withstand 6kV is for insulation resistance and
the like.

{Original Message removed}

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