Shop OBEX P1 Docs P2 Docs Learn Events
Board design with STAMP and current limiting resistors — Parallax Forums

Board design with STAMP and current limiting resistors

dgersicdgersic Posts: 10
edited 2011-05-03 07:11 in BASIC Stamp
Given this schematic, do I need to add current limiting resistors between the STAMP and the 74HC238s (IC2 and IC3)? How about on the /RES pin going to ground via SW2? Anywhere else?

(Ignore J2, J3, J8, and J10, they're not used / for future expansion).
1024 x 773 - 121K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-02 07:00
    You don't need current limiting resistors for Stamp I/O pins that go to 5V logic inputs. They're intended to prevent damage to the Stamp if you should accidentically program on of the I/O pins to be an output pin of the opposite state as that of the logic output. The 74HC238s only have inputs connected to the Stamp. It's impossible for them to become outputs, so you don't need resistors there. In the case of the switches, if the switch is closed and the I/O pin were accidentally made a high output, you'd have a short between the high I/O pin and the grounded switch contact. You need a resistor there. The /RES pin is a special case because, although it can become an output, it's a current limited output and shorting it to ground can't harm the Stamp.
  • dgersicdgersic Posts: 10
    edited 2011-05-02 23:10
    Mike Green wrote: »
    You don't need current limiting resistors for Stamp I/O pins that go to 5V logic inputs. They're intended to prevent damage to the Stamp if you should accidentically program on of the I/O pins to be an output pin of the opposite state as that of the logic output. The 74HC238s only have inputs connected to the Stamp. It's impossible for them to become outputs, so you don't need resistors there.

    Thanks. That's what I thought, but my STAMP recently died. Dave Andreae in tech support got me a replacement. But he said that the failure could have been from an I/O pin getting too much voltage or current. I told him I'd review my design, but I was pretty sure that it was ok. Looking at it, I didn't think I needed resistors between the STAMP and the 74HC238, but I figured it would be better to ask than to risk killing another STAMP.

    Mike Green wrote: »
    In the case of the switches, if the switch is closed and the I/O pin were accidentally made a high output, you'd have a short between the high I/O pin and the grounded switch contact. You need a resistor there.

    I'm confused about your answer here. The switches (SW5?) have limiting resistors (220 ohm, R4, R5, and R6) already, as does SW6 (220 ohm R3). What am I missing here?
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-05-03 06:59
    "But he said that the failure could have been from an I/O pin getting too much voltage or current."

    Since starting with BS years ago I recall that the output max current / power is specified per pin and per device.
    I also remember looking at PIC output schematic which included some protective ciruitry.
    ( I have not done that recently, so do not quote me.)
    Every time subject of current limiting resistors on the I/O pins comes up or someone "fries" his / hers BS I wonder how effective this PIC circuitry is and is it really doing the job.
    Vaclav

    PS dgersic - I still do not see the need for the "pull down" resistors on the output of 238
  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-03 07:11
    There's very little "protective circuitry" on most microprocessor I/O pins. Generally, you have a clamp diode from the I/O pin to the Vdd rail and another to the Vss rail. These are an attempt to protect the I/O circuitry from voltages above Vdd or below Vss. They can be burnt out when the fault current is too high and, even if they don't burn out, they're of limited use with high fault currents since Vdd-Vss can rise to where other parts of the chip become damaged. The other type of protection is from overcurrent. MOSFETs have a negative temperature coefficient. As they get hotter, the current through them drops. As a result, there's a peak current possible for the output transistors. If you design the output transistors to withstand this peak current, they can't be damaged by overcurrent. The Propeller I/O pins are designed this way and can withstand a short circuit at 3.3V indefinitely. You'll find a finite maximum current in the datasheet, but the chip has been tested with shorted outputs for substantial periods of time. The PICs (used in the BS2) are not designed as well.
Sign In or Register to comment.