Measuring Steppermotor Signals into Position and Velocity

Hey there Arduino Community,
I'm somewhat new to Aduino programming, so I don't know all the technical jargon.

What I want to create is a Program, that can measure the steps and the frequency of the pins of a microcontroller, that are meant to be sent to a stepper motor. And through that I want to calculate these numbers to distance and velocity.

As I understand stepper motors, the number of steps represent the distance travelled, and the frequency of the steps represents the velocity, right?

Is there any program that already calculates that? (ofc depending on other values like the kind of steppermotor and other parameters) I just can't find it online.

There is never a need because the program controlling the stepper already knows how many steps and how frequent. And those have NOTHING to do with distance or speed. Only rotation of the motor.

The AccelStepper library can work like that. Usually one would "home" the stepper using a switch of some sort. Move the motor till the switch is activated, set the current position to zero and call that the homed position. Then the library has the move() and moveTo() functions. The move() function is relative (move x steps from the current position). The moveTo() function will move the stepper to an absolute position. The library automatically keeps track of the position of the stepper (as long as no steps are missed). It is the responsibilty of the user to make sure that the motor has sufficient torque to never miss steps.

And, with the library, the speed of the stepper is specified (in steps per second). Also the acceleration can be specified. Steppers need acceleration to be able to reach higher speeds.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.