Shop OBEX P1 Docs P2 Docs Learn Events
Think i realy did it this time...... — Parallax Forums

Think i realy did it this time......

RackleRackle Posts: 17
edited 2005-04-15 18:03 in BASIC Stamp
I'm pretty sure I've destroyed my stamp chip.· I was tring to control a transistor, so that I could switch on and off 12 volts, well really I guess closer to 14 with the transistors resistance.· After fiddling around on it, Pins 0-5, 7 and 9 stopped working.· Then I connected the transistors collector to 14 volts, the·emittor to the boards VSS, and the negative side of the 14 volts.· Then i connected the base to pin10, and made it go high.· Didn't work right, so then I made somechanges and it won't even detect the stamp board.·

Pretty sure I've killed it, but where did i go wrong?

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-09 23:19
    Without a 220 ohm resistor in series with the I/O pin, the BS2 will source or sink enough current to destroy the pin drivers. That's assuming a 5 volt signal -- with a 12 volt signal you need more resistance.

    That's probably what you did wrong. It's a common mistake to assume that 20 to 25 mA specification for the I/O pins is a current limit -- it's not. What it is is the max current you can ALLOW to enter or leave the Stamp before the pin driver dies. and you ALLOW it with the amount of resistance YOU put into the circuit. No resistance == infinite current, until dead driver.
  • JonbJonb Posts: 146
    edited 2005-04-09 23:24
    ^ Ya that would do it...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-10 00:16
    ·· I just wanted to clarify...You tied the collector to 14V, the emitter to Vss (Ground) and the base directly to a Stamp I/O pin?· If so, you're also trying to directly short the supply rails!· nono.gif·· Ah well...I hope you at least got a pretty light/smoke show for your trouble!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • RackleRackle Posts: 17
    edited 2005-04-10 03:25
    what do you mean by "short the rails?" and How should I have configured this circuit to prevent this? just add resistance into the connections? a resistor between the pin and the base? a resistor from the emitter to VSS.

    I have a good understanding of electronics, but circuit building isn't my strongest point. I'm better at troubleshooting, I tend to destroy less parts there.
  • CPUMANCPUMAN Posts: 55
    edited 2005-04-10 04:59
    Keep in mind it takes very little current to turn a transistor on.· So I usually just throw a 1K resistor between the stamp pin and the transistor so if I was controlling 5 volts in the worst case scenario, a short, the max current the stamp pin would be dealing with is 5mA... well within the maximum rating.

    Seems like this has become stamp killing weekend. LOL wink.gif

    Chris
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-10 05:07
    ·· What I meant was, if you had the circuit connected as I was asking, then when you brought the I/O pin HIGH, it would be the equivalent of tying the 14V to ground.· Kinda like sticking a silicon screwdriver between the terminals.··Not to mention the current draw from the base without a transistor.

    ·· CPUMAN is correct.· A 1K resistor is often the better choice for beginners when using transistors to switch other components, because in a failure situation, the current draw on the Stamp I/O pin will be kept minimal.· I myself always use 1K on 2N2222, 2N3904 and 2N3906 transistors (and similar).· This way you're covered in any situation within the limitations of these devices.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • death by stampdeath by stamp Posts: 9
    edited 2005-04-10 05:30
    well, beacuse i have had a past of not watching for the CEMF from motors, coils, and anything else with inductance, i have fried an driver for a pin more than once.

    now i make it a habbit to put a 1kv diode between the pin and what im working on.

    in addition to that i only use MOSFETs so the base is insulated from everything else.



    sorry bout that bud...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -~Kill~-
  • Tom WalkerTom Walker Posts: 509
    edited 2005-04-11 14:58
    Mshkor,
    I think what Chris is asking is "What is it that you think your set-up was supposed to DO?" The circuit you described would just connect your 12V positive terminal to your ground terminal when the base current was high enough to turn on your transistor "switch". If you've ever tried connecting a wire from the top of a battery to the bottom (c'mon...we all have <g>), you have "felt the heat" (and just maybe, "seen the light").

    Sounds like a trip through the "What's a Microcontroller?" text is only one of the steps you need to take...

    Happy journey!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • RackleRackle Posts: 17
    edited 2005-04-11 22:38
    There was more to it than that, I guess I jsut didn't include all the necessary information.· I was trying to switch on a stepper motor, I was trying to activate one of the coils of the 12 v motor by switching on the transistor using 5 volts from the pin on the base of the transistor.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-12 01:30
    ·· Well don't do that again!· tongue.gif· <slaps hand>· Now, repeat after me, "I will always use a resistor to protect my Stamp I/O pins..."· Anyway, Good Luck next time and I would recommend using existing schematics of circuits as an example.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • RackleRackle Posts: 17
    edited 2005-04-12 02:07
    I do refer to existing work, but typically don't like to use it. I'd rather work through the design to get a better feeling for how it operates, of course this is a good example of WHY to study the existing designs.

    Well, that'll be another $50 parallax makes.
  • Tom WalkerTom Walker Posts: 509
    edited 2005-04-12 14:58
    Mshkor,
    Contacting Parallax for a repair might save you a couple of greenbacks. You're not the first to let the smoke out...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • RackleRackle Posts: 17
    edited 2005-04-15 00:27
    I've attached a schematic of what I'm going to try when my replacement chip comes.· I don't want to blow up another, so I'm planning ahead.

    I've added a 1k resistor between the pin and the transistor.· The Stepper motor I'm using is 12volts, and .4 amps.· on the schematic I put in a 12v supply for the motor, but should it be higher to compensate for any voltage drop across the transistor?· Also should my negative side of the power supply for the motor be connected to the VSS of the BOE2 Stamp board?· Any other advice on what to change/do?

    The Transistor is a 2n4400

    http://www.fairchildsemi.com/ds/2N/2N4400.pdf
    568 x 311 - 25K
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-15 00:35
    Yes, you must connect your motor ground to the BASIC Stamp Vss connection. You can simplify things a bit by using the ULN2003 -- it has seven Darlington circuits that you can connect directly to the BASIC Stamp in this application. See the StampWorks manual for details.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-15 15:59
    Mshkor,

    · Your schematic looks fine to me as it stands.· Now that you have the 1K resistors, you should be alright, as long as those transistors can handle the voltage and current.· I do not believe a 2N3904 will work, and I don't know which ones you are using.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • BeanBean Posts: 8,129
    edited 2005-04-15 18:03
    The pdf of the 2n4400 says 500mA, so if you are drawing 400mA (.4Amp) you should be okay.
    Beside unless you have the motor held steady, each transistor will be only on about 25% of the time.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video Display Module" Available Now.

    www.sxvm.com

    "A problem well defined, is a problem·half solved."
    ·
Sign In or Register to comment.