EasyDriver + Stepper motor + Arduino = nothing?

Hey everyone.

So I’m using an Arduino Uno, sparkfun Easydriver, and a wantai stepper motor I got at a local hobby shop.
Yet I can’t get absolutely anything to work!!

I’ve verified with my multimeter that the soldering was solid and my cables were in the right place multiple times.

I’m trying to power it all using a 9v battery that a guide said would work fine. I can step the motor back and forth by switching it all around manually so I know the motor works for sure.

One thing I’ve noticed is that in some tutorials online I see a little red LED light up on the easydriver board, for me I’ve never seen my board do that. I thought it meant it was broken at first so I bought another one but that didn’t fix the issue at all.

The stepper motor is a Wantai model 42BYGHW208

If anyone has some insight as to what I’m doing wrong I’d greatly appreciate it. Or if I missed some info I’ll easily put some more in.

using a 9v battery

If the 9V battery is one of those rectangular smoke alarm batteries it cannot provide enough current. Get a 12V power supply that can supply at least 1A.

Monitor the 9V battery voltage while trying to run the motor. Does the voltage drop?

These links may help
Stepper Motor Basics
Simple Stepper Code

If they, together with @groundFungus’ advice, do not solve your problem then post a link to the datasheet for your stepper motor.

…R

Ok so sorry for the late reply but I went and bought a 12v 3A power supply since groundFungus mentioned a 9v wouldn't work. And then I tried your example sketch and read up on some of the tutorial but still no luck. Everything is connected the way I think it should be. My multimeter guarantees everything is connected and soldered properly but still nothing. I'll post the datasheet link here if you can help.

(I'm using the 4 lead motor not the 6 lead)

Dean_Bean:
My multimeter guarantees everything is connected and soldered properly but still nothing.

I find they are not very intelligent :slight_smile:

Make a simple pencil drawing showing clearly how everything is connected and post a photo of the drawing. See this Simple Image Guide

Also post the program you are using to test the motor.

…R

So please ignore the horrid quality, I’m attempting to get fritzing working on my laptop as I write this so I will have a better sketch up soon if you need more quality
EDIT, I can’t see the image I uploaded using your guide. I’ll try to fix

and the code:

// testing a stepper motor with a Pololu A4988 driver board or equivalent
// on an Uno the onboard led will flash with each step
// this version uses delay() to manage timing

byte directionPin = 9;
byte stepPin = 8;
int numberOfSteps = 100;
byte ledPin = 13;
int pulseWidthMicros = 20;  // microseconds
int millisbetweenSteps = 250; // milliseconds - or try 1000 for slower steps


void setup() {

  Serial.begin(9600);
  Serial.println("Starting StepperTest");
  digitalWrite(ledPin, LOW);
  
  delay(2000);

  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
 
  digitalWrite(directionPin, HIGH);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros); // this line is probably unnecessary
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
  delay(3000);
  

  digitalWrite(directionPin, LOW);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    // delayMicroseconds(pulseWidthMicros); // probably not needed
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
}

void loop() {
}

Is the enable pin pulled LOW to enable the driver?

In the tutorial I'm using they didn't have me do anything with the enable pin, so nothing has been connected to it

so I made a fritzing schematic to help, I’ll try uploading it here

Screenshot (1).png

Dean_Bean:
So please ignore the horrid quality, I'm attempting to get fritzing working

Please don't bother with Fritzing - its pretty pictures are too easy to misunderstand. Just make a simple pencil drawing like I suggested in Reply #4

...R

I'm trying to power it all using a 9v battery that a guide said would work fine

Then I'd immediately assume everything else in that guide is similarly broken...

Robin2:
Please don’t bother with Fritzing - its pretty pictures are too easy to misunderstand. Just make a simple pencil drawing like I suggested in Reply #4

…R

Oh well I tried to upload the picture but when I used imgr it just didn’t work and when I tried attaching it the site said it’s too big…

Dean_Bean:
Oh well I tried to upload the picture but when I used imgr it just didn't work and when I tried attaching it the site said it's too big...

Then reduce its size. A 640 x 480 image should be sufficient.

...R

resized

IMG_20180730_120353.jpg

The Sparkfun EasyDriver hookup page. The "horse's mouth" so to speak.

Dean_Bean:
resized

It looks like you are drawing power for the motor from the Arduino. Don't do that.

You can power the Arduino and the motor from the same 12v supply but don't pass the motor power through the Arduino.

For testing it would be wise to power the Arduino separately from the motor, just to eliminate a potential problem. Just power the Arduino from the USB cable.

...R

Definitely don't route the motor power through the Arduino, its a humble logic board, not a
gnarly robust high current motor driver!

Take power direct to the motor driver, also route power to the Arduino, even better if you power
the arduino completely separately via USB for now to rule out any power spike/dip issues.

groundFungus:
The Sparkfun EasyDriver hookup page. The "horse's mouth" so to speak.

yes that was the first thing I tried, the reason I made this post to begin with.

yeah the reason I used a 9v battery was to power the motor seperately, then I heard it's best to just get a 12v supply to power the arduino and the motor from the arduino itself. But neither worked.