Stepper motor problem

Hi everyone. I just bought a stepper motor. In the internet, I can find how to control the speed and direction of the stepper motor, but what I really want to do is using a potentiometer to control the stepper motor angle. It means that the stepper motor will rotate the same angle as I rotate my potentiometer. My stepper motor model is 28BYJ-48 12V, the driver is ULN2003. May I know how I can write the code to achieve the above functions?

One more thing is for the other stepper motor. There are four wires, respectively they are A+,B+,A-,B-. May I know how I can connect it to the arduino board and how the code will be different from the above 28BYJ-48.

Thanks everyone!!!

In the IDE, open Examples, Starter kit, project 5, as starting point.

That's for a Servo instead of a Stepper motor, so you'll have to replace the Servo commands with Stepper motor commands.

Think in terms of the error between the desired position and actual position, and arrange that you cannot generate steps too quickly for the motor however large the error is.

Hi

Look here for pot stepper and 2003

http://arduino.cc/en/Tutorial/StepperUnipolar

Use part of pot control code from this tuto.

The second one: stepper motor with 4 wires, sound like a bipolar motor (28BYJ-48 12Vis a unipolar) Not a great driver this 2003 for the job. For this one a L298, l9110 or better a A4988 based driver. But you need to know technical info about it: voltage, amperage to get the correct driver.

Yes the 4-wire stepper is bipolar - what is the winding resistance and current rating?

MarkT: Yes the 4-wire stepper is bipolar - what is the winding resistance and current rating?

Hi.

looks like EPSON printer stepper motor, EM-XXX series. Got some of them. All with 24V rated and resistance... I could check here too. Or this one: http://www.compucanjes.com/manuales/SST41D.pdf or http://www.tnet.com.au/~lion/Electric_Motors.htm

EM-400

For the 4 wire stepper have a look at stepper motor basics.

…R

Thanks all. I just solved the first question. The reaction for the stepper motor is really a bit slow.

For the bipolar stepper motor, the only information that I get is operating voltage is 5V and current is 0.6A

tobbykan: For the bipolar stepper motor, the only information that I get is operating voltage is 5V and current is 0.6A

The important piece of data is the current. How to use it is explained in stepper motor basics.

...R

tobbykan: Thanks all. I just solved the first question. The reaction for the stepper motor is really a bit slow.

For the bipolar stepper motor, the only information that I get is operating voltage is 5V and current is 0.6A

So we have the current rating, but you haven't measured the winding resistance yet? With bipolar motors any voltage specification is usually bogus, trust only the current and resistance specs. Since bipolars are usually driven with current control the voltage is the least important thing.