Help with stepper and driver

Hi folks,

I bought a stepper motor ( 28BYJ48 ) with the LN2003 driver, unfortunately it didn't work with the built in library already installed in Arduino.

I had to look for another library which I think I found:

Unfortunately that didn't work for me. I am sure I wired everything like in the diagram and installed the library, and then uploaded the sketch. Anybody can help with this mottor? I just want to make it work, doesn't matter how.

THanks!

It works for lots of people, so you did something wrong.

If you want help, post the code, using code tags ("</> button), a diagram showing the exact wiring that you used (a clear photo would be helpful) and explain what happened when you tried to run the code.

Jremington thanks for your reply.

I will try to show it. This is the code:

#include <StepperMotor.h>

StepperMotor motor(8,9,10,11);

void setup(){
  Serial.begin(9600);
  motor.setStepDuration(1);
}

void loop(){
  motor.step(1000);
  delay(2000);
  motor.step(-1000);
  delay(2000);
}

The connection is like this one (I don't have a camera now):

Basically the mottor can't be connected wrong because there is only one way to connect it to the driver. Then IN1 goes to pin 8, IN2 to pin 9, IN3 to pin 10 and IN4 to pin 11.
And the driver - goes to ground, and + goes to +5v. I must say I have seen a different version of this driver with a trigger to switch it on or off, in my case there is no trigger. THere are just to extra pins that I have not used, above the 5volts - and + pins that I used to connect to arduino. So I don't know if the problem is there.

I have to explain too, that when I first installed the library I called the files libreria.h, libreria.cpp inside a folder called libreria. Then I realized the name was important and I changed it. Maybe all the trouble comes from not installing properly the library. Now I have a folder called StepperMotor with two files called StepperMotor.h and StepperMotor.cpp. When I go to Sketch, include library, and click on "StepperMotor" automatically the sketch includes the line:

#include <StepperMotor.h>

The folder and files are not inside c:program files/arduino/library

It is in user/documents/arduino/libraries

Nothing happens when I upload the sketch to arduino through the usb cable, the mottor doesn't move and the leds do not turn on.

From your photo it looks like you are powering the motor from the Arduino. Don't. Almost certainly it will overload the Arduino and may damage it.

Give the motor its own power supply - but make sure the driver board has a common GND with the Arduino.

...R

So now what I have to do is this?

1.- Connect 5 volts from a battery to the driver.

2.- Connect the ground to Arduino.

3.- Connect the usb to feed the arduino.

Is this correct?

What happens when you try to upload the program using the Arduino IDE? What error messages are printed?

It is likely that your library code and/or project code are in the wrong places, which depends on what type of computer you are using and how you installed the Arduino IDE. Here are some hints: How to organize my Arduino projects' structure for easy source control? - Arduino Stack Exchange

Google for others.

There are no error messages now, I got them before, not now.

I am going to read that link, thanks.

fernandobriatore:
So now what I have to do is this?

1.- Connect 5 volts from a battery to the driver.

2.- Connect the ground to Arduino.

3.- Connect the usb to feed the arduino.

Is this correct?

It is very difficult to make sense of even simple written wiring descriptions because I might make different assumptions from you.

Please make a pencil drawing showing the proposed connections and post a photo of the drawing..

...R