Electronic – how can i understand when a stepper motor get a complete round

stepper motor

i have just get out from an old printer a stepper motor and i'm experimenting with it and arduino and easydriver board.
the motors has 4 pin and 8 magnets. i can drive it correctly: i run it and change direction.
but now i just wondering the best solution to understand when it makes a complete round.

i've done a simple circuit: with a button i get it moving, when i press the button i reset a counter, when the button is pressed the counter is incrementing and then i realease the button the counter is saved. then i print the counter: more or less it is near 1600. this is empiric and for now it works. but: how to find out a precise value?

Best Answer

Stepper motors usually have a sensible number of steps per revolution, 100, 200, 400 are popular numbers. So my guess would be that 1600 is the precise value for your motor.

The way to check it is simply this:

for (i=0; i<400; i++)
{
    pause_ms(100);

    for (k=0; k<1600; k++)
        take_one_step();
}

Watch what happens. If the number is exactly 1600, then you'll simply see the motor rotate 360º 400 times, with a 0.1s pause between each rotation.

If the number was actually 1599, then you'd see the motor pausing at a slightly different place each time. And after 400 revolutions, would end up facing 90º from where it started.

Related Topic