Hey guys I feel like I am just missing something and seems to easy. So just trying to run a stepper motor with my Adafruit Feather M0 wifi attached to a DM542T driver running a 24V stepper motor. Testing with a basic stepper motor driver off amazon it works just fine but trying to run it off the driver with my feather is just not working no matter what I have tried and really lost count with all I have tried.
Here is my setup:
- AdaFruit Feather M0 wifi - https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/
- DM542T Stepper Driver - https://www.omc-stepperonline.com/digital-stepper-driver-1-0-4-2a-20-50vdc-for-nema-17-23-24-stepper-motor-dm542t
- Kamoer Peristalic Pump stepper motor 24V - (KPHM400-ST3B25)
Here is how I have it connected currently:
- Feather pin 10 > DM542T - PUL+
- Feather pin 11 > DM542T - DIR+
- Feather pin GND > DM542T - PUL-/DIR-
- DM542T GND > 24V -
- DM542T +Vdc > 24V +
- DM542T - A+ - Stepper Red
- DM542T - A- - Stepper Yellow
- DM542T - B+ - Stepper Orange
- DM542T - B- - Stepper Brown
** Keep in mind on the stepper connections I just matched up what works with the stepper driver I tested with first that I know works with the same power supply and motor
Here is the basic code I am trying to just get it to turn:
//
// Stepper Pump Motor PHR-6
// A+ = Red Wire (PIN 6)
// A- = Yellow Wire (PIN 4)
// B+ = Orange Wire (PIN 3)
// B- = Brown Wire (PIN 1)
//
#include <AccelStepper.h>
// Define a stepper and the pins it will use
AccelStepper clstepper(AccelStepper::DRIVER, 10, 11);
void setup()
{
// Change these to suit your stepper if you want
clstepper.setMaxSpeed(2000);
clstepper.setSpeed(1000);
}
void loop()
{
clstepper.run();
}
