4 lead stepper motor SKU 0503

If you mean this then that explains the problem. That demonstration is using a completely different style of driver (ULN2003). That driver uses four connections to the Arduino, not the 2 connections of the DRV8255… If that’s what you mean by ‘plug directly’ to the Arduino then there is no problem with using it exactly as described in that video - the driver that he uses provides a suitable interface. The only problem is that the Arduino 5v supply might not be sufficient to power the motor, but your motor is very small and might work OK off the Arduino 5v supply.

But you can’t bypass the controller and connect the stepper directly to the Arduino.

The code in that example will not work with the DRV8255 controller - for that controller you need code that drives the stepper using step and direction.

1 Like

Hi Jeff
Without looking it up I think the ULN2003 uses a Darlington array and is OK for small 5 or 6 wire steppers. Will not suit 4 wire units.
Cheers Bob

1 Like

Hello everyone,

Sorry I didn’t post today but I have the same problem and nothing has changed.

Did you have any luck on the weekend with it James?

It just doesn’t make sense that it runs perfectly with a standalone Arduino and no matter how I connect the stepper wires to the module it just jitters ( I know someone will come back and say voltage but a 9 volt battery is enough)

It runs from 5 volts re: Arduino alone.

I want to buy a large order of these but I can’t unless this problem is solved.

James, I would be open to trying a different motor controller if you think that would do the trick because maybe they are just not compatable.

Please help guys.

Hi David,

Do you have some photos of how you have it setup as a whole?
While a charged 9V battery will have enough voltage to power it, I would say there isn’t enough current to get it moving.

Identifying each key component in the system and making sure that it isnt a bottleneck should help track down the issue.
What power source were you using? As mentioned before a 12V source that is capable of outputting atleast 400mA (given the coils have a 30ohm impedance)
Is everything definitely hooked up correctly? The DRV8825 works differently to most other stepper drivers and requires a step and direction signal to be sent rather than signals for the individual coils
Is the code on the Arduino for the correct driver? Sending the incorrect signal will not move the motor and can cause that jitter.

I dont think the motor controller itself is at fault, I would imagine there is something else in the system that is the downfall. As Bob mentioned before is a stepper the most appropriate motor in this case? Even a continuous servo would be perfect and they are extremely simple to use.

1 Like

As I said a 5volt Arduino runs it perfectly

And… a servo will always have jitter on start up so, that is not ideal by any means for the reason if the project will be reused over again it will eventually be out of sync and cause catastrophic damage to the project( hence why photo copiers and CNC machines use stepper motors for precision)

I can send photos of how I wired it and my sketch…

I cannot run the risk of using just the Arduino Uno to run this incase I burn it out.

Can someone please reply to this that actually has used this stepper motor with the driver and has got it working smoothly?

Thanks

Hi David

You may have already contributed to that. Read my previous reply regarding cumulative damage to electronic components.

4 days ago BryceT posted a reply to with a link to aweb site. Yesterday I had a look at that link and really it explains in detail the set up and wiring of your driver board with Arduino and stepper. Almost in words of one syllable. Have you looked at this??? I don’t see how one could go wrong if these instructions are followed closely. The site has some demo sketches to check all is well.

A couple of things stand out.
You say the stepper makes some jittering noise. So something is happening.
Your 9V battery, although may measure 9V under no load it may not supply enough current to move the stepper.
I note that the driver board has current limit. Have you carried out the procedure to set this. It could be possible this is shipped with this setting at or close to minimum and the board itself is not providing the current to move the motor.

As I said I think if you followed that link closely I don’t see anything to stop this working except for your motor supply (you say 9V).

I would suggest the first thing to do at this stage is check your supply and make sure it will deliver enough current. Liam suggests 400mA, I would personally go a bit further and go for 1A. At this stage the voltage is not terribly critical. Most anything from about 6 to 12V should get it working.

Just so you don’t go in circles I suggest you change your Arduino pins in case the ones you have been using have been damaged. You only need 2, one for step and one for direction. That has been stated several times now.
Cheers Bob

2 Likes

Hi David,

Definitely go with Bobs advice here making sure to use a PSU with >>400mA and changing the pins, could you please include your code as well :smiley:
I have used the big easy drivers in previous projects and the DRV8825 has the exact same working principals.

FYI: the main reason a stepper is used is not because of the jittering but the discrete and accurate steps in an open loop regime, once you find the initial conditions of the system it will know exactly where it sits, without the system being powered it has a greater chance of the positions.

1 Like

Thanks for your advice but we keep going around in circles…

If the Arduino will run it perfectly a 9 volt adaptor or battery would also work.

Bryce is going to try hook it all up today and walk me through it because I have tried everything in the forum.

Thanks.

That’s not correct. The 8825 driver requires a minimum of 8.25v is order to be able to supply 5v for the logic and to manage the motor drivers.

Also, since driving a stepper directly from an Arduino is something that no-one ever does, any conclusion about what it means for driving the stepper in some other way would be just guesswork.

2 Likes

Hey @David84410,

Below is the code that I used in this video. Please note that you’ll likely need to adjust the trimpot on the top of the driver to limit the current so that your motor doesn’t get too hot (~5W seems to go quite nicely so 9V at ~500mA would be my recommendation):

// Define pin connections & motor's steps per revolution
const int dirPin = 2;
const int stepPin = 3;
const int stepsPerRevolution = 200 * 100;

void setup()
{
  // Declare pins as Outputs
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  Serial.begin(9600);
}
void loop()
{
  // Set motor direction clockwise
  digitalWrite(dirPin, HIGH);

  // Spin motor slowly
  for(int x = 0; x < stepsPerRevolution; x++)
  {
    Serial.println("Spinning...");
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(5);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(5);
  }

  delay(10000);
}

Given that this motor after gearing only turns 0.18° per step it takes a full 20,000 steps to rotate. If you have any other questions please let me know. This driver works quite well for this motor from what I found, attached is a silent video of this running below:

I apologize in advance for the lighting, it is rotating, just very slowly, viewing this in 1080p is the clearest resolution I could shoot in from the desk. All the best with your project!

2 Likes

Thankyou Bryce it’s working…

It did jitter but once I turned the pot to the far left it worked…

Thankyou Everyone for your patience.

Just one last thing…

I am happy with the speed for this project but.

Can some please modify the code to make it faster? It doesn’t matter if its not perfectly smooth I just need a way to make it faster and I don’t know how to change the code myself to do that

Sounds like the current limit was working.

2 Likes

What am I doing wrong? Is this code designed to spin just the one direction?

Have I possibly imputed the aa and BB leads in the wrong order?

If this code is written to go in one direction could someone please adjust it to make it go one revolution forward and one revolution backwards please

Go back 4 days to the link in BryceT reply

1 Like