BS2SX - driving K179 stepper controller?
jmbillings
Posts: 4
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!
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
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.
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!
I'll post back over the weekend when I've played around with it some more, didn't get chance last night.
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.