Hi all,
I have a stepper motor, Pandrive PD42-3-1141, documentation: http://www.trinamic.com/fileadmin/assets/Products/Drives_Documents/PD-1141_hardware_manual.pdf
I have connected pin 1 and pin 2 of the "Power and RS485 Connector" to a 24V powersupply (pin 1 to the - and pin to the + side of the power supply)
Furthermore, I have connected the Step/Direction Connector, pin 1 to the +5V op the arduino mega 2560, pin 3 (step) to pin 2 of the arduino board and pin 4 (direction) to pin 3 of the arduino.
When running the following program, absolutely nothing happens:
#include <AccelStepper.h>
#define STEPPER1_DIR_PIN 3
#define STEPPER1_STEP_PIN 2
AccelStepper stepper1(AccelStepper::DRIVER, STEPPER1_STEP_PIN, STEPPER1_DIR_PIN);
void setup()
{
stepper1.setMaxSpeed(200.0);
stepper1.setAcceleration(200.0);
stepper1.moveTo(1000);
}
void loop()
{
// Change direction at the limits
if (stepper1.distanceToGo() == 0)
stepper1.moveTo(-stepper1.currentPosition());
stepper1.run();
}
Additional info: running the stepper motor on USB, the motor itself runs just fine.
Can someone see what I'm doing wrong?
Many thanks!!!!
Stefan