Shop OBEX P1 Docs P2 Docs Learn Events
Pin Goes Dead? — Parallax Forums

Pin Goes Dead?

LoganLogan Posts: 12
edited 2006-02-03 15:46 in BASIC Stamp
I'm in the middle of a project involving 2 stepper motors, a color sensor, a BOE, and a BS2. Thus I have been using every pin available. I noticed one of the stepper motors quit working one day (after being used in the way it had been for weeks). Upon testing with a voltimeter, I deduced that Pin 10 would not go high when the program told it to.

Is it possible for just one Pin to quit working? I'm completely new at this so have no experience. I just can't imagine why it would have stopped working now.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 17:09
    It is if you try to drive too much current through it. What's beteen your BASIC Stamp and the stepper?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-01-30 17:13
    I have a ULN2803A transistor array.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 17:19
    Did you remove the ULN2803 before testing? I know from experience that you can burn up a channel on the ULN. If you look at the ULN circuitry each input has a resistor that should, theoretically, protect the Stamp I/O pin in the case of channel short.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-01-30 17:25
    I was testing the voltages straight off of the BS2, so the ULN shouldn't have caused any problems. But no, I hadn't removed it.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 17:35
    If the ULN is shorted then it could be causing a problem. Remove it and retest.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-01-30 17:43
    Upon removing the ULN, pin 10 still will not go high.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-30 17:59
    Before we give up on that pin, you might want to connect an LED (and resistor!) to the pin and run this simple test:

    Main:
    · HIGH thePin
    · PAUSE 200
    · LOW thePin
    · PAUSE 200
    · GOTO Main

    Sometimes we get fooled by meter readings -- the LED test is always a good test.· If you want to be very thorough, connect the LED as active-high and test, then retest as active-low.· If it blinks both was the output drivers are good.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-30 18:08
    If it doesn't blink, you should also move to another pin and just verify the circuit works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • LoganLogan Posts: 12
    edited 2006-01-31 18:35
    I tried the LED test as recommended and it simply stays on. When I move to a different pin, it blinks correctly.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-31 19:02
    You might want to replace your ULN, then, it's very likely it failed and the failure passed through to the BASIC Stamp. This doesn't usually happen, but it's certainly possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-01-31 19:09
    I've got a handful of extras so that shouldn't be the problem. But is there anything I can do about the BASIC Stamp? I was using all the pins so now I'm worried about my project.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-31 20:00
    The first thing to do is check on the what you're running through the ULN. Many people skip over the current limit when multiple pins are on at the same time, and this can lead to problems. If you look at the data sheet you'll see that when you start running simultaneous outputs you can't sink so much current per pin.

    Then again, the Stamp fault could be unrelated to the ULN. Sometimes these things happen. In 30 years of experimenting I've replaced a lot of banged-up chips with no concrete idea as to what did them harm.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-02-02 13:52
    I have attached the circuit diagram of what I was running. Only one steppper was run at a time except there was one point where one phase stayed on while the other stepper turned.

    Also attached to my stamp is a servo on pin 15 and a TAOS color sensor on pins 1, 2, 5, 6, 8.

    Did I do anything wrong that might have caused pin 10 to stop working?
    570 x 460 - 23K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-02 15:22
    Logan,

    ·· You did not connect pin 10 to the common (+) supply rail for the Stepper Motors.· This pin would connect the internal protection diodes.· But in your schematic they are not connected.· Inductive feedback from the coils could easily damage the outputs in this situation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-02 15:24
    · 2803s are used in the traffic controllers that I work on.·
    · There's a CMOS micro-P, which feeds some 74HC... ICs,·which are linked to the 2803s.·
    · I've found often that the 2803 gets knocked out or fails and the preceding 74HC... ICs get whacked, too, but never the micro-P.·
    · I think that if you place a forward-biased·small-signal·diode in series (between) the STAMP and the 2803 you'll go far in protecting your STAMP.· They'll be·a line of defense that you lack at present.· [noparse][[/noparse] Much as the 74HC...s in my controllers.· They do serve a function, they're not sacrificial semiconductors, but nonetheless. ]
  • LoganLogan Posts: 12
    edited 2006-02-02 15:52
    I was just following the diagram found on the stepper motor documentation: http://www.parallax.com/dl/docs/prod/motors/27964.pdf.

    So I just run another wire from the 12+ supply to pin 10 and it should prevent most problems? I had that when the problem first occured, but due to my lack of knowledge concerning circuitry, I removed it [noparse][[/noparse]after I started talking to you]·thinking it might have been connected wrong or was not doing anything.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-02 15:57
    Logan,

    ·· I am not sure who wrote the documentation you refer to, but I will look into it.· The V+ pin most certainly should be connected when you're driving an inductive load with the ULN.· As I have stated in the past, without that pin connected none of the outputs have the protection diodes enabled.· For some things this isn't a problem.· For example, high-power LEDs, light bulbs, etc.· But for Relays, Motors, Solenoids, etc. it should be connected.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • LoganLogan Posts: 12
    edited 2006-02-02 16:02
    I'll definitely hook that immediately back up. I do find it disappointing, though, that I still had my BS2 get damaged while that connection was made.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-02 16:11
    Check your PM...I need some information from you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-02 18:27
    Logan,

    You may in fact just had "one of those things" happen to your BASIC Stamp. I absolutely agree with Chris that for inductive loads (i.e., relays, solenoids) the COM line should be connected, and it doesn't hurt anything to connect for-non inductive loads. I will update our stepper motor documentation schematic to make that connection. That said, I don't think inductive lash-back was the cause of the problem. Why? Each ULN channel is a Darlington pair with a 2.7K resistor in the base circuit (that connects to the Stamp). My point is that there's quite a lot of circuitry to go through before getting to the Stamp's I/O pin, and stepper motors don't have big inductors in them so it's not likely that lash-back occurred in the first place -- unless you're using an abnormally-large stepper. I've run steppers in lots of projects with and without the connection. Now, I've burned up a few ULNs, but never has a problem in the ULN come all the way back to the BASIC Stamp.

    I don't know if you've been at electronics very long and if you haven't, I promise that you'll have a few more mysteries like this in your future -- it happens to all of us. We are sorry that it's happening to you now as it seems decidedly inconvenient.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LoganLogan Posts: 12
    edited 2006-02-03 15:46
    Thanks for all your help Jon and Chris. This is one of my first electronics projects so its been nice having your assistance. I guess sometimes, there really is no explanation. I guess you just have to work your way through them.
Sign In or Register to comment.