Shop OBEX P1 Docs P2 Docs Learn Events
Pin burnout! — Parallax Forums

Pin burnout!

ArchiverArchiver Posts: 46,084
edited 2003-01-09 22:29 in General Discussion
I have a strange problem. In an exhibit I developed, I have several
switches wired to the stamp. All switches are wired in an active-
low configuration. I am using a 10k resistor between Vdd and the
switch/pin, while the other end of the switch is tied to Vcc. All
except one switch are working fine. The one that has given me
trouble works well for a few hundred times and then the pin remains
in a low state even if the switch is disconnected. What can cause
that? The 10k resistor is supposed to protect the pin from too much
current dissipation! Now when I read the switch I constantly get
0. This is the second BS2 that I burn Pin0 on, and the second one
with both pins 0 and 1 burned out!

Please give me some clues...



Al najjar

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 21:38




  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 21:48
    It's likely that something in your program is causing Pin0 to become an
    output high and you're getting a direct short to ground when the button is
    pressed. You can protect the Stamp by connect a 1K resistor in series with
    the Stamp input pin. That way, even if a programming error causes a given
    pin to go high when you have a button pressed (connecting the pin to ground),
    you limit the current to 5 milliamps and do no fry the pin.

    -- Jon Williams
    -- Parallax

    PS: You can download Column #81 ("A Tale of Two Stamps") from this link:

    <A
    HREF="http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Download\
    s_V3.asp
    ">
    http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Downloads_V3.

    asp</A>

    for details on the "safe" input circuit that I describe above.


    In a message dated 1/7/2003 2:50:18 PM Central Standard Time,
    brownstamp@y... writes:

    > I have a strange problem. In an exhibit I developed, I have several
    > switches wired to the stamp. All switches are wired in an active-
    > low configuration. I am using a 10k resistor between Vdd and the
    > switch/pin, while the other end of the switch is tied to Vcc. All
    > except one switch are working fine. The one that has given me
    > trouble works well for a few hundred times and then the pin remains
    > in a low state even if the switch is disconnected. What can cause
    > that? The 10k resistor is supposed to protect the pin from too much
    > current dissipation! Now when I read the switch I constantly get
    > 0. This is the second BS2 that I burn Pin0 on, and the second one
    > with both pins 0 and 1 burned out!
    >
    > Please give me some clues...
    >
    >
    >
    > Al najjar



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 21:53
    In a message dated 1/7/2003 12:50:16 PM Pacific Standard Time,
    brownstamp@y... writes:

    > I have a strange problem. In an exhibit I developed, I have several
    > switches wired to the stamp. All switches are wired in an active-
    > low configuration. I am using a 10k resistor between Vdd and the
    > switch/pin, while the other end of the switch is tied to Vcc. All
    > except one switch are working fine. The one that has given me
    > trouble works well for a few hundred times and then the pin remains
    > in a low state even if the switch is disconnected. What can cause
    > that? The 10k resistor is supposed to protect the pin from too much
    > current dissipation! Now when I read the switch I constantly get
    > 0. This is the second BS2 that I burn Pin0 on, and the second one
    > with both pins 0 and 1 burned out!
    >
    > Please give me some clues...
    >
    >
    >
    > Al najjar
    >

    The way you have it wired, there is no current protection into the stamp pin
    (that is if I correctly understand your setup). If your pin is an output at
    any time, outputs a low with the switch pressed (Vcc connected to the input)
    you will burn out that channel/pin.

    is this your current setup?

    Vdd XXXXXXXX a______b Vcc

    That is XXX = 10k resistor, pin "a" of the switch to the stamp and pin "b" of
    the switch to vdd (+5v)?





    I would to the following.....

    A safe approach is to do the following..using the same schematic
    configuration as above...

    Vdd XXXX10kXXXXX stamp pin XXXXX 1K XXXXX a______b Vcc

    In this configuration, you will not need to change the software (input is low
    without pressing the switch) and you will read a valid logic high (4.54
    volts) when the switch is pressed and the stamp pin will will be protected
    from over current, regardless of the pin output state.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 21:59
    In a message dated 1/7/2003 1:51:01 PM Pacific Standard Time, jonwms@a...
    writes:

    > It's likely that something in your program is causing Pin0 to become an
    > output high and you're getting a direct short to ground when the button is
    > pressed. You can protect the Stamp by connect a 1K resistor in series with
    >
    > the Stamp input pin. That way, even if a programming error causes a given
    > pin to go high when you have a button pressed (connecting the pin to
    > ground),
    > you limit the current to 5 milliamps and do no fry the pin.
    >
    > -- Jon Williams
    > -- Parallax
    >
    > PS: You can download Column #81 ("A Tale of Two Stamps") from this link:
    >
    > <A
    HREF="http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Download\
    s_V3.asp
    ">
    >
    >
    >
    >
    http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Downloads_V3.
    >
    > asp</A>
    >
    > for details on the "safe" input circuit that I describe above.
    >
    >
    > In a message dated 1/7/2003 2:50:18 PM Central Standard Time,
    > brownstamp@y... writes:
    >
    > >I have a strange problem. In an exhibit I developed, I have several
    > >switches wired to the stamp. All switches are wired in an active-
    > >low configuration. I am using a 10k resistor between Vdd and the
    > >switch/pin, while the other end of the switch is tied to Vcc.
    >
    >
    Correct me if I am wrong, isn't vdd ground and vcc +5?

    The user has 10k to ground and a switch to +5....therefore if the pin is an
    output low with the switch pressed, you will then burn out the channel??????

    Am I wrong or confused?

    However, the 1k in SERIES to the stamp input pin will solve any logic problem
    that will cause an over current situation. This solution by Jon is slightly
    different from my earlier posting....

    Both should work.


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 22:07
    Yes, bot solutions provide the same protection because the path from the
    Stamp pin to ground (Vss) is through a 1K resistor. I prefer the series
    approach because it's easier to remember -- regardless of whether you want to
    switch active-low or active-high.

    -- Jon Williams


    In a message dated 1/7/2003 4:04:23 PM Central Standard Time,
    smartdim@a... writes:

    > Correct me if I am wrong, isn't vdd ground and vcc +5?
    >
    > The user has 10k to ground and a switch to +5....therefore if the pin is an
    >
    > output low with the switch pressed, you will then burn out the
    > channel??????
    >
    > Am I wrong or confused?
    >
    > However, the 1k in SERIES to the stamp input pin will solve any logic
    > problem
    > that will cause an over current situation. This solution by Jon is slightly
    >
    > different from my earlier posting....
    >
    > Both should work.



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-07 23:10
    In a message dated 1/7/2003 2:11:57 PM Pacific Standard Time, jonwms@a...
    writes:

    > Yes, both solutions provide the same protection because the path from the
    > Stamp pin to ground (Vss) is through a 1K resistor. I prefer the series
    > approach because it's easier to remember -- regardless of whether you want
    > to
    > switch active-low or active-high.
    >
    > -- Jon Williams
    >
    As usual, Jon is 100% correct. The series method is a "no brainer."


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-08 00:40
    Thanks Jon. It makes perfect sense but I find it curious that page
    250 of the 1.9 manual does not suggest this simple protective
    measure!

    Al Najjar


    --- In basicstamps@yahoogroups.com, jonwms@a... wrote:
    > Yes, bot solutions provide the same protection because the path
    from the
    > Stamp pin to ground (Vss) is through a 1K resistor. I prefer the
    series
    > approach because it's easier to remember -- regardless of whether
    you want to
    > switch active-low or active-high.
    >
    > -- Jon Williams
    >
    >
    > In a message dated 1/7/2003 4:04:23 PM Central Standard Time,
    > smartdim@a... writes:
    >
    > > Correct me if I am wrong, isn't vdd ground and vcc +5?
    > >
    > > The user has 10k to ground and a switch to +5....therefore if
    the pin is an
    > >
    > > output low with the switch pressed, you will then burn out the
    > > channel??????
    > >
    > > Am I wrong or confused?
    > >
    > > However, the 1k in SERIES to the stamp input pin will solve any
    logic
    > > problem
    > > that will cause an over current situation. This solution by Jon
    is slightly
    > >
    > > different from my earlier posting....
    > >
    > > Both should work.
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-08 00:52
    Most product designs DON'T use the safe approach since it's assumed software
    is written for the hardware and doesn't change -- the world of the
    experimenter is very "dynamic" while the manual is very standard. That said,
    I will suggest the update to our staff as the new compiler will necessitate
    updating the manual.

    -- Jon Williams
    -- Parallax


    In a message dated 1/7/2003 6:43:22 PM Central Standard Time,
    brownstamp@y... writes:

    > Thanks Jon. It makes perfect sense but I find it curious that page
    > 250 of the 1.9 manual does not suggest this simple protective
    > measure!
    >
    > Al Najjar



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-01-09 22:29
    "The Microcontroller Application Cookbook" by Matt Gilliland shows
    you many ways how not to fry your stamp, like the series resistor on
    the input pins (though he uses 270 Ohm in his example, not 1 k). I
    recommend getting this book, and don't lend it out because you won't
    get it back.
Sign In or Register to comment.