stepper motor positioning

My goal for this project is to have a stepper motor hooked up to my easy driver and that hooked to the arduino, I want to program the arduino to move the stepper motor to a certain position. I want to plot points on the stepper also so when I type 12 for example it moves to a certain point on the stepper. Any links of people doing similar or examples would be great.

Ennsjosh: My goal for this project is to have a stepper motor hooked up to my easy driver and that hooked to the arduino, I want to program the arduino to move the stepper motor to a certain position. I want to plot points on the stepper also so when I type 12 for example it moves to a certain point on the stepper. Any links of people doing similar or examples would be great.

This demo has simple code for controlling a stepper motor. It should work fine with an Easydriver.

You will need some method to set the starting position for the motor. The usual method is to turn the motor (with the Arduino) until it triggers a limit switch and then the Arduino can consider that position to be "zero"

I presume you have checked that the Easydriver can supply enough current for your motor.

Do NOT even think of powering the motor from the Arduino 5v pin. It needs a separate power supply, and the higher the voltage the better - up to the limit allowed by the Easydriver.

...R

My full plan for this involves an algorithm that runs every possible combination of a masterlock. I want to apply the algorithm to the stepper motor and it is a good start just to control the stepper via serial monitor

To get an absolute position for a stepper motor you need a starting point. A sensor at the "0" position would work, or you can trust the user (Don't trust users!) to always position the dial of the lock to 0 when it's inserted into the mechanism.

If you are trying every possible combination, it will still open it at some point, but you'd need to offset what it thinks the combination is with the last number when the lock opens, for example if it thinks the combination is 10-20-30 and the last number is actually a 40, the combination was really 20-30-40. This is probably the best bet anyway, unless you can fit the dial turner so that it can only go into the mechanism one way. Then you use a cam with a switch so that you can verify the 0 position. Probably this is a good idea anyway, so that you can track for possible missed steps. Sometimes those locks bind up a bit.

Ennsjosh: My full plan for this involves an algorithm that runs every possible combination of a masterlock.

I hope you own the lock, or have permission to do this ? ? ?

...R