Shop OBEX P1 Docs P2 Docs Learn Events
Stepper Motor Example — Parallax Forums

Stepper Motor Example

garnoldgarnold Posts: 12
edited 2011-07-08 13:23 in BASIC Stamp
I'm using a darlington array to control a small stepper motor. I'm having some issues with the wiring. I can replace the stepper with and LED and see that my wiring is correct. What I mean by that is with the chip connected to the stamp I can make pin 11 high and it will turn on the LED on the other side. What I'm not sure how to do is get the power to the stepper because it will not run off the small amount of power from the stamp. I'm very new to this so I'm sure I'm not explaining this correctly so please be forgiving with me :)

Comments

  • LeonLeon Posts: 7,620
    edited 2011-07-08 10:51
    Post a schematic.
  • garnoldgarnold Posts: 12
    edited 2011-07-08 12:00
    Here's a link to a picture that will turn a LED on. The issue I'm having is that the 5v from vdd is not enough to turn the stepper and I need to connect to vin. There is a +supply on the darlington but I guess I'm just not getting how this all works?

    https://plus.google.com/100296667279795719501/posts?tab=mX
  • LeonLeon Posts: 7,620
    edited 2011-07-08 12:06
    Vdd won't work. What is the stepper motor spec.?
  • garnoldgarnold Posts: 12
    edited 2011-07-08 12:11
    I tested the stepper out with a 9V and it seemed to work. It's a 6 wire stepper. I connected the common to the - of the 9V and one of the leads on the side of that common wire to the + of the 9V and it moved a step.
  • LeonLeon Posts: 7,620
    edited 2011-07-08 12:21
    You need the motor spec. You can't design something like that unless you know what voltage the motor requires and how much current it takes.
  • garnoldgarnold Posts: 12
    edited 2011-07-08 13:23
    Ok this wiring seems to work.
    https://plus.google.com/100296667279795719501/posts/JG19GAsZF2F

    Not really sure what I did here but it works. I'll send a video up soon.

    Here is the code that I use to make the motor move left and right.

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    counter VAR Byte

    counter = 1

    FOR counter = 1 TO 50
    HIGH 9
    LOW 8
    PAUSE 50
    LOW 9
    HIGH 8
    PAUSE 50
    NEXT

    LOW 8

    counter = 1

    FOR counter = 1 TO 50
    HIGH 11
    LOW 10
    PAUSE 50
    LOW 11
    HIGH 10
    PAUSE 50
    NEXT

    END
Sign In or Register to comment.