Author Topic: What purpouse do this resistor and capacitor serve?  (Read 2319 times)

0 Members and 1 Guest are viewing this topic.

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
What purpouse do this resistor and capacitor serve?
« on: January 03, 2016, 04:29:41 am »
On page 2 of this schematic, section A5, a reset button can be seen.  In series with it is a 39 ohm resistor and a 330 ohm resistor: 

https://www.arduino.cc/en/uploads/Main/Arduino-Zero-schematic.pdf

I know the 330 ohm resistor is for limiting the current just in case the pin is switched to an output.   But what purpose does the 39 ohm resistor and capacitor serve? 

I can read well enough, so I know the capacitor is for noise reduction.  But why would one need to reduce noise on a reset switch?  And how does the 39 ohm resistor come into play?  It would slow down the rate at which the capacitor discharges when you press the switch I suppose, but why is that necessary?

I do have a theory about what it's there for.  I know that on the original Arduino they had added a diode to the reset circuit because the voltage was spiking negative when the reset button was pressed and this would cause the microcontroller to lock up.  But in that circuit there was a capacitor in series with the reset pin, so it's not quite the same here.  But could the 39 ohm resistor be to prevent a negative spike when the capacitor is discharged through the reset switch?
 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: What purpouse do this resistor and capacitor serve?
« Reply #1 on: January 03, 2016, 05:32:55 am »
The switch shorts the cap and discharges it.  When released the cap is recharged through the 100k, giving RC=100e6*1e-9=0.1, which means it takes a little less than 0.1s to recharge back up to a CMOS logic threshold, holding the reset low for at least that long.  The 39R limits the discharge current of the cap.
 

Offline StarlordTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: us
Re: What purpouse do this resistor and capacitor serve?
« Reply #2 on: January 03, 2016, 06:05:07 am »
But why limit the discharge current of the cap?
 

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: What purpouse do this resistor and capacitor serve?
« Reply #3 on: January 03, 2016, 06:18:39 am »
Let's analyze the circuit.

TARGET_RESET is asserted (pulled down) by any number of peripherals using an open collector connection. This allows them to drive the signal without contention by relying on...

R100 is the pull-up for the reset circuit. This is what allows the open collector reset inputs to work.

SW100 is the manual reset button. It behaves just like an open collector.

C101 along with R100 form the low-pass filter that bson was talking about.

R102 limits current through the resistor for a few reasons:
- There could be additional capacitance in the system. Shorting them to ground could make excessive currents flow.
- Even just with C101 the current flow could be substantial enough to damage the contacts of SW100
- If TARGET_RESET were inadvertently connected to VCC power would be shorted to ground.

R101 limits current into the processor based on specifications, noise immunity, good practice, etc.
 

Offline RobertHolcombe

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: au
Re: What purpouse do this resistor and capacitor serve?
« Reply #4 on: January 03, 2016, 06:24:08 am »
It effectively debounces the switch

How critical is debounce for a reset pin though?
 

Offline khtwo2002

  • Contributor
  • Posts: 28
  • Country: ca
Re: What purpouse do this resistor and capacitor serve?
« Reply #5 on: January 03, 2016, 06:25:29 am »
Good to learn!  :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf