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.