Stepper Motor Issues

I’m encountering issues when trying to control a STP-DRV-6575 stepper motor with a STP-DRV-6575 stepper driver connected to an Arduino. This motor is specified to rotate 1.8 degrees per step, which should translate to 200 steps per revolution when full stepping is enabled on the driver. I first tested the stepper motor using the test mode available on the stepper driver and everything was working fine, with the motor rotating and changing directions just fine. This test was performed without any connections made to the Arduino, proving that the connections made between the stepper motor and the driver are correct.

I’m encountering problems when trying to control the motor by connecting the Arduino to the stepper driver. When running the “stepper_oneRevolution” sketch, the motor spins and changes direction, but only rotates a quarter of a revolution instead of a full revolution. I double-checked the DIP switches on the driver and it is set to the full stepping (200 steps/revolution) mode. I then tried the “stepper_oneStepAtATime” sketch and encountered the same behavior. When looking at the IDE terminal outputs, I only get one step on the motor for every four outputs to the terminal. The “stepsPerRevolution” constant was set to 200 in both cases. These are just the standard sketches included with the Arduino IDE in the “Stepper” folder. Does anyone know what is going on here?

In terms of the controller, I am using an Arduino Mega 2560. The DIR+ terminal on the stepper driver is connected to PIN 8 of the Arduino. The STEP+ terminal is connected to PIN 10 of the Arduino. These are both PWM outputs on the Mega. The DIR- and STEP- terminals are connected to the Arduino ground. I’m thinking this might be a connection issue between the Arduino and the stepper driver, but I’m not sure.

Documentation regarding making connections to the stepper driver can be found on Page 31 of this manual.


The Arduino stepper lib. doesn't work well (or at all) with step / dir drivers, try the AccelStepper lib.

if you go to the DFRobotic web site you will find sample codes under their dual stepper driver shield what you need to do is adjust the number of pulses you send i.e. the highs and lows and the delay time between them you can write your own code no library needed use a for loop and put step high step low pulses in the loop and changing how many times it loops gives you 1..2..etc rotations of the motor.. the direction pin uses another output you can make high or low to control cw or libraries are needed and you don't use the PWM feature digitalWrite 10 high followed by digitalWrite 10 low make it loop 2000 times to try adjust as needed

This Simple Stepper Code should be suitable for testing. It does not use any library.

Stepper Motor Basics