Shop OBEX P1 Docs P2 Docs Learn Events
BS2SX - driving K179 stepper controller? — Parallax Forums

BS2SX - driving K179 stepper controller?

jmbillingsjmbillings Posts: 4
edited 2011-11-26 08:23 in BASIC Stamp
Has anyone managed to drive the K179 stepper motor controller (see http://www.electronics123.com/s.nl/it.A/id.396/.f) with a Stamp?

The kit works on internal mode fine, so I've now wired the step and dir inputs to a couple of pins on the stamp. I'm sending pulsout to the pin wired to step but nothing happens, so it's obviously a bit more complex than this. Maybe I need a resistor to pull the pin high or low? Any pointers appreciated!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-24 07:26
    1) You have to connect the Stamp's ground (Vss) to the ground of the motor controller.

    2) You have to supply a direction signal from the Stamp or leave the DIR input unconnected and use the switch on the controller. Use a HIGH or LOW statement to set the direction.

    3) If you want further help, you'll have to supply a schematic of how you've connected things and your Stamp program, as simple as it may be.

    attachment.php?attachmentid=78421&d=1297987572
  • jmbillingsjmbillings Posts: 4
    edited 2011-11-24 07:36
    Hi, thanks for replying! Just to confirm from your points:

    1) You have to connect the Stamp's ground (Vss) to the ground of the motor controller.

    The K179 is running off the same 9V cell as the Stamp (although the stamp is via a 5V regulator) so this should be okay.


    2) You have to supply a direction signal from the Stamp or leave the DIR input unconnected and use the switch on the controller. Use a HIGH or LOW statement to set the direction.

    Hmm, I did wire up the DIR input to one of the pins, but I've not set it explicitly high or low yet. This may be the issue then...


    3) If you want further help, you'll have to supply a schematic of how you've connected things and your Stamp program, as simple as it may be.

    I'll try fixing 2) and post back if still stuck!

    Thanks!
  • ercoerco Posts: 20,256
    edited 2011-11-24 16:21
    Are you trying to power the Stamp, controller, AND schlepper motor off of one 9V battery? A 9V can't deliver enough current to power all that. Might work for a few seconds off a brand-new battery, but then the voltage will drop and your electronics will keep resetting. You need a much bigger battery or power supply.
  • jmbillingsjmbillings Posts: 4
    edited 2011-11-25 00:13
    Hi erco - no, the stepper motor itself has it's own 12v supply. The Stepper controller and the stamp are indeed running off the same 9v cell though.

    I'll post back over the weekend when I've played around with it some more, didn't get chance last night.
  • jmbillingsjmbillings Posts: 4
    edited 2011-11-26 08:23
    Good news, it's working now!

    Added code to set the direction pin, and still no joy.
    Wrote new test program just to run the motor pulses in a loop, and that worked, checked my original code and realised that the loop the motor runs in would complete really quickly rather than taking the second or so I needed, so amended that (using the pulsout length to calculate if the loop should end yet or not) and it seems to work!

    Thanks for the pointers.
Sign In or Register to comment.