Stepper motors do not always use the same colors so you need to find the datasheet for your motor or get a meter and test the wires to find out what is what. Test between each wire and the other three and between each two wires. write down what you get and come back with the info.
Stepper motors do not always use the same colors so you need to find the datasheet for your motor or get a meter and test the wires to find out what is what. Test between each wire and the other three and between each two wires. write down what you get and come back with the info.
Ok, fair enough but even if I know which wire is which on my motor, in the schematic I posted earlier http://arduino.cc/en/Reference/StepperBipolarCircuit it doesn't say which wire I should connect to the pin 1-2-3-4
As you can see from the schematic, the wires are really two pairs that are "connected to each other ) Actually two coils each with two ends.
What you have to figure out is which of the four wires belongs to the two pairs. You can do that by measuring the resistance between the four wire ends. The two wires in a pair have zero (or almost zero) resistance.
When you know the two pairs you can easily connect the 4 wires by trial and error. If you connect them wrong the stepper motor will not step correct but it wil be more like "rocking back and forth".
If any information is printed on the stepper, tru to google it, this might giev you a link to a datasheet with detailed information.
Thank you MikMofor your answer! How can you measure the resistance between the four wire ends if I don't know how to drive the motor because I don't know which wire is which yet?
No the motor does not need to be powered to measure the resistance. Actually it should not be powered.
You simply meassure the resistance between two of the 4 wires. two of the posible pairs should have zero resistance and the other two should have infinite resistance.
You really don't need to meassure resistance, it's just one way to do it you could just check continuity, with the "continuity beep" function that most meters have. you just want to figure out which of the 4 ends are connected.