Communicate with stepper motors?
Dar Scott
dsc at swcp.com
Thu Aug 31 17:47:54 EDT 2006
On Aug 31, 2006, at 12:16 PM, Dar Scott wrote:
> You might have trouble with jitter and getting up to speed.
Stephen Barncard mentioned that you need ramping.
I think you can ramp with control from a serial port if you set a
specified delay in your circuit for the handshake. All you need to
do is repeat the same character several times. For example, suppose
you use the lower two bits of the character code to control a two
phase motor. Your forward stepping cycle could be "dfeg" allowing
those bits to be 0, 1, 2 and then 3. To ramp up and step forward a
total of 39 times you write this to the printer at one time (assuming
on g):
dddddffffeeeeggggdddfffeeeggddfegdfegdfegdfegdfegdfegddffeeggdddfffeeeeg
ggggd
Knowing your handshake time and the max acceleration and the max
speed, you can calculate the string before hand.
Now, if this is for more than tinkering, you might want some sort of
a controller with a serial interface (or an interface that looks like
serial).
If the timing of the oneshot for handshake makes you go so slow that
you don't need to ramp, then this is a lot easier. The motor is
slow, though.
If you simplify the handshake and don't have a delay, then you need
to ramp up by sending one character at a time and varying the delay
between characters. This will have a little bit of jitter at higher
speeds and can have problems if you approach the max speed of the motor.
My experience with stepper motors is mostly with scientific instruments.
Dar
More information about the use-livecode
mailing list