Max. clamp current?

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am looking for the maximum allowed current value for clamp diodes in ATtiny. Either it's not stated explicitly in the datasheet or I'm not smart enough to find it. Some manufacturers state this value explicitly, some hide it under more cryptic "max in-rush current" or simply Iil max. Unfortunately this is not the case of Atmel. The only parameter resembling it is max. current through IO pin, specified at 40 mA. Not sure if this is the same as clamping diode max safe current.

BTW, it's 20 mA for Microchip PIC12 & PIC16 chips.

Any figure, definitive or experimental, will be appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know if this is useful but 220ohm to 12v resulted in CMOS lockup (smoke) and 470ohm did not. I fried about a dozen t11 finding this out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Was that with the chip powered from Vcc=5V?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

BTW, it's 20 mA for Microchip PIC12 & PIC16 chips.

Any figure, definitive or experimental, will be appreciated.


Better get over to the Leon camp, then (and where do they put all those mA??). AVR values are typically said to be 1mA or 2mA. At those levels, just re-word to be "don't overvoltage the pins continuously".

Often here they are called "protection diodes". Let's try a search on "diode protection current"...

A bit harder than I thought, but start with this one which gives references to prior.
https://www.avrfreaks.net/index.p...

also https://www.avrfreaks.net/index.p...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Once upon a time somebody on one of the Russian forums quoted the Atmel Support reply stating the maximum allowed AVR clamp diode current is just 1 mA.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Well, one of the issues is "SCR latchup".

The diodes simply make it more difficult to reach that threshold.

Thus, it may not just be an issue of "popping" the diode, but what happens to the IC as a whole.

Schottky diodes would do a better job, but CMOS processing does not lend itself to the creation of Schottky diodes.

End of story......

Jim

This is what I concluded too. Although I think they DO use schottky because the AVRs seem to clamp at .3v above and below, not .7v.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Was that with the chip powered from Vcc=5V?

Jim

Are you talkin' to ME? Are YOU talkin' to me? Are you TALKIN' to me?

If so then yes. And it had to be high current 5v or the lockup (latchup?) didn't happen. I.e. USB 5v no, PC drive connector yes.

And worth mentioning it was MUCH worse on the old 90s.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all the answers and links. I am impressed with discussions taking place here, and ashamed not to find these answers by myself.

Some time ago I promised to myself never to use any PIC or AVR chip. I had to break my first promise due to a request from a customer who happened to be a friend of mine, and the second because of low price of ATtiny13 and ATmega8 and good C programmability with WinAVR. I did several small projects around these and I plan to continue their use in various "blinkers", as the AVR chips have output drivers strong enough to drive LED matrices directly.
Looks like I will make another strange tiny device using PIC solely because of 20 mA clamp current. Actually that's the creaziest uC device idea I ever had and high current clamp circuit without any external components is essential to it.

Many thanks to all who responded.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That observation pretty much confirms the SCR latchup theory.

Latchup can only happen if the Vcc supply has enough current capability. My understanding (consistent with Lee, I think) is that latchup only happens if you get a logic input "high enough" (voltage-wise, other methods of "high" do not count) to start the SCR process. With a diode present, you need to supply enough current so that the I-V characteristic of the diode has enough forward drop to the SCR to start.

I have little doubt that a substantial current will be needed to do this. Since this is otherwise unspec'd behavior, if I were Atmel and someone were to ask, I would give a VERY conservative number. Sounds like 1ma might be a very conservative number!

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MBedder wrote:
Once upon a time somebody on one of the Russian forums quoted the Atmel Support reply stating the maximum allowed AVR clamp diode current is just 1 mA.
Actually, I believe it is stated in the Electrical Specifications on the datasheet.

To the OP's point--is there a reason why you couldn't use a discrete diode between the I/O pin and Vcc to supply the current without forcing it through the protection diode? Of course, that'd require getting a diode with a lower Vf than the protection diode...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi I know this thread is really old, but I wanted to provide an answer with an Atmel source, since one does not yet exist on this thread. Here it is:

 

The Atmel datasheets I have seen do not list the max internal protection diode current at all. However, Atmel Application Note "AVR182: Zero Cross Detector", states the following on the top of pg. 4: "It is not recommended that the clamping diodes are conducting more than maximum 1 mA..." Source: http://www.atmel.com/images/doc2...

 

This appears to be the universal answer for *all* of the Atmel AVR line of microcontrollers. 

 

For additional info on input pin protection feel free to read a brief article I wrote here: http://www.electricrcaircraftguy...

