ATmega reset pin protection diode

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

Some of the application notes (AVR40, AN2519) discuss the use of a diode for input protection of the reset pin.  Whether such a diode is necessary or not has been discussed extensively on this forum and elsewhere.  But what I've been unable to find is what kind of diode should be used.

 

I'm sure it's obvious to folks with more electronics experience, but I'm a newbie.  Saying "oh just use any jellybean diode" means nothing to me.  So, what diodes are appropriate here?   Both in PTH and SMD configurations.

 

Thanks.

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

oh just use any jellybean diode. :)

 

Use some small signal diode.

For wired components the 1N4148 has been the standard choice for 40 years or so.

 

The big "power" diodes are a waste of pcb space and a lot slower (Such as the 1N4007).

 

For SMD (or wired).

Use antyghing that can handle a continous current between 20mA and 500mA.

Skottky diode's are also fine.

 

You can also use a transistor out of your junk box (BC547 in Europe, I believe 2n2222 for overseas) and use the Base-Emitter diode.

 

Note that for better protection a resistor between you AVR and the "outside world" helps a lot in mitigatig the effects of ESD.

Even if you put a pretty low value such as 100 Ohms in series with each pin.

 

Edit:

I totally agree with Theusch (Below). Leave reset alone and use a bigger AVR. Especially as a beginner.

You can also do the program development on a "big" AVR and then scale it back to a "small" one if you really must when your product is (almost) finished.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Thu. Feb 1, 2018 - 05:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

So, you are a newbie yet are going to use the /RESET pin as an I/O (RSTDISBL fuse active) on a custom board design?  How will you do ISP?  Most of us would try to avoid the situation.

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: 1

Adding a diode will prevent the operation of certain programming modes. Those modes REQUIRE raising the RESET pin to a certain voltage well above Vcc. However, normal serial programming and debugging should be unaffected.

 

Frankly, even on commercial products, I have never seen the need to add a protection diode on RESET.

 

Jim

 

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

 

 

Last Edited: Thu. Feb 1, 2018 - 05:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee, I think it was just a general question, I don't think the OP is necessarily planning on using the Reset\ pin for general I/O.

 

If, as a newbie, the OP is doing his homework, and reading up on the supplied design considerations App Notes, (very commendable!), then AVR042:EMC Design Considerations, in Section 4.9.2 tells the reader that the Reset pin doesn't have the internal protection diode from the pin to Vcc, as do the other pins. 

 

It then essentially tells one to add the diode themselves: "To achieve the same protection on Reset as on other I/O pins, an external diode SHOULD be connected from Reset to Vcc, (emphasis added by myself).

 

If one doesn't have much hardware design experience, and is trying to follow the best practices presented in the App Notes, then it would truly be challenging for one to know when it is reasonable / safe to omit the diode.

 

The App Note also then says that the RC on the Reset pin are RECOMMENDED, ("The reset resistor and capacitor are still recommended for optimum Reset behavior.")  Clearly that was written before the Xmega chips came to be, as a cap on the Reset\ line will frequently trash the PDI interface.  This came up just last week, IIRC, also, and I mentioned then I don't have any experience with the new UPDI interface hardware to know what is actually a best practice for those (new) chips.

 

Back to the OP's question: If you want a bullet proof, super reliable system, especially in a high EMC noisy environment, then go ahead and add the diode.

For many users it just isn't necessary.

The threshold for adding the diode would be a little bit lower if one were using the Reset\ pin as a general purpose I/O pin, with connections to the outside world.

Doing that, however, is usually a poor decision unless one is optimizing the design for mass production, and counting pennies.

 

Lee has 100K's of boards (or more?) out in the wild, perhaps he will share whether or not the Reset\ pin diode is part of their usual design?

 

In summary, for the OP, barring a super mission critical design, for now you may safely ignore the Reset\ pin diode.

 

JC

  

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

DocJC wrote:
Lee has 100K's of boards (or more?) out in the wild, perhaps he will share whether or not the Reset\ pin diode is part of their usual design?

On none.

 

A diode to the hot rail protects against overvoltage, right?  Unless the programming header is exposed, what is then being protected against?  The diode isn't sufficient for static zaps anyway; right, sparkies? 

 

In my bit-pusher's opinion, protection diodes are indeed for outside world interference.

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

True, diodes usually are NOT sufficient for static zaps.

 

