Go Down

Topic: step motor control (Read 497 times) previous topic - next topic

jcrowe

hello,  Iam completly new to this so Thank you guys for your help!! i ave a nema 36 stepper motor that i would like to control like a servo.
for example i would like to let's say enter 90 in the serial moniter and have the stepper move from zero to 90 deg. can any one give ma a example of how to do this ?

PaulS

Quote
that i would like to control like a servo.
You can't. They are not interchangeable pieces of hardware.

Quote
for example i would like to let's say enter 90 in the serial moniter and have the stepper move from zero to 90 deg.
That is a completely different requirement. What you need to do is stop thinking in terms of angles and start thinking in terms of number of steps needed to get to some angle.

With a servo, it knows how far to move to get from where it is to where you tell it to be. With a stepper, it knows how to step. YOU must keep track of where it is, and tell it to step some number of times to get where you want it to be.

The Stepper library, and related AcellStepper and MultiStepper libraries, handle some of that for you. You still need to think in terms of steps, not angles, and how many steps are needed to get where you want to be.

Quote
can any one give ma a example of how to do this ?
The Stepper library comes with examples.
The art of getting good answers lies in asking good questions.

Go Up