Last Edited: Tue. Jul 21, 2015 - 07:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I wanted to provide an answer with an Atmel source, since one does not yet exist on this thread.

Not in this thread, but earlier (as referred to above?)...

https://www.avrfreaks.net/comment...

which leads to https://www.avrfreaks.net/comment...

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I might have overlooked it, but after a quick skim, I still don't see any link to an Atmel document, datasheet, App Note, etc. For me, since it's not in any Atmel datasheet I've seen, it's just reassuring to see it explicitly written out in an App Note rather than just stated as 1mA.

Last Edited: Tue. Jul 21, 2015 - 07:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it's just reassuring to see it explicitly written out in an App Note rather than just stated as 1mA.

 Indeed, you refer to an Atmel document--which appears to merely parrot the "1mA" number.  (I'm sure it isn't exactly 1mA, just like the max speed of an AVR8 is >>exactly<< 20.000000MHz and would croak at 20.000001, and similar.)

 

I'd give as much weight to the quoted response from Atmel support, as can be found in the link I gave, and at least one other.

 

All old news anyway.  There have been several feature size reductions since that quote (and app note), and in addition the new foundry.  Who knows what the value is currently.

 

[BTW, your linked discussion shows 1Mohm dropping resistor from mains to AVR for zero-crossing.  Yes, you do give a warning about mains work.  But I didn't see anything about that design not being isolated at all.  Dangerous to equipment and people if not fully aware of an AVR app floating on the mains.]

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Who knows what the value is currently." 

 

So you're saying this 1mA value may not be correct anyway? --I mean, if it's 0.8mA or 1.2mA vs 1mA, who cares. That's what factor of safety is for. But if it's 5mA or 2mA or 0.5mA or 20mA, that's what I want to know. I wish they'd put this info in the datasheet. 

 

As for the mains thing, yeah, I should expound in my warning how dangerous this could be. I'm thinking this 1 resistor application is really more useful when reading in 25V from brushless motor pulses, or when communicating between a 3.3V and 5V mcu, etc.  I explained the mains thing because it was impressive and very interesting, not so much because I expect people to use it often.

Last Edited: Tue. Jul 21, 2015 - 09:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The clamp diodes are substrate diodes. Inject too much current and you get a phenomenon known as 'latchup'. This is the parasitic scr that gets activated and the chip goes into meltdown. Just about all cmos devices have these diodes and suffer from the problem. This is not Atmel specific. The performance of these diodes are probably not a critical process parameter, so they're not specced.
Another real world issue that is glossed over is transients. The mains is full of them. What happens if there is a transient large enough to put the AVR into latchup?
The resistor is a critical safety component in this circuit. You need a correctly rated part. Whilst the power dissipation is minimal, a 1/4W resistor has an inadequate voltage rating. What usually happens is electromigration causes the resistor to fail open. What's worse is the resistor can flash over, thus the current bypasses the resistor so there is effectively no resistor in the circuit. This is a highly dangerous condition.
Think fire and electrocution.
By the time you've added suitable protection, you might as well use an opto and get isolation.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But if it's 5mA or 2mA or 0.5mA or 20mA, that's what I want to know.

 The clamp diodes are substrate diodes.

I'm certainly not a sparky or a chip designer.  But given that the "1mA" was doled out about 10 years ago and chip geometries have shrunk several times since then, I'd think that the magic number could be different now.  How much different, I have no idea.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It may be best to add external diodes of known characteristics rather then depend on the internal port protection diodes. 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

It may be best to add external diodes of known characteristics rather then depend on the internal port protection diodes. 

 

Jim

 

 

Agreed. For quick prototyping though I'm glad I at least understand the internal protection diodes much better now.

Last Edited: Wed. Jul 22, 2015 - 10:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There IS a standard CMOS "input structure" that is widely used in the industry. This structure is applied where-ever the input is accessed from a pin to the outside world.

 

A big deal was made of this about the time that 74Cxxx logic came out because there were so many input failures. If you look at a generic 74C or 74HC spec sheet that shows the "family characteristics", you may or may not see explicit diodes in the equivalent circuit. You may or may not see current limits specified in the data sheet. Its sort of "we will sort of try to protect you, but that is the extent of our liability." 

 

In a very few cases, there are explicit transient protection diodes AND series current limiting resistors on each input. There, the resistor and TWO diodes (one to Vcc and one to Ground) ARE shown. The manufacturer usually makes a pretty big deal about it. 

 

In this area, you take what you get. If you do not like it, add diodes and a series resistor, yourself.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Thu. Jul 23, 2015 - 01:33 AM