For anyone interested, I added command line utilities for the IOPoint-USB for Windows.
http://www.bibaja.com/products?page=iopoint_usb
These command line tools offer quick access to control the outputs.
Included with the updated command line tools for Windows is a command line utility called iop_step.exe that uses the IOPoint-USB as a unipolar stepper motor driver. It can drive up to 4 unipolar steppers at once.
I've been tinkering on the bench with a 4.2V Superior Electric 1.8degree stepper, so I figured I'd post the source and command line utility that makes it go in case someone else might find it useful or educational.
If you haven't driven a stepper before, it's really cool and fairly simple. The unipolar steppers typically have two center tapped windings something like this:
The commons are connected to ground and the phase terminals A, B, C, and D are connected to outputs from the IOPoint-USB or to other stepper motor drivers, like H-Bridge driver chips.
For making full steps, you drive the windings in sequence like this:
AB -> BC -> CD -> DA -> AB...
Reverse the sequence to go the opposite direction.
For half steps, or microstepping, you drive it like this:
A -> AB -> B -> BC -> C -> CD -> D -> DA -> A ...
Again, reverse the sequence to the other way.
This animated gif visually demonstrates the microstep sequence in one direction:
This iop_step.exe example app allows you to drive the stepper and move a certain number of steps in a certain direction. The downside is since it is a command line app, it exits and doesn't store it's state -- so you have to keep track of the state when you integrate the app into your own application. Or you can integrate the C source and save the state internally.
The command line app iop_step.exe takes these arguments:
iop_step [ -s serial ] [ -h ] output state dir steps [ delay ]
-s serial: The serial number returned by iop_list (required if
you have more than one IOPoint-USB attached)
-h: Half step, or microstep mode. If you have a 200 step/rev
stepper, this makes it go 400 steps
output: The starting output of 4 contiguous outputs where the
stepper is attached. For example, 1 means the stepper's
A, B, C, and D wires are attached to outs 1, 2, 3, and 4.
state: The previous output state returned by the iop_step command
Since iop_step is a command line utility (and the IOPoint-USB
is an output only gadget), it cannot remember where it left off.
So when the program exists, we return the state value. Simply
pass this value back into the program on subsequent calls to pick
up where you left off. 3 is a safe value to start with. This turns on
phases A and B of the stepper.
dir: Direction, 0 sequences from D down to A, 1 sequences up from A to D.
CW or CCW will depend on how you make the connections
steps: Number of steps to take, 200 steps is one revolution in full step
mode for a 1.8 degree per step stepper motor.
delay: Optional argument to specify the delay between steps in
milliseconds. The default is 10ms.
I haven't ported it to Linux yet. I'll do that in my "free time" after doing things for the day job.
Even if the IOPoint-USB isn't useful for any projects, you might find the example code useful as an example for how to drive a unipolar stepper. (Well, if you can figure out my C code.. ;-) )
Anyway, have fun with it. Hope someone finds it useful.
I'll be happy to answer any questions if there are any. I haven't had much interest in it so far. Looks like it will just end up being a one-of toy to drive some solenoid valves. I'm having fun playing with it on the bench in the lab. First chance I've had to play with super strong mosfet drivers.
Thanks,
Mark Stubbs
http://www.bibaja.com