Pull down button on Port B


+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    235

    Default Pull down button on Port B

    Using weak pullups on port B of 16f1936. A button to ground will cause an interrupt on IOCBN.
    Question: should I use a low value resistor in line with this pull down button?

    Wayne

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,704


    Did you find this post helpful? Yes | No

    Default Re: Pull down button on Port B

    if your query is to do with ameliorating effect of debounce capacitor

    google ai says

    effect of debounce capacitor on contact life


    Adding a debounce capacitor can both extend and shorten switch contact life, depending on its circuit placement and whether it is used with a current-limiting resistor.
    1. Protection Against Arcing (Positive Effect)
    When a switch opens, especially with inductive loads (like motors or relays), a high-voltage spike can occur, causing an electrical arc that erodes the contacts.
    Arc Suppression: A capacitor placed across the switch contacts acts as a temporary short, absorbing the energy that would otherwise cause a spark.
    Longevity: By quickly quenching the arc, the capacitor reduces material transfer (erosion) and prevents contacts from "welding" together, significantly extending electrical life.
    2. High Inrush Current (Negative Effect)
    If a capacitor is placed directly across the switch without a series resistor, it can damage the contacts during closure.
    Current Spikes: When the switch closes, the capacitor discharges nearly instantaneously. This creates a massive surge of current—potentially hundreds of amperes for a few nanoseconds—which can cause a brief but severe arc or even weld the contacts shut.
    Contact Erosion: For sensitive switches like reed relays, this tiny but intense arc can rapidly erode the contact area and shorten their lifespan.
    3. Best Practice: The RC Snubber
    To balance these effects, engineers typically use an RC network (a resistor and capacitor in series) rather than just a capacitor.
    The Resistor's Role: It limits the discharge current when the switch closes, protecting the contacts from inrush spikes.
    The Capacitor's Role: It still provides the necessary dV/dt limiting to prevent arcing when the switch opens.
    Result: Properly sized RC components ensure the longest possible contact life by mitigating both opening-arc erosion and closing-surge welding.
    Warning I'm not a teacher

  3. #3
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    235


    Did you find this post helpful? Yes | No

    Default Re: Pull down button on Port B

    thanks Richard for the reply. My point is to limit the current surge when the PortB pin drops from 5v to 0v at the button push. My thinking is there is a spike of current that may damage the PortB pin. Of course with no load there may be little current anyway. comments anyone?

    Wayne

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    235


    Did you find this post helpful? Yes | No

    Default Re: Pull down button on Port B

    Solved: Microchip Applacation note AN552
    "The series 100Ω resistors are used for Electrostatic Discharge (ESD) protection."

    OK, I think I was on the right track. In fact I was considering 100Ω resistors in my design then came across AN552.

    Wayne

Similar Threads

  1. Enabling weak internal pull up resistors on port B
    By dbodenheimer in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 8th October 2010, 16:55
  2. Weak pull Up 12F629
    By Lionheart in forum General
    Replies: 1
    Last Post: - 9th December 2008, 22:07
  3. 12F683 internal pull up
    By hvacrtech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th July 2008, 03:35
  4. Using weak pull-up
    By Sharky in forum General
    Replies: 6
    Last Post: - 11th September 2007, 07:44
  5. 18F4585 adc-in Pull-up ????
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th April 2006, 16:00

Members who have read this thread : 4

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts