-direction pin connected to Digital Pin 2
-step pin connected to Digital Pin 3
-Since I do not have a female DC barrel adapter right now(it's in the mail since I can't find anyplace near me that carries one), I have been powering the board through through the Arduino 5V pin, which I know is not the best idea but I wanted to get this thing working.
From the schematics of the motor I have the green and red wires connected to Motor A and yellow and blue wires connected to motor B. I have tried switching the two around with no luck and other types of combinations with no luck.
The code that I am currently using has come from the Arduino Cookbook. Driving a Bipolar Stepper Motor (Using EasyDriver Board). I have the code exactly the way they do with my setup the same way that they do except for how I am receiving my power.
How the code works is that you input a numerical value followed by a + or - and it should drive the motor forwards or backwards depending on what you put in it.
For some reason I cannot get the motor to turn, any thoughts or ideas?
Right now what I am using for the power supply for the Arduino is the usb cable connected to my laptop. The EasyDriver is being powered from the 5v pin from the arduino board.
The rest of the circuit goes as follows. I have 2 wires going from Pins 2 and 3 from the Arduino board to the EasyDriver Board for the step and direction. The Wire that is connected to pin 2 on the Arduino board is connected to Dir (which controls the direction) and the wire that is connected to pin 3 is connected to Step.
Now for the motor, I included the link to the motor in the OP which has another link for the data sheet(it seems like the data sheet is in chinese so I uploaded the pdf). From my limited understanding of it, the wiring diagram is telling me that the green and red wires go together and the yellow and blue wires go together. Which I then hooked up the green and red wires to Motor A on the EasyDriver and yellow and blue wires to Motor B on the EasyDriver.
Now for the code that I have you are suppose to input the speed and direction of the motor in serial port. Whenever I do nothing happens, the motor does not move and I am puzzled for how to solve the problem.
That's not going to work, USB can only supply 500mA max (and many computers won't even give you that unless the USB client does the correct power negotiations (which I believe the Arduino does not do - anyone know this for sure). You're just going to overload the USB supply or polyfuse on the Arduino - You want a proper power supply for the Stepper and driver, several amps at least.
Its always a good idea to keep logic and motor power supplies separate unless you know your motor can't overload its supply and you provide extra protection and decoupling between motor and logic circuitry...
I would use a considerably higher voltage than 5V to power the stepper. It is generally recommended to use a voltage 4-20x the rated voltage of the motor with a chopper type driver (which the Easy Driver is).
I have exactly the same problem.
THe motor and easydriver work with the simple sample that I downloaded from the Sparkfun site.
I use a 12 Volt power supply through arduino.
As I understand it I should be able to type in the Serial Monitor a number between 0 and 9 to change the speed
One of the things that I am wondering about is can I still connect the arduino to the USB cable to send commands while it is hooked up to the 12 Volts?
Does exclude the other?
or is there another reason why it doesn't work.
I am using a Stepper Motor - 68 oz.in (400 steps/rev)
Yankee:
I would use a considerably higher voltage than 5V to power the stepper. It is generally recommended to use a voltage 4-20x the rated voltage of the motor with a chopper type driver (which the Easy Driver is).
The EasyDriver also requires at least 7V to function so giving it 5V is never going to do anything.
You can power the Arduino from USB while powering the EasyDriver from a separate 12V or whatever supply,
just be sure to common grounds and power up the Easy Driver before the Arduino. You can also provide
12V to the Vin pin on the Arduino if you lack a barrel-plug, although this bypasses the protection diode.
Be really careful not to plug 12V to the 5V pin of course, and don't try to power the Arduino Vin with higher
than 12V