Author Topic: pullup on reset pin - cap or resistor?  (Read 15263 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
pullup on reset pin - cap or resistor?
« on: April 15, 2008, 12:12:13 PM »
I was going to put a 300k pull up resistor on my AVR reset pin because of reset issues, and then someone recommended putting a cap on it instead. Does this sound like a better idea? Anyone with experience on it? I'm not in an easy position to test it, so was hoping if someone else has tried it before . . .

Quote
Well, using an external 300K Ohm resistor tied between VCC and the RESET pin really doesn't add appreciably to noise immunity...
Code:

         40K * 300K
Rreset = ---------- = 35.25K Ohms.
         40K + 300K

With using an external 300K Ohm pull-up resister between VCC and the RESET input, it would be a better traid-off to just use a decent size capacitor of say, 1uF to 10uF.

Offline Steel_monkey

  • Full Member
  • ***
  • Posts: 85
  • Helpful? 0
Re: pullup on reset pin - cap or resistor?
« Reply #1 on: April 15, 2008, 12:39:54 PM »
The rule of thumb is 5-7 KOhm resistor from RESET to VCC and 0.1-1 mkF ceramic capacitor from RESET to GND. Atmel application notes tell the same. I can not see problem in putting one resistor and capacitor to prevent virtually all RESET problems ( but not all problems, of course, crystal it the other headache source).

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: pullup on reset pin - cap or resistor?
« Reply #2 on: April 15, 2008, 01:10:25 PM »
For one circuit its no big deal, but since I plan to mass produce circuits now and in the future, a single additional component could cost me hundreds of dollars.

The datasheet recommends at least a 4.7k resistor, or a minimum 10k to use a debugger. But it doesn't mention noise immunity or cap info . . .

I guess I'll just have to scope it up under realistic settings. But my setup is a bit complicated so I was really hoping to avoid making changes . . .

Offline Steel_monkey

  • Full Member
  • ***
  • Posts: 85
  • Helpful? 0
Re: pullup on reset pin - cap or resistor?
« Reply #3 on: April 16, 2008, 12:35:52 AM »
Classic from Atmel :   -  AVR040: EMC Design Considerations http://www.atmel.com/dyn/resources/prod_documents/doc1619.pdf
                              -AVR042: AVR Hardware Design Considerations http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf
You can design pads for small 0805 capacitor on PCB, but not just solder it, if consider not required. 
The thing is, capacitor is not arbitrary required, because AVR have internal low-pass on reset. But who knows  where the device will be used (example: for driving cheap Chinese motor without any filtering) ?
Test looks like best idea.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: pullup on reset pin - cap or resistor?
« Reply #4 on: April 16, 2008, 06:53:22 AM »
I always put a 10K resistor between RESET and Vcc. I also always put a 0.1 uF cap between Vcc and ground, right next to the chip.

Admin, if you're paying more than a few cents for a resistor or cap in that range, you're getting ripped off big time.

For instance, the 10K resistor I use, digikey part #RR08P10.0KDCT-ND

4.675 cents each in quantity 200 (that's $9.35 for 200 of them)

The caps are even cheaper:

the 0.1 uF cap I use: Digikey part #PCC2277CT-ND

2.7 cents each in quantity 100 (that's $2.70 for 100). I buy these ones in 500 rolls, since they're even cheaper - $9.97 for 500.

- Jon

Offline stopgo

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 0
Re: pullup on reset pin - cap or resistor?
« Reply #5 on: April 17, 2008, 10:12:18 AM »
This was an interesting read, although I'm not suggesting that you need something more complicated than the RC circuit suggested above.

http://www.sigcon.com/Pubs/edn/por.htm

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: pullup on reset pin - cap or resistor?
« Reply #6 on: April 17, 2008, 03:19:59 PM »
Man, yes... you always get a 10k pull up to reset pin... else it's very easy to have reset issues...
But, i don't know which controller do you use... you see, for the ATtiny2313 I recently configured there was an option to use reset pin as a common port or as usual through fusses...
I get you are really using the ATMEGA128 for that board you want to make for SoR....
I saw you don't have that option for that controller though AVR Studio 4....

And I really don't know about the cap... I haven't used it so far with any of my projects but doesn't seem to have troubles anyway....
From what I see on the net, it's usually a 10 - 100nF MKT or ceramic or film or whatever...


Cheers!!!
Lefteris, Greece
For whom the interrupts toll...

Offline apc3161

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: pullup on reset pin - cap or resistor?
« Reply #7 on: July 22, 2009, 06:22:16 PM »
I find this article concerning the fundamentals of this RC reset topic.

http://www.hardware-guru.net/board_design/power_on_reset.htm

I thought I'd post it here in case anyone ever does a search for this info as I did.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: pullup on reset pin - cap or resistor?
« Reply #8 on: July 22, 2009, 07:01:26 PM »
Iterating what some others have said...

The AVR has a built in pullup resistor anyway but check the ATMega640 datasheet (Axon II ?). The norm is 4.7k but it depends on whether you are using the debugWire interface.

The benefit of a capacitor between RESET and Gnd is that it will keep the chip in reset mode for a brief period - and hence help with any contact bounce on the power supply.

Here is an example of when that may be of use:-

When adding some code to my C library for a given motor controller (which uses a UART for comms) then I came across some problems. The motor-controller expects the first byte to be 0xAA and it uses the received info to auto calculate the baud rate. My problem was that when power was applied then the UART output 'bounced' high and low due to the power supply connection bouncing. This high low sequence was then misinterpreted by the motor controller board as an incorrect baud rate and so all subsequent comms failed.

You may find a similar thing if connecting to your pc. When you 'power on' you may get a 'glitch' character in HyperTerminal.

Of course one solution is to add delay loops in your start up code to wait until everything has settled before doing anything (ie all pins are inputs and so don't send any 'pulses').

The capacitor connection on the RESET pin does the same thing - but in hardware. Surely a better solution.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


data_list