Shop OBEX P1 Docs P2 Docs Learn Events
Why did my Stamp2p-40 just fry itself??? — Parallax Forums

Why did my Stamp2p-40 just fry itself???

everesteverest Posts: 141
edited 2009-06-20 15:33 in BASIC Stamp
I'm at the end of my rope with this Stamp2p-40 and this Professional Development Board. Here's the situation as of tonight.

For starters, I'm doing all of my experimentation and design on my BoE board with my Stamp2 because I'd rather fry a $49 chip than my shiny new $90 Stamp2p-40. . .which didn't work in this case! Here's exactly what I did:

1) I am using an NTE46 darlington transistor with the emitter connected to the power supply ground, the collector attached to VIN, and the base attached to Stamp2 Pin0

2) The VIN connection also runs through the coil of my 10A relay

3) When I take the Stamp2 pin HIGH, *snap* the relay activates. . .and when I take it LOW *snap* it releases.


So now that I know it all works and is safe (NOT), I replicated the circuit EXACTLY on my Professional Development Board, hook it up to Pin0 on my Stamp2p-40 and *pow* I smell cooking electronics. . .and pin0 is now toast on my Stamp2p-40. . .

So I power it off quickly, let it all cool down and carefully check the circuit. . .it's perfect. . .exactly like it was on the BoE board!?!?

Now I'm getting irritated because this is the 3rd problem I've had with this new set-up, including the whole rebooting when I make serial connections. . .so I remove the Stamp2p-40 from the Professional Development Board and put in my Stamp2. . .and run the same code. . .*snap* *snap* *snap*. . .it runs FINE. In fact it's running now. . .Note that I just swapped chips. . .everything else is exactly the same.

So why the heck did my Stamp2p-40 try to kill itself and fry a pin??? I'm at a complete loss.. .what makes these chips so different? Help!