In my book (the one I wrote), diodes are generally NOT needed on the RESET pin. If you are in a VERY noisy environment, then absolutely. I had a product (long time ago, different micro) that was being mounted close to elevator lift motors. These are BIG motors. Lots of changing magnetic field when they start and stop (and run). We had to do everything possible to keep that from committing a destructive reset (destructive in the sense that system communication would die while it was resetting). I would have added a RESET protection diode here. But, not usually,

 

Jim

 

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

 

 

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

Thanks all.  As JC correctly ascertained, I'm a complete newbie and am trying to read all the ANs and other guidance. 

 

Do I need one? Not sure.  I certainly don't plan to use that pin for I/O.  However, the project I'm currently working on is a high altitude balloon tracker.  Which might be a noisy environment - there'll be a radio transmitter, a gps module, etc., not to mention whatever charge-carrying weather conditions might occur at that altitude.  So treating it as a noisy environment seems prudent, especially since adding a sub-$1 part really doesn't matter when not building for mass production.

 

I do know that the diode prevents high voltage programming, but that's fine - I don't plan to use that.  The plan is to use ISP (or maybe install an Arduino bootloader and use serial programming), for which, as far as I can tell, the diode should be fine.  I do plan on both a pull-up resistor (10K seems to be suggested to make debugWire work) and, on the flight model, a capacitor (which won't be installed during development, as it interferes with debugWire).

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

On older Arduino boards they did not use a diode. 

 

With the way reset was performed by the FTDI chip using a cap between the DTR and reset of the AVR there were occasions when the reset pin would see a high enough voltage to do some crazy things (some suspected high voltage programming).

 

Newer boards now have a diode installed.

 

http://forum.arduino.cc/index.php?topic=86389.0

Last Edited: Thu. Feb 1, 2018 - 07:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgalak wrote:
I'm a complete newbie and am trying to read all the ANs and other guidance.

Starting 8 different topics in a few weeks is quite a lot.

While I recommend reading datasheets application notes etc, there are far to many of them to read them all.

 

You have some experience with arduino.

You can re-use an arduino board and program a new program in it via the ISP connector.

In that way you don't have to worry about the hardware too much and can write a blinking led program.

Then expand from there, add libraries & your own software. Read chapters of datasheets and application notes when they apply to something you want to do.

 

From there you can also go further back to "bare bones" if you want.

Put a naked AVR on a breadboard and make it work.

Take small steps at a time. Re-using an arduino board is a smaller step than a naked AVR on a breadboard.

 

You will improve faster by taking smaller steps.

If you take small steps and "something goes wrong" (which it always does) it's often very easy to determine what went wrong and you can correct it.

(The thing that went wrong is in the last step you take).

 

If you take a big step and "it doesn't work" then it can take a lot of time to figure out why it doesn't work.

(The thing that went wrong is one out of a 1000 small things).

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

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

In my book (the one I wrote)

Are you going to compete with SmileyMicros? hmmm Joe hasn't been around for a while and the website doesn't work anymore.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

No! Said "book" is virtual, in my mind only, and is contains what ever I output at any moment.

 

Jim

 

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

 

 

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

Paul:

 

That's more or less what I'm doing.  One small step at a time.  I'm just taking hardware steps and software steps in parallel.  I've got much of my circuitry built up around an off-the-shelf arduino, which is what I'm using to develop my code.  However, parts of that (non-AVR parts) are on a custom breakout PCB, which needs revising.  So since I'll be spinning another board, and there are relatively long (compared to writing code) lead times associated with that, I want to get as much as possible onto that next PCB revision.  This includes the ATmega.

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

Choosing the right value for protection diode / cap on reset is not as simple as it seems
.
As in AN2519 and mentioned at #7 it depends on your requirements
.
They need to be determined carefully due to they are connected to the most critical pin of the MCU, protection diode / cap itself is a potential victim of ESD or spike, what if they themselves become damaged during issue ?
.
I put in my new designs the place for diode and cap but not placed any component, I reserved the place as precaution and as B plan, if required i will examine and put "right one" to fit the needed requirements

For making a robust equipment the whole pcb must be considered not just reset of MCU,
For example linear regulator 7805 needs at least 3 protection diodes, voltage rating of all caps on pcb need to be considered ...

I suggest place the footprint in PCB design as practice and use them when really required,

Majid

Last Edited: Fri. Feb 2, 2018 - 06:11 PM