-Jeff

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-06-19 05:59
    I'll step outside my CS training and try an EE question. You have the collector of the pair to VIN, and the emitter to ground. So when the transistor goes on, it creates a short circuit between VIN and ground. It may have enough resistance (or drop or something else) to keep the BS2 on, but it is low enough for the relay to turn off. Theoretically, shouldn't the relay always be on if it's hooked up to a (constant) voltage VIN?

    As for why the BS2p40 fries and the BS2 does not? My theory is that since the p40 can source an extra 10 mA per pin (and 20 per group) that it cranks up the transistor a bit more, and creates it's own short... Just a theory.

    Post Edited (SRLM) : 6/19/2009 6:06:03 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-19 06:19
    With any bipolar transistor — Darlingtons included — you need a resistor between the Stamp pin and the base to limit the base current. Also, since you're driving an inductive load, you need a protection diode across the relay coil. Omitting either one could have caused the BS2p to fail.

    Here's a schematic:

    attachment.php?attachmentid=61673

    And please don't ask, "But, but, why did it work for the BS2, then?" You were just extraordinarily lucky, that's all! smile.gif

    -Phil
    300 x 327 - 2K
  • everesteverest Posts: 141
    edited 2009-06-19 06:27
    Well. . .another thing I've noticed about this Stamp2p-40 is that it runs HOT HOT HOT. . .almost too hot to touch actually. Even just doing a looping "pause" this little chip is smoking hot. . .just so ver different from my Stamp2!!

    I've gotten this to work actually. . .I put in two 330K resistors between Pin1 and the NTE46 transistor and it actually is working at this point. I also put the collector and emitter directly to the 12v power supply vs. using VIN, and that actually makes this chip run much cooler. . .it didn't fry anyways. . .

    I'm still trying to figure out why I lose Pin0 though!! I guess I have enough on this chip still, but I hate breaking new toys, particularly when I can't even learn from the experience [noparse]:([/noparse]

    -Jeff
  • everesteverest Posts: 141
    edited 2009-06-19 06:38
    Phil,

    Thanks for the note!! I'd completely forgotten the diodes, but I did remember the resistors, which are now in the circuit. I'll pick up some diodes tomorrow and add those in as well. . .my prototype unit actually does have diodes in place, I'd just forgotten about them here! Thanks!

    So the lack of a resistor overdrew the max the pin could provide. . .toasting it? Oh and why did it work for BS2. . .errr. . .wait. . .got it, I was lucky [noparse]:)[/noparse] [noparse]:)[/noparse]

    -J
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-19 06:38
    Jeff,

    Without the base resistor, your Pin 0 was driving pretty much a dead short. That would be enough to cause the pin to fail. 330K is a bit high, BTW, and may cause the Darlington not to saturate, which means it may overheat. Try a 2.2K instead.

    -Phil

    P.S. Did you remember the protection diode across the relay coil?

    Addendum: Looks like our posts crossed. You got it all, though. smile.gif
  • everesteverest Posts: 141
    edited 2009-06-19 06:57
    Thanks Phil, I've swapped for a 2.2K and I notice right away that the Stamp2p-40 is running quite a bit warmer, and that's just driving one relay. I'm concerned what it's going to do when it's driving 5!! It was cooler with the 330K. . .? This transistor is really very tiny. It's funny, when I plug in the resistor if I have my ground bracelet off the relay actually starts to flutter. . .my body must have enough of a charge to let a little power through. . .!

    -J
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-19 07:03
    I can't explain the warmer Stamp. With a 2.2K resistor, the pin should only be sourcing about 1.7mA.

    -Phil
  • everesteverest Posts: 141
    edited 2009-06-19 07:07
    I guess it just runs hot. . .? Maybe I'll give tech support a call tomorrow. . .thanks for all your help!

    -J
  • ercoerco Posts: 20,256
    edited 2009-06-19 20:06
    Make sure your 2P-40 runs cool with nothing attached. I·was given·an older·[url=mailto:BS2@-SX]BS2-SX[/url] that runs very·hot even with all pins disconnected, some internal defect or somebody done blown it up·GOOD.

    In a related story, if anyone wants to buy a used BS2-SX that doubles as a space heater, feel free to PM me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • everesteverest Posts: 141
    edited 2009-06-19 20:10
    It's a tad warm when it's doing nothing, but not hot. It's not until you actually use one or more pins that it really starts to heat up. . .

    -Jeff
  • pwillardpwillard Posts: 321
    edited 2009-06-19 20:51
    Like I said in the other thread, the STAMP chip can sink or source around 45ma. Keeping the load on the pins UNDER that value is the way to keep it cool... or rather... alive. Are you sure you didn't present the coil load directly to the pin?

    A switching transistor circuit for a relay does not mandate the use of a Darlington. In fact, I would say that this is not ideal transistor for this since it could actually demand more current to saturate. By contrast, a small signal switching transistor would do just fine, like a 2N2222.

    You keep saying 10A relay, but that is just the contact rating. What are the details for the coil itself? Knowing the Coil Voltage and Coil resistance... would help here.

    Technically, the transistor on P0 should appear to the STAMP the same as if it turned on an LED or a relay. The Pin sees a small load... the transistor takes the heaver load. That's why we use that circuit shown above.

    On the other hand, relays introduce an inductive kick to the circuit that if improperly handled and isolated can find it's way down a path that could be destructive... as you found out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    There's nothing like a new idea and a warm soldering iron.
  • ercoerco Posts: 20,256
    edited 2009-06-19 23:18
    A·lot of this relay driver/diode/bias resistor info is summarized in the simple schematic·near the top of http://forums.parallax.com/showthread.php?p=783327 .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • everesteverest Posts: 141
    edited 2009-06-20 15:33
    LOL, Thanks! "Prevent cooking your output". . .whoops!!! Thanks, at least I learned something (at the cost of a pin).

    -J
Sign In or Register to comment.